diff --git a/.github/workflows/ari-apis.yml b/.github/workflows/ari-apis.yml new file mode 100755 index 00000000..c43932ab --- /dev/null +++ b/.github/workflows/ari-apis.yml @@ -0,0 +1,34 @@ +name: ARI4Java ARI APIs PR + +on: + schedule: + - cron: '0 10 * * SAT' + workflow_dispatch: + +jobs: + getApis: + runs-on: ubuntu-22.04 + + steps: + - uses: actions/checkout@v4 + + - name: Execute getApis + run: | + cd codegen + chmod +x getApis.sh + ./getApis.sh + + - name: Create Pull Request + id: cpr + uses: peter-evans/create-pull-request@v6 + with: + commit-message: ARI API Updates + branch: apis + delete-branch: true + title: ARI API Updates + body: New APIs + + - name: Check outputs + run: | + echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" + echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" diff --git a/.github/workflows/ari-versions.yml b/.github/workflows/ari-versions.yml new file mode 100755 index 00000000..cc5df914 --- /dev/null +++ b/.github/workflows/ari-versions.yml @@ -0,0 +1,33 @@ +name: ARI4Java ARI Versions Wiki Update + +on: + schedule: + - cron: '0 10 * * SAT' + workflow_dispatch: + +jobs: + getApis: + runs-on: ubuntu-22.04 + + steps: + - name: Checkout Project + uses: actions/checkout@v4 + - name: Checkout Wiki + uses: actions/checkout@v4 + with: + repository: ${{github.repository}}.wiki + path: codegen/tmp/wiki + + - name: Execute getVersions + run: | + cd codegen + chmod +x getVersions.sh + ./getVersions.sh + + - name: Push Wiki + run: | + cd codegen/tmp/wiki + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" + git add . + git diff-index --quiet HEAD || git commit -m "Update Versions" && git push diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml new file mode 100755 index 00000000..7ec339f5 --- /dev/null +++ b/.github/workflows/gradle.yml @@ -0,0 +1,46 @@ +name: ARI4Java Build + +on: + push: + branches: + - master + pull_request: + branches: + - master + release: + types: [published] + +jobs: + build: + runs-on: ubuntu-22.04 + + steps: + - uses: actions/checkout@v4 + - uses: actions/cache@v4 + with: + path: ~/.gradle/caches + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} + restore-keys: | + ${{ runner.os }}-gradle- + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + distribution: 'zulu' + java-version: '17' + - name: Grant execute permission for gradlew + run: chmod +x gradlew + - name: Build with Gradle + run: ./gradlew clean :codegen:runCodegen build + if: github.event_name != 'release' + - name: Build & Publish with Gradle + env: + BUILD_NUMBER: ${{ env.GITHUB_RUN_NUMBER }} + BINTRAY_USER: ${{ secrets.BINTRAY_USER }} + BINTRAY_KEY: ${{ secrets.BINTRAY_KEY }} + run: ./gradlew clean :codegen:runCodegen buildProps build publish jreleaserDeploy + if: github.event_name == 'release' + - name: Archive Reports + uses: actions/upload-artifact@v4 + with: + name: report-folder + path: build/reports diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 index b6f70359..c635799c --- a/.gitignore +++ b/.gitignore @@ -1,12 +1,8 @@ *.class -# Package Files # -*.jar -*.war -*.ear - ari4java/* -build/* +build/ +bin/ dist/* nbproject/* libs/* @@ -17,8 +13,27 @@ build.xml /.settings /.classpath /.project -/.gradle +.gradle/ +/.nb-gradle +/.directory +.idea/ # macbook .DS_Store +# ignore generated code artifacts - they will be rebuilt by gradle as needed +src/main/generated/ +src/main/resources/build.properties +codegen/tmp/ +codegen/versions.md + +# vagrant state folder +.vagrant + +# local build +.inc-examples +oss.yaml +# exclude keys +examples/vagrant/asterisk/keys/*.key +examples/vagrant/asterisk/keys/*.crt +examples/vagrant/asterisk/keys/*.csr diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100755 index 00000000..12b82415 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,222 @@ +# ARI4Java Changelog + +## [Unreleased] +[Unreleased]: https://github.com/ari4java/ari4java/compare/v0.17.0...HEAD + +## [0.18.0] - 2026-01-26 +[0.18.0]: https://github.com/ari4java/ari4java/compare/v0.17.0...v0.18.0 + +### Added +- Connection Pooling using Netty's FixedChannelPool +- Examples have a Docker provider for Vagrant (in order to work around VirtualBox compatibility on Apple Silicon) +- `AriVersion.ARI_10_0_0` + +### Changed +- :exclamation: Changed java compatibility to Java 17 in preparation for Jackson 3 which will be in the next release +- Library updates +- Cannot wait for connection close due to using connection keep-alive (aka pooling) +- Some methods in the Examples use the async approach + +## [0.17.0] - 2024-02-24 +[0.17.0]: https://github.com/ari4java/ari4java/compare/v0.16.0...v0.17.0 +### Added +- `AriVersion.ARI_8_0_0` +- `AriVersion.ARI_9_0_0` + +## [0.16.0] - 2022-06-11 +[0.16.0]: https://github.com/ari4java/ari4java/compare/v0.15.0...v0.16.0 +### Added +- `AriVersion.ARI_4_1_4` +- `AriVersion.ARI_6_0_1` +- `AriVersion.ARI_7_0_1` + +## [0.15.0] - 2021-12-26 +[0.15.0]: https://github.com/ari4java/ari4java/compare/v0.14.0...v0.15.0 +### Changed +- Library updates +- Refactoring test to use JUnit 5 + +### Fixed +- Map `local_ssrc` & `remote_ssrc` in `RTPstat` model to `Long` instead of `Integer` #180 + +## [0.14.0] - 2021-10-24 +[0.14.0]: https://github.com/ari4java/ari4java/compare/v0.13.0...v0.14.0 +### Fixed +- ARI API resource inconsistency due to using git history on `resource.json`, now git tags (aka released versions) are used + +## [0.13.0] - 2021-08-14 +[0.13.0]: https://github.com/ari4java/ari4java/compare/v0.12.2...v0.13.0 +### Changed +- Library updates + +### Added +- `AriVersion.ARI_8_0_0` + +## [0.12.2] - 2021-03-25 +[0.12.2]: https://github.com/ari4java/ari4java/compare/v0.12.1...v0.12.2 +### Changed +- groupId changed from `ch.loway.oss.ari4java` to `io.github.ari4java` + +### Added +## [0.12.1] - 2020-09-23 +[0.12.1]: https://github.com/ari4java/ari4java/compare/v0.12.0...v0.12.1 +### Added +- ARI 4.1.3, 5.1.1 & 7.0.0 + +## [0.12.0] - 2020-06-24 +[0.12.0]: https://github.com/ari4java/ari4java/compare/v0.11.0...v0.12.0 +### Fixes +- onFailure long after WS Connect error #156 +- execute shutdown immediately #159 + +### Added +- WS reconnect count #158 + +## [0.11.0] - 2020-03-21 +[0.11.0]: https://github.com/ari4java/ari4java/compare/v.0.10.0...v0.11.0 +### Added +- Unit tests to increase coverage #11 +- New ARI binding + +## [0.10.0] - 2020-02-23 +[0.10.0]: https://github.com/ari4java/ari4java/compare/v0.9.1...v.0.10.0 +### Fixed +- UnsupportedOperationException #15 +- Javadoc warnings #149 +- If Url doesn't end with a slash add one #150 +- Set `codegen` and `examples` to Java8 compatibility +### Added +- toString for generated model if there is an `id` or `name` field +- `AriWSHelper` class for convenient `onMessage` methods for each type #23 +- Script to map Asterisk versions to ARI version + +## [0.9.1] - 2020-02-23 +[0.9.1]: https://github.com/ari4java/ari4java/compare/REL-0.9.0...v0.9.1 +### Added +- Test connection when creating ARI #19 +### Fixed +- Mistakenly removed the http aggregator + +## [0.9.0] - 2020-02-20 +[0.9.0]: https://github.com/ari4java/ari4java/compare/REL-0.8.1...REL-0.9.0 +### Added +- SLF4J Logger +- Connection timeouts #85 #86 +- Body JSON using Jackson #135 +- WebSocket Connection Events #103 +- Support SSL, 150MB limit for `ActionRecordings.getStoredFile()` + +## [0.8.1] - 2020-01-25 +[0.8.1]: https://github.com/ari4java/ari4java/compare/REL-0.8.0...REL-0.8.1 +### Changed +- Exception messages #6 +### Fixed +- Java 8 Compatibility #142 + +## [0.8.0] - 2019-12-23 +[0.8.0]: https://github.com/ari4java/ari4java/compare/REL-070...REL-0.8.0 +### :exclamation: **!! BREAKING CHANGES !!** +- API Actions signatures only contain manditory params and returns a Request object which follows the builder/factory pattern + +## [0.7.0] - 2019-12-22 +[0.7.0]: https://github.com/ari4java/ari4java/compare/REL-061...REL-070 +### Fixed +- Treat `fields` as `fields` not `variables` in body parameters +- fix `ActionRecordings.getStoredFile()` for `byte[]` & add `ARI.mailboxes()` + +## [0.6.1] - 2019-11-07 +[0.6.1]: https://github.com/ari4java/ari4java/compare/REL-060...REL-061 +### Fixed +- Codegen bug fixes for object + +## [0.6.0] - 2019-10-15 +[0.6.0]: https://github.com/ari4java/ari4java/compare/REL-051...REL-060 +### Change +- Project restructure +- Script to include all past and present versions of ARI + +## [0.5.1] - 2019-10-15 +[0.5.1]: https://github.com/ari4java/ari4java/compare/REL-050...REL-051 +### Fixes +- Various fixes (Goodbye Naama!) + +## [0.5.0] - 2019-01-07 +[0.5.0]: https://github.com/ari4java/ari4java/compare/REL-045...REL-050 +### Added +- Support java 9 (#108) +- code generation from gradle(#110) +- event interface inheritance(#106) +### Fixed +- unsubscribing from application correctly(#59) + +## [0.4.5] - 2017-12-19 +[0.4.5]: https://github.com/ari4java/ari4java/compare/REL-044...REL-045 +### Added +- ARI 3.0.0 (#78) + +## [0.4.4] - 2017-02-04 +[0.4.4]: https://github.com/ari4java/ari4java/compare/REL-043...REL-044 +### Added +- ARI 2.0.0 (#62) +### Changed +- quicker deserialization (#63) + +## [0.4.3] - 2016-11-30 +[0.4.3]: https://github.com/ari4java/ari4java/compare/REL-042...REL-043 +### Fixed +- Graham's AutoReconnect patch - #60 + +## [0.4.2] - 2016-10-21 +[0.4.2]: https://github.com/ari4java/ari4java/compare/REL-041...REL-042 +### Fixing + - URL Prefix regression #57 + - Findbugs string concatenation #55 + +## [0.4.1] - 2016-10-17 +[0.4.1]: https://github.com/ari4java/ari4java/compare/REL-040...REL-041 +### Added +- Graham's AutoReconnect patch #52 + +## [0.4.0] - 2016-08-31 +[0.4.0]: https://github.com/ari4java/ari4java/compare/REL-034...REL-040 +### Added +- ARI 1.10.0 (Asterisk 14) +### Fixed +- some bugs + +## [0.3.4] - 2016-01-30 +[0.3.4]: https://github.com/ari4java/ari4java/compare/REL-033...REL-034 +### Added +- ARI 1.9.0 + +## [0.3.3] - 2015-09-23 +[0.3.3]: https://github.com/ari4java/ari4java/compare/REL-022...REL-032 +### Added +- 201 statuses (bug #33) + +## 0.3.2 - 2015-09-23 +### Added +- ARI 1.8.0 (bug #32) + +## 0.3.1 - 2015-03-20 +### Fixed +- Disconnected ARI WS now throws an exception (bug #28) + +## 0.3.0 - 2015-03-11 +### Added +- ARI 1.7.0 (bug #28) + +## [0.2.2] - 2014-11-09 +[0.2.2]: https://github.com/ari4java/ari4java/compare/v011...REL-022 +### Added +- ARI bindings for 1.5.0 as coming from the official Asterisk 13.0.0 release +- Added a minimal application under tests/ class ch.loway.oss.ari4java.sandbox.sample to be used as a style laboratory + +## [0.1.1] - 2013-12-31 +[0.1.1]: https://github.com/ari4java/ari4java/commits/v011 +### Added +- Netty.io based HTTP and WebSocket implementation, factory, sync and async methods +- Imported the definitions for Asterisk 12.0.0 - ARI 1.0.0 +- All objects are deserializable right out of JSON automatically +- Auto-generates all classes and compiles them +- Gradle build script diff --git a/GETTING_STARTED.md b/GETTING_STARTED.md deleted file mode 100644 index 65d80d89..00000000 --- a/GETTING_STARTED.md +++ /dev/null @@ -1,32 +0,0 @@ -Getting started with ari4java (and ARI in general) is not that easy. This is because there are many moving parts involved: - -* An Asterisk server -* A specific configuration for Asterisk -* ari4java itself - -In order to reduce the cost of getting up and running, we thought of providing a pre-configured Docker image that runs Asterisk, -and an example that you can run yourself though an IDE. - -## Getting the Docker image - -This is quite easy - first you will have to install Docker; when it's up, you can then do a: - - docker run -p 18088:8088 -P -d lenz/asterisk-load-test-13 - -to run a Docker image with Asterisk 13 and bind its ARI port to local port 18088. - - -## Running your first ari4java program - -We have a very simple stub that: - -* Creates a a bridge -* Originates a call -* Monitor events for 20 seconds -* Destroys the bridge - -and that shows what it is doing on stdout. In order to run it, you just have to edit the credentials in ConnectAndDial.java. - - - - diff --git a/LICENSE b/LICENSE old mode 100644 new mode 100755 diff --git a/NEWVERSION.md b/NEWVERSION.md deleted file mode 100644 index 8aff44ca..00000000 --- a/NEWVERSION.md +++ /dev/null @@ -1,19 +0,0 @@ -When adding a new version of the ARI: - -- Copy the files from "Asterisk/rest-api/api-docs" to the right folder under "codegen_data" -- Add the ARI version in run.java under the code generator -- Create folders like "generated.ARI_1_2_3", "generated.ARI_1_2_3.actions" and "generated.ARI_1_2_3.models" - or the code generator will fail -- Run the code generator - -In the main source tree: - -- create the version to be used in AriVersion.java - - - -(Obsolete) - -- in ARI.java, edit the build() function to get you the correct objects - - diff --git a/README.md b/README.md old mode 100644 new mode 100755 index 8090e59b..441d6228 --- a/README.md +++ b/README.md @@ -1,14 +1,14 @@ -ari4java -======== +# ARI4Java The Asterisk REST Interface (ARI) bindings for Java. - [ ![Download](https://api.bintray.com/packages/lenz/maven/ari4java/images/download.png) ](https://bintray.com/lenz/maven/ari4java/_latestVersion) +![Maven Central](https://img.shields.io/maven-central/v/io.github.ari4java/ari4java) +[![javadoc](https://javadoc.io/badge2/io.github.ari4java/ari4java/javadoc.svg)](https://javadoc.io/doc/io.github.ari4java/ari4java) +[![Build](https://github.com/ari4java/ari4java/actions/workflows/gradle.yml/badge.svg?branch=master)](https://github.com/ari4java/ari4java/actions?query=workflow%3A%22ARI4Java+Build%22) -Description ------------ +## Description -ARI is an interface available on Asterisk 12/13 that lets you write applications +ARI is an interface available on Asterisk 11+ that lets you write applications that run externally and control call flow through REST calls while receiving events on a websocket. @@ -16,184 +16,33 @@ In order to support different versions of the API, what we do is we maintain con for each version of the API, but we also have general interfaces that are used to work with objects across different versions. -**Getting started?** +### Getting started -* Start from the "Hello ARI World" tutorial at https://github.com/l3nz/ari4java/blob/master/docs/HELLOWORLD.md -* Read our FAQs at https://github.com/l3nz/ari4java/blob/master/docs/FAQ.md -* Want to run a ready-made Asterisk image? This will make your life easier when developing! get - yours from https://github.com/l3nz/whaleware/tree/master/examples/asterisk-load-test +Simply add the library and an SLF4J logger to your package config, here is an example using Gradle +``` +repositories { + mavenCentral() +} +dependencies { + implementation 'io.github.ari4java:ari4java:+' + implementation 'ch.qos.logback:logback-classic:1.5.26' +} +``` -**Tip:** join [our ari4java Google+ group](https://plus.google.com/u/0/communities/116130645492865479649) for news, help and plain bouncing of ideas around. +Due to the sun setting of JCenter the jar is now publish through Sonatype to Maven Central but under a new groupId. +Since 0.12.2 the groupId is now `io.github.ari4java` make sure you update your build files if you used `ch.loway.oss.ari4java`. -Using the library -================= +## Documentation +- The [CHANGELOG](https://github.com/ari4java/ari4java/blob/master/CHANGELOG.md) +- The [Wiki](https://github.com/ari4java/ari4java/wiki) has some more info on how to use the project + - [Getting Started](https://github.com/ari4java/ari4java/wiki/Getting-Started) + - [Examples](https://github.com/ari4java/ari4java/wiki/Examples) -If you use Gradle (or any tool using Maven dependencies) you can simply declare the lib as: +## Development +Please find the [Development Wiki](https://github.com/ari4java/ari4java/wiki/Development) - - repositories { - mavenCentral() - mavenRepo(url: 'http://jcenter.bintray.com') - } - - - dependencies { - compile 'ch.loway.oss.ari4java:ari4java:0.4.2' - } - -This will download the package and all required dependencies. - -Building -======== - -The code here is partially hand-written and partially generated out of Swagger definitions. - -* "classes/" contains Java code to be released (manually and automatically generated). All automatically -generated classes are under "ch.loway.oss.ari4vaja.generated". They should not be hand-edited. -* "tests/" contains test cases for "classes/" -* "codegen/" contains the Java code that creates auto-generated classes. -* "codegen-data/" contains Swagger models from different versions of the interface (copied from Asterisk). - -Creating Java code out of Swagger definitions ---------------------------------------------- - -In order to run codegen (class ch.loway.oss.ari4java.codegen.run), you need the following libraries: - -- jackson-core-2.2.2 -- jackson-databind-2.2.2 -- jackson-annotations-2.2.2 - -Testing and packaging ---------------------- - -The easiest tway to build is simply using the Gradle script supplied. - - gradle clean build - -This will compile, test and package the current version. It will not run the code generator (for the moment at least). -You'll find the resulting jar file under 'build/libs'. - -Running -------- - -The project requires: - -- jackson-core-2.2.2 -- jackson-databind-2.2.2 -- jackson-annotations-2.2.2 -- netty-all-4.0.25-Final - -Status ------- - -* 16.10.21 - Fixing #55 and #57 - rel 0.4.2 -* 16.10.17 - Graham's AutoReconnect patch #52 - rel 0.4.1 -* 16.08.31 - Added support for ARI 1.10.0 (Asterisk 14) and some bug fixes - release 0.4.0 -* 16.01.30 - Added support for ARI 1.9.0 - release 0.3.4 -* 15.09.23 - Fixed issue with 201 statuses (bug #33) - release 0.3.3 -* 15.09.19 - Added support for ARI 1.8.0 (bug #32) - release 0.3.2 -* 15.03.20 - Disconnected ARI WS now throws an exception - se bug #28 - release 0.3.1 -* 15.03.11 - Added support for ARI 1.7.0 (bug #28) - release 0.3.0 -* 15.01.17 - Added support for ARI 1.6.0 (bug #24) - release 0.2.3 - compiles with Netty 4.0.25 -* 14.11.01 - Added support for ARI 1.5 (bug #9) -* 14.10.30 - Added ARI bindings for 1.5.0 as coming from the official Asterisk 13.0.0 release -* 14.01.01 - Added a minimal application under tests/ class ch.loway.oss.ari4java.sandbox.sample to be used as a style laboratory. Look for UGLY tags. Rel 0.1.2. -* 13.12.30 - Added AriBuilder interfaces -* 13.12.29 - Imported the definitions for Asterisk 12.0.0 - ARI 1.0.0 - a bit of code changes in the code generator - Added the Gradle build script. -* 13.11.26 - Netty.io based HTTP and WebSocket implementation, factory, sync and async methods -* 13.10.21 - All objects are deserializable right out of JSON. Mesages can be deserialized automatically. -* 13.10.18 - Auto-generates all classes and compiles them. - - -Using ------ - -To use the Netty.io HTTP+WS implementation, include netty-all-4.0.12.Final.jar or newer in your classpath. - -To initialize: - - ARI ari = new ARI(); - NettyHttpClient hc = new NettyHttpClient(); - hc.initialize("http://my-pbx-ip:8088/", "admin", "admin"); - ari.setHttpClient(hc); - ari.setWsClient(hc); - ari.setVersion(AriVersion.ARI_0_0_1); - -or make your life easier by using the convenience method supplied in AriFactory. - -Sample synchronous call: - - ActionApplications ac = ari.getActionImpl(ActionApplications.class); - List alist = ac.list(); - -Sample asynchronous call: - - ActionAsterisk aa = ari.getActionImpl(ActionAsterisk.class); - aa.getGlobalVar("AMPMGRPASS", new AriCallback() { - @Override - public void onSuccess(Variable result) { - // Let's do something with the returned value - } - @Override - public void onFailure(RestException e) { - e.printStackTrace(); - } - }); - -Sample WebSocket connection, waiting for events on hello and goodbye apps: - - ActionEvents ae = ari.getActionImpl(ActionEvents.class); - ae.eventWebsocket("hello,goodbye", new AriCallback() { - @Override - public void onSuccess(Message result) { - // Let's do something with the event - } - @Override - public void onFailure(RestException e) { - e.printStackTrace(); - } - }); - Thread.sleep(5000); // Wait 5 seconds for events - ari.closeAction(ae); // Now close the websocket - -The Message object in the code above will be one of the message subtypes, -you will have to introspect to find out which. - -To be done ----------- - -* Parameters that could be multiple are handled as only one item. I would like to have - both ways, so that you do not have to create a List in the very common case that - you need to pass only one parameter - see https://github.com/l3nz/ari4java/issues/10 -* Misc open bugs here: https://github.com/l3nz/ari4java/issues?q=is%3Aopen - - -Useful links ------------- - -* Asterisk 13 docs: https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Documentation -* Asterisk 13 ARI docs: https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+ARI -* Asterisk 12 docs: https://wiki.asterisk.org/wiki/display/AST/Asterisk+12+Documentation -* Official ARI docs for Asterisk 12: https://wiki.asterisk.org/wiki/display/AST/Asterisk+12+ARI -* ari4java community on Google+: https://plus.google.com/u/0/communities/116130645492865479649 -* Asterisk-app-dev archives: http://lists.digium.com/pipermail/asterisk-app-dev/ - - -Similar & Interesting projects ------------------------------- - -* AstAryPy - a Python library - https://github.com/asterisk/ast-ari-py -* AsterNET.ARI - C# / .NET - https://github.com/skrusty/AsterNET.ARI -* node-ari-client - JavaScript (node) - https://github.com/asterisk/node-ari-client -* phpari - PHP - http://www.phpari.org/ -* asterisk-ari-client - Ruby - https://github.com/svoboda-jan/asterisk-ari - - -Licensing ---------- - -The library is released under the GNU LGPL (see LICENSE file). +## Licensing +The library is released under the GNU LGPL (see [LICENSE](https://github.com/ari4java/ari4java/blob/master/LICENSE) file). Files under codegen-data come from the Asterisk project and are licensed under the GPLv2 (see LICENSE.asterisk file therein). -They are only used to build the classes and are not distribuited in any form with Ari4Java. - +They are only used to build the classes and are not distributed in any form with ARI4Java. diff --git a/build.gradle b/build.gradle old mode 100644 new mode 100755 index 1bd880db..2d69a810 --- a/build.gradle +++ b/build.gradle @@ -1,159 +1,206 @@ -apply plugin: 'java' -apply plugin: 'findbugs' -apply plugin: 'maven' -def env = System.getenv() +plugins { + id "java" + id "jacoco" + id "maven-publish" + id "signing" + id "com.github.spotbugs" version "6.4.8" + id "org.sonarqube" version "2.7.1" + id "org.jreleaser" version "1.22.0" +} -// -// I defaults valgono per HUDSON -// +group = "io.github.ari4java" +version = "0.18.0" -project.ext { - webapp_name = 'ari4java' - app_version = '0.4.2' - build_number = env["BUILD_NUMBER"] - version_class = 'ch/loway/oss/ari4java/BUILD.java' - build_time = "" + new Date() +def projectUrl = "http://github.com/ari4java/ari4java" +def build_number = "x" +if (System.getenv("BUILD_NUMBER") != null) { + build_number = System.getenv("BUILD_NUMBER") } - +java { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + withJavadocJar() + withSourcesJar() +} sourceSets { - - main { - java { - srcDirs "$buildDir/classes_subst" - } - } - - test { - java { - srcDirs "./tests" - } - } -} - -//artifacts { -// archives sourcesJar -// archives javadocJar -//} - -task writeNewPom << { - pom { - project { - groupId 'ch.loway.oss.ari4java' - version project.ext.app_version - inceptionYear '2013' - packaging 'jar' - name 'ari4java' - description 'Asterisk ARI interface bindings for Java' - licenses { - license { - name 'GNU LGPL v3' - } - } - scm { - url 'http://github.com/l3nz/ari4java' - connection 'http://github.com/l3nz/ari4java' - } - developers { - developer { - name 'lenz e.' - email 'nomail@home' - } - } + main { + java { + srcDir "src/main/generated" } - }.writeTo("$buildDir/libs/ari4java-" + project.ext.app_version + ".pom") + } } - - -task sourcesJar(type: Jar, dependsOn: classes) { - classifier = 'sources' - from "$buildDir/classes_subst" - archiveName project.ext.webapp_name + "-" + project.ext.app_version + "-sources.jar" +repositories { + mavenCentral() } -task javadocJar(type: Jar, dependsOn: javadoc) { - classifier = 'javadoc' - from javadoc.destinationDir - archiveName project.ext.webapp_name + "-" + project.ext.app_version + "-javadoc.jar" +dependencies { + implementation 'com.fasterxml.jackson.core:jackson-core:2.21.0' + implementation 'com.fasterxml.jackson.core:jackson-databind:2.21.0' + implementation 'com.fasterxml.jackson.core:jackson-annotations:2.21' + implementation 'io.netty:netty-all:4.2.9.Final' + implementation 'javax.xml.bind:jaxb-api:2.3.1' + implementation 'org.slf4j:slf4j-api:2.0.17' + + testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2' + testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.2' + testImplementation 'org.mockito:mockito-core:4.2.0' + testImplementation 'ch.qos.logback:logback-classic:1.5.26' } - +tasks.register('buildProps', WriteProperties) { + outputFile file("src/main/resources/build.properties") + property "BUILD_NUMBER", build_number +} jar { manifest { - attributes("Implementation-Title": project.ext.webapp_name, - "Implementation-Version": project.ext.app_version) + attributes "Implementation-Title": project.name, + "Implementation-Version": project.version } - archiveName project.ext.webapp_name + "-" + project.ext.app_version + ".jar" - from( "$buildDir/classes_subst" ) } -jar.dependsOn writeNewPom -jar.dependsOn sourcesJar -jar.dependsOn javadocJar - - -repositories { - mavenCentral() +javadoc { + def inc = [ + "ch/loway/oss/ari4java/generated/AriVersion.java", + "ch/loway/oss/ari4java/generated/actions/*", + "ch/loway/oss/ari4java/generated/models/*", + "ch/loway/oss/ari4java/*", + "ch/loway/oss/ari4java/tools/*", + "ch/loway/oss/ari4java/tools/*/*" + ] + includes = inc.toSet() + options.overview = "src/overview.html" + failOnError = false } - -dependencies { - compile 'com.fasterxml.jackson.core:jackson-core:2.2.2' - compile 'com.fasterxml.jackson.core:jackson-databind:2.2.2' - compile 'com.fasterxml.jackson.core:jackson-annotations:2.2.2' - compile 'io.netty:netty-all:4.0.25.Final' - - testCompile 'junit:junit:4.10' - +test { + useJUnitPlatform() + jacoco { + excludes = ["**/generated/**"] + } } -task setVersionInSources() { - doLast { - def cjd = new File( "$buildDir/classes_subst" ) - cjd.mkdirs(); +jacocoTestReport { + reports { + xml.required.set(true) + csv.required.set(false) + html.required.set(true) + xml.outputLocation.set(file("${buildDir}/reports/jacocoTestReport.xml")) + html.outputLocation.set(file("${buildDir}/reports/jacocoTestReport/html")) + } + afterEvaluate { + classDirectories.setFrom(files(classDirectories.files.collect { + fileTree(dir: it, exclude: "**/generated/**") + })) + } +} - def FileTree tree = fileTree( dir: "./classes" ) - //tree.each { File file -> println file } - - copy { - from './classes' - into "$buildDir/classes_subst" +jacocoTestCoverageVerification { + violationRules { + rule { + limit { + minimum = 0.3 + } + } + } + afterEvaluate { + classDirectories.setFrom(files(classDirectories.files.collect { + fileTree(dir: it, exclude: "**/generated/**") + })) } +} - ant.replace( file: "$buildDir/classes_subst/" + project.ext.version_class, - token: "VERSION", - value: "VERSION = \"" + project.ext.app_version + "\"; //" - ) - - ant.replace( file: "$buildDir/classes_subst/" + project.ext.version_class, - token: "BUILD_N", - value: "BUILD_N = \"" + project.ext.build_number + " - " + project.ext.build_time + "\"; //" - ) - } -} -compileJava.dependsOn setVersionInSources - -// decide what to see -only one can be enabled -// get the HTML report from build/reports/findbugs/main.html -tasks.withType(FindBugs) { +spotbugsMain { + excludeFilter = file("spotbugs-exclude.xml") reports { - xml.enabled = false - html.enabled = true + xml.required.set(true) + html.required.set(true) } - ignoreFailures = true - } +} +spotbugsTest { + ignoreFailures = true + reports { + xml.required.set(false) + html.required.set(true) + } +} +sonarqube { + properties { + property "sonar.projectKey", "ari4java" + property "sonar.organization", "ari4java" + property "sonar.host.url", "https://sonarcloud.io" + property "sonar.login", System.getenv("SONAR_LOGIN") + property "sonar.java.coveragePlugin", "jacoco" + property "sonar.coverage.jacoco.xmlReportPaths", "${buildDir}/reports/jacocoTestReport.xml" + } +} +test.finalizedBy jacocoTestReport +check.dependsOn jacocoTestCoverageVerification + +publishing { + publications { + maven(MavenPublication) { + from components.java + pom { + name = project.name + description = "Asterisk ARI interface bindings for Java" + url = projectUrl + licenses { + license { + name = "LPGL-3.0" + } + } + developers { + developer { + name = "Graham Brown" + email = "grahambrown11@gmail.com" + } + developer { + name = "lenz e." + email = "nomail@home" + } + } + scm { + url = projectUrl + } + } + } + } + repositories { + maven { + name = "staging-deploy" + url = layout.buildDirectory.dir("staging-deploy") + } + } +} -task downloadJars << { - copy { - from configurations.compile - into './libs' - include '**/*.jar' +jreleaser { + signing { + active = "ALWAYS" + armored = true + // Keys via Environment Variables: + // JRELEASER_GPG_SECRET_KEY JRELEASER_GPG_PASSPHRASE JRELEASER_GPG_PUBLIC_KEY + } + deploy { + maven { + mavenCentral { + sonatype { + active = "ALWAYS" + url = "https://central.sonatype.com/api/v1/publisher" + authorization = "BASIC" + // user & pass via Environment Variables: + // JRELEASER_MAVENCENTRAL_SONATYPE_USERNAME JRELEASER_MAVENCENTRAL_SONATYPE_PASSWORD + applyMavenCentralRules = true + stagingRepository("build/staging-deploy") + } + } + } } } diff --git a/classes/ch/loway/oss/ari4java/ARI.java b/classes/ch/loway/oss/ari4java/ARI.java deleted file mode 100644 index a3d8dd9d..00000000 --- a/classes/ch/loway/oss/ari4java/ARI.java +++ /dev/null @@ -1,643 +0,0 @@ -package ch.loway.oss.ari4java; - -import ch.loway.oss.ari4java.tools.ARIException; -import ch.loway.oss.ari4java.generated.ActionApplications; -import ch.loway.oss.ari4java.generated.ActionAsterisk; -import ch.loway.oss.ari4java.generated.ActionBridges; -import ch.loway.oss.ari4java.generated.ActionChannels; -import ch.loway.oss.ari4java.generated.ActionDeviceStates; -import ch.loway.oss.ari4java.generated.ActionEndpoints; -import ch.loway.oss.ari4java.generated.ActionEvents; -import ch.loway.oss.ari4java.generated.ActionPlaybacks; -import ch.loway.oss.ari4java.generated.ActionRecordings; -import ch.loway.oss.ari4java.generated.ActionSounds; -import ch.loway.oss.ari4java.generated.Application; -import ch.loway.oss.ari4java.generated.Message; -import ch.loway.oss.ari4java.tools.AriCallback; -import java.io.IOException; -import java.net.URL; - -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.MessageQueue; -import ch.loway.oss.ari4java.tools.HttpClient; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.WsClient; -import ch.loway.oss.ari4java.tools.http.NettyHttpClient; -import ch.loway.oss.ari4java.tools.tags.EventSource; -import java.io.BufferedReader; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.UnsupportedEncodingException; -import java.net.MalformedURLException; -import java.net.URISyntaxException; -import java.net.URLConnection; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -/** - * ARI factory and helper class - * - * @author lenz - * @author mwalton - */ -public class ARI { - - private final static String ALLOWED_IN_UID = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; - - private String appName = ""; - private String url = ""; - private AriVersion version; - private HttpClient httpClient; - private WsClient wsClient; - private ActionEvents liveActionEvent = null; - private AriSubscriber subscriptions = new AriSubscriber(); - - public void setHttpClient(HttpClient httpClient) { - this.httpClient = httpClient; - } - - public void setWsClient(WsClient wsClient) { - this.wsClient = wsClient; - } - - - public void setVersion(AriVersion version) throws ARIException { - this.version = version; - } - - public void setUrl(String url) { - this.url = url; - } - - /** - * Returns the current ARI version. - * - * @return the ARI version currently used. - * @throws ARIException - */ - - public AriVersion getVersion() throws ARIException { - return version; - } - - /** - * Returns the server and port the websocket is connected to. - * - * @return the server currently being used. - */ - public String getUrl() { - return url; - } - - /** - * Get the implementation for a given action interface - * - * @param klazz - the required action interface class - * @return An implementation instance - * @throws ARIException - */ - @SuppressWarnings("unchecked") - public T getActionImpl(Class klazz) throws ARIException { - - // use the events method as we ref it for cleanup - if (klazz == ActionEvents.class) { - return (T) events(); - } - - BaseAriAction action = (BaseAriAction) buildConcreteImplementation(klazz); - action.setHttpClient(this.httpClient); - action.setWsClient(this.wsClient); - return (T) action; - } - - /** - * Get the implementation for a given model interface - * - * @param klazz - the required model interface class - * @return An implementation instance - * @throws ARIException - */ - @SuppressWarnings("unchecked") - public T getModelImpl(Class klazz) throws ARIException { - return (T) buildConcreteImplementation(klazz); - } - - - /** - * Builds a concrete instance given an interface. - * Note that we make no assumptions on the type of objects being built. - * @param klazz - * @return the concrete implementation for that interface under the ARI in use. - * @throws ARIException - */ - - private Object buildConcreteImplementation(Class klazz) throws ARIException { - - if (version == null) { - throw new ARIException("API version not set"); - } - - Class concrete = version.builder.getClassFactory().getImplementationFor(klazz); - if (concrete == null) { - throw new ARIException("No concrete implementation in " + version.name() + " for " + klazz); - } - - try { - return concrete.newInstance(); - } catch (IllegalAccessException e) { - e.printStackTrace(); - } catch (InstantiationException e) { - e.printStackTrace(); - } catch (NullPointerException e) { - // Do nothing - e.printStackTrace(); - } - throw new ARIException("Unable to build concrete implementation " - + "for " + klazz.getName() - + " in " + version.name() - ); - } - - - - /** - * Close an action object that is open for WebSocket interaction - * - * @param action - the action object - * @throws ARIException - */ - public void closeAction(Object action) throws ARIException { - if (!(action instanceof BaseAriAction)) { - throw new ARIException("Class " + action.getClass().getName() + " is not an Action implementation"); - } - BaseAriAction ba = (BaseAriAction) action; - try { - ba.disconnectWs(); - } catch (RestException e) { - throw new ARIException(e.getMessage()); - } - } - - /** - * Builds a connector object for the specified ARI version. - * If the version is set as IM_FEELING_LUCKY, then it will first try connecting, - * will detect the current ARI version and will then connect to it. - * This method uses Netty for both websocket and HTTP. - * - * As this sets everything up but does not do anything, we do not have any - * information on whether this connection is valid or not. - * - * @param url The URL of the Asterisk web server, e.g. http://10.10.5.8:8088/ - defined in http.conf - * @param user The user name (defined in ari.conf) - * @param pass The password - * @param version The reuired version - * @return a connection object - * @throws ARIException If the url is invalid, or the version of ARI is not supported. - */ - - public static ARI build(String url, String app, String user, String pass, AriVersion version) throws ARIException { - - if (version == AriVersion.IM_FEELING_LUCKY) { - - AriVersion currentVersion = detectAriVersion(url, user, pass); - return build(url, app, user, pass, currentVersion); - - } else { - - try { - - ARI ari = new ARI(); - ari.appName = app; - NettyHttpClient hc = new NettyHttpClient(); - hc.initialize(url, user, pass); - ari.setHttpClient(hc); - ari.setWsClient(hc); - ari.setVersion( version ); - ari.setUrl(url); - - return ari; - - } catch (URISyntaxException e) { - throw new ARIException("Wrong URI format: " + url); - } - } - } - - /** - * Sets the application name. - * - * @param s - */ - - public void setAppName( String s ) { - this.appName = s; - } - - /** - * Return the current application name. - * - * @return the appName - */ - - public String getAppName() { - return this.appName; - } - - /** - * Connect and detect the current ARI version. - * If the ARI version is not supported, - * will raise an excepttion as we have no bindings for it. - * - * @param url - * @param user - * @param pass - * @return the version of your server - * @throws ARIException if the version is not supported - */ - - protected static AriVersion detectAriVersion( String url, String user, String pass ) throws ARIException { - - String response = doHttpGet( url + "ari/api-docs/resources.json", user, pass ); - String version = findVersionString( response ); - return AriVersion.fromVersionString(version); - - } - - /** - * Runs an HTTP GET and returns the text downloaded. - * - * \TODO does it really belong here? - * - * @param urlWithParms - * @param user - * @param pwd - * @return The body of the HTTP request. - * @throws ARIException - */ - - private static String doHttpGet(String urlWithParms, String user, String pwd) throws ARIException { - URL url = null; - final String UTF8 = "UTF-8"; - try { - url = new URL(urlWithParms); - } catch (MalformedURLException e) { - throw new ARIException("MalformedUrlException: " + e.getMessage()); - } - - URLConnection uc = null; - try { - uc = url.openConnection(); - } catch (IOException e) { - throw new ARIException("IOException: " + e.getMessage()); - } - - StringBuilder response = new StringBuilder(); - - try { - String userpass = user + ":" + pwd; - String basicAuth = "Basic " + javax.xml.bind.DatatypeConverter.printBase64Binary(userpass.getBytes(UTF8)); - - uc.setRequestProperty("Authorization", basicAuth); - InputStream is = null; - try { - is = uc.getInputStream(); - } catch (IOException e) { - throw new ARIException("Cannot connect: " + e.getMessage()); - } - - - - BufferedReader buffReader = new BufferedReader(new InputStreamReader(is, UTF8)); - - String line = null; - try { - line = buffReader.readLine(); - } catch (IOException e) { - throw new ARIException("IOException: " + e.getMessage()); - } - while (line != null) { - response.append(line); - response.append('\n'); - try { - line = buffReader.readLine(); - } catch (IOException e) { - throw new ARIException("IOException: " + e.getMessage()); - } - } - try { - buffReader.close(); - } catch (IOException e) { - throw new ARIException("IOException: " + e.getMessage()); - } - } catch (UnsupportedEncodingException e) { - throw new ARIException("Nobody is going to believe this: missing encoding UTF8 " + e.getMessage()); - } - - //System.out.println("Response: " + response.toString()); - return response.toString(); - } - - /** - * Matches the version string out of the resources.json file. - * - * @param response - * @return a String describing the version reported from Asterisk. - * @throws ARIException - */ - - private static String findVersionString(String response) throws ARIException { - Pattern p = Pattern.compile(".apiVersion.:\\s*\"(.+?)\"", Pattern.MULTILINE + Pattern.CASE_INSENSITIVE ); - - Matcher m = p.matcher(response); - if ( m.find() ) { - return m.group(1); - } else { - throw new ARIException( "Cound not match apiVersion " ); - } - } - - - /** - * This operation is the opposite of a build() - to be called in the final - * clause where the ARI object is built. - * - * In any case, it is good practice to have a way to deallocate stuff like - * the websocket or any circular reference. - */ - - public void cleanup() throws ARIException { - - if ( liveActionEvent != null ) { - try { - closeAction(liveActionEvent); - } catch (ARIException e) { - // ignore on cleanup... - } - liveActionEvent = null; - } - - destroy( wsClient ); - if (wsClient != httpClient) { - destroy(httpClient); - } - - wsClient = null; - httpClient = null; - } - - /** - * Does the destruction of a client. In a sense, it is a reverse factory. - * - * @param client the client object - * @throws IllegalArgumentException All clients should be of a known type. Let's play it safe. - */ - - private void destroy( Object client ) { - if ( client != null ) { - if ( client instanceof NettyHttpClient ) { - NettyHttpClient nhc = (NettyHttpClient) client; - nhc.destroy(); - } else { - throw new IllegalArgumentException( "Unknown client object " + client ); - } - } - } - - /** - * In order to avoid multi-threading for users, you can get a - * MessageQueue object and poll on it for new messages. - * This makes sure you don't really need to synchonize or be worried by - * threading issues - * - * @return The MQ connected to your websocket. - * @throws ARIException - */ - - - public MessageQueue getWebsocketQueue() throws ARIException { - - if ( liveActionEvent != null ) { - throw new ARIException( "Websocket already present" ); - } - - final MessageQueue q = new MessageQueue(); - - events().eventWebsocket( appName, new AriCallback() { - - @Override - public void onSuccess(Message result) { - q.queue( result ); - } - - @Override - public void onFailure(RestException e) { - q.queueError("Err:" + e.getMessage()); - } - }); - - return q; - - } - - - - /** - * Gets us a ready to use object. - * - * @return an Applications object. - */ - public ActionApplications applications() { - return (ActionApplications) setupAction(version.builder().actionApplications()); - } - - /** - * Gets us a ready to use object. - * - * @return an Asterisk object. - */ - public ActionAsterisk asterisk() { - return (ActionAsterisk) setupAction(version.builder().actionAsterisk()); - } - - /** - * Gets us a ready to use object. - * - * @return a Bridges object. - */ - public ActionBridges bridges() { - return (ActionBridges) setupAction(version.builder().actionBridges()); - } - - /** - * Gets us a ready to use object. - * - * @return a Channels object. - */ - public ActionChannels channels() { - return (ActionChannels) setupAction(version.builder().actionChannels()); - } - - /** - * Gets us a ready to use object. - * - * @return a deviceSTates object. - */ - public ActionDeviceStates deviceStates() { - return (ActionDeviceStates) setupAction(version.builder().actionDeviceStates()); - } - - /** - * Gets us a ready to use object. - * - * @return an Endpoints object. - */ - public ActionEndpoints endpoints() { - return (ActionEndpoints) setupAction(version.builder().actionEndpoints()); - } - - /** - * Gets us a ready to use object. - * - * @return an Events object. - */ - public ActionEvents events() { - if (liveActionEvent == null) - liveActionEvent = (ActionEvents) setupAction(version.builder().actionEvents()); - return liveActionEvent; - } - - /** - * Gets us a ready to use object. - * - * @return a Playbacks object. - */ - public ActionPlaybacks playbacks() { - return (ActionPlaybacks) setupAction(version.builder().actionPlaybacks()); - } - - /** - * Gets us a ready to use object. - * - * @return a Recordings object. - */ - public ActionRecordings recordings() { - return (ActionRecordings) setupAction(version.builder().actionRecordings()); - } - - /** - * Gets us a ready to use object. - * - * @return a Sounds object. - */ - public ActionSounds sounds() { - return (ActionSounds) setupAction(version.builder().actionSounds()); - } - - - - /** - * This code REALLY smells bad. - * Most likely we should either implement an interface, or push the clients - * to the default builder. - * - * See the getActionImpl() method here. - * - * \TODO - * - * @param a - * @return an Action object on which we'll set the default clients. - * @throws IllegalArgumentException - */ - - public Object setupAction(Object a) throws IllegalArgumentException { - if (a instanceof BaseAriAction) { - BaseAriAction action = (BaseAriAction) a; - action.setHttpClient(this.httpClient); - action.setWsClient(this.wsClient); - } else { - throw new IllegalArgumentException("Object does not seem to be an Action implementation " + a.toString()); - } - return a; - } - - /** - * Wrapper of the Thread.sleep() to avoid exception. - * - * @param ms how long is it going to sleep. - */ - - public static void sleep( long ms ) { - try { - Thread.sleep(ms); - } catch (InterruptedException e ) { - System.err.println( "Interrupted: " + e.getMessage() ); - } - } - - /** - * Generates a pseudo-random ID like "a4j.ZH6IA.IXEX0.TUIE8". - * - * @return the UID - */ - public static String getUID() { - StringBuilder sb = new StringBuilder(20); - - sb.append("a4j"); - - for (int n = 0; n < 15; n++) { - if ((n % 5) == 0) { - sb.append("."); - } - int pos = (int) (Math.random() * ALLOWED_IN_UID.length()); - sb.append(ALLOWED_IN_UID.charAt(pos)); - } - return sb.toString(); - - } - - /** - * Subscribes to an event source. - * - * @param m - * @return the Application object - * @throws RestException - */ - - public Application subscribe( EventSource m ) throws RestException { - return subscriptions.subscribe(this, m); - } - - /** - * Unsubscribes from an event source. - * @param m - * @throws RestException - */ - - public void unsubscribe( EventSource m ) throws RestException { - subscriptions.unsubscribe(this, m); - - } - - /** - * Unsubscribes from all known subscriptions. - * - * @throws RestException - */ - - public void unsubscribeAll() throws RestException { - subscriptions.unsubscribeAll(this); - } - - - - - /** - * This interface is used to go from an interface to its concrete - * implementation. - */ - public static interface ClassFactory { - public Class getImplementationFor( Class interfaceClass ); - } - -} - diff --git a/classes/ch/loway/oss/ari4java/AriFactory.java b/classes/ch/loway/oss/ari4java/AriFactory.java deleted file mode 100644 index 042664fe..00000000 --- a/classes/ch/loway/oss/ari4java/AriFactory.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * - */ -package ch.loway.oss.ari4java; - -import ch.loway.oss.ari4java.tools.ARIException; -import ch.loway.oss.ari4java.tools.http.NettyHttpClient; -import java.net.URISyntaxException; - -/** - * This class is a placeholder for convenience factory methods. - * - * @author lenz - */ -public class AriFactory { - - /** - * Your default HTTP connector through Netty (without app). - * - * @param uri - * @param login - * @param pass - * @param version - * @return a ready-to-use connector. - * @throws ARIException - * @throws URISyntaxException - */ - - - public static ARI nettyHttp(String uri, String login, String pass, AriVersion version) throws ARIException, URISyntaxException { - return nettyHttp(uri, login, pass, version, ""); - } - - /** - * This connects to an application. - * - * @param uri - * @param login - * @param pass - * @param version - * @param app - * @return your ready-to-use connector. - * @throws ARIException - * @throws URISyntaxException - */ - - public static ARI nettyHttp(String uri, String login, String pass, AriVersion version, String app) throws ARIException, URISyntaxException { - ARI ari = new ARI(); - ari.setAppName(app); - NettyHttpClient hc = new NettyHttpClient(); - - ari.setHttpClient(hc); - ari.setWsClient(hc); - - ari.setVersion(version); - - hc.initialize(uri, login, pass); - return ari; - } - -} diff --git a/classes/ch/loway/oss/ari4java/AriSubscriber.java b/classes/ch/loway/oss/ari4java/AriSubscriber.java deleted file mode 100644 index a13367cb..00000000 --- a/classes/ch/loway/oss/ari4java/AriSubscriber.java +++ /dev/null @@ -1,82 +0,0 @@ -package ch.loway.oss.ari4java; - -import ch.loway.oss.ari4java.generated.Application; -import ch.loway.oss.ari4java.generated.Bridge; -import ch.loway.oss.ari4java.generated.Channel; -import ch.loway.oss.ari4java.generated.DeviceState; -import ch.loway.oss.ari4java.generated.Endpoint; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.tags.EventSource; -import java.util.ArrayList; -import java.util.List; - -/** - * - * @author lenz - */ -public class AriSubscriber { - - List subscriptions = new ArrayList(); - - public Application subscribe( ARI ari, EventSource m ) throws RestException { - - String model = toModelName(m); - Application a = ari.applications().subscribe( ari.getAppName(), model ); - subscriptions.add(model); - return a; - } - - public void unsubscribe( ARI ari, EventSource m ) throws RestException { - String model = toModelName(m); - ari.applications().unsubscribe( ari.getAppName(), model); - subscriptions.remove(model); - } - - public void unsubscribeAll( ARI ari) throws RestException { - for ( String model: subscriptions ) { - ari.applications().unsubscribe( ari.getAppName(), model); - } - subscriptions.clear(); - } - - /** - * Return the correct string "modeltype:id". - * - * See - * channel:{channelId}, - * bridge:{bridgeId}, - * endpoint:{tech}[/{resource}, - * deviceState:{deviceName} - * - * @param m - * @return a string representation, e.g. "channel:1234" - */ - - - public String toModelName( EventSource m ) { - - if ( m instanceof Bridge ) { - Bridge b = (Bridge) m; - return "bridge:" + b.getId(); - } else - if ( m instanceof Channel ) { - Channel b = (Channel) m; - return "channel:" + b.getId(); - } else - if ( m instanceof Endpoint ) { - Endpoint b = (Endpoint) m; - return "endpoint:" + b.getTechnology() + "/" + b.getResource(); - } else - if ( m instanceof DeviceState ) { - DeviceState b = (DeviceState) m; - return "deviceState:" + b.getName(); - } else - - { - throw new IllegalArgumentException("Cannot subscribe model " + m.getClass().getName() ); - } - - - } - -} diff --git a/classes/ch/loway/oss/ari4java/AriVersion.java b/classes/ch/loway/oss/ari4java/AriVersion.java deleted file mode 100644 index 13efd532..00000000 --- a/classes/ch/loway/oss/ari4java/AriVersion.java +++ /dev/null @@ -1,81 +0,0 @@ - -package ch.loway.oss.ari4java; - -import ch.loway.oss.ari4java.generated.AriBuilder; -import ch.loway.oss.ari4java.generated.ari_0_0_1.AriBuilder_impl_ari_0_0_1; -import ch.loway.oss.ari4java.generated.ari_1_0_0.AriBuilder_impl_ari_1_0_0; -import ch.loway.oss.ari4java.generated.ari_1_10_0.AriBuilder_impl_ari_1_10_0; -import ch.loway.oss.ari4java.generated.ari_1_5_0.AriBuilder_impl_ari_1_5_0; -import ch.loway.oss.ari4java.generated.ari_1_6_0.AriBuilder_impl_ari_1_6_0; -import ch.loway.oss.ari4java.generated.ari_1_7_0.AriBuilder_impl_ari_1_7_0; -import ch.loway.oss.ari4java.generated.ari_1_8_0.AriBuilder_impl_ari_1_8_0; -import ch.loway.oss.ari4java.generated.ari_1_9_0.AriBuilder_impl_ari_1_9_0; -import ch.loway.oss.ari4java.tools.ARIException; - -/** - * The version of ARI to be used. - * - * @author lenz - */ -public enum AriVersion { - - - ARI_0_0_1 ( "0.0.1", new AriBuilder_impl_ari_0_0_1() ), /** Asterisk 12 beta 1 */ - ARI_1_0_0 ( "1.0.0", new AriBuilder_impl_ari_1_0_0() ), /** Asterisk 12 */ - ARI_1_5_0 ( "1.5.0", new AriBuilder_impl_ari_1_5_0() ), /** Asterisk 13.0.0 */ - ARI_1_6_0 ( "1.6.0", new AriBuilder_impl_ari_1_6_0() ), /** Asterisk 13.1.0 */ - ARI_1_7_0 ( "1.7.0", new AriBuilder_impl_ari_1_7_0() ), /** Asterisk 13.2.0 */ - ARI_1_8_0 ( "1.8.0", new AriBuilder_impl_ari_1_8_0() ), /** Asterisk 13.5.0 */ - ARI_1_9_0 ( "1.9.0", new AriBuilder_impl_ari_1_9_0() ), /** Asterisk 13.7.0 */ - ARI_1_10_0 ( "1.10.0", new AriBuilder_impl_ari_1_10_0() ), /** Asterisk 14.0.0 */ - - IM_FEELING_LUCKY ( "", null ); - - final AriBuilder builder; - final String versionString; - - private AriVersion( String myVersion, AriBuilder ab ) { - versionString = myVersion; - builder = ab; - } - - /** - * You cannot get a builder for IM_FEELING_LUCKY or similar. - * If you try to do this, it s a logical error and you get an exception. - * - * @return the builder object - * @throws IllegalArgumentException - */ - - public AriBuilder builder() { - if ( builder == null ) { - throw new IllegalArgumentException("This version has no builder. Library error for :" + this.name()); - } else { - return builder; - } - } - - /** - * Return the correct version object from the signature string. - * - * @param version - * @return the inferred version. - * @throws ARIException - */ - - public static AriVersion fromVersionString( String version ) throws ARIException { - - for ( AriVersion av: AriVersion.values() ) { - if ( av.builder != null ) { - if (av.versionString.equalsIgnoreCase(version) ) { - return av; - } - } - } - - throw new ARIException( "Unknown ARI Version object for " + version ); - } - - -} - diff --git a/classes/ch/loway/oss/ari4java/BUILD.java b/classes/ch/loway/oss/ari4java/BUILD.java deleted file mode 100644 index f108f76b..00000000 --- a/classes/ch/loway/oss/ari4java/BUILD.java +++ /dev/null @@ -1,15 +0,0 @@ - -package ch.loway.oss.ari4java; - -/** - * Do not hand-edit this file. - * The values below will be set by the Gradle build script. - * - * - * @author lenz - */ -public class BUILD { - public static final String VERSION = "x"; - public static final String BUILD_N = "x"; -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ActionApplications.java b/classes/ch/loway/oss/ari4java/generated/ActionApplications.java deleted file mode 100644 index 440cc377..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ActionApplications.java +++ /dev/null @@ -1,109 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface ActionApplications { - -// List list -/********************************************************** - * List all applications. - * - * - * @since ari_0_0_1 - *********************************************************/ -public List list() throws RestException; - - - -// void unsubscribe String String AriCallback callback -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void unsubscribe(String applicationName, String eventSource, AriCallback callback); - - - -// void subscribe String String AriCallback callback -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void subscribe(String applicationName, String eventSource, AriCallback callback); - - - -// void get String AriCallback callback -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void get(String applicationName, AriCallback callback); - - - -// Application get String -/********************************************************** - * Get details of an application. - * - * - * @since ari_0_0_1 - *********************************************************/ -public Application get(String applicationName) throws RestException; - - - -// Application unsubscribe String String -/********************************************************** - * Unsubscribe an application from an event source. - * Returns the state of the application after the subscriptions have changed - * - * @since ari_0_0_1 - *********************************************************/ -public Application unsubscribe(String applicationName, String eventSource) throws RestException; - - - -// void list AriCallback> callback -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void list(AriCallback> callback); - - - -// Application subscribe String String -/********************************************************** - * Subscribe an application to a event source. - * Returns the state of the application after the subscriptions have changed - * - * @since ari_0_0_1 - *********************************************************/ -public Application subscribe(String applicationName, String eventSource) throws RestException; - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/ActionAsterisk.java b/classes/ch/loway/oss/ari4java/generated/ActionAsterisk.java deleted file mode 100644 index b0a6550c..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ActionAsterisk.java +++ /dev/null @@ -1,340 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface ActionAsterisk { - -// void deleteObject String String String AriCallback callback -/********************************************************** - * - * - * @since ari_1_8_0 - *********************************************************/ -public void deleteObject(String configClass, String objectType, String id, AriCallback callback); - - - -// List updateObject String String String Map -/********************************************************** - * Create or update a dynamic configuration object. - * - * - * @since ari_1_8_0 - *********************************************************/ -public List updateObject(String configClass, String objectType, String id, Map fields) throws RestException; - - - -// void reloadModule String -/********************************************************** - * Reload an Asterisk module. - * - * - * @since ari_1_8_0 - *********************************************************/ -public void reloadModule(String moduleName) throws RestException; - - - -// void addLog String String AriCallback callback -/********************************************************** - * - * - * @since ari_1_9_0 - *********************************************************/ -public void addLog(String logChannelName, String configuration, AriCallback callback); - - - -// void reloadModule String AriCallback callback -/********************************************************** - * - * - * @since ari_1_8_0 - *********************************************************/ -public void reloadModule(String moduleName, AriCallback callback); - - - -// List listModules -/********************************************************** - * List Asterisk modules. - * - * - * @since ari_1_8_0 - *********************************************************/ -public List listModules() throws RestException; - - - -// void unloadModule String AriCallback callback -/********************************************************** - * - * - * @since ari_1_8_0 - *********************************************************/ -public void unloadModule(String moduleName, AriCallback callback); - - - -// List listLogChannels -/********************************************************** - * Gets Asterisk log channel information. - * - * - * @since ari_1_9_0 - *********************************************************/ -public List listLogChannels() throws RestException; - - - -// Module getModule String -/********************************************************** - * Get Asterisk module information. - * - * - * @since ari_1_8_0 - *********************************************************/ -public Module getModule(String moduleName) throws RestException; - - - -// Variable getGlobalVar String -/********************************************************** - * Get the value of a global variable. - * - * - * @since ari_0_0_1 - *********************************************************/ -public Variable getGlobalVar(String variable) throws RestException; - - - -// void rotateLog String AriCallback callback -/********************************************************** - * - * - * @since ari_1_9_0 - *********************************************************/ -public void rotateLog(String logChannelName, AriCallback callback); - - - -// void setGlobalVar String String -/********************************************************** - * Set the value of a global variable. - * - * - * @since ari_0_0_1 - *********************************************************/ -public void setGlobalVar(String variable, String value) throws RestException; - - - -// List getObject String String String -/********************************************************** - * Retrieve a dynamic configuration object. - * - * - * @since ari_1_8_0 - *********************************************************/ -public List getObject(String configClass, String objectType, String id) throws RestException; - - - -// void loadModule String -/********************************************************** - * Load an Asterisk module. - * - * - * @since ari_1_8_0 - *********************************************************/ -public void loadModule(String moduleName) throws RestException; - - - -// void unloadModule String -/********************************************************** - * Unload an Asterisk module. - * - * - * @since ari_1_8_0 - *********************************************************/ -public void unloadModule(String moduleName) throws RestException; - - - -// void getModule String AriCallback callback -/********************************************************** - * - * - * @since ari_1_8_0 - *********************************************************/ -public void getModule(String moduleName, AriCallback callback); - - - -// void updateObject String String String Map AriCallback> callback -/********************************************************** - * - * - * @since ari_1_8_0 - *********************************************************/ -public void updateObject(String configClass, String objectType, String id, Map fields, AriCallback> callback); - - - -// AsteriskInfo getInfo String -/********************************************************** - * Gets Asterisk system information. - * - * - * @since ari_0_0_1 - *********************************************************/ -public AsteriskInfo getInfo(String only) throws RestException; - - - -// void getInfo String AriCallback callback -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void getInfo(String only, AriCallback callback); - - - -// void deleteObject String String String -/********************************************************** - * Delete a dynamic configuration object. - * - * - * @since ari_1_8_0 - *********************************************************/ -public void deleteObject(String configClass, String objectType, String id) throws RestException; - - - -// void rotateLog String -/********************************************************** - * Rotates a log channel. - * - * - * @since ari_1_9_0 - *********************************************************/ -public void rotateLog(String logChannelName) throws RestException; - - - -// void listLogChannels AriCallback> callback -/********************************************************** - * - * - * @since ari_1_9_0 - *********************************************************/ -public void listLogChannels(AriCallback> callback); - - - -// void addLog String String -/********************************************************** - * Adds a log channel. - * - * - * @since ari_1_9_0 - *********************************************************/ -public void addLog(String logChannelName, String configuration) throws RestException; - - - -// void listModules AriCallback> callback -/********************************************************** - * - * - * @since ari_1_8_0 - *********************************************************/ -public void listModules(AriCallback> callback); - - - -// void getGlobalVar String AriCallback callback -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void getGlobalVar(String variable, AriCallback callback); - - - -// void setGlobalVar String String AriCallback callback -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void setGlobalVar(String variable, String value, AriCallback callback); - - - -// void deleteLog String -/********************************************************** - * Deletes a log channel. - * - * - * @since ari_1_9_0 - *********************************************************/ -public void deleteLog(String logChannelName) throws RestException; - - - -// void deleteLog String AriCallback callback -/********************************************************** - * - * - * @since ari_1_9_0 - *********************************************************/ -public void deleteLog(String logChannelName, AriCallback callback); - - - -// void loadModule String AriCallback callback -/********************************************************** - * - * - * @since ari_1_8_0 - *********************************************************/ -public void loadModule(String moduleName, AriCallback callback); - - - -// void getObject String String String AriCallback> callback -/********************************************************** - * - * - * @since ari_1_8_0 - *********************************************************/ -public void getObject(String configClass, String objectType, String id, AriCallback> callback); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/ActionBridges.java b/classes/ch/loway/oss/ari4java/generated/ActionBridges.java deleted file mode 100644 index 30fd947c..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ActionBridges.java +++ /dev/null @@ -1,361 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface ActionBridges { - -// void create String String String AriCallback callback -/********************************************************** - * - * - * @since ari_1_5_0 - *********************************************************/ -public void create(String type, String bridgeId, String name, AriCallback callback); - - - -// void createWithId String String String AriCallback callback -/********************************************************** - * - * - * @since ari_1_7_0 - *********************************************************/ -public void createWithId(String type, String bridgeId, String name, AriCallback callback); - - - -// void create String AriCallback callback -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void create(String type, AriCallback callback); - - - -// List list -/********************************************************** - * List all active bridges in Asterisk. - * - * - * @since ari_0_0_1 - *********************************************************/ -public List list() throws RestException; - - - -// void playWithId String String String String int int AriCallback callback -/********************************************************** - * - * - * @since ari_1_5_0 - *********************************************************/ -public void playWithId(String bridgeId, String playbackId, String media, String lang, int offsetms, int skipms, AriCallback callback); - - - -// Bridge get String -/********************************************************** - * Get bridge details. - * - * - * @since ari_0_0_1 - *********************************************************/ -public Bridge get(String bridgeId) throws RestException; - - - -// Bridge createWithId String String String -/********************************************************** - * Create a new bridge or updates an existing one. - * This bridge persists until it has been shut down, or Asterisk has been shut down. - * - * @since ari_1_7_0 - *********************************************************/ -public Bridge createWithId(String type, String bridgeId, String name) throws RestException; - - - -// void removeChannel String String -/********************************************************** - * Remove a channel from a bridge. - * - * - * @since ari_0_0_1 - *********************************************************/ -public void removeChannel(String bridgeId, String channel) throws RestException; - - - -// void addChannel String String String -/********************************************************** - * Add a channel to a bridge. - * - * - * @since ari_0_0_1 - *********************************************************/ -public void addChannel(String bridgeId, String channel, String role) throws RestException; - - - -// void stopMoh String AriCallback callback -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void stopMoh(String bridgeId, AriCallback callback); - - - -// void destroy String AriCallback callback -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void destroy(String bridgeId, AriCallback callback); - - - -// Bridge create String String -/********************************************************** - * Create a new bridge. - * This bridge persists until it has been shut down, or Asterisk has been shut down. - * - * @since ari_1_0_0 - *********************************************************/ -public Bridge create(String type, String name) throws RestException; - - - -// Bridge create String String String -/********************************************************** - * Create a new bridge. - * This bridge persists until it has been shut down, or Asterisk has been shut down. - * - * @since ari_1_5_0 - *********************************************************/ -public Bridge create(String type, String bridgeId, String name) throws RestException; - - - -// Bridge create String -/********************************************************** - * Create a new bridge. - * This bridge persists until it has been shut down, or Asterisk has been shut down. - * - * @since ari_0_0_1 - *********************************************************/ -public Bridge create(String type) throws RestException; - - - -// void record String String String int int String boolean String AriCallback callback -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void record(String bridgeId, String name, String format, int maxDurationSeconds, int maxSilenceSeconds, String ifExists, boolean beep, String terminateOn, AriCallback callback); - - - -// Playback play String String String int int -/********************************************************** - * Start playback of media on a bridge. - * 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.) - * - * @since ari_0_0_1 - *********************************************************/ -public Playback play(String bridgeId, String media, String lang, int offsetms, int skipms) throws RestException; - - - -// void play String String String int int AriCallback callback -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void play(String bridgeId, String media, String lang, int offsetms, int skipms, AriCallback callback); - - - -// void create String String AriCallback callback -/********************************************************** - * - * - * @since ari_1_0_0 - *********************************************************/ -public void create(String type, String name, AriCallback callback); - - - -// void addChannel String String String AriCallback callback -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void addChannel(String bridgeId, String channel, String role, AriCallback callback); - - - -// Playback play String String String int int String -/********************************************************** - * Start playback of media on a bridge. - * The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.) - * - * @since ari_1_5_0 - *********************************************************/ -public Playback play(String bridgeId, String media, String lang, int offsetms, int skipms, String playbackId) throws RestException; - - - -// void get String AriCallback callback -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void get(String bridgeId, AriCallback callback); - - - -// Playback playWithId String String String String int int -/********************************************************** - * Start playback of media on a bridge. - * 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.) - * - * @since ari_1_5_0 - *********************************************************/ -public Playback playWithId(String bridgeId, String playbackId, String media, String lang, int offsetms, int skipms) throws RestException; - - - -// void stopMoh String -/********************************************************** - * Stop playing music on hold to a bridge. - * This will only stop music on hold being played via POST bridges/{bridgeId}/moh. - * - * @since ari_0_0_1 - *********************************************************/ -public void stopMoh(String bridgeId) throws RestException; - - - -// void play String String String int int String AriCallback callback -/********************************************************** - * - * - * @since ari_1_5_0 - *********************************************************/ -public void play(String bridgeId, String media, String lang, int offsetms, int skipms, String playbackId, AriCallback callback); - - - -// void create_or_update_with_id String String String AriCallback callback -/********************************************************** - * - * - * @since ari_1_5_0 - *********************************************************/ -public void create_or_update_with_id(String type, String bridgeId, String name, AriCallback callback); - - - -// void removeChannel String String AriCallback callback -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void removeChannel(String bridgeId, String channel, AriCallback callback); - - - -// void startMoh String String -/********************************************************** - * Play music on hold to a bridge or change the MOH class that is playing. - * - * - * @since ari_0_0_1 - *********************************************************/ -public void startMoh(String bridgeId, String mohClass) throws RestException; - - - -// Bridge create_or_update_with_id String String String -/********************************************************** - * Create a new bridge or updates an existing one. - * This bridge persists until it has been shut down, or Asterisk has been shut down. - * - * @since ari_1_5_0 - *********************************************************/ -public Bridge create_or_update_with_id(String type, String bridgeId, String name) throws RestException; - - - -// void list AriCallback> callback -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void list(AriCallback> callback); - - - -// void startMoh String String AriCallback callback -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void startMoh(String bridgeId, String mohClass, AriCallback callback); - - - -// void destroy String -/********************************************************** - * Shut down a bridge. - * If any channels are in this bridge, they will be removed and resume whatever they were doing beforehand. - * - * @since ari_0_0_1 - *********************************************************/ -public void destroy(String bridgeId) throws RestException; - - - -// LiveRecording record String String String int int String boolean String -/********************************************************** - * Start a recording. - * This records the mixed audio from all channels participating in this bridge. - * - * @since ari_0_0_1 - *********************************************************/ -public LiveRecording record(String bridgeId, String name, String format, int maxDurationSeconds, int maxSilenceSeconds, String ifExists, boolean beep, String terminateOn) throws RestException; - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/ActionChannels.java b/classes/ch/loway/oss/ari4java/generated/ActionChannels.java deleted file mode 100644 index df0408f0..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ActionChannels.java +++ /dev/null @@ -1,781 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface ActionChannels { - -// void dial String String int AriCallback callback -/********************************************************** - * - * - * @since ari_1_10_0 - *********************************************************/ -public void dial(String channelId, String caller, int timeout, AriCallback callback); - - - -// void originateWithId String String String String long String String String int Map String AriCallback callback -/********************************************************** - * - * - * @since ari_1_5_0 - *********************************************************/ -public void originateWithId(String channelId, String endpoint, String extension, String context, long priority, String app, String appArgs, String callerId, int timeout, Map variables, String otherChannelId, AriCallback callback); - - - -// void ring String -/********************************************************** - * Indicate ringing to a channel. - * - * - * @since ari_0_0_1 - *********************************************************/ -public void ring(String channelId) throws RestException; - - - -// void snoopChannel String String String String String AriCallback callback -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void snoopChannel(String channelId, String spy, String whisper, String app, String appArgs, AriCallback callback); - - - -// void ringStop String -/********************************************************** - * Stop ringing indication on a channel if locally generated. - * - * - * @since ari_0_0_1 - *********************************************************/ -public void ringStop(String channelId) throws RestException; - - - -// void playWithId String String String String int int AriCallback callback -/********************************************************** - * - * - * @since ari_1_5_0 - *********************************************************/ -public void playWithId(String channelId, String playbackId, String media, String lang, int offsetms, int skipms, AriCallback callback); - - - -// void dial String String int -/********************************************************** - * Dial a created channel. - * - * - * @since ari_1_10_0 - *********************************************************/ -public void dial(String channelId, String caller, int timeout) throws RestException; - - - -// void unmute String String -/********************************************************** - * Unmute a channel. - * - * - * @since ari_0_0_1 - *********************************************************/ -public void unmute(String channelId, String direction) throws RestException; - - - -// void snoopChannelWithId String String String String String String AriCallback callback -/********************************************************** - * - * - * @since ari_1_5_0 - *********************************************************/ -public void snoopChannelWithId(String channelId, String snoopId, String spy, String whisper, String app, String appArgs, AriCallback callback); - - - -// void ringStop String AriCallback callback -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void ringStop(String channelId, AriCallback callback); - - - -// void continueInDialplan String String String int AriCallback callback -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void continueInDialplan(String channelId, String context, String extension, int priority, AriCallback callback); - - - -// void hangup String String -/********************************************************** - * Delete (i.e. hangup) a channel. - * - * - * @since ari_0_0_1 - *********************************************************/ -public void hangup(String channelId, String reason) throws RestException; - - - -// void unmute String String AriCallback callback -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void unmute(String channelId, String direction, AriCallback callback); - - - -// void stopMoh String AriCallback callback -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void stopMoh(String channelId, AriCallback callback); - - - -// void get String AriCallback callback -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void get(String channelId, AriCallback callback); - - - -// void setChannelVar String String String -/********************************************************** - * Set the value of a channel variable or function. - * - * - * @since ari_0_0_1 - *********************************************************/ -public void setChannelVar(String channelId, String variable, String value) throws RestException; - - - -// void originateWithId String String String String long String String String String int Map String String String AriCallback callback -/********************************************************** - * - * - * @since ari_1_10_0 - *********************************************************/ -public void originateWithId(String channelId, String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String otherChannelId, String originator, String formats, AriCallback callback); - - - -// void continueInDialplan String String String int String AriCallback callback -/********************************************************** - * - * - * @since ari_1_7_0 - *********************************************************/ -public void continueInDialplan(String channelId, String context, String extension, int priority, String label, AriCallback callback); - - - -// void unhold String AriCallback callback -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void unhold(String channelId, AriCallback callback); - - - -// void startSilence String AriCallback callback -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void startSilence(String channelId, AriCallback callback); - - - -// Playback play String String String int int -/********************************************************** - * Start playback of media. - * 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.) - * - * @since ari_0_0_1 - *********************************************************/ -public Playback play(String channelId, String media, String lang, int offsetms, int skipms) throws RestException; - - - -// void hangup String String AriCallback callback -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void hangup(String channelId, String reason, AriCallback callback); - - - -// void continueInDialplan String String String int -/********************************************************** - * Exit application; continue execution in the dialplan. - * - * - * @since ari_0_0_1 - *********************************************************/ -public void continueInDialplan(String channelId, String context, String extension, int priority) throws RestException; - - - -// Channel originate String String String long String String String String int Map String String String String -/********************************************************** - * Create a new channel (originate). - * 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. - * - * @since ari_1_10_0 - *********************************************************/ -public Channel originate(String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String channelId, String otherChannelId, String originator, String formats) throws RestException; - - - -// void originate String String String long String String String int AriCallback callback -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void originate(String endpoint, String extension, String context, long priority, String app, String appArgs, String callerId, int timeout, AriCallback callback); - - - -// Channel get String -/********************************************************** - * Channel details. - * - * - * @since ari_0_0_1 - *********************************************************/ -public Channel get(String channelId) throws RestException; - - - -// void redirect String String AriCallback callback -/********************************************************** - * - * - * @since ari_1_8_0 - *********************************************************/ -public void redirect(String channelId, String endpoint, AriCallback callback); - - - -// void redirect String String -/********************************************************** - * Redirect the channel to a different location. - * - * - * @since ari_1_8_0 - *********************************************************/ -public void redirect(String channelId, String endpoint) throws RestException; - - - -// Playback play String String String int int String -/********************************************************** - * Start playback of media. - * The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.) - * - * @since ari_1_5_0 - *********************************************************/ -public Playback play(String channelId, String media, String lang, int offsetms, int skipms, String playbackId) throws RestException; - - - -// void stopSilence String -/********************************************************** - * Stop playing silence to a channel. - * - * - * @since ari_0_0_1 - *********************************************************/ -public void stopSilence(String channelId) throws RestException; - - - -// void originate String String String long String String String String int Map String String String AriCallback callback -/********************************************************** - * - * - * @since ari_1_7_0 - *********************************************************/ -public void originate(String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String channelId, String otherChannelId, String originator, AriCallback callback); - - - -// Channel snoopChannelWithId String String String String String String -/********************************************************** - * Start snooping. - * Snoop (spy/whisper) on a specific channel. - * - * @since ari_1_5_0 - *********************************************************/ -public Channel snoopChannelWithId(String channelId, String snoopId, String spy, String whisper, String app, String appArgs) throws RestException; - - - -// void startSilence String -/********************************************************** - * Play silence to a channel. - * Using media operations such as /play on a channel playing silence in this manner will suspend silence without resuming automatically. - * - * @since ari_0_0_1 - *********************************************************/ -public void startSilence(String channelId) throws RestException; - - - -// Channel originate String String String long String String String String int Map String String String -/********************************************************** - * Create a new channel (originate). - * 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. - * - * @since ari_1_7_0 - *********************************************************/ -public Channel originate(String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String channelId, String otherChannelId, String originator) throws RestException; - - - -// Channel create String String String String String String String -/********************************************************** - * Create channel. - * - * - * @since ari_1_10_0 - *********************************************************/ -public Channel create(String endpoint, String app, String appArgs, String channelId, String otherChannelId, String originator, String formats) throws RestException; - - - -// void mute String String -/********************************************************** - * Mute a channel. - * - * - * @since ari_0_0_1 - *********************************************************/ -public void mute(String channelId, String direction) throws RestException; - - - -// void snoopChannel String String String String String String AriCallback callback -/********************************************************** - * - * - * @since ari_1_5_0 - *********************************************************/ -public void snoopChannel(String channelId, String spy, String whisper, String app, String appArgs, String snoopId, AriCallback callback); - - - -// void stopMoh String -/********************************************************** - * Stop playing music on hold to a channel. - * - * - * @since ari_0_0_1 - *********************************************************/ -public void stopMoh(String channelId) throws RestException; - - - -// void play String String String int int String AriCallback callback -/********************************************************** - * - * - * @since ari_1_5_0 - *********************************************************/ -public void play(String channelId, String media, String lang, int offsetms, int skipms, String playbackId, AriCallback callback); - - - -// void startMoh String String -/********************************************************** - * Play music on hold to a channel. - * Using media operations such as /play on a channel playing MOH in this manner will suspend MOH without resuming automatically. If continuing music on hold is desired, the stasis application must reinitiate music on hold. - * - * @since ari_0_0_1 - *********************************************************/ -public void startMoh(String channelId, String mohClass) throws RestException; - - - -// void unhold String -/********************************************************** - * Remove a channel from hold. - * - * - * @since ari_0_0_1 - *********************************************************/ -public void unhold(String channelId) throws RestException; - - - -// void originate String String String long String String String int Map String String AriCallback callback -/********************************************************** - * - * - * @since ari_1_5_0 - *********************************************************/ -public void originate(String endpoint, String extension, String context, long priority, String app, String appArgs, String callerId, int timeout, Map variables, String channelId, String otherChannelId, AriCallback callback); - - - -// void startMoh String String AriCallback callback -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void startMoh(String channelId, String mohClass, AriCallback callback); - - - -// Channel originate String String String long String String String int -/********************************************************** - * Create a new channel (originate). - * 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. - * - * @since ari_0_0_1 - *********************************************************/ -public Channel originate(String endpoint, String extension, String context, long priority, String app, String appArgs, String callerId, int timeout) throws RestException; - - - -// Channel originateWithId String String String String long String String String int Map String -/********************************************************** - * Create a new channel (originate with id). - * 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. - * - * @since ari_1_5_0 - *********************************************************/ -public Channel originateWithId(String channelId, String endpoint, String extension, String context, long priority, String app, String appArgs, String callerId, int timeout, Map variables, String otherChannelId) throws RestException; - - - -// void stopSilence String AriCallback callback -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void stopSilence(String channelId, AriCallback callback); - - - -// Channel originateWithId String String String String long String String String String int Map String String String -/********************************************************** - * Create a new channel (originate with id). - * 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. - * - * @since ari_1_10_0 - *********************************************************/ -public Channel originateWithId(String channelId, String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String otherChannelId, String originator, String formats) throws RestException; - - - -// Variable getChannelVar String String -/********************************************************** - * Get the value of a channel variable or function. - * - * - * @since ari_0_0_1 - *********************************************************/ -public Variable getChannelVar(String channelId, String variable) throws RestException; - - - -// void sendDTMF String String int int int int -/********************************************************** - * Send provided DTMF to a given channel. - * - * - * @since ari_0_0_1 - *********************************************************/ -public void sendDTMF(String channelId, String dtmf, int before, int between, int duration, int after) throws RestException; - - - -// void getChannelVar String String AriCallback callback -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void getChannelVar(String channelId, String variable, AriCallback callback); - - - -// void originateWithId String String String String long String String String String int Map String String AriCallback callback -/********************************************************** - * - * - * @since ari_1_7_0 - *********************************************************/ -public void originateWithId(String channelId, String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String otherChannelId, String originator, AriCallback callback); - - - -// void answer String -/********************************************************** - * Answer a channel. - * - * - * @since ari_0_0_1 - *********************************************************/ -public void answer(String channelId) throws RestException; - - - -// void list AriCallback> callback -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void list(AriCallback> callback); - - - -// void create String String String String String String String AriCallback callback -/********************************************************** - * - * - * @since ari_1_10_0 - *********************************************************/ -public void create(String endpoint, String app, String appArgs, String channelId, String otherChannelId, String originator, String formats, AriCallback callback); - - - -// void hold String -/********************************************************** - * Hold a channel. - * - * - * @since ari_0_0_1 - *********************************************************/ -public void hold(String channelId) throws RestException; - - - -// void setChannelVar String String String AriCallback callback -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void setChannelVar(String channelId, String variable, String value, AriCallback callback); - - - -// List list -/********************************************************** - * List all active channels in Asterisk. - * - * - * @since ari_0_0_1 - *********************************************************/ -public List list() throws RestException; - - - -// Channel originate String String String long String String String int Map String String -/********************************************************** - * Create a new channel (originate). - * 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. - * - * @since ari_1_5_0 - *********************************************************/ -public Channel originate(String endpoint, String extension, String context, long priority, String app, String appArgs, String callerId, int timeout, Map variables, String channelId, String otherChannelId) throws RestException; - - - -// void ring String AriCallback callback -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void ring(String channelId, AriCallback callback); - - - -// void record String String String int int String boolean String AriCallback callback -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void record(String channelId, String name, String format, int maxDurationSeconds, int maxSilenceSeconds, String ifExists, boolean beep, String terminateOn, AriCallback callback); - - - -// Channel originateWithId String String String String long String String String String int Map String String -/********************************************************** - * Create a new channel (originate with id). - * 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. - * - * @since ari_1_7_0 - *********************************************************/ -public Channel originateWithId(String channelId, String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String otherChannelId, String originator) throws RestException; - - - -// void play String String String int int AriCallback callback -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void play(String channelId, String media, String lang, int offsetms, int skipms, AriCallback callback); - - - -// Channel snoopChannel String String String String String String -/********************************************************** - * Start snooping. - * Snoop (spy/whisper) on a specific channel. - * - * @since ari_1_5_0 - *********************************************************/ -public Channel snoopChannel(String channelId, String spy, String whisper, String app, String appArgs, String snoopId) throws RestException; - - - -// void mute String String AriCallback callback -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void mute(String channelId, String direction, AriCallback callback); - - - -// void answer String AriCallback callback -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void answer(String channelId, AriCallback callback); - - - -// void continueInDialplan String String String int String -/********************************************************** - * Exit application; continue execution in the dialplan. - * - * - * @since ari_1_7_0 - *********************************************************/ -public void continueInDialplan(String channelId, String context, String extension, int priority, String label) throws RestException; - - - -// Playback playWithId String String String String int int -/********************************************************** - * Start playback of media and specify the playbackId. - * 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.) - * - * @since ari_1_5_0 - *********************************************************/ -public Playback playWithId(String channelId, String playbackId, String media, String lang, int offsetms, int skipms) throws RestException; - - - -// void sendDTMF String String int int int int AriCallback callback -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void sendDTMF(String channelId, String dtmf, int before, int between, int duration, int after, AriCallback callback); - - - -// Channel snoopChannel String String String String String -/********************************************************** - * Start snooping. - * Snoop (spy/whisper) on a specific channel. - * - * @since ari_0_0_1 - *********************************************************/ -public Channel snoopChannel(String channelId, String spy, String whisper, String app, String appArgs) throws RestException; - - - -// void hold String AriCallback callback -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void hold(String channelId, AriCallback callback); - - - -// void originate String String String long String String String String int Map String String String String AriCallback callback -/********************************************************** - * - * - * @since ari_1_10_0 - *********************************************************/ -public void originate(String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String channelId, String otherChannelId, String originator, String formats, AriCallback callback); - - - -// LiveRecording record String String String int int String boolean String -/********************************************************** - * Start a recording. - * 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. - * - * @since ari_0_0_1 - *********************************************************/ -public LiveRecording record(String channelId, String name, String format, int maxDurationSeconds, int maxSilenceSeconds, String ifExists, boolean beep, String terminateOn) throws RestException; - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/ActionDeviceStates.java b/classes/ch/loway/oss/ari4java/generated/ActionDeviceStates.java deleted file mode 100644 index a0610cf7..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ActionDeviceStates.java +++ /dev/null @@ -1,109 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface ActionDeviceStates { - -// List list -/********************************************************** - * List all ARI controlled device states. - * - * - * @since ari_0_0_1 - *********************************************************/ -public List list() throws RestException; - - - -// void get String AriCallback callback -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void get(String deviceName, AriCallback callback); - - - -// void delete String AriCallback callback -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void delete(String deviceName, AriCallback callback); - - - -// void delete String -/********************************************************** - * Destroy a device-state controlled by ARI. - * - * - * @since ari_0_0_1 - *********************************************************/ -public void delete(String deviceName) throws RestException; - - - -// void update String String AriCallback callback -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void update(String deviceName, String deviceState, AriCallback callback); - - - -// void update String String -/********************************************************** - * Change the state of a device controlled by ARI. (Note - implicitly creates the device state). - * - * - * @since ari_0_0_1 - *********************************************************/ -public void update(String deviceName, String deviceState) throws RestException; - - - -// DeviceState get String -/********************************************************** - * Retrieve the current state of a device. - * - * - * @since ari_0_0_1 - *********************************************************/ -public DeviceState get(String deviceName) throws RestException; - - - -// void list AriCallback> callback -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void list(AriCallback> callback); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/ActionEndpoints.java b/classes/ch/loway/oss/ari4java/generated/ActionEndpoints.java deleted file mode 100644 index 72b1c1cf..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ActionEndpoints.java +++ /dev/null @@ -1,130 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface ActionEndpoints { - -// Endpoint get String String -/********************************************************** - * Details for an endpoint. - * - * - * @since ari_0_0_1 - *********************************************************/ -public Endpoint get(String tech, String resource) throws RestException; - - - -// List listByTech String -/********************************************************** - * List available endoints for a given endpoint technology. - * - * - * @since ari_0_0_1 - *********************************************************/ -public List listByTech(String tech) throws RestException; - - - -// void list AriCallback> callback -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void list(AriCallback> callback); - - - -// void sendMessageToEndpoint String String String String Map AriCallback callback -/********************************************************** - * - * - * @since ari_1_5_0 - *********************************************************/ -public void sendMessageToEndpoint(String tech, String resource, String from, String body, Map variables, AriCallback callback); - - - -// void sendMessage String String String Map AriCallback callback -/********************************************************** - * - * - * @since ari_1_5_0 - *********************************************************/ -public void sendMessage(String to, String from, String body, Map variables, AriCallback callback); - - - -// void listByTech String AriCallback> callback -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void listByTech(String tech, AriCallback> callback); - - - -// void get String String AriCallback callback -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void get(String tech, String resource, AriCallback callback); - - - -// List list -/********************************************************** - * List all endpoints. - * - * - * @since ari_0_0_1 - *********************************************************/ -public List list() throws RestException; - - - -// void sendMessageToEndpoint String String String String Map -/********************************************************** - * Send a message to some endpoint in a technology. - * - * - * @since ari_1_5_0 - *********************************************************/ -public void sendMessageToEndpoint(String tech, String resource, String from, String body, Map variables) throws RestException; - - - -// void sendMessage String String String Map -/********************************************************** - * Send a message to some technology URI or endpoint. - * - * - * @since ari_1_5_0 - *********************************************************/ -public void sendMessage(String to, String from, String body, Map variables) throws RestException; - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/ActionEvents.java b/classes/ch/loway/oss/ari4java/generated/ActionEvents.java deleted file mode 100644 index 5a906e1e..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ActionEvents.java +++ /dev/null @@ -1,88 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface ActionEvents { - -// void userEvent String String String Map -/********************************************************** - * Generate a user event. - * - * - * @since ari_1_5_0 - *********************************************************/ -public void userEvent(String eventName, String application, String source, Map variables) throws RestException; - - - -// void eventWebsocket String boolean AriCallback callback -/********************************************************** - * - * - * @since ari_1_9_0 - *********************************************************/ -public void eventWebsocket(String app, boolean subscribeAll, AriCallback callback); - - - -// void eventWebsocket String AriCallback callback -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void eventWebsocket(String app, AriCallback callback); - - - -// Message eventWebsocket String -/********************************************************** - * WebSocket connection for events. - * - * - * @since ari_0_0_1 - *********************************************************/ -public Message eventWebsocket(String app) throws RestException; - - - -// void userEvent String String String Map AriCallback callback -/********************************************************** - * - * - * @since ari_1_5_0 - *********************************************************/ -public void userEvent(String eventName, String application, String source, Map variables, AriCallback callback); - - - -// Message eventWebsocket String boolean -/********************************************************** - * WebSocket connection for events. - * - * - * @since ari_1_9_0 - *********************************************************/ -public Message eventWebsocket(String app, boolean subscribeAll) throws RestException; - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/ActionPlaybacks.java b/classes/ch/loway/oss/ari4java/generated/ActionPlaybacks.java deleted file mode 100644 index 4aa0cc3d..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ActionPlaybacks.java +++ /dev/null @@ -1,88 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface ActionPlaybacks { - -// void get String AriCallback callback -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void get(String playbackId, AriCallback callback); - - - -// void control String String -/********************************************************** - * Control a playback. - * - * - * @since ari_0_0_1 - *********************************************************/ -public void control(String playbackId, String operation) throws RestException; - - - -// void stop String -/********************************************************** - * Stop a playback. - * - * - * @since ari_0_0_1 - *********************************************************/ -public void stop(String playbackId) throws RestException; - - - -// Playback get String -/********************************************************** - * Get a playback's details. - * - * - * @since ari_0_0_1 - *********************************************************/ -public Playback get(String playbackId) throws RestException; - - - -// void control String String AriCallback callback -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void control(String playbackId, String operation, AriCallback callback); - - - -// void stop String AriCallback callback -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void stop(String playbackId, AriCallback callback); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/ActionRecordings.java b/classes/ch/loway/oss/ari4java/generated/ActionRecordings.java deleted file mode 100644 index 1c1ab3ac..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ActionRecordings.java +++ /dev/null @@ -1,277 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface ActionRecordings { - -// void mute String AriCallback callback -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void mute(String recordingName, AriCallback callback); - - - -// StoredRecording getStored String -/********************************************************** - * Get a stored recording's details. - * - * - * @since ari_0_0_1 - *********************************************************/ -public StoredRecording getStored(String recordingName) throws RestException; - - - -// LiveRecording getLive String -/********************************************************** - * List live recordings. - * - * - * @since ari_0_0_1 - *********************************************************/ -public LiveRecording getLive(String recordingName) throws RestException; - - - -// void unpause String -/********************************************************** - * Unpause a live recording. - * - * - * @since ari_0_0_1 - *********************************************************/ -public void unpause(String recordingName) throws RestException; - - - -// void pause String AriCallback callback -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void pause(String recordingName, AriCallback callback); - - - -// void listStored AriCallback> callback -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void listStored(AriCallback> callback); - - - -// void deleteStored String AriCallback callback -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void deleteStored(String recordingName, AriCallback callback); - - - -// void cancel String -/********************************************************** - * Stop a live recording and discard it. - * - * - * @since ari_0_0_1 - *********************************************************/ -public void cancel(String recordingName) throws RestException; - - - -// void cancel String AriCallback callback -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void cancel(String recordingName, AriCallback callback); - - - -// void unmute String -/********************************************************** - * Unmute a live recording. - * - * - * @since ari_0_0_1 - *********************************************************/ -public void unmute(String recordingName) throws RestException; - - - -// List listStored -/********************************************************** - * List recordings that are complete. - * - * - * @since ari_0_0_1 - *********************************************************/ -public List listStored() throws RestException; - - - -// void deleteStored String -/********************************************************** - * Delete a stored recording. - * - * - * @since ari_0_0_1 - *********************************************************/ -public void deleteStored(String recordingName) throws RestException; - - - -// void unpause String AriCallback callback -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void unpause(String recordingName, AriCallback callback); - - - -// void pause String -/********************************************************** - * Pause a live recording. - * Pausing a recording suspends silence detection, which will be restarted when the recording is unpaused. Paused time is not included in the accounting for maxDurationSeconds. - * - * @since ari_0_0_1 - *********************************************************/ -public void pause(String recordingName) throws RestException; - - - -// byte[] getStoredFile String -/********************************************************** - * Get the file associated with the stored recording. - * - * - * @since ari_1_10_0 - *********************************************************/ -public byte[] getStoredFile(String recordingName) throws RestException; - - - -// StoredRecording copyStored String String -/********************************************************** - * Copy a stored recording. - * - * - * @since ari_1_5_0 - *********************************************************/ -public StoredRecording copyStored(String recordingName, String destinationRecordingName) throws RestException; - - - -// void getStoredFile String AriCallback callback -/********************************************************** - * - * - * @since ari_1_10_0 - *********************************************************/ -public void getStoredFile(String recordingName, AriCallback callback); - - - -// void getLive String AriCallback callback -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void getLive(String recordingName, AriCallback callback); - - - -// void mute String -/********************************************************** - * Mute a live recording. - * Muting a recording suspends silence detection, which will be restarted when the recording is unmuted. - * - * @since ari_0_0_1 - *********************************************************/ -public void mute(String recordingName) throws RestException; - - - -// void copyStored String String AriCallback callback -/********************************************************** - * - * - * @since ari_1_5_0 - *********************************************************/ -public void copyStored(String recordingName, String destinationRecordingName, AriCallback callback); - - - -// void getStored String AriCallback callback -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void getStored(String recordingName, AriCallback callback); - - - -// void stop String -/********************************************************** - * Stop a live recording and store it. - * - * - * @since ari_0_0_1 - *********************************************************/ -public void stop(String recordingName) throws RestException; - - - -// void unmute String AriCallback callback -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void unmute(String recordingName, AriCallback callback); - - - -// void stop String AriCallback callback -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void stop(String recordingName, AriCallback callback); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/ActionSounds.java b/classes/ch/loway/oss/ari4java/generated/ActionSounds.java deleted file mode 100644 index 901c1640..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ActionSounds.java +++ /dev/null @@ -1,67 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface ActionSounds { - -// List list String String -/********************************************************** - * List all sounds. - * - * - * @since ari_0_0_1 - *********************************************************/ -public List list(String lang, String format) throws RestException; - - - -// void get String AriCallback callback -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void get(String soundId, AriCallback callback); - - - -// Sound get String -/********************************************************** - * Get a sound's details. - * - * - * @since ari_0_0_1 - *********************************************************/ -public Sound get(String soundId) throws RestException; - - - -// void list String String AriCallback> callback -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void list(String lang, String format, AriCallback> callback); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/Application.java b/classes/ch/loway/oss/ari4java/generated/Application.java deleted file mode 100644 index 2f3eb5ea..00000000 --- a/classes/ch/loway/oss/ari4java/generated/Application.java +++ /dev/null @@ -1,125 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface Application { - -// void setEndpoint_ids List -/********************************************************** - * {tech}/{resource} for endpoints subscribed to. - * - * @since ari_0_0_1 - *********************************************************/ - public void setEndpoint_ids(List val ); - - - -// void setBridge_ids List -/********************************************************** - * Id's for bridges subscribed to. - * - * @since ari_0_0_1 - *********************************************************/ - public void setBridge_ids(List val ); - - - -// List getChannel_ids -/********************************************************** - * Id's for channels subscribed to. - * - * @since ari_0_0_1 - *********************************************************/ - public List getChannel_ids(); - - - -// List getBridge_ids -/********************************************************** - * Id's for bridges subscribed to. - * - * @since ari_0_0_1 - *********************************************************/ - public List getBridge_ids(); - - - -// void setName String -/********************************************************** - * Name of this application - * - * @since ari_0_0_1 - *********************************************************/ - public void setName(String val ); - - - -// List getEndpoint_ids -/********************************************************** - * {tech}/{resource} for endpoints subscribed to. - * - * @since ari_0_0_1 - *********************************************************/ - public List getEndpoint_ids(); - - - -// void setChannel_ids List -/********************************************************** - * Id's for channels subscribed to. - * - * @since ari_0_0_1 - *********************************************************/ - public void setChannel_ids(List val ); - - - -// String getName -/********************************************************** - * Name of this application - * - * @since ari_0_0_1 - *********************************************************/ - public String getName(); - - - -// void setDevice_names List -/********************************************************** - * Names of the devices subscribed to. - * - * @since ari_0_0_1 - *********************************************************/ - public void setDevice_names(List val ); - - - -// List getDevice_names -/********************************************************** - * Names of the devices subscribed to. - * - * @since ari_0_0_1 - *********************************************************/ - public List getDevice_names(); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/ApplicationReplaced.java b/classes/ch/loway/oss/ari4java/generated/ApplicationReplaced.java deleted file mode 100644 index 7e905934..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ApplicationReplaced.java +++ /dev/null @@ -1,25 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface ApplicationReplaced { -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/AriBuilder.java b/classes/ch/loway/oss/ari4java/generated/AriBuilder.java deleted file mode 100644 index a4600cc3..00000000 --- a/classes/ch/loway/oss/ari4java/generated/AriBuilder.java +++ /dev/null @@ -1,94 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.ARI; - -public interface AriBuilder { - public abstract ActionApplications actionApplications(); - public abstract ActionAsterisk actionAsterisk(); - public abstract ActionBridges actionBridges(); - public abstract ActionChannels actionChannels(); - public abstract ActionDeviceStates actionDeviceStates(); - public abstract ActionEndpoints actionEndpoints(); - public abstract ActionEvents actionEvents(); - public abstract ActionPlaybacks actionPlaybacks(); - public abstract ActionRecordings actionRecordings(); - public abstract ActionSounds actionSounds(); - public abstract Application application(); - public abstract ApplicationReplaced applicationReplaced(); - public abstract AsteriskInfo asteriskInfo(); - public abstract Bridge bridge(); - public abstract BridgeAttendedTransfer bridgeAttendedTransfer(); - public abstract BridgeBlindTransfer bridgeBlindTransfer(); - public abstract BridgeCreated bridgeCreated(); - public abstract BridgeDestroyed bridgeDestroyed(); - public abstract BridgeMerged bridgeMerged(); - public abstract BuildInfo buildInfo(); - public abstract CallerID callerID(); - public abstract Channel channel(); - public abstract ChannelCallerId channelCallerId(); - public abstract ChannelConnectedLine channelConnectedLine(); - public abstract ChannelCreated channelCreated(); - public abstract ChannelDestroyed channelDestroyed(); - public abstract ChannelDialplan channelDialplan(); - public abstract ChannelDtmfReceived channelDtmfReceived(); - public abstract ChannelEnteredBridge channelEnteredBridge(); - public abstract ChannelHangupRequest channelHangupRequest(); - public abstract ChannelHold channelHold(); - public abstract ChannelLeftBridge channelLeftBridge(); - public abstract ChannelStateChange channelStateChange(); - public abstract ChannelTalkingFinished channelTalkingFinished(); - public abstract ChannelTalkingStarted channelTalkingStarted(); - public abstract ChannelUnhold channelUnhold(); - public abstract ChannelUserevent channelUserevent(); - public abstract ChannelVarset channelVarset(); - public abstract ConfigInfo configInfo(); - public abstract ConfigTuple configTuple(); - public abstract ContactInfo contactInfo(); - public abstract ContactStatusChange contactStatusChange(); - public abstract DeviceState deviceState(); - public abstract DeviceStateChanged deviceStateChanged(); - public abstract Dial dial(); - public abstract Dialed dialed(); - public abstract DialplanCEP dialplanCEP(); - public abstract Endpoint endpoint(); - public abstract EndpointStateChange endpointStateChange(); - public abstract Event event(); - public abstract FormatLangPair formatLangPair(); - public abstract LiveRecording liveRecording(); - public abstract LogChannel logChannel(); - public abstract Message message(); - public abstract MissingParams missingParams(); - public abstract Module module(); - public abstract Peer peer(); - public abstract PeerStatusChange peerStatusChange(); - public abstract Playback playback(); - public abstract PlaybackContinuing playbackContinuing(); - public abstract PlaybackFinished playbackFinished(); - public abstract PlaybackStarted playbackStarted(); - public abstract RecordingFailed recordingFailed(); - public abstract RecordingFinished recordingFinished(); - public abstract RecordingStarted recordingStarted(); - public abstract SetId setId(); - public abstract Sound sound(); - public abstract StasisEnd stasisEnd(); - public abstract StasisStart stasisStart(); - public abstract StatusInfo statusInfo(); - public abstract StoredRecording storedRecording(); - public abstract SystemInfo systemInfo(); - public abstract TextMessage textMessage(); - public abstract TextMessageReceived textMessageReceived(); - public abstract TextMessageVariable textMessageVariable(); - public abstract Variable variable(); - - - public abstract ARI.ClassFactory getClassFactory(); - - -} - diff --git a/classes/ch/loway/oss/ari4java/generated/AsteriskInfo.java b/classes/ch/loway/oss/ari4java/generated/AsteriskInfo.java deleted file mode 100644 index 85c8ac7d..00000000 --- a/classes/ch/loway/oss/ari4java/generated/AsteriskInfo.java +++ /dev/null @@ -1,105 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface AsteriskInfo { - -// void setConfig ConfigInfo -/********************************************************** - * Info about Asterisk configuration - * - * @since ari_0_0_1 - *********************************************************/ - public void setConfig(ConfigInfo val ); - - - -// void setStatus StatusInfo -/********************************************************** - * Info about Asterisk status - * - * @since ari_0_0_1 - *********************************************************/ - public void setStatus(StatusInfo val ); - - - -// StatusInfo getStatus -/********************************************************** - * Info about Asterisk status - * - * @since ari_0_0_1 - *********************************************************/ - public StatusInfo getStatus(); - - - -// void setBuild BuildInfo -/********************************************************** - * Info about how Asterisk was built - * - * @since ari_0_0_1 - *********************************************************/ - public void setBuild(BuildInfo val ); - - - -// BuildInfo getBuild -/********************************************************** - * Info about how Asterisk was built - * - * @since ari_0_0_1 - *********************************************************/ - public BuildInfo getBuild(); - - - -// ConfigInfo getConfig -/********************************************************** - * Info about Asterisk configuration - * - * @since ari_0_0_1 - *********************************************************/ - public ConfigInfo getConfig(); - - - -// void setSystem SystemInfo -/********************************************************** - * Info about the system running Asterisk - * - * @since ari_0_0_1 - *********************************************************/ - public void setSystem(SystemInfo val ); - - - -// SystemInfo getSystem -/********************************************************** - * Info about the system running Asterisk - * - * @since ari_0_0_1 - *********************************************************/ - public SystemInfo getSystem(); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/Bridge.java b/classes/ch/loway/oss/ari4java/generated/Bridge.java deleted file mode 100644 index 289b2125..00000000 --- a/classes/ch/loway/oss/ari4java/generated/Bridge.java +++ /dev/null @@ -1,165 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface Bridge extends EventSource { - -// void setBridge_type String -/********************************************************** - * Type of bridge technology - * - * @since ari_0_0_1 - *********************************************************/ - public void setBridge_type(String val ); - - - -// void setBridge_class String -/********************************************************** - * Bridging class - * - * @since ari_0_0_1 - *********************************************************/ - public void setBridge_class(String val ); - - - -// void setName String -/********************************************************** - * Name the creator gave the bridge - * - * @since ari_1_0_0 - *********************************************************/ - public void setName(String val ); - - - -// String getId -/********************************************************** - * Unique identifier for this bridge - * - * @since ari_0_0_1 - *********************************************************/ - public String getId(); - - - -// void setId String -/********************************************************** - * Unique identifier for this bridge - * - * @since ari_0_0_1 - *********************************************************/ - public void setId(String val ); - - - -// String getBridge_type -/********************************************************** - * Type of bridge technology - * - * @since ari_0_0_1 - *********************************************************/ - public String getBridge_type(); - - - -// String getName -/********************************************************** - * Name the creator gave the bridge - * - * @since ari_1_0_0 - *********************************************************/ - public String getName(); - - - -// String getCreator -/********************************************************** - * Entity that created the bridge - * - * @since ari_1_0_0 - *********************************************************/ - public String getCreator(); - - - -// void setTechnology String -/********************************************************** - * Name of the current bridging technology - * - * @since ari_0_0_1 - *********************************************************/ - public void setTechnology(String val ); - - - -// String getBridge_class -/********************************************************** - * Bridging class - * - * @since ari_0_0_1 - *********************************************************/ - public String getBridge_class(); - - - -// String getTechnology -/********************************************************** - * Name of the current bridging technology - * - * @since ari_0_0_1 - *********************************************************/ - public String getTechnology(); - - - -// List getChannels -/********************************************************** - * Ids of channels participating in this bridge - * - * @since ari_0_0_1 - *********************************************************/ - public List getChannels(); - - - -// void setChannels List -/********************************************************** - * Ids of channels participating in this bridge - * - * @since ari_0_0_1 - *********************************************************/ - public void setChannels(List val ); - - - -// void setCreator String -/********************************************************** - * Entity that created the bridge - * - * @since ari_1_0_0 - *********************************************************/ - public void setCreator(String val ); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/BridgeAttendedTransfer.java b/classes/ch/loway/oss/ari4java/generated/BridgeAttendedTransfer.java deleted file mode 100644 index f304fad8..00000000 --- a/classes/ch/loway/oss/ari4java/generated/BridgeAttendedTransfer.java +++ /dev/null @@ -1,345 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface BridgeAttendedTransfer { - -// Channel getTransfer_target -/********************************************************** - * The channel that is being transferred to - * - * @since ari_1_5_0 - *********************************************************/ - public Channel getTransfer_target(); - - - -// void setDestination_threeway_channel Channel -/********************************************************** - * Transferer channel that survived the threeway result - * - * @since ari_1_5_0 - *********************************************************/ - public void setDestination_threeway_channel(Channel val ); - - - -// void setDestination_application String -/********************************************************** - * Application that has been transferred into - * - * @since ari_1_5_0 - *********************************************************/ - public void setDestination_application(String val ); - - - -// String getDestination_type -/********************************************************** - * How the transfer was accomplished - * - * @since ari_1_5_0 - *********************************************************/ - public String getDestination_type(); - - - -// String getResult -/********************************************************** - * The result of the transfer attempt - * - * @since ari_1_5_0 - *********************************************************/ - public String getResult(); - - - -// Channel getTransferee -/********************************************************** - * The channel that is being transferred - * - * @since ari_1_5_0 - *********************************************************/ - public Channel getTransferee(); - - - -// Channel getDestination_threeway_channel -/********************************************************** - * Transferer channel that survived the threeway result - * - * @since ari_1_5_0 - *********************************************************/ - public Channel getDestination_threeway_channel(); - - - -// Bridge getTransferer_second_leg_bridge -/********************************************************** - * Bridge the transferer second leg is in - * - * @since ari_1_5_0 - *********************************************************/ - public Bridge getTransferer_second_leg_bridge(); - - - -// Bridge getDestination_threeway_bridge -/********************************************************** - * Bridge that survived the threeway result - * - * @since ari_1_5_0 - *********************************************************/ - public Bridge getDestination_threeway_bridge(); - - - -// Bridge getTransferer_first_leg_bridge -/********************************************************** - * Bridge the transferer first leg is in - * - * @since ari_1_5_0 - *********************************************************/ - public Bridge getTransferer_first_leg_bridge(); - - - -// boolean getIs_external -/********************************************************** - * Whether the transfer was externally initiated or not - * - * @since ari_1_5_0 - *********************************************************/ - public boolean getIs_external(); - - - -// Channel getDestination_link_second_leg -/********************************************************** - * Second leg of a link transfer result - * - * @since ari_1_5_0 - *********************************************************/ - public Channel getDestination_link_second_leg(); - - - -// void setDestination_bridge String -/********************************************************** - * Bridge that survived the merge result - * - * @since ari_1_5_0 - *********************************************************/ - public void setDestination_bridge(String val ); - - - -// String getDestination_application -/********************************************************** - * Application that has been transferred into - * - * @since ari_1_5_0 - *********************************************************/ - public String getDestination_application(); - - - -// Channel getTransferer_second_leg -/********************************************************** - * Second leg of the transferer - * - * @since ari_1_5_0 - *********************************************************/ - public Channel getTransferer_second_leg(); - - - -// void setIs_external boolean -/********************************************************** - * Whether the transfer was externally initiated or not - * - * @since ari_1_5_0 - *********************************************************/ - public void setIs_external(boolean val ); - - - -// void setDestination_link_first_leg Channel -/********************************************************** - * First leg of a link transfer result - * - * @since ari_1_5_0 - *********************************************************/ - public void setDestination_link_first_leg(Channel val ); - - - -// void setTransferer_second_leg_bridge Bridge -/********************************************************** - * Bridge the transferer second leg is in - * - * @since ari_1_5_0 - *********************************************************/ - public void setTransferer_second_leg_bridge(Bridge val ); - - - -// String getDestination_bridge -/********************************************************** - * Bridge that survived the merge result - * - * @since ari_1_5_0 - *********************************************************/ - public String getDestination_bridge(); - - - -// void setTransfer_target Channel -/********************************************************** - * The channel that is being transferred to - * - * @since ari_1_5_0 - *********************************************************/ - public void setTransfer_target(Channel val ); - - - -// void setDestination_link_second_leg Channel -/********************************************************** - * Second leg of a link transfer result - * - * @since ari_1_5_0 - *********************************************************/ - public void setDestination_link_second_leg(Channel val ); - - - -// void setTransferer_first_leg Channel -/********************************************************** - * First leg of the transferer - * - * @since ari_1_5_0 - *********************************************************/ - public void setTransferer_first_leg(Channel val ); - - - -// void setDestination_type String -/********************************************************** - * How the transfer was accomplished - * - * @since ari_1_5_0 - *********************************************************/ - public void setDestination_type(String val ); - - - -// void setTransferee Channel -/********************************************************** - * The channel that is being transferred - * - * @since ari_1_5_0 - *********************************************************/ - public void setTransferee(Channel val ); - - - -// void setDestination_threeway_bridge Bridge -/********************************************************** - * Bridge that survived the threeway result - * - * @since ari_1_5_0 - *********************************************************/ - public void setDestination_threeway_bridge(Bridge val ); - - - -// void setReplace_channel Channel -/********************************************************** - * The channel that is replacing transferer_first_leg in the swap - * - * @since ari_1_5_0 - *********************************************************/ - public void setReplace_channel(Channel val ); - - - -// Channel getDestination_link_first_leg -/********************************************************** - * First leg of a link transfer result - * - * @since ari_1_5_0 - *********************************************************/ - public Channel getDestination_link_first_leg(); - - - -// void setTransferer_second_leg Channel -/********************************************************** - * Second leg of the transferer - * - * @since ari_1_5_0 - *********************************************************/ - public void setTransferer_second_leg(Channel val ); - - - -// Channel getReplace_channel -/********************************************************** - * The channel that is replacing transferer_first_leg in the swap - * - * @since ari_1_5_0 - *********************************************************/ - public Channel getReplace_channel(); - - - -// Channel getTransferer_first_leg -/********************************************************** - * First leg of the transferer - * - * @since ari_1_5_0 - *********************************************************/ - public Channel getTransferer_first_leg(); - - - -// void setTransferer_first_leg_bridge Bridge -/********************************************************** - * Bridge the transferer first leg is in - * - * @since ari_1_5_0 - *********************************************************/ - public void setTransferer_first_leg_bridge(Bridge val ); - - - -// void setResult String -/********************************************************** - * The result of the transfer attempt - * - * @since ari_1_5_0 - *********************************************************/ - public void setResult(String val ); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/BridgeBlindTransfer.java b/classes/ch/loway/oss/ari4java/generated/BridgeBlindTransfer.java deleted file mode 100644 index aa759e7e..00000000 --- a/classes/ch/loway/oss/ari4java/generated/BridgeBlindTransfer.java +++ /dev/null @@ -1,185 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface BridgeBlindTransfer { - -// void setIs_external boolean -/********************************************************** - * Whether the transfer was externally initiated or not - * - * @since ari_1_5_0 - *********************************************************/ - public void setIs_external(boolean val ); - - - -// String getResult -/********************************************************** - * The result of the transfer attempt - * - * @since ari_1_5_0 - *********************************************************/ - public String getResult(); - - - -// String getContext -/********************************************************** - * The context transferred to - * - * @since ari_1_5_0 - *********************************************************/ - public String getContext(); - - - -// Channel getTransferee -/********************************************************** - * The channel that is being transferred - * - * @since ari_1_5_0 - *********************************************************/ - public Channel getTransferee(); - - - -// Bridge getBridge -/********************************************************** - * The bridge being transferred - * - * @since ari_1_5_0 - *********************************************************/ - public Bridge getBridge(); - - - -// void setTransferee Channel -/********************************************************** - * The channel that is being transferred - * - * @since ari_1_5_0 - *********************************************************/ - public void setTransferee(Channel val ); - - - -// void setContext String -/********************************************************** - * The context transferred to - * - * @since ari_1_5_0 - *********************************************************/ - public void setContext(String val ); - - - -// void setReplace_channel Channel -/********************************************************** - * The channel that is replacing transferer when the transferee(s) can not be transferred directly - * - * @since ari_1_5_0 - *********************************************************/ - public void setReplace_channel(Channel val ); - - - -// void setBridge Bridge -/********************************************************** - * The bridge being transferred - * - * @since ari_1_5_0 - *********************************************************/ - public void setBridge(Bridge val ); - - - -// Channel getReplace_channel -/********************************************************** - * The channel that is replacing transferer when the transferee(s) can not be transferred directly - * - * @since ari_1_5_0 - *********************************************************/ - public Channel getReplace_channel(); - - - -// String getExten -/********************************************************** - * The extension transferred to - * - * @since ari_1_5_0 - *********************************************************/ - public String getExten(); - - - -// boolean getIs_external -/********************************************************** - * Whether the transfer was externally initiated or not - * - * @since ari_1_5_0 - *********************************************************/ - public boolean getIs_external(); - - - -// Channel getChannel -/********************************************************** - * The channel performing the blind transfer - * - * @since ari_1_5_0 - *********************************************************/ - public Channel getChannel(); - - - -// void setResult String -/********************************************************** - * The result of the transfer attempt - * - * @since ari_1_5_0 - *********************************************************/ - public void setResult(String val ); - - - -// void setChannel Channel -/********************************************************** - * The channel performing the blind transfer - * - * @since ari_1_5_0 - *********************************************************/ - public void setChannel(Channel val ); - - - -// void setExten String -/********************************************************** - * The extension transferred to - * - * @since ari_1_5_0 - *********************************************************/ - public void setExten(String val ); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/BridgeCreated.java b/classes/ch/loway/oss/ari4java/generated/BridgeCreated.java deleted file mode 100644 index a609364e..00000000 --- a/classes/ch/loway/oss/ari4java/generated/BridgeCreated.java +++ /dev/null @@ -1,45 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface BridgeCreated { - -// void setBridge Bridge -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ - public void setBridge(Bridge val ); - - - -// Bridge getBridge -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ - public Bridge getBridge(); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/BridgeDestroyed.java b/classes/ch/loway/oss/ari4java/generated/BridgeDestroyed.java deleted file mode 100644 index c42cbb60..00000000 --- a/classes/ch/loway/oss/ari4java/generated/BridgeDestroyed.java +++ /dev/null @@ -1,45 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface BridgeDestroyed { - -// void setBridge Bridge -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ - public void setBridge(Bridge val ); - - - -// Bridge getBridge -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ - public Bridge getBridge(); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/BridgeMerged.java b/classes/ch/loway/oss/ari4java/generated/BridgeMerged.java deleted file mode 100644 index 9845d363..00000000 --- a/classes/ch/loway/oss/ari4java/generated/BridgeMerged.java +++ /dev/null @@ -1,65 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface BridgeMerged { - -// void setBridge_from Bridge -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ - public void setBridge_from(Bridge val ); - - - -// void setBridge Bridge -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ - public void setBridge(Bridge val ); - - - -// Bridge getBridge_from -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ - public Bridge getBridge_from(); - - - -// Bridge getBridge -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ - public Bridge getBridge(); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/BuildInfo.java b/classes/ch/loway/oss/ari4java/generated/BuildInfo.java deleted file mode 100644 index 8d2ddb40..00000000 --- a/classes/ch/loway/oss/ari4java/generated/BuildInfo.java +++ /dev/null @@ -1,145 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface BuildInfo { - -// void setUser String -/********************************************************** - * Username that build Asterisk - * - * @since ari_0_0_1 - *********************************************************/ - public void setUser(String val ); - - - -// void setOptions String -/********************************************************** - * Compile time options, or empty string if default. - * - * @since ari_0_0_1 - *********************************************************/ - public void setOptions(String val ); - - - -// void setDate String -/********************************************************** - * Date and time when Asterisk was built. - * - * @since ari_0_0_1 - *********************************************************/ - public void setDate(String val ); - - - -// String getOptions -/********************************************************** - * Compile time options, or empty string if default. - * - * @since ari_0_0_1 - *********************************************************/ - public String getOptions(); - - - -// void setOs String -/********************************************************** - * OS Asterisk was built on. - * - * @since ari_0_0_1 - *********************************************************/ - public void setOs(String val ); - - - -// String getDate -/********************************************************** - * Date and time when Asterisk was built. - * - * @since ari_0_0_1 - *********************************************************/ - public String getDate(); - - - -// String getKernel -/********************************************************** - * Kernel version Asterisk was built on. - * - * @since ari_0_0_1 - *********************************************************/ - public String getKernel(); - - - -// void setMachine String -/********************************************************** - * Machine architecture (x86_64, i686, ppc, etc.) - * - * @since ari_0_0_1 - *********************************************************/ - public void setMachine(String val ); - - - -// String getUser -/********************************************************** - * Username that build Asterisk - * - * @since ari_0_0_1 - *********************************************************/ - public String getUser(); - - - -// String getMachine -/********************************************************** - * Machine architecture (x86_64, i686, ppc, etc.) - * - * @since ari_0_0_1 - *********************************************************/ - public String getMachine(); - - - -// String getOs -/********************************************************** - * OS Asterisk was built on. - * - * @since ari_0_0_1 - *********************************************************/ - public String getOs(); - - - -// void setKernel String -/********************************************************** - * Kernel version Asterisk was built on. - * - * @since ari_0_0_1 - *********************************************************/ - public void setKernel(String val ); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/CallerID.java b/classes/ch/loway/oss/ari4java/generated/CallerID.java deleted file mode 100644 index 143e2f28..00000000 --- a/classes/ch/loway/oss/ari4java/generated/CallerID.java +++ /dev/null @@ -1,65 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface CallerID { - -// void setName String -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ - public void setName(String val ); - - - -// String getNumber -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ - public String getNumber(); - - - -// String getName -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ - public String getName(); - - - -// void setNumber String -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ - public void setNumber(String val ); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/Channel.java b/classes/ch/loway/oss/ari4java/generated/Channel.java deleted file mode 100644 index ce2954c8..00000000 --- a/classes/ch/loway/oss/ari4java/generated/Channel.java +++ /dev/null @@ -1,209 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface Channel extends EventSource { - -// String getLanguage -/********************************************************** - * The default spoken language - * - * @since ari_1_7_0 - *********************************************************/ - public String getLanguage(); - - - -// void setState String -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ - public void setState(String val ); - - - -// String getId -/********************************************************** - * Unique identifier of the channel. - * - * This is the same as the Uniqueid field in AMI. - * - * @since ari_0_0_1 - *********************************************************/ - public String getId(); - - - -// void setAccountcode String -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ - public void setAccountcode(String val ); - - - -// CallerID getConnected -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ - public CallerID getConnected(); - - - -// String getAccountcode -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ - public String getAccountcode(); - - - -// void setConnected CallerID -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ - public void setConnected(CallerID val ); - - - -// CallerID getCaller -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ - public CallerID getCaller(); - - - -// DialplanCEP getDialplan -/********************************************************** - * Current location in the dialplan - * - * @since ari_0_0_1 - *********************************************************/ - public DialplanCEP getDialplan(); - - - -// void setId String -/********************************************************** - * Unique identifier of the channel. - * - * This is the same as the Uniqueid field in AMI. - * - * @since ari_0_0_1 - *********************************************************/ - public void setId(String val ); - - - -// String getState -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ - public String getState(); - - - -// void setLanguage String -/********************************************************** - * The default spoken language - * - * @since ari_1_7_0 - *********************************************************/ - public void setLanguage(String val ); - - - -// void setName String -/********************************************************** - * Name of the channel (i.e. SIP/foo-0000a7e3) - * - * @since ari_0_0_1 - *********************************************************/ - public void setName(String val ); - - - -// void setCaller CallerID -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ - public void setCaller(CallerID val ); - - - -// Date getCreationtime -/********************************************************** - * Timestamp when channel was created - * - * @since ari_0_0_1 - *********************************************************/ - public Date getCreationtime(); - - - -// String getName -/********************************************************** - * Name of the channel (i.e. SIP/foo-0000a7e3) - * - * @since ari_0_0_1 - *********************************************************/ - public String getName(); - - - -// void setCreationtime Date -/********************************************************** - * Timestamp when channel was created - * - * @since ari_0_0_1 - *********************************************************/ - public void setCreationtime(Date val ); - - - -// void setDialplan DialplanCEP -/********************************************************** - * Current location in the dialplan - * - * @since ari_0_0_1 - *********************************************************/ - public void setDialplan(DialplanCEP val ); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/ChannelCallerId.java b/classes/ch/loway/oss/ari4java/generated/ChannelCallerId.java deleted file mode 100644 index d82aacc9..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ChannelCallerId.java +++ /dev/null @@ -1,85 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface ChannelCallerId { - -// void setCaller_presentation int -/********************************************************** - * The integer representation of the Caller Presentation value. - * - * @since ari_0_0_1 - *********************************************************/ - public void setCaller_presentation(int val ); - - - -// int getCaller_presentation -/********************************************************** - * The integer representation of the Caller Presentation value. - * - * @since ari_0_0_1 - *********************************************************/ - public int getCaller_presentation(); - - - -// void setCaller_presentation_txt String -/********************************************************** - * The text representation of the Caller Presentation value. - * - * @since ari_0_0_1 - *********************************************************/ - public void setCaller_presentation_txt(String val ); - - - -// Channel getChannel -/********************************************************** - * The channel that changed Caller ID. - * - * @since ari_0_0_1 - *********************************************************/ - public Channel getChannel(); - - - -// String getCaller_presentation_txt -/********************************************************** - * The text representation of the Caller Presentation value. - * - * @since ari_0_0_1 - *********************************************************/ - public String getCaller_presentation_txt(); - - - -// void setChannel Channel -/********************************************************** - * The channel that changed Caller ID. - * - * @since ari_0_0_1 - *********************************************************/ - public void setChannel(Channel val ); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/ChannelConnectedLine.java b/classes/ch/loway/oss/ari4java/generated/ChannelConnectedLine.java deleted file mode 100644 index c53b8581..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ChannelConnectedLine.java +++ /dev/null @@ -1,45 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface ChannelConnectedLine { - -// Channel getChannel -/********************************************************** - * The channel whose connected line has changed. - * - * @since ari_1_6_0 - *********************************************************/ - public Channel getChannel(); - - - -// void setChannel Channel -/********************************************************** - * The channel whose connected line has changed. - * - * @since ari_1_6_0 - *********************************************************/ - public void setChannel(Channel val ); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/ChannelCreated.java b/classes/ch/loway/oss/ari4java/generated/ChannelCreated.java deleted file mode 100644 index 3e6729e2..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ChannelCreated.java +++ /dev/null @@ -1,45 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface ChannelCreated { - -// Channel getChannel -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ - public Channel getChannel(); - - - -// void setChannel Channel -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ - public void setChannel(Channel val ); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/ChannelDestroyed.java b/classes/ch/loway/oss/ari4java/generated/ChannelDestroyed.java deleted file mode 100644 index 2361ed1e..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ChannelDestroyed.java +++ /dev/null @@ -1,85 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface ChannelDestroyed { - -// void setCause_txt String -/********************************************************** - * Text representation of the cause of the hangup - * - * @since ari_0_0_1 - *********************************************************/ - public void setCause_txt(String val ); - - - -// void setCause int -/********************************************************** - * Integer representation of the cause of the hangup - * - * @since ari_0_0_1 - *********************************************************/ - public void setCause(int val ); - - - -// int getCause -/********************************************************** - * Integer representation of the cause of the hangup - * - * @since ari_0_0_1 - *********************************************************/ - public int getCause(); - - - -// Channel getChannel -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ - public Channel getChannel(); - - - -// String getCause_txt -/********************************************************** - * Text representation of the cause of the hangup - * - * @since ari_0_0_1 - *********************************************************/ - public String getCause_txt(); - - - -// void setChannel Channel -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ - public void setChannel(Channel val ); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/ChannelDialplan.java b/classes/ch/loway/oss/ari4java/generated/ChannelDialplan.java deleted file mode 100644 index 17b6840a..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ChannelDialplan.java +++ /dev/null @@ -1,85 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface ChannelDialplan { - -// String getDialplan_app -/********************************************************** - * The application about to be executed. - * - * @since ari_0_0_1 - *********************************************************/ - public String getDialplan_app(); - - - -// Channel getChannel -/********************************************************** - * The channel that changed dialplan location. - * - * @since ari_0_0_1 - *********************************************************/ - public Channel getChannel(); - - - -// void setDialplan_app String -/********************************************************** - * The application about to be executed. - * - * @since ari_0_0_1 - *********************************************************/ - public void setDialplan_app(String val ); - - - -// String getDialplan_app_data -/********************************************************** - * The data to be passed to the application. - * - * @since ari_0_0_1 - *********************************************************/ - public String getDialplan_app_data(); - - - -// void setDialplan_app_data String -/********************************************************** - * The data to be passed to the application. - * - * @since ari_0_0_1 - *********************************************************/ - public void setDialplan_app_data(String val ); - - - -// void setChannel Channel -/********************************************************** - * The channel that changed dialplan location. - * - * @since ari_0_0_1 - *********************************************************/ - public void setChannel(Channel val ); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/ChannelDtmfReceived.java b/classes/ch/loway/oss/ari4java/generated/ChannelDtmfReceived.java deleted file mode 100644 index 73877b33..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ChannelDtmfReceived.java +++ /dev/null @@ -1,85 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface ChannelDtmfReceived { - -// String getDigit -/********************************************************** - * DTMF digit received (0-9, A-E, # or *) - * - * @since ari_0_0_1 - *********************************************************/ - public String getDigit(); - - - -// void setDuration_ms int -/********************************************************** - * Number of milliseconds DTMF was received - * - * @since ari_0_0_1 - *********************************************************/ - public void setDuration_ms(int val ); - - - -// int getDuration_ms -/********************************************************** - * Number of milliseconds DTMF was received - * - * @since ari_0_0_1 - *********************************************************/ - public int getDuration_ms(); - - - -// Channel getChannel -/********************************************************** - * The channel on which DTMF was received - * - * @since ari_0_0_1 - *********************************************************/ - public Channel getChannel(); - - - -// void setChannel Channel -/********************************************************** - * The channel on which DTMF was received - * - * @since ari_0_0_1 - *********************************************************/ - public void setChannel(Channel val ); - - - -// void setDigit String -/********************************************************** - * DTMF digit received (0-9, A-E, # or *) - * - * @since ari_0_0_1 - *********************************************************/ - public void setDigit(String val ); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/ChannelEnteredBridge.java b/classes/ch/loway/oss/ari4java/generated/ChannelEnteredBridge.java deleted file mode 100644 index f29d631d..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ChannelEnteredBridge.java +++ /dev/null @@ -1,65 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface ChannelEnteredBridge { - -// void setBridge Bridge -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ - public void setBridge(Bridge val ); - - - -// Channel getChannel -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ - public Channel getChannel(); - - - -// Bridge getBridge -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ - public Bridge getBridge(); - - - -// void setChannel Channel -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ - public void setChannel(Channel val ); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/ChannelHangupRequest.java b/classes/ch/loway/oss/ari4java/generated/ChannelHangupRequest.java deleted file mode 100644 index fb424d46..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ChannelHangupRequest.java +++ /dev/null @@ -1,85 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface ChannelHangupRequest { - -// void setCause int -/********************************************************** - * Integer representation of the cause of the hangup. - * - * @since ari_0_0_1 - *********************************************************/ - public void setCause(int val ); - - - -// int getCause -/********************************************************** - * Integer representation of the cause of the hangup. - * - * @since ari_0_0_1 - *********************************************************/ - public int getCause(); - - - -// void setSoft boolean -/********************************************************** - * Whether the hangup request was a soft hangup request. - * - * @since ari_0_0_1 - *********************************************************/ - public void setSoft(boolean val ); - - - -// Channel getChannel -/********************************************************** - * The channel on which the hangup was requested. - * - * @since ari_0_0_1 - *********************************************************/ - public Channel getChannel(); - - - -// void setChannel Channel -/********************************************************** - * The channel on which the hangup was requested. - * - * @since ari_0_0_1 - *********************************************************/ - public void setChannel(Channel val ); - - - -// boolean getSoft -/********************************************************** - * Whether the hangup request was a soft hangup request. - * - * @since ari_0_0_1 - *********************************************************/ - public boolean getSoft(); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/ChannelHold.java b/classes/ch/loway/oss/ari4java/generated/ChannelHold.java deleted file mode 100644 index a4b8867c..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ChannelHold.java +++ /dev/null @@ -1,65 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface ChannelHold { - -// String getMusicclass -/********************************************************** - * The music on hold class that the initiator requested. - * - * @since ari_1_8_0 - *********************************************************/ - public String getMusicclass(); - - - -// void setMusicclass String -/********************************************************** - * The music on hold class that the initiator requested. - * - * @since ari_1_8_0 - *********************************************************/ - public void setMusicclass(String val ); - - - -// Channel getChannel -/********************************************************** - * The channel that initiated the hold event. - * - * @since ari_1_8_0 - *********************************************************/ - public Channel getChannel(); - - - -// void setChannel Channel -/********************************************************** - * The channel that initiated the hold event. - * - * @since ari_1_8_0 - *********************************************************/ - public void setChannel(Channel val ); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/ChannelLeftBridge.java b/classes/ch/loway/oss/ari4java/generated/ChannelLeftBridge.java deleted file mode 100644 index b57ab7c0..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ChannelLeftBridge.java +++ /dev/null @@ -1,65 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface ChannelLeftBridge { - -// void setBridge Bridge -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ - public void setBridge(Bridge val ); - - - -// Channel getChannel -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ - public Channel getChannel(); - - - -// Bridge getBridge -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ - public Bridge getBridge(); - - - -// void setChannel Channel -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ - public void setChannel(Channel val ); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/ChannelStateChange.java b/classes/ch/loway/oss/ari4java/generated/ChannelStateChange.java deleted file mode 100644 index 66cba9e2..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ChannelStateChange.java +++ /dev/null @@ -1,45 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface ChannelStateChange { - -// Channel getChannel -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ - public Channel getChannel(); - - - -// void setChannel Channel -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ - public void setChannel(Channel val ); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/ChannelTalkingFinished.java b/classes/ch/loway/oss/ari4java/generated/ChannelTalkingFinished.java deleted file mode 100644 index 82e5c997..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ChannelTalkingFinished.java +++ /dev/null @@ -1,65 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface ChannelTalkingFinished { - -// void setDuration int -/********************************************************** - * The length of time, in milliseconds, that talking was detected on the channel - * - * @since ari_1_5_0 - *********************************************************/ - public void setDuration(int val ); - - - -// Channel getChannel -/********************************************************** - * The channel on which talking completed. - * - * @since ari_1_5_0 - *********************************************************/ - public Channel getChannel(); - - - -// void setChannel Channel -/********************************************************** - * The channel on which talking completed. - * - * @since ari_1_5_0 - *********************************************************/ - public void setChannel(Channel val ); - - - -// int getDuration -/********************************************************** - * The length of time, in milliseconds, that talking was detected on the channel - * - * @since ari_1_5_0 - *********************************************************/ - public int getDuration(); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/ChannelTalkingStarted.java b/classes/ch/loway/oss/ari4java/generated/ChannelTalkingStarted.java deleted file mode 100644 index ec9712f5..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ChannelTalkingStarted.java +++ /dev/null @@ -1,45 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface ChannelTalkingStarted { - -// Channel getChannel -/********************************************************** - * The channel on which talking started. - * - * @since ari_1_5_0 - *********************************************************/ - public Channel getChannel(); - - - -// void setChannel Channel -/********************************************************** - * The channel on which talking started. - * - * @since ari_1_5_0 - *********************************************************/ - public void setChannel(Channel val ); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/ChannelUnhold.java b/classes/ch/loway/oss/ari4java/generated/ChannelUnhold.java deleted file mode 100644 index f0f3837d..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ChannelUnhold.java +++ /dev/null @@ -1,45 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface ChannelUnhold { - -// Channel getChannel -/********************************************************** - * The channel that initiated the unhold event. - * - * @since ari_1_8_0 - *********************************************************/ - public Channel getChannel(); - - - -// void setChannel Channel -/********************************************************** - * The channel that initiated the unhold event. - * - * @since ari_1_8_0 - *********************************************************/ - public void setChannel(Channel val ); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/ChannelUserevent.java b/classes/ch/loway/oss/ari4java/generated/ChannelUserevent.java deleted file mode 100644 index 5cd520bf..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ChannelUserevent.java +++ /dev/null @@ -1,125 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface ChannelUserevent { - -// void setEventname String -/********************************************************** - * The name of the user event. - * - * @since ari_0_0_1 - *********************************************************/ - public void setEventname(String val ); - - - -// void setUserevent String -/********************************************************** - * Custom Userevent data - * - * @since ari_0_0_1 - *********************************************************/ - public void setUserevent(String val ); - - - -// String getEventname -/********************************************************** - * The name of the user event. - * - * @since ari_0_0_1 - *********************************************************/ - public String getEventname(); - - - -// void setEndpoint Endpoint -/********************************************************** - * A endpoint that is signaled with the user event. - * - * @since ari_1_5_0 - *********************************************************/ - public void setEndpoint(Endpoint val ); - - - -// void setBridge Bridge -/********************************************************** - * A bridge that is signaled with the user event. - * - * @since ari_1_5_0 - *********************************************************/ - public void setBridge(Bridge val ); - - - -// Channel getChannel -/********************************************************** - * The channel that signaled the user event. - * - * @since ari_0_0_1 - *********************************************************/ - public Channel getChannel(); - - - -// Endpoint getEndpoint -/********************************************************** - * A endpoint that is signaled with the user event. - * - * @since ari_1_5_0 - *********************************************************/ - public Endpoint getEndpoint(); - - - -// String getUserevent -/********************************************************** - * Custom Userevent data - * - * @since ari_0_0_1 - *********************************************************/ - public String getUserevent(); - - - -// Bridge getBridge -/********************************************************** - * A bridge that is signaled with the user event. - * - * @since ari_1_5_0 - *********************************************************/ - public Bridge getBridge(); - - - -// void setChannel Channel -/********************************************************** - * The channel that signaled the user event. - * - * @since ari_0_0_1 - *********************************************************/ - public void setChannel(Channel val ); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/ChannelVarset.java b/classes/ch/loway/oss/ari4java/generated/ChannelVarset.java deleted file mode 100644 index cf5dfa41..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ChannelVarset.java +++ /dev/null @@ -1,89 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface ChannelVarset { - -// void setValue String -/********************************************************** - * The new value of the variable. - * - * @since ari_0_0_1 - *********************************************************/ - public void setValue(String val ); - - - -// void setVariable String -/********************************************************** - * The variable that changed. - * - * @since ari_0_0_1 - *********************************************************/ - public void setVariable(String val ); - - - -// Channel getChannel -/********************************************************** - * The channel on which the variable was set. - * - * If missing, the variable is a global variable. - * - * @since ari_0_0_1 - *********************************************************/ - public Channel getChannel(); - - - -// String getValue -/********************************************************** - * The new value of the variable. - * - * @since ari_0_0_1 - *********************************************************/ - public String getValue(); - - - -// String getVariable -/********************************************************** - * The variable that changed. - * - * @since ari_0_0_1 - *********************************************************/ - public String getVariable(); - - - -// void setChannel Channel -/********************************************************** - * The channel on which the variable was set. - * - * If missing, the variable is a global variable. - * - * @since ari_0_0_1 - *********************************************************/ - public void setChannel(Channel val ); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/ConfigInfo.java b/classes/ch/loway/oss/ari4java/generated/ConfigInfo.java deleted file mode 100644 index e0d296dd..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ConfigInfo.java +++ /dev/null @@ -1,145 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface ConfigInfo { - -// void setMax_channels int -/********************************************************** - * Maximum number of simultaneous channels. - * - * @since ari_0_0_1 - *********************************************************/ - public void setMax_channels(int val ); - - - -// int getMax_open_files -/********************************************************** - * Maximum number of open file handles (files, sockets). - * - * @since ari_0_0_1 - *********************************************************/ - public int getMax_open_files(); - - - -// void setName String -/********************************************************** - * Asterisk system name. - * - * @since ari_0_0_1 - *********************************************************/ - public void setName(String val ); - - - -// void setSetid SetId -/********************************************************** - * Effective user/group id for running Asterisk. - * - * @since ari_0_0_1 - *********************************************************/ - public void setSetid(SetId val ); - - - -// void setMax_load double -/********************************************************** - * Maximum load avg on system. - * - * @since ari_0_0_1 - *********************************************************/ - public void setMax_load(double val ); - - - -// String getName -/********************************************************** - * Asterisk system name. - * - * @since ari_0_0_1 - *********************************************************/ - public String getName(); - - - -// String getDefault_language -/********************************************************** - * Default language for media playback. - * - * @since ari_0_0_1 - *********************************************************/ - public String getDefault_language(); - - - -// void setMax_open_files int -/********************************************************** - * Maximum number of open file handles (files, sockets). - * - * @since ari_0_0_1 - *********************************************************/ - public void setMax_open_files(int val ); - - - -// SetId getSetid -/********************************************************** - * Effective user/group id for running Asterisk. - * - * @since ari_0_0_1 - *********************************************************/ - public SetId getSetid(); - - - -// void setDefault_language String -/********************************************************** - * Default language for media playback. - * - * @since ari_0_0_1 - *********************************************************/ - public void setDefault_language(String val ); - - - -// double getMax_load -/********************************************************** - * Maximum load avg on system. - * - * @since ari_0_0_1 - *********************************************************/ - public double getMax_load(); - - - -// int getMax_channels -/********************************************************** - * Maximum number of simultaneous channels. - * - * @since ari_0_0_1 - *********************************************************/ - public int getMax_channels(); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/ConfigTuple.java b/classes/ch/loway/oss/ari4java/generated/ConfigTuple.java deleted file mode 100644 index 753ed08f..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ConfigTuple.java +++ /dev/null @@ -1,65 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface ConfigTuple { - -// void setValue String -/********************************************************** - * The value for the attribute. - * - * @since ari_1_8_0 - *********************************************************/ - public void setValue(String val ); - - - -// String getValue -/********************************************************** - * The value for the attribute. - * - * @since ari_1_8_0 - *********************************************************/ - public String getValue(); - - - -// String getAttribute -/********************************************************** - * A configuration object attribute. - * - * @since ari_1_8_0 - *********************************************************/ - public String getAttribute(); - - - -// void setAttribute String -/********************************************************** - * A configuration object attribute. - * - * @since ari_1_8_0 - *********************************************************/ - public void setAttribute(String val ); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/ContactInfo.java b/classes/ch/loway/oss/ari4java/generated/ContactInfo.java deleted file mode 100644 index cdd9d723..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ContactInfo.java +++ /dev/null @@ -1,105 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface ContactInfo { - -// String getUri -/********************************************************** - * The location of the contact. - * - * @since ari_1_9_0 - *********************************************************/ - public String getUri(); - - - -// void setRoundtrip_usec String -/********************************************************** - * Current round trip time, in microseconds, for the contact. - * - * @since ari_1_9_0 - *********************************************************/ - public void setRoundtrip_usec(String val ); - - - -// String getRoundtrip_usec -/********************************************************** - * Current round trip time, in microseconds, for the contact. - * - * @since ari_1_9_0 - *********************************************************/ - public String getRoundtrip_usec(); - - - -// String getAor -/********************************************************** - * The Address of Record this contact belongs to. - * - * @since ari_1_9_0 - *********************************************************/ - public String getAor(); - - - -// void setContact_status String -/********************************************************** - * The current status of the contact. - * - * @since ari_1_9_0 - *********************************************************/ - public void setContact_status(String val ); - - - -// void setUri String -/********************************************************** - * The location of the contact. - * - * @since ari_1_9_0 - *********************************************************/ - public void setUri(String val ); - - - -// void setAor String -/********************************************************** - * The Address of Record this contact belongs to. - * - * @since ari_1_9_0 - *********************************************************/ - public void setAor(String val ); - - - -// String getContact_status -/********************************************************** - * The current status of the contact. - * - * @since ari_1_9_0 - *********************************************************/ - public String getContact_status(); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/ContactStatusChange.java b/classes/ch/loway/oss/ari4java/generated/ContactStatusChange.java deleted file mode 100644 index 193bfd85..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ContactStatusChange.java +++ /dev/null @@ -1,65 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface ContactStatusChange { - -// void setContact_info ContactInfo -/********************************************************** - * - * - * @since ari_1_9_0 - *********************************************************/ - public void setContact_info(ContactInfo val ); - - - -// void setEndpoint Endpoint -/********************************************************** - * - * - * @since ari_1_9_0 - *********************************************************/ - public void setEndpoint(Endpoint val ); - - - -// ContactInfo getContact_info -/********************************************************** - * - * - * @since ari_1_9_0 - *********************************************************/ - public ContactInfo getContact_info(); - - - -// Endpoint getEndpoint -/********************************************************** - * - * - * @since ari_1_9_0 - *********************************************************/ - public Endpoint getEndpoint(); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/DeviceState.java b/classes/ch/loway/oss/ari4java/generated/DeviceState.java deleted file mode 100644 index 5474426e..00000000 --- a/classes/ch/loway/oss/ari4java/generated/DeviceState.java +++ /dev/null @@ -1,65 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface DeviceState extends EventSource { - -// void setState String -/********************************************************** - * Device's state - * - * @since ari_0_0_1 - *********************************************************/ - public void setState(String val ); - - - -// void setName String -/********************************************************** - * Name of the device. - * - * @since ari_0_0_1 - *********************************************************/ - public void setName(String val ); - - - -// String getName -/********************************************************** - * Name of the device. - * - * @since ari_0_0_1 - *********************************************************/ - public String getName(); - - - -// String getState -/********************************************************** - * Device's state - * - * @since ari_0_0_1 - *********************************************************/ - public String getState(); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/DeviceStateChanged.java b/classes/ch/loway/oss/ari4java/generated/DeviceStateChanged.java deleted file mode 100644 index 7e653b51..00000000 --- a/classes/ch/loway/oss/ari4java/generated/DeviceStateChanged.java +++ /dev/null @@ -1,45 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface DeviceStateChanged { - -// void setDevice_state DeviceState -/********************************************************** - * Device state object - * - * @since ari_0_0_1 - *********************************************************/ - public void setDevice_state(DeviceState val ); - - - -// DeviceState getDevice_state -/********************************************************** - * Device state object - * - * @since ari_0_0_1 - *********************************************************/ - public DeviceState getDevice_state(); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/Dial.java b/classes/ch/loway/oss/ari4java/generated/Dial.java deleted file mode 100644 index 5851a93d..00000000 --- a/classes/ch/loway/oss/ari4java/generated/Dial.java +++ /dev/null @@ -1,145 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface Dial { - -// void setPeer Channel -/********************************************************** - * The dialed channel. - * - * @since ari_1_0_0 - *********************************************************/ - public void setPeer(Channel val ); - - - -// Channel getForwarded -/********************************************************** - * Channel that the caller has been forwarded to. - * - * @since ari_1_0_0 - *********************************************************/ - public Channel getForwarded(); - - - -// String getDialstatus -/********************************************************** - * Current status of the dialing attempt to the peer. - * - * @since ari_1_0_0 - *********************************************************/ - public String getDialstatus(); - - - -// void setDialstatus String -/********************************************************** - * Current status of the dialing attempt to the peer. - * - * @since ari_1_0_0 - *********************************************************/ - public void setDialstatus(String val ); - - - -// void setDialstring String -/********************************************************** - * The dial string for calling the peer channel. - * - * @since ari_1_0_0 - *********************************************************/ - public void setDialstring(String val ); - - - -// String getDialstring -/********************************************************** - * The dial string for calling the peer channel. - * - * @since ari_1_0_0 - *********************************************************/ - public String getDialstring(); - - - -// Channel getPeer -/********************************************************** - * The dialed channel. - * - * @since ari_1_0_0 - *********************************************************/ - public Channel getPeer(); - - - -// void setForward String -/********************************************************** - * Forwarding target requested by the original dialed channel. - * - * @since ari_1_0_0 - *********************************************************/ - public void setForward(String val ); - - - -// void setForwarded Channel -/********************************************************** - * Channel that the caller has been forwarded to. - * - * @since ari_1_0_0 - *********************************************************/ - public void setForwarded(Channel val ); - - - -// String getForward -/********************************************************** - * Forwarding target requested by the original dialed channel. - * - * @since ari_1_0_0 - *********************************************************/ - public String getForward(); - - - -// void setCaller Channel -/********************************************************** - * The calling channel. - * - * @since ari_1_0_0 - *********************************************************/ - public void setCaller(Channel val ); - - - -// Channel getCaller -/********************************************************** - * The calling channel. - * - * @since ari_1_0_0 - *********************************************************/ - public Channel getCaller(); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/Dialed.java b/classes/ch/loway/oss/ari4java/generated/Dialed.java deleted file mode 100644 index 043fe2bb..00000000 --- a/classes/ch/loway/oss/ari4java/generated/Dialed.java +++ /dev/null @@ -1,25 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface Dialed { -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/DialplanCEP.java b/classes/ch/loway/oss/ari4java/generated/DialplanCEP.java deleted file mode 100644 index 3ab78838..00000000 --- a/classes/ch/loway/oss/ari4java/generated/DialplanCEP.java +++ /dev/null @@ -1,85 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface DialplanCEP { - -// void setContext String -/********************************************************** - * Context in the dialplan - * - * @since ari_0_0_1 - *********************************************************/ - public void setContext(String val ); - - - -// long getPriority -/********************************************************** - * Priority in the dialplan - * - * @since ari_0_0_1 - *********************************************************/ - public long getPriority(); - - - -// void setPriority long -/********************************************************** - * Priority in the dialplan - * - * @since ari_0_0_1 - *********************************************************/ - public void setPriority(long val ); - - - -// String getExten -/********************************************************** - * Extension in the dialplan - * - * @since ari_0_0_1 - *********************************************************/ - public String getExten(); - - - -// String getContext -/********************************************************** - * Context in the dialplan - * - * @since ari_0_0_1 - *********************************************************/ - public String getContext(); - - - -// void setExten String -/********************************************************** - * Extension in the dialplan - * - * @since ari_0_0_1 - *********************************************************/ - public void setExten(String val ); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/Endpoint.java b/classes/ch/loway/oss/ari4java/generated/Endpoint.java deleted file mode 100644 index c8630965..00000000 --- a/classes/ch/loway/oss/ari4java/generated/Endpoint.java +++ /dev/null @@ -1,105 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface Endpoint extends EventSource { - -// List getChannel_ids -/********************************************************** - * Id's of channels associated with this endpoint - * - * @since ari_0_0_1 - *********************************************************/ - public List getChannel_ids(); - - - -// void setState String -/********************************************************** - * Endpoint's state - * - * @since ari_0_0_1 - *********************************************************/ - public void setState(String val ); - - - -// void setChannel_ids List -/********************************************************** - * Id's of channels associated with this endpoint - * - * @since ari_0_0_1 - *********************************************************/ - public void setChannel_ids(List val ); - - - -// String getResource -/********************************************************** - * Identifier of the endpoint, specific to the given technology. - * - * @since ari_0_0_1 - *********************************************************/ - public String getResource(); - - - -// void setTechnology String -/********************************************************** - * Technology of the endpoint - * - * @since ari_0_0_1 - *********************************************************/ - public void setTechnology(String val ); - - - -// String getTechnology -/********************************************************** - * Technology of the endpoint - * - * @since ari_0_0_1 - *********************************************************/ - public String getTechnology(); - - - -// void setResource String -/********************************************************** - * Identifier of the endpoint, specific to the given technology. - * - * @since ari_0_0_1 - *********************************************************/ - public void setResource(String val ); - - - -// String getState -/********************************************************** - * Endpoint's state - * - * @since ari_0_0_1 - *********************************************************/ - public String getState(); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/EndpointStateChange.java b/classes/ch/loway/oss/ari4java/generated/EndpointStateChange.java deleted file mode 100644 index 62d238a6..00000000 --- a/classes/ch/loway/oss/ari4java/generated/EndpointStateChange.java +++ /dev/null @@ -1,45 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface EndpointStateChange { - -// void setEndpoint Endpoint -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ - public void setEndpoint(Endpoint val ); - - - -// Endpoint getEndpoint -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ - public Endpoint getEndpoint(); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/Event.java b/classes/ch/loway/oss/ari4java/generated/Event.java deleted file mode 100644 index 00d8dbab..00000000 --- a/classes/ch/loway/oss/ari4java/generated/Event.java +++ /dev/null @@ -1,65 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface Event { - -// Date getTimestamp -/********************************************************** - * Time at which this event was created. - * - * @since ari_0_0_1 - *********************************************************/ - public Date getTimestamp(); - - - -// void setTimestamp Date -/********************************************************** - * Time at which this event was created. - * - * @since ari_0_0_1 - *********************************************************/ - public void setTimestamp(Date val ); - - - -// String getApplication -/********************************************************** - * Name of the application receiving the event. - * - * @since ari_0_0_1 - *********************************************************/ - public String getApplication(); - - - -// void setApplication String -/********************************************************** - * Name of the application receiving the event. - * - * @since ari_0_0_1 - *********************************************************/ - public void setApplication(String val ); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/FormatLangPair.java b/classes/ch/loway/oss/ari4java/generated/FormatLangPair.java deleted file mode 100644 index 681f4448..00000000 --- a/classes/ch/loway/oss/ari4java/generated/FormatLangPair.java +++ /dev/null @@ -1,65 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface FormatLangPair { - -// String getFormat -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ - public String getFormat(); - - - -// String getLanguage -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ - public String getLanguage(); - - - -// void setLanguage String -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ - public void setLanguage(String val ); - - - -// void setFormat String -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ - public void setFormat(String val ); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/LiveRecording.java b/classes/ch/loway/oss/ari4java/generated/LiveRecording.java deleted file mode 100644 index c6c425b4..00000000 --- a/classes/ch/loway/oss/ari4java/generated/LiveRecording.java +++ /dev/null @@ -1,185 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface LiveRecording { - -// void setState String -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ - public void setState(String val ); - - - -// int getSilence_duration -/********************************************************** - * Duration of silence, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds. - * - * @since ari_1_5_0 - *********************************************************/ - public int getSilence_duration(); - - - -// void setTarget_uri String -/********************************************************** - * URI for the channel or bridge being recorded - * - * @since ari_1_5_0 - *********************************************************/ - public void setTarget_uri(String val ); - - - -// String getCause -/********************************************************** - * Cause for recording failure if failed - * - * @since ari_0_0_1 - *********************************************************/ - public String getCause(); - - - -// String getTarget_uri -/********************************************************** - * URI for the channel or bridge being recorded - * - * @since ari_1_5_0 - *********************************************************/ - public String getTarget_uri(); - - - -// void setDuration int -/********************************************************** - * Duration in seconds of the recording - * - * @since ari_1_5_0 - *********************************************************/ - public void setDuration(int val ); - - - -// void setTalking_duration int -/********************************************************** - * Duration of talking, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds. - * - * @since ari_1_5_0 - *********************************************************/ - public void setTalking_duration(int val ); - - - -// String getState -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ - public String getState(); - - - -// void setCause String -/********************************************************** - * Cause for recording failure if failed - * - * @since ari_0_0_1 - *********************************************************/ - public void setCause(String val ); - - - -// int getDuration -/********************************************************** - * Duration in seconds of the recording - * - * @since ari_1_5_0 - *********************************************************/ - public int getDuration(); - - - -// String getFormat -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ - public String getFormat(); - - - -// void setName String -/********************************************************** - * Base name for the recording - * - * @since ari_0_0_1 - *********************************************************/ - public void setName(String val ); - - - -// int getTalking_duration -/********************************************************** - * Duration of talking, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds. - * - * @since ari_1_5_0 - *********************************************************/ - public int getTalking_duration(); - - - -// String getName -/********************************************************** - * Base name for the recording - * - * @since ari_0_0_1 - *********************************************************/ - public String getName(); - - - -// void setFormat String -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ - public void setFormat(String val ); - - - -// void setSilence_duration int -/********************************************************** - * Duration of silence, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds. - * - * @since ari_1_5_0 - *********************************************************/ - public void setSilence_duration(int val ); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/LogChannel.java b/classes/ch/loway/oss/ari4java/generated/LogChannel.java deleted file mode 100644 index 17d39cfa..00000000 --- a/classes/ch/loway/oss/ari4java/generated/LogChannel.java +++ /dev/null @@ -1,105 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface LogChannel { - -// void setStatus String -/********************************************************** - * Whether or not a log type is enabled - * - * @since ari_1_9_0 - *********************************************************/ - public void setStatus(String val ); - - - -// void setType String -/********************************************************** - * Types of logs for the log channel - * - * @since ari_1_9_0 - *********************************************************/ - public void setType(String val ); - - - -// void setChannel String -/********************************************************** - * The log channel path - * - * @since ari_1_9_0 - *********************************************************/ - public void setChannel(String val ); - - - -// String getChannel -/********************************************************** - * The log channel path - * - * @since ari_1_9_0 - *********************************************************/ - public String getChannel(); - - - -// String getStatus -/********************************************************** - * Whether or not a log type is enabled - * - * @since ari_1_9_0 - *********************************************************/ - public String getStatus(); - - - -// String getConfiguration -/********************************************************** - * The various log levels - * - * @since ari_1_9_0 - *********************************************************/ - public String getConfiguration(); - - - -// String getType -/********************************************************** - * Types of logs for the log channel - * - * @since ari_1_9_0 - *********************************************************/ - public String getType(); - - - -// void setConfiguration String -/********************************************************** - * The various log levels - * - * @since ari_1_9_0 - *********************************************************/ - public void setConfiguration(String val ); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/Message.java b/classes/ch/loway/oss/ari4java/generated/Message.java deleted file mode 100644 index 0d68cfc6..00000000 --- a/classes/ch/loway/oss/ari4java/generated/Message.java +++ /dev/null @@ -1,45 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface Message { - -// void setType String -/********************************************************** - * Indicates the type of this message. - * - * @since ari_0_0_1 - *********************************************************/ - public void setType(String val ); - - - -// String getType -/********************************************************** - * Indicates the type of this message. - * - * @since ari_0_0_1 - *********************************************************/ - public String getType(); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/MissingParams.java b/classes/ch/loway/oss/ari4java/generated/MissingParams.java deleted file mode 100644 index 5284ed07..00000000 --- a/classes/ch/loway/oss/ari4java/generated/MissingParams.java +++ /dev/null @@ -1,45 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface MissingParams { - -// void setParams List -/********************************************************** - * A list of the missing parameters - * - * @since ari_0_0_1 - *********************************************************/ - public void setParams(List val ); - - - -// List getParams -/********************************************************** - * A list of the missing parameters - * - * @since ari_0_0_1 - *********************************************************/ - public List getParams(); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/Module.java b/classes/ch/loway/oss/ari4java/generated/Module.java deleted file mode 100644 index 63f22ff2..00000000 --- a/classes/ch/loway/oss/ari4java/generated/Module.java +++ /dev/null @@ -1,125 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface Module { - -// void setStatus String -/********************************************************** - * The running status of this module - * - * @since ari_1_8_0 - *********************************************************/ - public void setStatus(String val ); - - - -// void setName String -/********************************************************** - * The name of this module - * - * @since ari_1_8_0 - *********************************************************/ - public void setName(String val ); - - - -// void setDescription String -/********************************************************** - * The description of this module - * - * @since ari_1_8_0 - *********************************************************/ - public void setDescription(String val ); - - - -// String getStatus -/********************************************************** - * The running status of this module - * - * @since ari_1_8_0 - *********************************************************/ - public String getStatus(); - - - -// String getDescription -/********************************************************** - * The description of this module - * - * @since ari_1_8_0 - *********************************************************/ - public String getDescription(); - - - -// void setUse_count int -/********************************************************** - * The number of times this module is being used - * - * @since ari_1_8_0 - *********************************************************/ - public void setUse_count(int val ); - - - -// void setSupport_level String -/********************************************************** - * The support state of this module - * - * @since ari_1_8_0 - *********************************************************/ - public void setSupport_level(String val ); - - - -// String getName -/********************************************************** - * The name of this module - * - * @since ari_1_8_0 - *********************************************************/ - public String getName(); - - - -// String getSupport_level -/********************************************************** - * The support state of this module - * - * @since ari_1_8_0 - *********************************************************/ - public String getSupport_level(); - - - -// int getUse_count -/********************************************************** - * The number of times this module is being used - * - * @since ari_1_8_0 - *********************************************************/ - public int getUse_count(); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/Peer.java b/classes/ch/loway/oss/ari4java/generated/Peer.java deleted file mode 100644 index 8e394a48..00000000 --- a/classes/ch/loway/oss/ari4java/generated/Peer.java +++ /dev/null @@ -1,125 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface Peer { - -// String getAddress -/********************************************************** - * The IP address of the peer. - * - * @since ari_1_9_0 - *********************************************************/ - public String getAddress(); - - - -// void setPeer_status String -/********************************************************** - * The current state of the peer. Note that the values of the status are dependent on the underlying peer technology. - * - * @since ari_1_9_0 - *********************************************************/ - public void setPeer_status(String val ); - - - -// void setPort String -/********************************************************** - * The port of the peer. - * - * @since ari_1_9_0 - *********************************************************/ - public void setPort(String val ); - - - -// String getPort -/********************************************************** - * The port of the peer. - * - * @since ari_1_9_0 - *********************************************************/ - public String getPort(); - - - -// String getCause -/********************************************************** - * An optional reason associated with the change in peer_status. - * - * @since ari_1_9_0 - *********************************************************/ - public String getCause(); - - - -// String getTime -/********************************************************** - * The last known time the peer was contacted. - * - * @since ari_1_9_0 - *********************************************************/ - public String getTime(); - - - -// void setTime String -/********************************************************** - * The last known time the peer was contacted. - * - * @since ari_1_9_0 - *********************************************************/ - public void setTime(String val ); - - - -// String getPeer_status -/********************************************************** - * The current state of the peer. Note that the values of the status are dependent on the underlying peer technology. - * - * @since ari_1_9_0 - *********************************************************/ - public String getPeer_status(); - - - -// void setAddress String -/********************************************************** - * The IP address of the peer. - * - * @since ari_1_9_0 - *********************************************************/ - public void setAddress(String val ); - - - -// void setCause String -/********************************************************** - * An optional reason associated with the change in peer_status. - * - * @since ari_1_9_0 - *********************************************************/ - public void setCause(String val ); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/PeerStatusChange.java b/classes/ch/loway/oss/ari4java/generated/PeerStatusChange.java deleted file mode 100644 index 89a051c7..00000000 --- a/classes/ch/loway/oss/ari4java/generated/PeerStatusChange.java +++ /dev/null @@ -1,65 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface PeerStatusChange { - -// Peer getPeer -/********************************************************** - * - * - * @since ari_1_9_0 - *********************************************************/ - public Peer getPeer(); - - - -// void setPeer Peer -/********************************************************** - * - * - * @since ari_1_9_0 - *********************************************************/ - public void setPeer(Peer val ); - - - -// void setEndpoint Endpoint -/********************************************************** - * - * - * @since ari_1_9_0 - *********************************************************/ - public void setEndpoint(Endpoint val ); - - - -// Endpoint getEndpoint -/********************************************************** - * - * - * @since ari_1_9_0 - *********************************************************/ - public Endpoint getEndpoint(); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/Playback.java b/classes/ch/loway/oss/ari4java/generated/Playback.java deleted file mode 100644 index a56017ee..00000000 --- a/classes/ch/loway/oss/ari4java/generated/Playback.java +++ /dev/null @@ -1,145 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface Playback { - -// String getLanguage -/********************************************************** - * For media types that support multiple languages, the language requested for playback. - * - * @since ari_0_0_1 - *********************************************************/ - public String getLanguage(); - - - -// void setState String -/********************************************************** - * Current state of the playback operation. - * - * @since ari_0_0_1 - *********************************************************/ - public void setState(String val ); - - - -// void setLanguage String -/********************************************************** - * For media types that support multiple languages, the language requested for playback. - * - * @since ari_0_0_1 - *********************************************************/ - public void setLanguage(String val ); - - - -// String getId -/********************************************************** - * ID for this playback operation - * - * @since ari_0_0_1 - *********************************************************/ - public String getId(); - - - -// void setTarget_uri String -/********************************************************** - * URI for the channel or bridge to play the media on - * - * @since ari_0_0_1 - *********************************************************/ - public void setTarget_uri(String val ); - - - -// void setMedia_uri String -/********************************************************** - * URI for the media to play back. - * - * @since ari_0_0_1 - *********************************************************/ - public void setMedia_uri(String val ); - - - -// String getTarget_uri -/********************************************************** - * URI for the channel or bridge to play the media on - * - * @since ari_0_0_1 - *********************************************************/ - public String getTarget_uri(); - - - -// void setId String -/********************************************************** - * ID for this playback operation - * - * @since ari_0_0_1 - *********************************************************/ - public void setId(String val ); - - - -// void setNext_media_uri String -/********************************************************** - * If a list of URIs is being played, the next media URI to be played back. - * - * @since ari_1_10_0 - *********************************************************/ - public void setNext_media_uri(String val ); - - - -// String getNext_media_uri -/********************************************************** - * If a list of URIs is being played, the next media URI to be played back. - * - * @since ari_1_10_0 - *********************************************************/ - public String getNext_media_uri(); - - - -// String getMedia_uri -/********************************************************** - * URI for the media to play back. - * - * @since ari_0_0_1 - *********************************************************/ - public String getMedia_uri(); - - - -// String getState -/********************************************************** - * Current state of the playback operation. - * - * @since ari_0_0_1 - *********************************************************/ - public String getState(); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/PlaybackContinuing.java b/classes/ch/loway/oss/ari4java/generated/PlaybackContinuing.java deleted file mode 100644 index 3182f2d7..00000000 --- a/classes/ch/loway/oss/ari4java/generated/PlaybackContinuing.java +++ /dev/null @@ -1,45 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface PlaybackContinuing { - -// void setPlayback Playback -/********************************************************** - * Playback control object - * - * @since ari_1_10_0 - *********************************************************/ - public void setPlayback(Playback val ); - - - -// Playback getPlayback -/********************************************************** - * Playback control object - * - * @since ari_1_10_0 - *********************************************************/ - public Playback getPlayback(); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/PlaybackFinished.java b/classes/ch/loway/oss/ari4java/generated/PlaybackFinished.java deleted file mode 100644 index 2407e803..00000000 --- a/classes/ch/loway/oss/ari4java/generated/PlaybackFinished.java +++ /dev/null @@ -1,45 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface PlaybackFinished { - -// void setPlayback Playback -/********************************************************** - * Playback control object - * - * @since ari_0_0_1 - *********************************************************/ - public void setPlayback(Playback val ); - - - -// Playback getPlayback -/********************************************************** - * Playback control object - * - * @since ari_0_0_1 - *********************************************************/ - public Playback getPlayback(); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/PlaybackStarted.java b/classes/ch/loway/oss/ari4java/generated/PlaybackStarted.java deleted file mode 100644 index 121f9f6d..00000000 --- a/classes/ch/loway/oss/ari4java/generated/PlaybackStarted.java +++ /dev/null @@ -1,45 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface PlaybackStarted { - -// void setPlayback Playback -/********************************************************** - * Playback control object - * - * @since ari_0_0_1 - *********************************************************/ - public void setPlayback(Playback val ); - - - -// Playback getPlayback -/********************************************************** - * Playback control object - * - * @since ari_0_0_1 - *********************************************************/ - public Playback getPlayback(); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/RecordingFailed.java b/classes/ch/loway/oss/ari4java/generated/RecordingFailed.java deleted file mode 100644 index 47c35c78..00000000 --- a/classes/ch/loway/oss/ari4java/generated/RecordingFailed.java +++ /dev/null @@ -1,45 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface RecordingFailed { - -// void setRecording LiveRecording -/********************************************************** - * Recording control object - * - * @since ari_0_0_1 - *********************************************************/ - public void setRecording(LiveRecording val ); - - - -// LiveRecording getRecording -/********************************************************** - * Recording control object - * - * @since ari_0_0_1 - *********************************************************/ - public LiveRecording getRecording(); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/RecordingFinished.java b/classes/ch/loway/oss/ari4java/generated/RecordingFinished.java deleted file mode 100644 index e42fb06e..00000000 --- a/classes/ch/loway/oss/ari4java/generated/RecordingFinished.java +++ /dev/null @@ -1,45 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface RecordingFinished { - -// void setRecording LiveRecording -/********************************************************** - * Recording control object - * - * @since ari_0_0_1 - *********************************************************/ - public void setRecording(LiveRecording val ); - - - -// LiveRecording getRecording -/********************************************************** - * Recording control object - * - * @since ari_0_0_1 - *********************************************************/ - public LiveRecording getRecording(); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/RecordingStarted.java b/classes/ch/loway/oss/ari4java/generated/RecordingStarted.java deleted file mode 100644 index e87bdc17..00000000 --- a/classes/ch/loway/oss/ari4java/generated/RecordingStarted.java +++ /dev/null @@ -1,45 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface RecordingStarted { - -// void setRecording LiveRecording -/********************************************************** - * Recording control object - * - * @since ari_0_0_1 - *********************************************************/ - public void setRecording(LiveRecording val ); - - - -// LiveRecording getRecording -/********************************************************** - * Recording control object - * - * @since ari_0_0_1 - *********************************************************/ - public LiveRecording getRecording(); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/SetId.java b/classes/ch/loway/oss/ari4java/generated/SetId.java deleted file mode 100644 index 7c677487..00000000 --- a/classes/ch/loway/oss/ari4java/generated/SetId.java +++ /dev/null @@ -1,65 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface SetId { - -// void setUser String -/********************************************************** - * Effective user id. - * - * @since ari_0_0_1 - *********************************************************/ - public void setUser(String val ); - - - -// void setGroup String -/********************************************************** - * Effective group id. - * - * @since ari_0_0_1 - *********************************************************/ - public void setGroup(String val ); - - - -// String getUser -/********************************************************** - * Effective user id. - * - * @since ari_0_0_1 - *********************************************************/ - public String getUser(); - - - -// String getGroup -/********************************************************** - * Effective group id. - * - * @since ari_0_0_1 - *********************************************************/ - public String getGroup(); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/Sound.java b/classes/ch/loway/oss/ari4java/generated/Sound.java deleted file mode 100644 index f31b301e..00000000 --- a/classes/ch/loway/oss/ari4java/generated/Sound.java +++ /dev/null @@ -1,85 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface Sound { - -// List getFormats -/********************************************************** - * The formats and languages in which this sound is available. - * - * @since ari_0_0_1 - *********************************************************/ - public List getFormats(); - - - -// String getId -/********************************************************** - * Sound's identifier. - * - * @since ari_0_0_1 - *********************************************************/ - public String getId(); - - - -// void setId String -/********************************************************** - * Sound's identifier. - * - * @since ari_0_0_1 - *********************************************************/ - public void setId(String val ); - - - -// String getText -/********************************************************** - * Text description of the sound, usually the words spoken. - * - * @since ari_0_0_1 - *********************************************************/ - public String getText(); - - - -// void setFormats List -/********************************************************** - * The formats and languages in which this sound is available. - * - * @since ari_0_0_1 - *********************************************************/ - public void setFormats(List val ); - - - -// void setText String -/********************************************************** - * Text description of the sound, usually the words spoken. - * - * @since ari_0_0_1 - *********************************************************/ - public void setText(String val ); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/StasisEnd.java b/classes/ch/loway/oss/ari4java/generated/StasisEnd.java deleted file mode 100644 index 8fcd9b29..00000000 --- a/classes/ch/loway/oss/ari4java/generated/StasisEnd.java +++ /dev/null @@ -1,45 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface StasisEnd { - -// Channel getChannel -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ - public Channel getChannel(); - - - -// void setChannel Channel -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ - public void setChannel(Channel val ); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/StasisStart.java b/classes/ch/loway/oss/ari4java/generated/StasisStart.java deleted file mode 100644 index 5e9f9e07..00000000 --- a/classes/ch/loway/oss/ari4java/generated/StasisStart.java +++ /dev/null @@ -1,85 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface StasisStart { - -// void setReplace_channel Channel -/********************************************************** - * - * - * @since ari_1_5_0 - *********************************************************/ - public void setReplace_channel(Channel val ); - - - -// Channel getReplace_channel -/********************************************************** - * - * - * @since ari_1_5_0 - *********************************************************/ - public Channel getReplace_channel(); - - - -// Channel getChannel -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ - public Channel getChannel(); - - - -// void setArgs List -/********************************************************** - * Arguments to the application - * - * @since ari_0_0_1 - *********************************************************/ - public void setArgs(List val ); - - - -// List getArgs -/********************************************************** - * Arguments to the application - * - * @since ari_0_0_1 - *********************************************************/ - public List getArgs(); - - - -// void setChannel Channel -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ - public void setChannel(Channel val ); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/StatusInfo.java b/classes/ch/loway/oss/ari4java/generated/StatusInfo.java deleted file mode 100644 index 79a1918f..00000000 --- a/classes/ch/loway/oss/ari4java/generated/StatusInfo.java +++ /dev/null @@ -1,65 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface StatusInfo { - -// void setLast_reload_time Date -/********************************************************** - * Time when Asterisk was last reloaded. - * - * @since ari_0_0_1 - *********************************************************/ - public void setLast_reload_time(Date val ); - - - -// Date getLast_reload_time -/********************************************************** - * Time when Asterisk was last reloaded. - * - * @since ari_0_0_1 - *********************************************************/ - public Date getLast_reload_time(); - - - -// Date getStartup_time -/********************************************************** - * Time when Asterisk was started. - * - * @since ari_0_0_1 - *********************************************************/ - public Date getStartup_time(); - - - -// void setStartup_time Date -/********************************************************** - * Time when Asterisk was started. - * - * @since ari_0_0_1 - *********************************************************/ - public void setStartup_time(Date val ); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/StoredRecording.java b/classes/ch/loway/oss/ari4java/generated/StoredRecording.java deleted file mode 100644 index cb8fe040..00000000 --- a/classes/ch/loway/oss/ari4java/generated/StoredRecording.java +++ /dev/null @@ -1,65 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface StoredRecording { - -// String getFormat -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ - public String getFormat(); - - - -// void setName String -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ - public void setName(String val ); - - - -// String getName -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ - public String getName(); - - - -// void setFormat String -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ - public void setFormat(String val ); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/SystemInfo.java b/classes/ch/loway/oss/ari4java/generated/SystemInfo.java deleted file mode 100644 index dfa47553..00000000 --- a/classes/ch/loway/oss/ari4java/generated/SystemInfo.java +++ /dev/null @@ -1,65 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface SystemInfo { - -// String getEntity_id -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ - public String getEntity_id(); - - - -// void setVersion String -/********************************************************** - * Asterisk version. - * - * @since ari_0_0_1 - *********************************************************/ - public void setVersion(String val ); - - - -// void setEntity_id String -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ - public void setEntity_id(String val ); - - - -// String getVersion -/********************************************************** - * Asterisk version. - * - * @since ari_0_0_1 - *********************************************************/ - public String getVersion(); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/TextMessage.java b/classes/ch/loway/oss/ari4java/generated/TextMessage.java deleted file mode 100644 index ae204698..00000000 --- a/classes/ch/loway/oss/ari4java/generated/TextMessage.java +++ /dev/null @@ -1,105 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface TextMessage { - -// void setFrom String -/********************************************************** - * A technology specific URI specifying the source of the message. For sip and pjsip technologies, any SIP URI can be specified. For xmpp, the URI must correspond to the client connection being used to send the message. - * - * @since ari_1_5_0 - *********************************************************/ - public void setFrom(String val ); - - - -// String getBody -/********************************************************** - * The text of the message. - * - * @since ari_1_5_0 - *********************************************************/ - public String getBody(); - - - -// void setTo String -/********************************************************** - * A technology specific URI specifying the destination of the message. Valid technologies include sip, pjsip, and xmp. The destination of a message should be an endpoint. - * - * @since ari_1_5_0 - *********************************************************/ - public void setTo(String val ); - - - -// void setBody String -/********************************************************** - * The text of the message. - * - * @since ari_1_5_0 - *********************************************************/ - public void setBody(String val ); - - - -// String getFrom -/********************************************************** - * A technology specific URI specifying the source of the message. For sip and pjsip technologies, any SIP URI can be specified. For xmpp, the URI must correspond to the client connection being used to send the message. - * - * @since ari_1_5_0 - *********************************************************/ - public String getFrom(); - - - -// String getTo -/********************************************************** - * A technology specific URI specifying the destination of the message. Valid technologies include sip, pjsip, and xmp. The destination of a message should be an endpoint. - * - * @since ari_1_5_0 - *********************************************************/ - public String getTo(); - - - -// List getVariables -/********************************************************** - * Technology specific key/value pairs associated with the message. - * - * @since ari_1_5_0 - *********************************************************/ - public List getVariables(); - - - -// void setVariables List -/********************************************************** - * Technology specific key/value pairs associated with the message. - * - * @since ari_1_5_0 - *********************************************************/ - public void setVariables(List val ); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/TextMessageReceived.java b/classes/ch/loway/oss/ari4java/generated/TextMessageReceived.java deleted file mode 100644 index d417486a..00000000 --- a/classes/ch/loway/oss/ari4java/generated/TextMessageReceived.java +++ /dev/null @@ -1,65 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface TextMessageReceived { - -// TextMessage getMessage -/********************************************************** - * - * - * @since ari_1_5_0 - *********************************************************/ - public TextMessage getMessage(); - - - -// void setEndpoint Endpoint -/********************************************************** - * - * - * @since ari_1_5_0 - *********************************************************/ - public void setEndpoint(Endpoint val ); - - - -// void setMessage TextMessage -/********************************************************** - * - * - * @since ari_1_5_0 - *********************************************************/ - public void setMessage(TextMessage val ); - - - -// Endpoint getEndpoint -/********************************************************** - * - * - * @since ari_1_5_0 - *********************************************************/ - public Endpoint getEndpoint(); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/TextMessageVariable.java b/classes/ch/loway/oss/ari4java/generated/TextMessageVariable.java deleted file mode 100644 index 04e142c7..00000000 --- a/classes/ch/loway/oss/ari4java/generated/TextMessageVariable.java +++ /dev/null @@ -1,65 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface TextMessageVariable { - -// void setValue String -/********************************************************** - * The value of the variable. - * - * @since ari_1_5_0 - *********************************************************/ - public void setValue(String val ); - - - -// String getKey -/********************************************************** - * A unique key identifying the variable. - * - * @since ari_1_5_0 - *********************************************************/ - public String getKey(); - - - -// void setKey String -/********************************************************** - * A unique key identifying the variable. - * - * @since ari_1_5_0 - *********************************************************/ - public void setKey(String val ); - - - -// String getValue -/********************************************************** - * The value of the variable. - * - * @since ari_1_5_0 - *********************************************************/ - public String getValue(); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/Variable.java b/classes/ch/loway/oss/ari4java/generated/Variable.java deleted file mode 100644 index bcd18412..00000000 --- a/classes/ch/loway/oss/ari4java/generated/Variable.java +++ /dev/null @@ -1,45 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.tags.*; - -/********************************************************** - * - * Generated by: JavaInterface - *********************************************************/ - - -public interface Variable { - -// void setValue String -/********************************************************** - * The value of the variable requested - * - * @since ari_0_0_1 - *********************************************************/ - public void setValue(String val ); - - - -// String getValue -/********************************************************** - * The value of the variable requested - * - * @since ari_0_0_1 - *********************************************************/ - public String getValue(); - - -} -; diff --git a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/AriBuilder_impl_ari_0_0_1.java b/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/AriBuilder_impl_ari_0_0_1.java deleted file mode 100644 index 2ad4035b..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/AriBuilder_impl_ari_0_0_1.java +++ /dev/null @@ -1,324 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_0_0_1; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.ari_0_0_1.models.*; -import ch.loway.oss.ari4java.generated.ari_0_0_1.actions.*; -import ch.loway.oss.ari4java.generated.*; -import ch.loway.oss.ari4java.ARI; - -public class AriBuilder_impl_ari_0_0_1 implements AriBuilder { - -public ActionRecordings actionRecordings() { - return new ActionRecordings_impl_ari_0_0_1(); - }; - -public ActionEndpoints actionEndpoints() { - return new ActionEndpoints_impl_ari_0_0_1(); - }; - -public ActionAsterisk actionAsterisk() { - return new ActionAsterisk_impl_ari_0_0_1(); - }; - -public ActionSounds actionSounds() { - return new ActionSounds_impl_ari_0_0_1(); - }; - -public ActionBridges actionBridges() { - return new ActionBridges_impl_ari_0_0_1(); - }; - -public ActionChannels actionChannels() { - return new ActionChannels_impl_ari_0_0_1(); - }; - -public ActionEvents actionEvents() { - return new ActionEvents_impl_ari_0_0_1(); - }; - -public ActionApplications actionApplications() { - return new ActionApplications_impl_ari_0_0_1(); - }; - -public ActionDeviceStates actionDeviceStates() { - return new ActionDeviceStates_impl_ari_0_0_1(); - }; - -public ActionPlaybacks actionPlaybacks() { - return new ActionPlaybacks_impl_ari_0_0_1(); - }; - -public ChannelDtmfReceived channelDtmfReceived() { - return new ChannelDtmfReceived_impl_ari_0_0_1(); - }; - -public Event event() { - return new Event_impl_ari_0_0_1(); - }; - -public StasisEnd stasisEnd() { - return new StasisEnd_impl_ari_0_0_1(); - }; - -public ChannelCreated channelCreated() { - return new ChannelCreated_impl_ari_0_0_1(); - }; - -public SetId setId() { - return new SetId_impl_ari_0_0_1(); - }; - -public BuildInfo buildInfo() { - return new BuildInfo_impl_ari_0_0_1(); - }; - -public MissingParams missingParams() { - return new MissingParams_impl_ari_0_0_1(); - }; - -public ChannelEnteredBridge channelEnteredBridge() { - return new ChannelEnteredBridge_impl_ari_0_0_1(); - }; - -public Application application() { - return new Application_impl_ari_0_0_1(); - }; - -public StoredRecording storedRecording() { - return new StoredRecording_impl_ari_0_0_1(); - }; - -public BridgeMerged bridgeMerged() { - return new BridgeMerged_impl_ari_0_0_1(); - }; - -public Bridge bridge() { - return new Bridge_impl_ari_0_0_1(); - }; - -public SystemInfo systemInfo() { - return new SystemInfo_impl_ari_0_0_1(); - }; - -public Playback playback() { - return new Playback_impl_ari_0_0_1(); - }; - -public StatusInfo statusInfo() { - return new StatusInfo_impl_ari_0_0_1(); - }; - -public EndpointStateChange endpointStateChange() { - return new EndpointStateChange_impl_ari_0_0_1(); - }; - -public Variable variable() { - return new Variable_impl_ari_0_0_1(); - }; - -public ChannelLeftBridge channelLeftBridge() { - return new ChannelLeftBridge_impl_ari_0_0_1(); - }; - -public Dialed dialed() { - return new Dialed_impl_ari_0_0_1(); - }; - -public RecordingFailed recordingFailed() { - return new RecordingFailed_impl_ari_0_0_1(); - }; - -public PlaybackFinished playbackFinished() { - return new PlaybackFinished_impl_ari_0_0_1(); - }; - -public ChannelHangupRequest channelHangupRequest() { - return new ChannelHangupRequest_impl_ari_0_0_1(); - }; - -public BridgeCreated bridgeCreated() { - return new BridgeCreated_impl_ari_0_0_1(); - }; - -public CallerID callerID() { - return new CallerID_impl_ari_0_0_1(); - }; - -public FormatLangPair formatLangPair() { - return new FormatLangPair_impl_ari_0_0_1(); - }; - -public ChannelVarset channelVarset() { - return new ChannelVarset_impl_ari_0_0_1(); - }; - -public ChannelStateChange channelStateChange() { - return new ChannelStateChange_impl_ari_0_0_1(); - }; - -public DialplanCEP dialplanCEP() { - return new DialplanCEP_impl_ari_0_0_1(); - }; - -public PlaybackStarted playbackStarted() { - return new PlaybackStarted_impl_ari_0_0_1(); - }; - -public ConfigInfo configInfo() { - return new ConfigInfo_impl_ari_0_0_1(); - }; - -public ChannelDialplan channelDialplan() { - return new ChannelDialplan_impl_ari_0_0_1(); - }; - -public RecordingStarted recordingStarted() { - return new RecordingStarted_impl_ari_0_0_1(); - }; - -public Endpoint endpoint() { - return new Endpoint_impl_ari_0_0_1(); - }; - -public Channel channel() { - return new Channel_impl_ari_0_0_1(); - }; - -public RecordingFinished recordingFinished() { - return new RecordingFinished_impl_ari_0_0_1(); - }; - -public AsteriskInfo asteriskInfo() { - return new AsteriskInfo_impl_ari_0_0_1(); - }; - -public ChannelDestroyed channelDestroyed() { - return new ChannelDestroyed_impl_ari_0_0_1(); - }; - -public DeviceStateChanged deviceStateChanged() { - return new DeviceStateChanged_impl_ari_0_0_1(); - }; - -public DeviceState deviceState() { - return new DeviceState_impl_ari_0_0_1(); - }; - -public StasisStart stasisStart() { - return new StasisStart_impl_ari_0_0_1(); - }; - -public Sound sound() { - return new Sound_impl_ari_0_0_1(); - }; - -public BridgeDestroyed bridgeDestroyed() { - return new BridgeDestroyed_impl_ari_0_0_1(); - }; - -public LiveRecording liveRecording() { - return new LiveRecording_impl_ari_0_0_1(); - }; - -public Message message() { - return new Message_impl_ari_0_0_1(); - }; - -public ChannelCallerId channelCallerId() { - return new ChannelCallerId_impl_ari_0_0_1(); - }; - -public ApplicationReplaced applicationReplaced() { - return new ApplicationReplaced_impl_ari_0_0_1(); - }; - -public ChannelUserevent channelUserevent() { - return new ChannelUserevent_impl_ari_0_0_1(); - }; - -public BridgeAttendedTransfer bridgeAttendedTransfer() { - throw new UnsupportedOperationException(); - }; - -public BridgeBlindTransfer bridgeBlindTransfer() { - throw new UnsupportedOperationException(); - }; - -public ChannelConnectedLine channelConnectedLine() { - throw new UnsupportedOperationException(); - }; - -public ChannelHold channelHold() { - throw new UnsupportedOperationException(); - }; - -public ChannelTalkingFinished channelTalkingFinished() { - throw new UnsupportedOperationException(); - }; - -public ChannelTalkingStarted channelTalkingStarted() { - throw new UnsupportedOperationException(); - }; - -public ChannelUnhold channelUnhold() { - throw new UnsupportedOperationException(); - }; - -public ConfigTuple configTuple() { - throw new UnsupportedOperationException(); - }; - -public ContactInfo contactInfo() { - throw new UnsupportedOperationException(); - }; - -public ContactStatusChange contactStatusChange() { - throw new UnsupportedOperationException(); - }; - -public Dial dial() { - throw new UnsupportedOperationException(); - }; - -public LogChannel logChannel() { - throw new UnsupportedOperationException(); - }; - -public Module module() { - throw new UnsupportedOperationException(); - }; - -public Peer peer() { - throw new UnsupportedOperationException(); - }; - -public PeerStatusChange peerStatusChange() { - throw new UnsupportedOperationException(); - }; - -public PlaybackContinuing playbackContinuing() { - throw new UnsupportedOperationException(); - }; - -public TextMessage textMessage() { - throw new UnsupportedOperationException(); - }; - -public TextMessageReceived textMessageReceived() { - throw new UnsupportedOperationException(); - }; - -public TextMessageVariable textMessageVariable() { - throw new UnsupportedOperationException(); - }; - -public ARI.ClassFactory getClassFactory() { - return new ClassTranslator_impl_ari_0_0_1(); -}; - -}; diff --git a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/ClassTranslator_impl_ari_0_0_1.java b/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/ClassTranslator_impl_ari_0_0_1.java deleted file mode 100644 index 2150d998..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/ClassTranslator_impl_ari_0_0_1.java +++ /dev/null @@ -1,255 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_0_0_1; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.ARI; -import ch.loway.oss.ari4java.generated.*; -import ch.loway.oss.ari4java.generated.ari_0_0_1.models.*; -import ch.loway.oss.ari4java.generated.ari_0_0_1.actions.*; - -/********************************************************** - * This is a class translator. - *********************************************************/ -public class ClassTranslator_impl_ari_0_0_1 implements ARI.ClassFactory { - - @Override - public Class getImplementationFor(Class interfaceClass) { - - if ( interfaceClass.equals(ActionApplications.class) ) { - return (ActionApplications_impl_ari_0_0_1.class); - } else - - if ( interfaceClass.equals(ActionAsterisk.class) ) { - return (ActionAsterisk_impl_ari_0_0_1.class); - } else - - if ( interfaceClass.equals(ActionBridges.class) ) { - return (ActionBridges_impl_ari_0_0_1.class); - } else - - if ( interfaceClass.equals(ActionChannels.class) ) { - return (ActionChannels_impl_ari_0_0_1.class); - } else - - if ( interfaceClass.equals(ActionDeviceStates.class) ) { - return (ActionDeviceStates_impl_ari_0_0_1.class); - } else - - if ( interfaceClass.equals(ActionEndpoints.class) ) { - return (ActionEndpoints_impl_ari_0_0_1.class); - } else - - if ( interfaceClass.equals(ActionEvents.class) ) { - return (ActionEvents_impl_ari_0_0_1.class); - } else - - if ( interfaceClass.equals(ActionPlaybacks.class) ) { - return (ActionPlaybacks_impl_ari_0_0_1.class); - } else - - if ( interfaceClass.equals(ActionRecordings.class) ) { - return (ActionRecordings_impl_ari_0_0_1.class); - } else - - if ( interfaceClass.equals(ActionSounds.class) ) { - return (ActionSounds_impl_ari_0_0_1.class); - } else - - if ( interfaceClass.equals(Application.class) ) { - return (Application_impl_ari_0_0_1.class); - } else - - if ( interfaceClass.equals(ApplicationReplaced.class) ) { - return (ApplicationReplaced_impl_ari_0_0_1.class); - } else - - if ( interfaceClass.equals(AsteriskInfo.class) ) { - return (AsteriskInfo_impl_ari_0_0_1.class); - } else - - if ( interfaceClass.equals(Bridge.class) ) { - return (Bridge_impl_ari_0_0_1.class); - } else - - if ( interfaceClass.equals(BridgeCreated.class) ) { - return (BridgeCreated_impl_ari_0_0_1.class); - } else - - if ( interfaceClass.equals(BridgeDestroyed.class) ) { - return (BridgeDestroyed_impl_ari_0_0_1.class); - } else - - if ( interfaceClass.equals(BridgeMerged.class) ) { - return (BridgeMerged_impl_ari_0_0_1.class); - } else - - if ( interfaceClass.equals(BuildInfo.class) ) { - return (BuildInfo_impl_ari_0_0_1.class); - } else - - if ( interfaceClass.equals(CallerID.class) ) { - return (CallerID_impl_ari_0_0_1.class); - } else - - if ( interfaceClass.equals(Channel.class) ) { - return (Channel_impl_ari_0_0_1.class); - } else - - if ( interfaceClass.equals(ChannelCallerId.class) ) { - return (ChannelCallerId_impl_ari_0_0_1.class); - } else - - if ( interfaceClass.equals(ChannelCreated.class) ) { - return (ChannelCreated_impl_ari_0_0_1.class); - } else - - if ( interfaceClass.equals(ChannelDestroyed.class) ) { - return (ChannelDestroyed_impl_ari_0_0_1.class); - } else - - if ( interfaceClass.equals(ChannelDialplan.class) ) { - return (ChannelDialplan_impl_ari_0_0_1.class); - } else - - if ( interfaceClass.equals(ChannelDtmfReceived.class) ) { - return (ChannelDtmfReceived_impl_ari_0_0_1.class); - } else - - if ( interfaceClass.equals(ChannelEnteredBridge.class) ) { - return (ChannelEnteredBridge_impl_ari_0_0_1.class); - } else - - if ( interfaceClass.equals(ChannelHangupRequest.class) ) { - return (ChannelHangupRequest_impl_ari_0_0_1.class); - } else - - if ( interfaceClass.equals(ChannelLeftBridge.class) ) { - return (ChannelLeftBridge_impl_ari_0_0_1.class); - } else - - if ( interfaceClass.equals(ChannelStateChange.class) ) { - return (ChannelStateChange_impl_ari_0_0_1.class); - } else - - if ( interfaceClass.equals(ChannelUserevent.class) ) { - return (ChannelUserevent_impl_ari_0_0_1.class); - } else - - if ( interfaceClass.equals(ChannelVarset.class) ) { - return (ChannelVarset_impl_ari_0_0_1.class); - } else - - if ( interfaceClass.equals(ConfigInfo.class) ) { - return (ConfigInfo_impl_ari_0_0_1.class); - } else - - if ( interfaceClass.equals(DeviceState.class) ) { - return (DeviceState_impl_ari_0_0_1.class); - } else - - if ( interfaceClass.equals(DeviceStateChanged.class) ) { - return (DeviceStateChanged_impl_ari_0_0_1.class); - } else - - if ( interfaceClass.equals(Dialed.class) ) { - return (Dialed_impl_ari_0_0_1.class); - } else - - if ( interfaceClass.equals(DialplanCEP.class) ) { - return (DialplanCEP_impl_ari_0_0_1.class); - } else - - if ( interfaceClass.equals(Endpoint.class) ) { - return (Endpoint_impl_ari_0_0_1.class); - } else - - if ( interfaceClass.equals(EndpointStateChange.class) ) { - return (EndpointStateChange_impl_ari_0_0_1.class); - } else - - if ( interfaceClass.equals(Event.class) ) { - return (Event_impl_ari_0_0_1.class); - } else - - if ( interfaceClass.equals(FormatLangPair.class) ) { - return (FormatLangPair_impl_ari_0_0_1.class); - } else - - if ( interfaceClass.equals(LiveRecording.class) ) { - return (LiveRecording_impl_ari_0_0_1.class); - } else - - if ( interfaceClass.equals(Message.class) ) { - return (Message_impl_ari_0_0_1.class); - } else - - if ( interfaceClass.equals(MissingParams.class) ) { - return (MissingParams_impl_ari_0_0_1.class); - } else - - if ( interfaceClass.equals(Playback.class) ) { - return (Playback_impl_ari_0_0_1.class); - } else - - if ( interfaceClass.equals(PlaybackFinished.class) ) { - return (PlaybackFinished_impl_ari_0_0_1.class); - } else - - if ( interfaceClass.equals(PlaybackStarted.class) ) { - return (PlaybackStarted_impl_ari_0_0_1.class); - } else - - if ( interfaceClass.equals(RecordingFailed.class) ) { - return (RecordingFailed_impl_ari_0_0_1.class); - } else - - if ( interfaceClass.equals(RecordingFinished.class) ) { - return (RecordingFinished_impl_ari_0_0_1.class); - } else - - if ( interfaceClass.equals(RecordingStarted.class) ) { - return (RecordingStarted_impl_ari_0_0_1.class); - } else - - if ( interfaceClass.equals(SetId.class) ) { - return (SetId_impl_ari_0_0_1.class); - } else - - if ( interfaceClass.equals(Sound.class) ) { - return (Sound_impl_ari_0_0_1.class); - } else - - if ( interfaceClass.equals(StasisEnd.class) ) { - return (StasisEnd_impl_ari_0_0_1.class); - } else - - if ( interfaceClass.equals(StasisStart.class) ) { - return (StasisStart_impl_ari_0_0_1.class); - } else - - if ( interfaceClass.equals(StatusInfo.class) ) { - return (StatusInfo_impl_ari_0_0_1.class); - } else - - if ( interfaceClass.equals(StoredRecording.class) ) { - return (StoredRecording_impl_ari_0_0_1.class); - } else - - if ( interfaceClass.equals(SystemInfo.class) ) { - return (SystemInfo_impl_ari_0_0_1.class); - } else - - if ( interfaceClass.equals(Variable.class) ) { - return (Variable_impl_ari_0_0_1.class); - } else - { - return null; - } - } -} - - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/actions/ActionApplications_impl_ari_0_0_1.java b/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/actions/ActionApplications_impl_ari_0_0_1.java deleted file mode 100644 index 640e00d3..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/actions/ActionApplications_impl_ari_0_0_1.java +++ /dev/null @@ -1,140 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_0_0_1.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_0_0_1.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionApplications_impl_ari_0_0_1 extends BaseAriAction implements ActionApplications { -/********************************************************** - * Stasis applications - * - * List all applications. - *********************************************************/ -private void buildList() { -reset(); -url = "/applications"; -method = "GET"; -} - -@Override -public List list() throws RestException { -buildList(); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void list(AriCallback> callback) { -buildList(); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Stasis application - * - * Get details of an application. - *********************************************************/ -private void buildGet(String applicationName) { -reset(); -url = "/applications/" + applicationName + ""; -method = "GET"; -lE.add( HttpResponse.build( 404, "Application does not exist.") ); -} - -@Override -public Application get(String applicationName) throws RestException { -buildGet(applicationName); -String json = httpActionSync(); -return deserializeJson( json, Application_impl_ari_0_0_1.class ); -} - -@Override -public void get(String applicationName, AriCallback callback) { -buildGet(applicationName); -httpActionAsync(callback, Application_impl_ari_0_0_1.class); -} - -/********************************************************** - * Stasis application - * - * Subscribe an application to a event source. - * Returns the state of the application after the subscriptions have changed - *********************************************************/ -private void buildSubscribe(String applicationName, String eventSource) { -reset(); -url = "/applications/" + applicationName + "/subscription"; -method = "POST"; -lParamQuery.add( HttpParam.build( "eventSource", eventSource) ); -lE.add( HttpResponse.build( 400, "Missing parameter.") ); -lE.add( HttpResponse.build( 404, "Application does not exist.") ); -lE.add( HttpResponse.build( 422, "Event source does not exist.") ); -} - -@Override -public Application subscribe(String applicationName, String eventSource) throws RestException { -buildSubscribe(applicationName, eventSource); -String json = httpActionSync(); -return deserializeJson( json, Application_impl_ari_0_0_1.class ); -} - -@Override -public void subscribe(String applicationName, String eventSource, AriCallback callback) { -buildSubscribe(applicationName, eventSource); -httpActionAsync(callback, Application_impl_ari_0_0_1.class); -} - -/********************************************************** - * Stasis application - * - * Unsubscribe an application from an event source. - * Returns the state of the application after the subscriptions have changed - *********************************************************/ -private void buildUnsubscribe(String applicationName, String eventSource) { -reset(); -url = "/applications/" + applicationName + "/subscription"; -method = "DELETE"; -lParamQuery.add( HttpParam.build( "eventSource", eventSource) ); -lE.add( HttpResponse.build( 400, "Missing parameter; event source scheme not recognized.") ); -lE.add( HttpResponse.build( 404, "Application does not exist.") ); -lE.add( HttpResponse.build( 409, "Application not subscribed to event source.") ); -lE.add( HttpResponse.build( 422, "Event source does not exist.") ); -} - -@Override -public Application unsubscribe(String applicationName, String eventSource) throws RestException { -buildUnsubscribe(applicationName, eventSource); -String json = httpActionSync(); -return deserializeJson( json, Application_impl_ari_0_0_1.class ); -} - -@Override -public void unsubscribe(String applicationName, String eventSource, AriCallback callback) { -buildUnsubscribe(applicationName, eventSource); -httpActionAsync(callback, Application_impl_ari_0_0_1.class); -} - -/** No missing signatures from interface */ -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/actions/ActionAsterisk_impl_ari_0_0_1.java b/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/actions/ActionAsterisk_impl_ari_0_0_1.java deleted file mode 100644 index ccf4539c..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/actions/ActionAsterisk_impl_ari_0_0_1.java +++ /dev/null @@ -1,335 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_0_0_1.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_0_0_1.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionAsterisk_impl_ari_0_0_1 extends BaseAriAction implements ActionAsterisk { -/********************************************************** - * Asterisk system information (similar to core show settings) - * - * Gets Asterisk system information. - *********************************************************/ -private void buildGetInfo(String only) { -reset(); -url = "/asterisk/info"; -method = "GET"; -lParamQuery.add( HttpParam.build( "only", only) ); -} - -@Override -public AsteriskInfo getInfo(String only) throws RestException { -buildGetInfo(only); -String json = httpActionSync(); -return deserializeJson( json, AsteriskInfo_impl_ari_0_0_1.class ); -} - -@Override -public void getInfo(String only, AriCallback callback) { -buildGetInfo(only); -httpActionAsync(callback, AsteriskInfo_impl_ari_0_0_1.class); -} - -/********************************************************** - * Global variables - * - * Get the value of a global variable. - *********************************************************/ -private void buildGetGlobalVar(String variable) { -reset(); -url = "/asterisk/variable"; -method = "GET"; -lParamQuery.add( HttpParam.build( "variable", variable) ); -lE.add( HttpResponse.build( 400, "Missing variable parameter.") ); -} - -@Override -public Variable getGlobalVar(String variable) throws RestException { -buildGetGlobalVar(variable); -String json = httpActionSync(); -return deserializeJson( json, Variable_impl_ari_0_0_1.class ); -} - -@Override -public void getGlobalVar(String variable, AriCallback callback) { -buildGetGlobalVar(variable); -httpActionAsync(callback, Variable_impl_ari_0_0_1.class); -} - -/********************************************************** - * Global variables - * - * Set the value of a global variable. - *********************************************************/ -private void buildSetGlobalVar(String variable, String value) { -reset(); -url = "/asterisk/variable"; -method = "POST"; -lParamQuery.add( HttpParam.build( "variable", variable) ); -lParamQuery.add( HttpParam.build( "value", value) ); -lE.add( HttpResponse.build( 400, "Missing variable parameter.") ); -} - -@Override -public void setGlobalVar(String variable, String value) throws RestException { -buildSetGlobalVar(variable, value); -String json = httpActionSync(); -} - -@Override -public void setGlobalVar(String variable, String value, AriCallback callback) { -buildSetGlobalVar(variable, value); -httpActionAsync(callback); -} - -/********************************************************** - * Reload an Asterisk module. - * - * - * @since ari_1_8_0 - *********************************************************/ -public void reloadModule(String moduleName) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create or update a dynamic configuration object. - * - * - * @since ari_1_8_0 - *********************************************************/ -public List updateObject(String configClass, String objectType, String id, Map fields) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_8_0 - *********************************************************/ -public void deleteObject(String configClass, String objectType, String id, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_8_0 - *********************************************************/ -public void reloadModule(String moduleName, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_9_0 - *********************************************************/ -public void addLog(String logChannelName, String configuration, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_8_0 - *********************************************************/ -public void unloadModule(String moduleName, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * List Asterisk modules. - * - * - * @since ari_1_8_0 - *********************************************************/ -public List listModules() throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Gets Asterisk log channel information. - * - * - * @since ari_1_9_0 - *********************************************************/ -public List listLogChannels() throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Get Asterisk module information. - * - * - * @since ari_1_8_0 - *********************************************************/ -public Module getModule(String moduleName) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_9_0 - *********************************************************/ -public void rotateLog(String logChannelName, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Retrieve a dynamic configuration object. - * - * - * @since ari_1_8_0 - *********************************************************/ -public List getObject(String configClass, String objectType, String id) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Load an Asterisk module. - * - * - * @since ari_1_8_0 - *********************************************************/ -public void loadModule(String moduleName) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Unload an Asterisk module. - * - * - * @since ari_1_8_0 - *********************************************************/ -public void unloadModule(String moduleName) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_8_0 - *********************************************************/ -public void getModule(String moduleName, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_8_0 - *********************************************************/ -public void updateObject(String configClass, String objectType, String id, Map fields, AriCallback> callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Delete a dynamic configuration object. - * - * - * @since ari_1_8_0 - *********************************************************/ -public void deleteObject(String configClass, String objectType, String id) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Rotates a log channel. - * - * - * @since ari_1_9_0 - *********************************************************/ -public void rotateLog(String logChannelName) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_9_0 - *********************************************************/ -public void listLogChannels(AriCallback> callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Adds a log channel. - * - * - * @since ari_1_9_0 - *********************************************************/ -public void addLog(String logChannelName, String configuration) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_8_0 - *********************************************************/ -public void listModules(AriCallback> callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Deletes a log channel. - * - * - * @since ari_1_9_0 - *********************************************************/ -public void deleteLog(String logChannelName) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_9_0 - *********************************************************/ -public void deleteLog(String logChannelName, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_8_0 - *********************************************************/ -public void loadModule(String moduleName, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_8_0 - *********************************************************/ -public void getObject(String configClass, String objectType, String id, AriCallback> callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/actions/ActionBridges_impl_ari_0_0_1.java b/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/actions/ActionBridges_impl_ari_0_0_1.java deleted file mode 100644 index e2595981..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/actions/ActionBridges_impl_ari_0_0_1.java +++ /dev/null @@ -1,421 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_0_0_1.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_0_0_1.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionBridges_impl_ari_0_0_1 extends BaseAriAction implements ActionBridges { -/********************************************************** - * Active bridges - * - * List all active bridges in Asterisk. - *********************************************************/ -private void buildList() { -reset(); -url = "/bridges"; -method = "GET"; -} - -@Override -public List list() throws RestException { -buildList(); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void list(AriCallback> callback) { -buildList(); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Active bridges - * - * Create a new bridge. - * This bridge persists until it has been shut down, or Asterisk has been shut down. - *********************************************************/ -private void buildCreate(String type) { -reset(); -url = "/bridges"; -method = "POST"; -lParamQuery.add( HttpParam.build( "type", type) ); -} - -@Override -public Bridge create(String type) throws RestException { -buildCreate(type); -String json = httpActionSync(); -return deserializeJson( json, Bridge_impl_ari_0_0_1.class ); -} - -@Override -public void create(String type, AriCallback callback) { -buildCreate(type); -httpActionAsync(callback, Bridge_impl_ari_0_0_1.class); -} - -/********************************************************** - * Individual bridge - * - * Get bridge details. - *********************************************************/ -private void buildGet(String bridgeId) { -reset(); -url = "/bridges/" + bridgeId + ""; -method = "GET"; -lE.add( HttpResponse.build( 404, "Bridge not found") ); -} - -@Override -public Bridge get(String bridgeId) throws RestException { -buildGet(bridgeId); -String json = httpActionSync(); -return deserializeJson( json, Bridge_impl_ari_0_0_1.class ); -} - -@Override -public void get(String bridgeId, AriCallback callback) { -buildGet(bridgeId); -httpActionAsync(callback, Bridge_impl_ari_0_0_1.class); -} - -/********************************************************** - * Individual bridge - * - * Shut down a bridge. - * If any channels are in this bridge, they will be removed and resume whatever they were doing beforehand. - *********************************************************/ -private void buildDestroy(String bridgeId) { -reset(); -url = "/bridges/" + bridgeId + ""; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Bridge not found") ); -} - -@Override -public void destroy(String bridgeId) throws RestException { -buildDestroy(bridgeId); -String json = httpActionSync(); -} - -@Override -public void destroy(String bridgeId, AriCallback callback) { -buildDestroy(bridgeId); -httpActionAsync(callback); -} - -/********************************************************** - * Add a channel to a bridge - * - * Add a channel to a bridge. - *********************************************************/ -private void buildAddChannel(String bridgeId, String channel, String role) { -reset(); -url = "/bridges/" + bridgeId + "/addChannel"; -method = "POST"; -lParamQuery.add( HttpParam.build( "channel", channel) ); -lParamQuery.add( HttpParam.build( "role", role) ); -lE.add( HttpResponse.build( 400, "Channel not found") ); -lE.add( HttpResponse.build( 404, "Bridge not found") ); -lE.add( HttpResponse.build( 409, "Bridge not in Stasis application") ); -lE.add( HttpResponse.build( 422, "Channel not in Stasis application") ); -} - -@Override -public void addChannel(String bridgeId, String channel, String role) throws RestException { -buildAddChannel(bridgeId, channel, role); -String json = httpActionSync(); -} - -@Override -public void addChannel(String bridgeId, String channel, String role, AriCallback callback) { -buildAddChannel(bridgeId, channel, role); -httpActionAsync(callback); -} - -/********************************************************** - * Play music on hold to a bridge - * - * Play music on hold to a bridge or change the MOH class that is playing. - *********************************************************/ -private void buildStartMoh(String bridgeId, String mohClass) { -reset(); -url = "/bridges/" + bridgeId + "/moh"; -method = "POST"; -lParamQuery.add( HttpParam.build( "mohClass", mohClass) ); -lE.add( HttpResponse.build( 404, "Bridge not found") ); -lE.add( HttpResponse.build( 409, "Bridge not in Stasis application") ); -} - -@Override -public void startMoh(String bridgeId, String mohClass) throws RestException { -buildStartMoh(bridgeId, mohClass); -String json = httpActionSync(); -} - -@Override -public void startMoh(String bridgeId, String mohClass, AriCallback callback) { -buildStartMoh(bridgeId, mohClass); -httpActionAsync(callback); -} - -/********************************************************** - * Play music on hold to a bridge - * - * Stop playing music on hold to a bridge. - * This will only stop music on hold being played via POST bridges/{bridgeId}/moh. - *********************************************************/ -private void buildStopMoh(String bridgeId) { -reset(); -url = "/bridges/" + bridgeId + "/moh"; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Bridge not found") ); -lE.add( HttpResponse.build( 409, "Bridge not in Stasis application") ); -} - -@Override -public void stopMoh(String bridgeId) throws RestException { -buildStopMoh(bridgeId); -String json = httpActionSync(); -} - -@Override -public void stopMoh(String bridgeId, AriCallback callback) { -buildStopMoh(bridgeId); -httpActionAsync(callback); -} - -/********************************************************** - * Play media to the participants of a bridge - * - * Start playback of media on a bridge. - * 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.) - *********************************************************/ -private void buildPlay(String bridgeId, String media, String lang, int offsetms, int skipms) { -reset(); -url = "/bridges/" + bridgeId + "/play"; -method = "POST"; -lParamQuery.add( HttpParam.build( "media", media) ); -lParamQuery.add( HttpParam.build( "lang", lang) ); -lParamQuery.add( HttpParam.build( "offsetms", offsetms) ); -lParamQuery.add( HttpParam.build( "skipms", skipms) ); -lE.add( HttpResponse.build( 404, "Bridge not found") ); -lE.add( HttpResponse.build( 409, "Bridge not in a Stasis application") ); -} - -@Override -public Playback play(String bridgeId, String media, String lang, int offsetms, int skipms) throws RestException { -buildPlay(bridgeId, media, lang, offsetms, skipms); -String json = httpActionSync(); -return deserializeJson( json, Playback_impl_ari_0_0_1.class ); -} - -@Override -public void play(String bridgeId, String media, String lang, int offsetms, int skipms, AriCallback callback) { -buildPlay(bridgeId, media, lang, offsetms, skipms); -httpActionAsync(callback, Playback_impl_ari_0_0_1.class); -} - -/********************************************************** - * Record audio on a bridge - * - * Start a recording. - * This records the mixed audio from all channels participating in this bridge. - *********************************************************/ -private void buildRecord(String bridgeId, String name, String format, int maxDurationSeconds, int maxSilenceSeconds, String ifExists, boolean beep, String terminateOn) { -reset(); -url = "/bridges/" + bridgeId + "/record"; -method = "POST"; -lParamQuery.add( HttpParam.build( "name", name) ); -lParamQuery.add( HttpParam.build( "format", format) ); -lParamQuery.add( HttpParam.build( "maxDurationSeconds", maxDurationSeconds) ); -lParamQuery.add( HttpParam.build( "maxSilenceSeconds", maxSilenceSeconds) ); -lParamQuery.add( HttpParam.build( "ifExists", ifExists) ); -lParamQuery.add( HttpParam.build( "beep", beep) ); -lParamQuery.add( HttpParam.build( "terminateOn", terminateOn) ); -lE.add( HttpResponse.build( 400, "Invalid parameters") ); -lE.add( HttpResponse.build( 404, "Bridge not found") ); -lE.add( HttpResponse.build( 409, "Bridge is not in a Stasis application; A recording with the same name already exists on the system and can not be overwritten because it is in progress or ifExists=fail") ); -lE.add( HttpResponse.build( 422, "The format specified is unknown on this system") ); -} - -@Override -public LiveRecording record(String bridgeId, String name, String format, int maxDurationSeconds, int maxSilenceSeconds, String ifExists, boolean beep, String terminateOn) throws RestException { -buildRecord(bridgeId, name, format, maxDurationSeconds, maxSilenceSeconds, ifExists, beep, terminateOn); -String json = httpActionSync(); -return deserializeJson( json, LiveRecording_impl_ari_0_0_1.class ); -} - -@Override -public void record(String bridgeId, String name, String format, int maxDurationSeconds, int maxSilenceSeconds, String ifExists, boolean beep, String terminateOn, AriCallback callback) { -buildRecord(bridgeId, name, format, maxDurationSeconds, maxSilenceSeconds, ifExists, beep, terminateOn); -httpActionAsync(callback, LiveRecording_impl_ari_0_0_1.class); -} - -/********************************************************** - * Remove a channel from a bridge - * - * Remove a channel from a bridge. - *********************************************************/ -private void buildRemoveChannel(String bridgeId, String channel) { -reset(); -url = "/bridges/" + bridgeId + "/removeChannel"; -method = "POST"; -lParamQuery.add( HttpParam.build( "channel", channel) ); -lE.add( HttpResponse.build( 400, "Channel not found") ); -lE.add( HttpResponse.build( 404, "Bridge not found") ); -lE.add( HttpResponse.build( 409, "Bridge not in Stasis application") ); -lE.add( HttpResponse.build( 422, "Channel not in this bridge") ); -} - -@Override -public void removeChannel(String bridgeId, String channel) throws RestException { -buildRemoveChannel(bridgeId, channel); -String json = httpActionSync(); -} - -@Override -public void removeChannel(String bridgeId, String channel, AriCallback callback) { -buildRemoveChannel(bridgeId, channel); -httpActionAsync(callback); -} - -/********************************************************** - * - * - * @since ari_1_5_0 - *********************************************************/ -public void create(String type, String bridgeId, String name, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_7_0 - *********************************************************/ -public void createWithId(String type, String bridgeId, String name, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_5_0 - *********************************************************/ -public void playWithId(String bridgeId, String playbackId, String media, String lang, int offsetms, int skipms, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new bridge or updates an existing one. - * This bridge persists until it has been shut down, or Asterisk has been shut down. - * - * @since ari_1_7_0 - *********************************************************/ -public Bridge createWithId(String type, String bridgeId, String name) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new bridge. - * This bridge persists until it has been shut down, or Asterisk has been shut down. - * - * @since ari_1_5_0 - *********************************************************/ -public Bridge create(String type, String bridgeId, String name) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new bridge. - * This bridge persists until it has been shut down, or Asterisk has been shut down. - * - * @since ari_1_0_0 - *********************************************************/ -public Bridge create(String type, String name) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_0_0 - *********************************************************/ -public void create(String type, String name, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Start playback of media on a bridge. - * The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.) - * - * @since ari_1_5_0 - *********************************************************/ -public Playback play(String bridgeId, String media, String lang, int offsetms, int skipms, String playbackId) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Start playback of media on a bridge. - * 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.) - * - * @since ari_1_5_0 - *********************************************************/ -public Playback playWithId(String bridgeId, String playbackId, String media, String lang, int offsetms, int skipms) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_5_0 - *********************************************************/ -public void play(String bridgeId, String media, String lang, int offsetms, int skipms, String playbackId, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_5_0 - *********************************************************/ -public void create_or_update_with_id(String type, String bridgeId, String name, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new bridge or updates an existing one. - * This bridge persists until it has been shut down, or Asterisk has been shut down. - * - * @since ari_1_5_0 - *********************************************************/ -public Bridge create_or_update_with_id(String type, String bridgeId, String name) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/actions/ActionChannels_impl_ari_0_0_1.java b/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/actions/ActionChannels_impl_ari_0_0_1.java deleted file mode 100644 index e494924d..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/actions/ActionChannels_impl_ari_0_0_1.java +++ /dev/null @@ -1,901 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_0_0_1.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_0_0_1.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionChannels_impl_ari_0_0_1 extends BaseAriAction implements ActionChannels { -/********************************************************** - * Active channels - * - * List all active channels in Asterisk. - *********************************************************/ -private void buildList() { -reset(); -url = "/channels"; -method = "GET"; -} - -@Override -public List list() throws RestException { -buildList(); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void list(AriCallback> callback) { -buildList(); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Active channels - * - * Create a new channel (originate). - * 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. - *********************************************************/ -private void buildOriginate(String endpoint, String extension, String context, long priority, String app, String appArgs, String callerId, int timeout) { -reset(); -url = "/channels"; -method = "POST"; -lParamQuery.add( HttpParam.build( "endpoint", endpoint) ); -lParamQuery.add( HttpParam.build( "extension", extension) ); -lParamQuery.add( HttpParam.build( "context", context) ); -lParamQuery.add( HttpParam.build( "priority", priority) ); -lParamQuery.add( HttpParam.build( "app", app) ); -lParamQuery.add( HttpParam.build( "appArgs", appArgs) ); -lParamQuery.add( HttpParam.build( "callerId", callerId) ); -lParamQuery.add( HttpParam.build( "timeout", timeout) ); -lE.add( HttpResponse.build( 400, "Invalid parameters for originating a channel.") ); -} - -@Override -public Channel originate(String endpoint, String extension, String context, long priority, String app, String appArgs, String callerId, int timeout) throws RestException { -buildOriginate(endpoint, extension, context, priority, app, appArgs, callerId, timeout); -String json = httpActionSync(); -return deserializeJson( json, Channel_impl_ari_0_0_1.class ); -} - -@Override -public void originate(String endpoint, String extension, String context, long priority, String app, String appArgs, String callerId, int timeout, AriCallback callback) { -buildOriginate(endpoint, extension, context, priority, app, appArgs, callerId, timeout); -httpActionAsync(callback, Channel_impl_ari_0_0_1.class); -} - -/********************************************************** - * Active channel - * - * Channel details. - *********************************************************/ -private void buildGet(String channelId) { -reset(); -url = "/channels/" + channelId + ""; -method = "GET"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -} - -@Override -public Channel get(String channelId) throws RestException { -buildGet(channelId); -String json = httpActionSync(); -return deserializeJson( json, Channel_impl_ari_0_0_1.class ); -} - -@Override -public void get(String channelId, AriCallback callback) { -buildGet(channelId); -httpActionAsync(callback, Channel_impl_ari_0_0_1.class); -} - -/********************************************************** - * Active channel - * - * Delete (i.e. hangup) a channel. - *********************************************************/ -private void buildHangup(String channelId, String reason) { -reset(); -url = "/channels/" + channelId + ""; -method = "DELETE"; -lParamQuery.add( HttpParam.build( "reason", reason) ); -lE.add( HttpResponse.build( 400, "Invalid reason for hangup provided") ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -} - -@Override -public void hangup(String channelId, String reason) throws RestException { -buildHangup(channelId, reason); -String json = httpActionSync(); -} - -@Override -public void hangup(String channelId, String reason, AriCallback callback) { -buildHangup(channelId, reason); -httpActionAsync(callback); -} - -/********************************************************** - * Answer a channel - * - * Answer a channel. - *********************************************************/ -private void buildAnswer(String channelId) { -reset(); -url = "/channels/" + channelId + "/answer"; -method = "POST"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void answer(String channelId) throws RestException { -buildAnswer(channelId); -String json = httpActionSync(); -} - -@Override -public void answer(String channelId, AriCallback callback) { -buildAnswer(channelId); -httpActionAsync(callback); -} - -/********************************************************** - * Exit application; continue execution in the dialplan - * - * Exit application; continue execution in the dialplan. - *********************************************************/ -private void buildContinueInDialplan(String channelId, String context, String extension, int priority) { -reset(); -url = "/channels/" + channelId + "/continue"; -method = "POST"; -lParamQuery.add( HttpParam.build( "context", context) ); -lParamQuery.add( HttpParam.build( "extension", extension) ); -lParamQuery.add( HttpParam.build( "priority", priority) ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void continueInDialplan(String channelId, String context, String extension, int priority) throws RestException { -buildContinueInDialplan(channelId, context, extension, priority); -String json = httpActionSync(); -} - -@Override -public void continueInDialplan(String channelId, String context, String extension, int priority, AriCallback callback) { -buildContinueInDialplan(channelId, context, extension, priority); -httpActionAsync(callback); -} - -/********************************************************** - * Send DTMF to a channel - * - * Send provided DTMF to a given channel. - *********************************************************/ -private void buildSendDTMF(String channelId, String dtmf, int before, int between, int duration, int after) { -reset(); -url = "/channels/" + channelId + "/dtmf"; -method = "POST"; -lParamQuery.add( HttpParam.build( "dtmf", dtmf) ); -lParamQuery.add( HttpParam.build( "before", before) ); -lParamQuery.add( HttpParam.build( "between", between) ); -lParamQuery.add( HttpParam.build( "duration", duration) ); -lParamQuery.add( HttpParam.build( "after", after) ); -lE.add( HttpResponse.build( 400, "DTMF is required") ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void sendDTMF(String channelId, String dtmf, int before, int between, int duration, int after) throws RestException { -buildSendDTMF(channelId, dtmf, before, between, duration, after); -String json = httpActionSync(); -} - -@Override -public void sendDTMF(String channelId, String dtmf, int before, int between, int duration, int after, AriCallback callback) { -buildSendDTMF(channelId, dtmf, before, between, duration, after); -httpActionAsync(callback); -} - -/********************************************************** - * Put a channel on hold - * - * Hold a channel. - *********************************************************/ -private void buildHold(String channelId) { -reset(); -url = "/channels/" + channelId + "/hold"; -method = "POST"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void hold(String channelId) throws RestException { -buildHold(channelId); -String json = httpActionSync(); -} - -@Override -public void hold(String channelId, AriCallback callback) { -buildHold(channelId); -httpActionAsync(callback); -} - -/********************************************************** - * Put a channel on hold - * - * Remove a channel from hold. - *********************************************************/ -private void buildUnhold(String channelId) { -reset(); -url = "/channels/" + channelId + "/hold"; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void unhold(String channelId) throws RestException { -buildUnhold(channelId); -String json = httpActionSync(); -} - -@Override -public void unhold(String channelId, AriCallback callback) { -buildUnhold(channelId); -httpActionAsync(callback); -} - -/********************************************************** - * Play music on hold to a channel - * - * Play music on hold to a channel. - * Using media operations such as /play on a channel playing MOH in this manner will suspend MOH without resuming automatically. If continuing music on hold is desired, the stasis application must reinitiate music on hold. - *********************************************************/ -private void buildStartMoh(String channelId, String mohClass) { -reset(); -url = "/channels/" + channelId + "/moh"; -method = "POST"; -lParamQuery.add( HttpParam.build( "mohClass", mohClass) ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void startMoh(String channelId, String mohClass) throws RestException { -buildStartMoh(channelId, mohClass); -String json = httpActionSync(); -} - -@Override -public void startMoh(String channelId, String mohClass, AriCallback callback) { -buildStartMoh(channelId, mohClass); -httpActionAsync(callback); -} - -/********************************************************** - * Play music on hold to a channel - * - * Stop playing music on hold to a channel. - *********************************************************/ -private void buildStopMoh(String channelId) { -reset(); -url = "/channels/" + channelId + "/moh"; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void stopMoh(String channelId) throws RestException { -buildStopMoh(channelId); -String json = httpActionSync(); -} - -@Override -public void stopMoh(String channelId, AriCallback callback) { -buildStopMoh(channelId); -httpActionAsync(callback); -} - -/********************************************************** - * Mute a channel - * - * Mute a channel. - *********************************************************/ -private void buildMute(String channelId, String direction) { -reset(); -url = "/channels/" + channelId + "/mute"; -method = "POST"; -lParamQuery.add( HttpParam.build( "direction", direction) ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void mute(String channelId, String direction) throws RestException { -buildMute(channelId, direction); -String json = httpActionSync(); -} - -@Override -public void mute(String channelId, String direction, AriCallback callback) { -buildMute(channelId, direction); -httpActionAsync(callback); -} - -/********************************************************** - * Mute a channel - * - * Unmute a channel. - *********************************************************/ -private void buildUnmute(String channelId, String direction) { -reset(); -url = "/channels/" + channelId + "/mute"; -method = "DELETE"; -lParamQuery.add( HttpParam.build( "direction", direction) ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void unmute(String channelId, String direction) throws RestException { -buildUnmute(channelId, direction); -String json = httpActionSync(); -} - -@Override -public void unmute(String channelId, String direction, AriCallback callback) { -buildUnmute(channelId, direction); -httpActionAsync(callback); -} - -/********************************************************** - * Play media to a channel - * - * Start playback of media. - * 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.) - *********************************************************/ -private void buildPlay(String channelId, String media, String lang, int offsetms, int skipms) { -reset(); -url = "/channels/" + channelId + "/play"; -method = "POST"; -lParamQuery.add( HttpParam.build( "media", media) ); -lParamQuery.add( HttpParam.build( "lang", lang) ); -lParamQuery.add( HttpParam.build( "offsetms", offsetms) ); -lParamQuery.add( HttpParam.build( "skipms", skipms) ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public Playback play(String channelId, String media, String lang, int offsetms, int skipms) throws RestException { -buildPlay(channelId, media, lang, offsetms, skipms); -String json = httpActionSync(); -return deserializeJson( json, Playback_impl_ari_0_0_1.class ); -} - -@Override -public void play(String channelId, String media, String lang, int offsetms, int skipms, AriCallback callback) { -buildPlay(channelId, media, lang, offsetms, skipms); -httpActionAsync(callback, Playback_impl_ari_0_0_1.class); -} - -/********************************************************** - * Record audio from a channel - * - * Start a recording. - * 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. - *********************************************************/ -private void buildRecord(String channelId, String name, String format, int maxDurationSeconds, int maxSilenceSeconds, String ifExists, boolean beep, String terminateOn) { -reset(); -url = "/channels/" + channelId + "/record"; -method = "POST"; -lParamQuery.add( HttpParam.build( "name", name) ); -lParamQuery.add( HttpParam.build( "format", format) ); -lParamQuery.add( HttpParam.build( "maxDurationSeconds", maxDurationSeconds) ); -lParamQuery.add( HttpParam.build( "maxSilenceSeconds", maxSilenceSeconds) ); -lParamQuery.add( HttpParam.build( "ifExists", ifExists) ); -lParamQuery.add( HttpParam.build( "beep", beep) ); -lParamQuery.add( HttpParam.build( "terminateOn", terminateOn) ); -lE.add( HttpResponse.build( 400, "Invalid parameters") ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "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") ); -lE.add( HttpResponse.build( 422, "The format specified is unknown on this system") ); -} - -@Override -public LiveRecording record(String channelId, String name, String format, int maxDurationSeconds, int maxSilenceSeconds, String ifExists, boolean beep, String terminateOn) throws RestException { -buildRecord(channelId, name, format, maxDurationSeconds, maxSilenceSeconds, ifExists, beep, terminateOn); -String json = httpActionSync(); -return deserializeJson( json, LiveRecording_impl_ari_0_0_1.class ); -} - -@Override -public void record(String channelId, String name, String format, int maxDurationSeconds, int maxSilenceSeconds, String ifExists, boolean beep, String terminateOn, AriCallback callback) { -buildRecord(channelId, name, format, maxDurationSeconds, maxSilenceSeconds, ifExists, beep, terminateOn); -httpActionAsync(callback, LiveRecording_impl_ari_0_0_1.class); -} - -/********************************************************** - * Send a ringing indication to a channel - * - * Indicate ringing to a channel. - *********************************************************/ -private void buildRing(String channelId) { -reset(); -url = "/channels/" + channelId + "/ring"; -method = "POST"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void ring(String channelId) throws RestException { -buildRing(channelId); -String json = httpActionSync(); -} - -@Override -public void ring(String channelId, AriCallback callback) { -buildRing(channelId); -httpActionAsync(callback); -} - -/********************************************************** - * Send a ringing indication to a channel - * - * Stop ringing indication on a channel if locally generated. - *********************************************************/ -private void buildRingStop(String channelId) { -reset(); -url = "/channels/" + channelId + "/ring"; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void ringStop(String channelId) throws RestException { -buildRingStop(channelId); -String json = httpActionSync(); -} - -@Override -public void ringStop(String channelId, AriCallback callback) { -buildRingStop(channelId); -httpActionAsync(callback); -} - -/********************************************************** - * Play silence to a channel - * - * Play silence to a channel. - * Using media operations such as /play on a channel playing silence in this manner will suspend silence without resuming automatically. - *********************************************************/ -private void buildStartSilence(String channelId) { -reset(); -url = "/channels/" + channelId + "/silence"; -method = "POST"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void startSilence(String channelId) throws RestException { -buildStartSilence(channelId); -String json = httpActionSync(); -} - -@Override -public void startSilence(String channelId, AriCallback callback) { -buildStartSilence(channelId); -httpActionAsync(callback); -} - -/********************************************************** - * Play silence to a channel - * - * Stop playing silence to a channel. - *********************************************************/ -private void buildStopSilence(String channelId) { -reset(); -url = "/channels/" + channelId + "/silence"; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void stopSilence(String channelId) throws RestException { -buildStopSilence(channelId); -String json = httpActionSync(); -} - -@Override -public void stopSilence(String channelId, AriCallback callback) { -buildStopSilence(channelId); -httpActionAsync(callback); -} - -/********************************************************** - * Snoop (spy/whisper) on a channel - * - * Start snooping. - * Snoop (spy/whisper) on a specific channel. - *********************************************************/ -private void buildSnoopChannel(String channelId, String spy, String whisper, String app, String appArgs) { -reset(); -url = "/channels/" + channelId + "/snoop"; -method = "POST"; -lParamQuery.add( HttpParam.build( "spy", spy) ); -lParamQuery.add( HttpParam.build( "whisper", whisper) ); -lParamQuery.add( HttpParam.build( "app", app) ); -lParamQuery.add( HttpParam.build( "appArgs", appArgs) ); -lE.add( HttpResponse.build( 400, "Invalid parameters") ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -} - -@Override -public Channel snoopChannel(String channelId, String spy, String whisper, String app, String appArgs) throws RestException { -buildSnoopChannel(channelId, spy, whisper, app, appArgs); -String json = httpActionSync(); -return deserializeJson( json, Channel_impl_ari_0_0_1.class ); -} - -@Override -public void snoopChannel(String channelId, String spy, String whisper, String app, String appArgs, AriCallback callback) { -buildSnoopChannel(channelId, spy, whisper, app, appArgs); -httpActionAsync(callback, Channel_impl_ari_0_0_1.class); -} - -/********************************************************** - * Variables on a channel - * - * Get the value of a channel variable or function. - *********************************************************/ -private void buildGetChannelVar(String channelId, String variable) { -reset(); -url = "/channels/" + channelId + "/variable"; -method = "GET"; -lParamQuery.add( HttpParam.build( "variable", variable) ); -lE.add( HttpResponse.build( 400, "Missing variable parameter.") ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public Variable getChannelVar(String channelId, String variable) throws RestException { -buildGetChannelVar(channelId, variable); -String json = httpActionSync(); -return deserializeJson( json, Variable_impl_ari_0_0_1.class ); -} - -@Override -public void getChannelVar(String channelId, String variable, AriCallback callback) { -buildGetChannelVar(channelId, variable); -httpActionAsync(callback, Variable_impl_ari_0_0_1.class); -} - -/********************************************************** - * Variables on a channel - * - * Set the value of a channel variable or function. - *********************************************************/ -private void buildSetChannelVar(String channelId, String variable, String value) { -reset(); -url = "/channels/" + channelId + "/variable"; -method = "POST"; -lParamQuery.add( HttpParam.build( "variable", variable) ); -lParamQuery.add( HttpParam.build( "value", value) ); -lE.add( HttpResponse.build( 400, "Missing variable parameter.") ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void setChannelVar(String channelId, String variable, String value) throws RestException { -buildSetChannelVar(channelId, variable, value); -String json = httpActionSync(); -} - -@Override -public void setChannelVar(String channelId, String variable, String value, AriCallback callback) { -buildSetChannelVar(channelId, variable, value); -httpActionAsync(callback); -} - -/********************************************************** - * - * - * @since ari_1_5_0 - *********************************************************/ -public void originateWithId(String channelId, String endpoint, String extension, String context, long priority, String app, String appArgs, String callerId, int timeout, Map variables, String otherChannelId, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_10_0 - *********************************************************/ -public void dial(String channelId, String caller, int timeout, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_5_0 - *********************************************************/ -public void playWithId(String channelId, String playbackId, String media, String lang, int offsetms, int skipms, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Dial a created channel. - * - * - * @since ari_1_10_0 - *********************************************************/ -public void dial(String channelId, String caller, int timeout) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_5_0 - *********************************************************/ -public void snoopChannelWithId(String channelId, String snoopId, String spy, String whisper, String app, String appArgs, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_7_0 - *********************************************************/ -public void continueInDialplan(String channelId, String context, String extension, int priority, String label, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_10_0 - *********************************************************/ -public void originateWithId(String channelId, String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String otherChannelId, String originator, String formats, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new channel (originate). - * 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. - * - * @since ari_1_10_0 - *********************************************************/ -public Channel originate(String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String channelId, String otherChannelId, String originator, String formats) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Start playback of media. - * The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.) - * - * @since ari_1_5_0 - *********************************************************/ -public Playback play(String channelId, String media, String lang, int offsetms, int skipms, String playbackId) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Redirect the channel to a different location. - * - * - * @since ari_1_8_0 - *********************************************************/ -public void redirect(String channelId, String endpoint) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_8_0 - *********************************************************/ -public void redirect(String channelId, String endpoint, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Start snooping. - * Snoop (spy/whisper) on a specific channel. - * - * @since ari_1_5_0 - *********************************************************/ -public Channel snoopChannelWithId(String channelId, String snoopId, String spy, String whisper, String app, String appArgs) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_7_0 - *********************************************************/ -public void originate(String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String channelId, String otherChannelId, String originator, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new channel (originate). - * 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. - * - * @since ari_1_7_0 - *********************************************************/ -public Channel originate(String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String channelId, String otherChannelId, String originator) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create channel. - * - * - * @since ari_1_10_0 - *********************************************************/ -public Channel create(String endpoint, String app, String appArgs, String channelId, String otherChannelId, String originator, String formats) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_5_0 - *********************************************************/ -public void snoopChannel(String channelId, String spy, String whisper, String app, String appArgs, String snoopId, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_5_0 - *********************************************************/ -public void play(String channelId, String media, String lang, int offsetms, int skipms, String playbackId, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_5_0 - *********************************************************/ -public void originate(String endpoint, String extension, String context, long priority, String app, String appArgs, String callerId, int timeout, Map variables, String channelId, String otherChannelId, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new channel (originate with id). - * 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. - * - * @since ari_1_5_0 - *********************************************************/ -public Channel originateWithId(String channelId, String endpoint, String extension, String context, long priority, String app, String appArgs, String callerId, int timeout, Map variables, String otherChannelId) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new channel (originate with id). - * 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. - * - * @since ari_1_10_0 - *********************************************************/ -public Channel originateWithId(String channelId, String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String otherChannelId, String originator, String formats) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_7_0 - *********************************************************/ -public void originateWithId(String channelId, String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String otherChannelId, String originator, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_10_0 - *********************************************************/ -public void create(String endpoint, String app, String appArgs, String channelId, String otherChannelId, String originator, String formats, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new channel (originate). - * 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. - * - * @since ari_1_5_0 - *********************************************************/ -public Channel originate(String endpoint, String extension, String context, long priority, String app, String appArgs, String callerId, int timeout, Map variables, String channelId, String otherChannelId) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new channel (originate with id). - * 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. - * - * @since ari_1_7_0 - *********************************************************/ -public Channel originateWithId(String channelId, String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String otherChannelId, String originator) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Start snooping. - * Snoop (spy/whisper) on a specific channel. - * - * @since ari_1_5_0 - *********************************************************/ -public Channel snoopChannel(String channelId, String spy, String whisper, String app, String appArgs, String snoopId) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Exit application{ - throw new UnsupportedOperationException("Method availble from ..."); -}; continue execution in the dialplan. - * - * - * @since ari_1_7_0 - *********************************************************/ -public void continueInDialplan(String channelId, String context, String extension, int priority, String label) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Start playback of media and specify the playbackId. - * 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.) - * - * @since ari_1_5_0 - *********************************************************/ -public Playback playWithId(String channelId, String playbackId, String media, String lang, int offsetms, int skipms) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_10_0 - *********************************************************/ -public void originate(String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String channelId, String otherChannelId, String originator, String formats, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/actions/ActionDeviceStates_impl_ari_0_0_1.java b/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/actions/ActionDeviceStates_impl_ari_0_0_1.java deleted file mode 100644 index ec8f7492..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/actions/ActionDeviceStates_impl_ari_0_0_1.java +++ /dev/null @@ -1,131 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_0_0_1.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_0_0_1.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionDeviceStates_impl_ari_0_0_1 extends BaseAriAction implements ActionDeviceStates { -/********************************************************** - * Device states - * - * List all ARI controlled device states. - *********************************************************/ -private void buildList() { -reset(); -url = "/deviceStates"; -method = "GET"; -} - -@Override -public List list() throws RestException { -buildList(); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void list(AriCallback> callback) { -buildList(); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Device state - * - * Retrieve the current state of a device. - *********************************************************/ -private void buildGet(String deviceName) { -reset(); -url = "/deviceStates/" + deviceName + ""; -method = "GET"; -} - -@Override -public DeviceState get(String deviceName) throws RestException { -buildGet(deviceName); -String json = httpActionSync(); -return deserializeJson( json, DeviceState_impl_ari_0_0_1.class ); -} - -@Override -public void get(String deviceName, AriCallback callback) { -buildGet(deviceName); -httpActionAsync(callback, DeviceState_impl_ari_0_0_1.class); -} - -/********************************************************** - * Device state - * - * Change the state of a device controlled by ARI. (Note - implicitly creates the device state). - *********************************************************/ -private void buildUpdate(String deviceName, String deviceState) { -reset(); -url = "/deviceStates/" + deviceName + ""; -method = "PUT"; -lParamQuery.add( HttpParam.build( "deviceState", deviceState) ); -lE.add( HttpResponse.build( 404, "Device name is missing") ); -lE.add( HttpResponse.build( 409, "Uncontrolled device specified") ); -} - -@Override -public void update(String deviceName, String deviceState) throws RestException { -buildUpdate(deviceName, deviceState); -String json = httpActionSync(); -} - -@Override -public void update(String deviceName, String deviceState, AriCallback callback) { -buildUpdate(deviceName, deviceState); -httpActionAsync(callback); -} - -/********************************************************** - * Device state - * - * Destroy a device-state controlled by ARI. - *********************************************************/ -private void buildDelete(String deviceName) { -reset(); -url = "/deviceStates/" + deviceName + ""; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Device name is missing") ); -lE.add( HttpResponse.build( 409, "Uncontrolled device specified") ); -} - -@Override -public void delete(String deviceName) throws RestException { -buildDelete(deviceName); -String json = httpActionSync(); -} - -@Override -public void delete(String deviceName, AriCallback callback) { -buildDelete(deviceName); -httpActionAsync(callback); -} - -/** No missing signatures from interface */ -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/actions/ActionEndpoints_impl_ari_0_0_1.java b/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/actions/ActionEndpoints_impl_ari_0_0_1.java deleted file mode 100644 index 966aeef2..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/actions/ActionEndpoints_impl_ari_0_0_1.java +++ /dev/null @@ -1,144 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_0_0_1.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_0_0_1.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionEndpoints_impl_ari_0_0_1 extends BaseAriAction implements ActionEndpoints { -/********************************************************** - * Asterisk endpoints - * - * List all endpoints. - *********************************************************/ -private void buildList() { -reset(); -url = "/endpoints"; -method = "GET"; -} - -@Override -public List list() throws RestException { -buildList(); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void list(AriCallback> callback) { -buildList(); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Asterisk endpoints - * - * List available endoints for a given endpoint technology. - *********************************************************/ -private void buildListByTech(String tech) { -reset(); -url = "/endpoints/" + tech + ""; -method = "GET"; -lE.add( HttpResponse.build( 404, "Endpoints not found") ); -} - -@Override -public List listByTech(String tech) throws RestException { -buildListByTech(tech); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void listByTech(String tech, AriCallback> callback) { -buildListByTech(tech); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Single endpoint - * - * Details for an endpoint. - *********************************************************/ -private void buildGet(String tech, String resource) { -reset(); -url = "/endpoints/" + tech + "/" + resource + ""; -method = "GET"; -lE.add( HttpResponse.build( 404, "Endpoints not found") ); -} - -@Override -public Endpoint get(String tech, String resource) throws RestException { -buildGet(tech, resource); -String json = httpActionSync(); -return deserializeJson( json, Endpoint_impl_ari_0_0_1.class ); -} - -@Override -public void get(String tech, String resource, AriCallback callback) { -buildGet(tech, resource); -httpActionAsync(callback, Endpoint_impl_ari_0_0_1.class); -} - -/********************************************************** - * - * - * @since ari_1_5_0 - *********************************************************/ -public void sendMessage(String to, String from, String body, Map variables, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_5_0 - *********************************************************/ -public void sendMessageToEndpoint(String tech, String resource, String from, String body, Map variables, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Send a message to some endpoint in a technology. - * - * - * @since ari_1_5_0 - *********************************************************/ -public void sendMessageToEndpoint(String tech, String resource, String from, String body, Map variables) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Send a message to some technology URI or endpoint. - * - * - * @since ari_1_5_0 - *********************************************************/ -public void sendMessage(String to, String from, String body, Map variables) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/actions/ActionEvents_impl_ari_0_0_1.java b/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/actions/ActionEvents_impl_ari_0_0_1.java deleted file mode 100644 index 51a8d193..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/actions/ActionEvents_impl_ari_0_0_1.java +++ /dev/null @@ -1,92 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_0_0_1.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_0_0_1.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionEvents_impl_ari_0_0_1 extends BaseAriAction implements ActionEvents { -/********************************************************** - * Events from Asterisk to applications - * - * WebSocket connection for events. - *********************************************************/ -private void buildEventWebsocket(String app) { -reset(); -url = "/events"; -method = "GET"; -lParamQuery.add( HttpParam.build( "app", app) ); -wsUpgrade = true; -} - -@Override -public Message eventWebsocket(String app) throws RestException { -throw new RestException("No synchronous operation on WebSocket"); -} - -@Override -public void eventWebsocket(String app, AriCallback callback) { -buildEventWebsocket(app); -httpActionAsync(callback, Message_impl_ari_0_0_1.class); -} - -/********************************************************** - * Generate a user event. - * - * - * @since ari_1_5_0 - *********************************************************/ -public void userEvent(String eventName, String application, String source, Map variables) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_9_0 - *********************************************************/ -public void eventWebsocket(String app, boolean subscribeAll, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_5_0 - *********************************************************/ -public void userEvent(String eventName, String application, String source, Map variables, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * WebSocket connection for events. - * - * - * @since ari_1_9_0 - *********************************************************/ -public Message eventWebsocket(String app, boolean subscribeAll) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/actions/ActionPlaybacks_impl_ari_0_0_1.java b/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/actions/ActionPlaybacks_impl_ari_0_0_1.java deleted file mode 100644 index b7aae32a..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/actions/ActionPlaybacks_impl_ari_0_0_1.java +++ /dev/null @@ -1,107 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_0_0_1.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_0_0_1.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionPlaybacks_impl_ari_0_0_1 extends BaseAriAction implements ActionPlaybacks { -/********************************************************** - * Control object for a playback operation. - * - * Get a playback's details. - *********************************************************/ -private void buildGet(String playbackId) { -reset(); -url = "/playbacks/" + playbackId + ""; -method = "GET"; -lE.add( HttpResponse.build( 404, "The playback cannot be found") ); -} - -@Override -public Playback get(String playbackId) throws RestException { -buildGet(playbackId); -String json = httpActionSync(); -return deserializeJson( json, Playback_impl_ari_0_0_1.class ); -} - -@Override -public void get(String playbackId, AriCallback callback) { -buildGet(playbackId); -httpActionAsync(callback, Playback_impl_ari_0_0_1.class); -} - -/********************************************************** - * Control object for a playback operation. - * - * Stop a playback. - *********************************************************/ -private void buildStop(String playbackId) { -reset(); -url = "/playbacks/" + playbackId + ""; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "The playback cannot be found") ); -} - -@Override -public void stop(String playbackId) throws RestException { -buildStop(playbackId); -String json = httpActionSync(); -} - -@Override -public void stop(String playbackId, AriCallback callback) { -buildStop(playbackId); -httpActionAsync(callback); -} - -/********************************************************** - * Control object for a playback operation. - * - * Control a playback. - *********************************************************/ -private void buildControl(String playbackId, String operation) { -reset(); -url = "/playbacks/" + playbackId + "/control"; -method = "POST"; -lParamQuery.add( HttpParam.build( "operation", operation) ); -lE.add( HttpResponse.build( 400, "The provided operation parameter was invalid") ); -lE.add( HttpResponse.build( 404, "The playback cannot be found") ); -lE.add( HttpResponse.build( 409, "The operation cannot be performed in the playback's current state") ); -} - -@Override -public void control(String playbackId, String operation) throws RestException { -buildControl(playbackId, operation); -String json = httpActionSync(); -} - -@Override -public void control(String playbackId, String operation, AriCallback callback) { -buildControl(playbackId, operation); -httpActionAsync(callback); -} - -/** No missing signatures from interface */ -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/actions/ActionRecordings_impl_ari_0_0_1.java b/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/actions/ActionRecordings_impl_ari_0_0_1.java deleted file mode 100644 index d8168503..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/actions/ActionRecordings_impl_ari_0_0_1.java +++ /dev/null @@ -1,317 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_0_0_1.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_0_0_1.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionRecordings_impl_ari_0_0_1 extends BaseAriAction implements ActionRecordings { -/********************************************************** - * A recording that is in progress - * - * List live recordings. - *********************************************************/ -private void buildGetLive(String recordingName) { -reset(); -url = "/recordings/live/" + recordingName + ""; -method = "GET"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -} - -@Override -public LiveRecording getLive(String recordingName) throws RestException { -buildGetLive(recordingName); -String json = httpActionSync(); -return deserializeJson( json, LiveRecording_impl_ari_0_0_1.class ); -} - -@Override -public void getLive(String recordingName, AriCallback callback) { -buildGetLive(recordingName); -httpActionAsync(callback, LiveRecording_impl_ari_0_0_1.class); -} - -/********************************************************** - * A recording that is in progress - * - * Stop a live recording and discard it. - *********************************************************/ -private void buildCancel(String recordingName) { -reset(); -url = "/recordings/live/" + recordingName + ""; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -} - -@Override -public void cancel(String recordingName) throws RestException { -buildCancel(recordingName); -String json = httpActionSync(); -} - -@Override -public void cancel(String recordingName, AriCallback callback) { -buildCancel(recordingName); -httpActionAsync(callback); -} - -/********************************************************** - * - * - * Mute a live recording. - * Muting a recording suspends silence detection, which will be restarted when the recording is unmuted. - *********************************************************/ -private void buildMute(String recordingName) { -reset(); -url = "/recordings/live/" + recordingName + "/mute"; -method = "POST"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -lE.add( HttpResponse.build( 409, "Recording not in session") ); -} - -@Override -public void mute(String recordingName) throws RestException { -buildMute(recordingName); -String json = httpActionSync(); -} - -@Override -public void mute(String recordingName, AriCallback callback) { -buildMute(recordingName); -httpActionAsync(callback); -} - -/********************************************************** - * - * - * Unmute a live recording. - *********************************************************/ -private void buildUnmute(String recordingName) { -reset(); -url = "/recordings/live/" + recordingName + "/mute"; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -lE.add( HttpResponse.build( 409, "Recording not in session") ); -} - -@Override -public void unmute(String recordingName) throws RestException { -buildUnmute(recordingName); -String json = httpActionSync(); -} - -@Override -public void unmute(String recordingName, AriCallback callback) { -buildUnmute(recordingName); -httpActionAsync(callback); -} - -/********************************************************** - * - * - * Pause a live recording. - * Pausing a recording suspends silence detection, which will be restarted when the recording is unpaused. Paused time is not included in the accounting for maxDurationSeconds. - *********************************************************/ -private void buildPause(String recordingName) { -reset(); -url = "/recordings/live/" + recordingName + "/pause"; -method = "POST"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -lE.add( HttpResponse.build( 409, "Recording not in session") ); -} - -@Override -public void pause(String recordingName) throws RestException { -buildPause(recordingName); -String json = httpActionSync(); -} - -@Override -public void pause(String recordingName, AriCallback callback) { -buildPause(recordingName); -httpActionAsync(callback); -} - -/********************************************************** - * - * - * Unpause a live recording. - *********************************************************/ -private void buildUnpause(String recordingName) { -reset(); -url = "/recordings/live/" + recordingName + "/pause"; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -lE.add( HttpResponse.build( 409, "Recording not in session") ); -} - -@Override -public void unpause(String recordingName) throws RestException { -buildUnpause(recordingName); -String json = httpActionSync(); -} - -@Override -public void unpause(String recordingName, AriCallback callback) { -buildUnpause(recordingName); -httpActionAsync(callback); -} - -/********************************************************** - * - * - * Stop a live recording and store it. - *********************************************************/ -private void buildStop(String recordingName) { -reset(); -url = "/recordings/live/" + recordingName + "/stop"; -method = "POST"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -} - -@Override -public void stop(String recordingName) throws RestException { -buildStop(recordingName); -String json = httpActionSync(); -} - -@Override -public void stop(String recordingName, AriCallback callback) { -buildStop(recordingName); -httpActionAsync(callback); -} - -/********************************************************** - * Recordings - * - * List recordings that are complete. - *********************************************************/ -private void buildListStored() { -reset(); -url = "/recordings/stored"; -method = "GET"; -} - -@Override -public List listStored() throws RestException { -buildListStored(); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void listStored(AriCallback> callback) { -buildListStored(); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Individual recording - * - * Get a stored recording's details. - *********************************************************/ -private void buildGetStored(String recordingName) { -reset(); -url = "/recordings/stored/" + recordingName + ""; -method = "GET"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -} - -@Override -public StoredRecording getStored(String recordingName) throws RestException { -buildGetStored(recordingName); -String json = httpActionSync(); -return deserializeJson( json, StoredRecording_impl_ari_0_0_1.class ); -} - -@Override -public void getStored(String recordingName, AriCallback callback) { -buildGetStored(recordingName); -httpActionAsync(callback, StoredRecording_impl_ari_0_0_1.class); -} - -/********************************************************** - * Individual recording - * - * Delete a stored recording. - *********************************************************/ -private void buildDeleteStored(String recordingName) { -reset(); -url = "/recordings/stored/" + recordingName + ""; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -} - -@Override -public void deleteStored(String recordingName) throws RestException { -buildDeleteStored(recordingName); -String json = httpActionSync(); -} - -@Override -public void deleteStored(String recordingName, AriCallback callback) { -buildDeleteStored(recordingName); -httpActionAsync(callback); -} - -/********************************************************** - * Copy a stored recording. - * - * - * @since ari_1_5_0 - *********************************************************/ -public StoredRecording copyStored(String recordingName, String destinationRecordingName) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_10_0 - *********************************************************/ -public void getStoredFile(String recordingName, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Get the file associated with the stored recording. - * - * - * @since ari_1_10_0 - *********************************************************/ -public byte[] getStoredFile(String recordingName) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_5_0 - *********************************************************/ -public void copyStored(String recordingName, String destinationRecordingName, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/actions/ActionSounds_impl_ari_0_0_1.java b/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/actions/ActionSounds_impl_ari_0_0_1.java deleted file mode 100644 index d9895686..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/actions/ActionSounds_impl_ari_0_0_1.java +++ /dev/null @@ -1,82 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_0_0_1.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_0_0_1.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionSounds_impl_ari_0_0_1 extends BaseAriAction implements ActionSounds { -/********************************************************** - * Sounds - * - * List all sounds. - *********************************************************/ -private void buildList(String lang, String format) { -reset(); -url = "/sounds"; -method = "GET"; -lParamQuery.add( HttpParam.build( "lang", lang) ); -lParamQuery.add( HttpParam.build( "format", format) ); -} - -@Override -public List list(String lang, String format) throws RestException { -buildList(lang, format); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void list(String lang, String format, AriCallback> callback) { -buildList(lang, format); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Individual sound - * - * Get a sound's details. - *********************************************************/ -private void buildGet(String soundId) { -reset(); -url = "/sounds/" + soundId + ""; -method = "GET"; -} - -@Override -public Sound get(String soundId) throws RestException { -buildGet(soundId); -String json = httpActionSync(); -return deserializeJson( json, Sound_impl_ari_0_0_1.class ); -} - -@Override -public void get(String soundId, AriCallback callback) { -buildGet(soundId); -httpActionAsync(callback, Sound_impl_ari_0_0_1.class); -} - -/** No missing signatures from interface */ -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/ApplicationReplaced_impl_ari_0_0_1.java b/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/ApplicationReplaced_impl_ari_0_0_1.java deleted file mode 100644 index 337ca678..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/ApplicationReplaced_impl_ari_0_0_1.java +++ /dev/null @@ -1,28 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_0_0_1.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that another WebSocket has taken over for an application. - * - * An 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. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ApplicationReplaced_impl_ari_0_0_1 extends Event_impl_ari_0_0_1 implements ApplicationReplaced, java.io.Serializable { -private static final long serialVersionUID = 1L; -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/Application_impl_ari_0_0_1.java b/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/Application_impl_ari_0_0_1.java deleted file mode 100644 index 6196d96b..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/Application_impl_ari_0_0_1.java +++ /dev/null @@ -1,81 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_0_0_1.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Details of a Stasis application - * - * Defined in file: applications.json - * Generated by: Model - *********************************************************/ - -public class Application_impl_ari_0_0_1 implements Application, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Id's for bridges subscribed to. */ - private List bridge_ids; - public List getBridge_ids() { - return bridge_ids; - } - - @JsonDeserialize( contentAs=String.class ) - public void setBridge_ids(List val ) { - bridge_ids = val; - } - - /** Id's for channels subscribed to. */ - private List channel_ids; - public List getChannel_ids() { - return channel_ids; - } - - @JsonDeserialize( contentAs=String.class ) - public void setChannel_ids(List val ) { - channel_ids = val; - } - - /** Names of the devices subscribed to. */ - private List device_names; - public List getDevice_names() { - return device_names; - } - - @JsonDeserialize( contentAs=String.class ) - public void setDevice_names(List val ) { - device_names = val; - } - - /** {tech}/{resource} for endpoints subscribed to. */ - private List endpoint_ids; - public List getEndpoint_ids() { - return endpoint_ids; - } - - @JsonDeserialize( contentAs=String.class ) - public void setEndpoint_ids(List val ) { - endpoint_ids = val; - } - - /** Name of this application */ - private String name; - public String getName() { - return name; - } - - @JsonDeserialize( as=String.class ) - public void setName(String val ) { - name = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/AsteriskInfo_impl_ari_0_0_1.java b/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/AsteriskInfo_impl_ari_0_0_1.java deleted file mode 100644 index 6bbdab24..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/AsteriskInfo_impl_ari_0_0_1.java +++ /dev/null @@ -1,70 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_0_0_1.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Asterisk system information - * - * Defined in file: asterisk.json - * Generated by: Model - *********************************************************/ - -public class AsteriskInfo_impl_ari_0_0_1 implements AsteriskInfo, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Info about how Asterisk was built */ - private BuildInfo build; - public BuildInfo getBuild() { - return build; - } - - @JsonDeserialize( as=BuildInfo_impl_ari_0_0_1.class ) - public void setBuild(BuildInfo val ) { - build = val; - } - - /** Info about Asterisk configuration */ - private ConfigInfo config; - public ConfigInfo getConfig() { - return config; - } - - @JsonDeserialize( as=ConfigInfo_impl_ari_0_0_1.class ) - public void setConfig(ConfigInfo val ) { - config = val; - } - - /** Info about Asterisk status */ - private StatusInfo status; - public StatusInfo getStatus() { - return status; - } - - @JsonDeserialize( as=StatusInfo_impl_ari_0_0_1.class ) - public void setStatus(StatusInfo val ) { - status = val; - } - - /** Info about the system running Asterisk */ - private SystemInfo system; - public SystemInfo getSystem() { - return system; - } - - @JsonDeserialize( as=SystemInfo_impl_ari_0_0_1.class ) - public void setSystem(SystemInfo val ) { - system = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/BridgeCreated_impl_ari_0_0_1.java b/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/BridgeCreated_impl_ari_0_0_1.java deleted file mode 100644 index 2f94a322..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/BridgeCreated_impl_ari_0_0_1.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_0_0_1.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a bridge has been created. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class BridgeCreated_impl_ari_0_0_1 extends Event_impl_ari_0_0_1 implements BridgeCreated, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Bridge bridge; - public Bridge getBridge() { - return bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_0_0_1.class ) - public void setBridge(Bridge val ) { - bridge = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/BridgeDestroyed_impl_ari_0_0_1.java b/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/BridgeDestroyed_impl_ari_0_0_1.java deleted file mode 100644 index 579a65d2..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/BridgeDestroyed_impl_ari_0_0_1.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_0_0_1.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a bridge has been destroyed. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class BridgeDestroyed_impl_ari_0_0_1 extends Event_impl_ari_0_0_1 implements BridgeDestroyed, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Bridge bridge; - public Bridge getBridge() { - return bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_0_0_1.class ) - public void setBridge(Bridge val ) { - bridge = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/BridgeMerged_impl_ari_0_0_1.java b/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/BridgeMerged_impl_ari_0_0_1.java deleted file mode 100644 index 35dcb449..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/BridgeMerged_impl_ari_0_0_1.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_0_0_1.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that one bridge has merged into another. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class BridgeMerged_impl_ari_0_0_1 extends Event_impl_ari_0_0_1 implements BridgeMerged, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Bridge bridge; - public Bridge getBridge() { - return bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_0_0_1.class ) - public void setBridge(Bridge val ) { - bridge = val; - } - - /** */ - private Bridge bridge_from; - public Bridge getBridge_from() { - return bridge_from; - } - - @JsonDeserialize( as=Bridge_impl_ari_0_0_1.class ) - public void setBridge_from(Bridge val ) { - bridge_from = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/Bridge_impl_ari_0_0_1.java b/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/Bridge_impl_ari_0_0_1.java deleted file mode 100644 index f5ad4a0d..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/Bridge_impl_ari_0_0_1.java +++ /dev/null @@ -1,118 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_0_0_1.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * The merging of media from one or more channels. - * - * Everyone on the bridge receives the same audio. - * - * Defined in file: bridges.json - * Generated by: Model - *********************************************************/ - -public class Bridge_impl_ari_0_0_1 implements Bridge, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Bridging class */ - private String bridge_class; - public String getBridge_class() { - return bridge_class; - } - - @JsonDeserialize( as=String.class ) - public void setBridge_class(String val ) { - bridge_class = val; - } - - /** Type of bridge technology */ - private String bridge_type; - public String getBridge_type() { - return bridge_type; - } - - @JsonDeserialize( as=String.class ) - public void setBridge_type(String val ) { - bridge_type = val; - } - - /** Ids of channels participating in this bridge */ - private List channels; - public List getChannels() { - return channels; - } - - @JsonDeserialize( contentAs=String.class ) - public void setChannels(List val ) { - channels = val; - } - - /** Unique identifier for this bridge */ - private String id; - public String getId() { - return id; - } - - @JsonDeserialize( as=String.class ) - public void setId(String val ) { - id = val; - } - - /** Name of the current bridging technology */ - private String technology; - public String getTechnology() { - return technology; - } - - @JsonDeserialize( as=String.class ) - public void setTechnology(String val ) { - technology = val; - } - -/********************************************************** - * Entity that created the bridge - * - * @since ari_1_0_0 - *********************************************************/ - public String getCreator(){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Name the creator gave the bridge - * - * @since ari_1_0_0 - *********************************************************/ - public void setName(String val ){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Name the creator gave the bridge - * - * @since ari_1_0_0 - *********************************************************/ - public String getName(){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Entity that created the bridge - * - * @since ari_1_0_0 - *********************************************************/ - public void setCreator(String val ){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/BuildInfo_impl_ari_0_0_1.java b/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/BuildInfo_impl_ari_0_0_1.java deleted file mode 100644 index ce9f27cb..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/BuildInfo_impl_ari_0_0_1.java +++ /dev/null @@ -1,92 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_0_0_1.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Info about how Asterisk was built - * - * Defined in file: asterisk.json - * Generated by: Model - *********************************************************/ - -public class BuildInfo_impl_ari_0_0_1 implements BuildInfo, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Date and time when Asterisk was built. */ - private String date; - public String getDate() { - return date; - } - - @JsonDeserialize( as=String.class ) - public void setDate(String val ) { - date = val; - } - - /** Kernel version Asterisk was built on. */ - private String kernel; - public String getKernel() { - return kernel; - } - - @JsonDeserialize( as=String.class ) - public void setKernel(String val ) { - kernel = val; - } - - /** Machine architecture (x86_64, i686, ppc, etc.) */ - private String machine; - public String getMachine() { - return machine; - } - - @JsonDeserialize( as=String.class ) - public void setMachine(String val ) { - machine = val; - } - - /** Compile time options, or empty string if default. */ - private String options; - public String getOptions() { - return options; - } - - @JsonDeserialize( as=String.class ) - public void setOptions(String val ) { - options = val; - } - - /** OS Asterisk was built on. */ - private String os; - public String getOs() { - return os; - } - - @JsonDeserialize( as=String.class ) - public void setOs(String val ) { - os = val; - } - - /** Username that build Asterisk */ - private String user; - public String getUser() { - return user; - } - - @JsonDeserialize( as=String.class ) - public void setUser(String val ) { - user = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/CallerID_impl_ari_0_0_1.java b/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/CallerID_impl_ari_0_0_1.java deleted file mode 100644 index 800ca750..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/CallerID_impl_ari_0_0_1.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_0_0_1.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Caller identification - * - * Defined in file: channels.json - * Generated by: Model - *********************************************************/ - -public class CallerID_impl_ari_0_0_1 implements CallerID, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private String name; - public String getName() { - return name; - } - - @JsonDeserialize( as=String.class ) - public void setName(String val ) { - name = val; - } - - /** */ - private String number; - public String getNumber() { - return number; - } - - @JsonDeserialize( as=String.class ) - public void setNumber(String val ) { - number = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/ChannelCallerId_impl_ari_0_0_1.java b/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/ChannelCallerId_impl_ari_0_0_1.java deleted file mode 100644 index 4042f05e..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/ChannelCallerId_impl_ari_0_0_1.java +++ /dev/null @@ -1,59 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_0_0_1.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Channel changed Caller ID. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelCallerId_impl_ari_0_0_1 extends Event_impl_ari_0_0_1 implements ChannelCallerId, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The integer representation of the Caller Presentation value. */ - private int caller_presentation; - public int getCaller_presentation() { - return caller_presentation; - } - - @JsonDeserialize( as=int.class ) - public void setCaller_presentation(int val ) { - caller_presentation = val; - } - - /** The text representation of the Caller Presentation value. */ - private String caller_presentation_txt; - public String getCaller_presentation_txt() { - return caller_presentation_txt; - } - - @JsonDeserialize( as=String.class ) - public void setCaller_presentation_txt(String val ) { - caller_presentation_txt = val; - } - - /** The channel that changed Caller ID. */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_0_0_1.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/ChannelCreated_impl_ari_0_0_1.java b/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/ChannelCreated_impl_ari_0_0_1.java deleted file mode 100644 index 479164d8..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/ChannelCreated_impl_ari_0_0_1.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_0_0_1.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a channel has been created. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelCreated_impl_ari_0_0_1 extends Event_impl_ari_0_0_1 implements ChannelCreated, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_0_0_1.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/ChannelDestroyed_impl_ari_0_0_1.java b/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/ChannelDestroyed_impl_ari_0_0_1.java deleted file mode 100644 index 24a85b4e..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/ChannelDestroyed_impl_ari_0_0_1.java +++ /dev/null @@ -1,59 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_0_0_1.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a channel has been destroyed. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelDestroyed_impl_ari_0_0_1 extends Event_impl_ari_0_0_1 implements ChannelDestroyed, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Integer representation of the cause of the hangup */ - private int cause; - public int getCause() { - return cause; - } - - @JsonDeserialize( as=int.class ) - public void setCause(int val ) { - cause = val; - } - - /** Text representation of the cause of the hangup */ - private String cause_txt; - public String getCause_txt() { - return cause_txt; - } - - @JsonDeserialize( as=String.class ) - public void setCause_txt(String val ) { - cause_txt = val; - } - - /** */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_0_0_1.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/ChannelDialplan_impl_ari_0_0_1.java b/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/ChannelDialplan_impl_ari_0_0_1.java deleted file mode 100644 index 70567a17..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/ChannelDialplan_impl_ari_0_0_1.java +++ /dev/null @@ -1,59 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_0_0_1.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Channel changed location in the dialplan. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelDialplan_impl_ari_0_0_1 extends Event_impl_ari_0_0_1 implements ChannelDialplan, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The channel that changed dialplan location. */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_0_0_1.class ) - public void setChannel(Channel val ) { - channel = val; - } - - /** The application about to be executed. */ - private String dialplan_app; - public String getDialplan_app() { - return dialplan_app; - } - - @JsonDeserialize( as=String.class ) - public void setDialplan_app(String val ) { - dialplan_app = val; - } - - /** The data to be passed to the application. */ - private String dialplan_app_data; - public String getDialplan_app_data() { - return dialplan_app_data; - } - - @JsonDeserialize( as=String.class ) - public void setDialplan_app_data(String val ) { - dialplan_app_data = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/ChannelDtmfReceived_impl_ari_0_0_1.java b/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/ChannelDtmfReceived_impl_ari_0_0_1.java deleted file mode 100644 index 69016300..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/ChannelDtmfReceived_impl_ari_0_0_1.java +++ /dev/null @@ -1,61 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_0_0_1.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * DTMF received on a channel. - * - * This event is sent when the DTMF ends. There is no notification about the start of DTMF - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelDtmfReceived_impl_ari_0_0_1 extends Event_impl_ari_0_0_1 implements ChannelDtmfReceived, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The channel on which DTMF was received */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_0_0_1.class ) - public void setChannel(Channel val ) { - channel = val; - } - - /** DTMF digit received (0-9, A-E, # or *) */ - private String digit; - public String getDigit() { - return digit; - } - - @JsonDeserialize( as=String.class ) - public void setDigit(String val ) { - digit = val; - } - - /** Number of milliseconds DTMF was received */ - private int duration_ms; - public int getDuration_ms() { - return duration_ms; - } - - @JsonDeserialize( as=int.class ) - public void setDuration_ms(int val ) { - duration_ms = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/ChannelEnteredBridge_impl_ari_0_0_1.java b/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/ChannelEnteredBridge_impl_ari_0_0_1.java deleted file mode 100644 index 4ad10c6f..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/ChannelEnteredBridge_impl_ari_0_0_1.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_0_0_1.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a channel has entered a bridge. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelEnteredBridge_impl_ari_0_0_1 extends Event_impl_ari_0_0_1 implements ChannelEnteredBridge, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Bridge bridge; - public Bridge getBridge() { - return bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_0_0_1.class ) - public void setBridge(Bridge val ) { - bridge = val; - } - - /** */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_0_0_1.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/ChannelHangupRequest_impl_ari_0_0_1.java b/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/ChannelHangupRequest_impl_ari_0_0_1.java deleted file mode 100644 index 52303ff1..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/ChannelHangupRequest_impl_ari_0_0_1.java +++ /dev/null @@ -1,59 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_0_0_1.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A hangup was requested on the channel. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelHangupRequest_impl_ari_0_0_1 extends Event_impl_ari_0_0_1 implements ChannelHangupRequest, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Integer representation of the cause of the hangup. */ - private int cause; - public int getCause() { - return cause; - } - - @JsonDeserialize( as=int.class ) - public void setCause(int val ) { - cause = val; - } - - /** The channel on which the hangup was requested. */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_0_0_1.class ) - public void setChannel(Channel val ) { - channel = val; - } - - /** Whether the hangup request was a soft hangup request. */ - private boolean soft; - public boolean getSoft() { - return soft; - } - - @JsonDeserialize( as=boolean.class ) - public void setSoft(boolean val ) { - soft = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/ChannelLeftBridge_impl_ari_0_0_1.java b/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/ChannelLeftBridge_impl_ari_0_0_1.java deleted file mode 100644 index 7a162797..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/ChannelLeftBridge_impl_ari_0_0_1.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_0_0_1.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a channel has left a bridge. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelLeftBridge_impl_ari_0_0_1 extends Event_impl_ari_0_0_1 implements ChannelLeftBridge, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Bridge bridge; - public Bridge getBridge() { - return bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_0_0_1.class ) - public void setBridge(Bridge val ) { - bridge = val; - } - - /** */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_0_0_1.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/ChannelStateChange_impl_ari_0_0_1.java b/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/ChannelStateChange_impl_ari_0_0_1.java deleted file mode 100644 index a603aa3d..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/ChannelStateChange_impl_ari_0_0_1.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_0_0_1.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification of a channel's state change. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelStateChange_impl_ari_0_0_1 extends Event_impl_ari_0_0_1 implements ChannelStateChange, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_0_0_1.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/ChannelUserevent_impl_ari_0_0_1.java b/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/ChannelUserevent_impl_ari_0_0_1.java deleted file mode 100644 index 96c187a7..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/ChannelUserevent_impl_ari_0_0_1.java +++ /dev/null @@ -1,94 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_0_0_1.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * User-generated event with additional user-defined fields in the object. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelUserevent_impl_ari_0_0_1 extends Event_impl_ari_0_0_1 implements ChannelUserevent, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The channel that signaled the user event. */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_0_0_1.class ) - public void setChannel(Channel val ) { - channel = val; - } - - /** The name of the user event. */ - private String eventname; - public String getEventname() { - return eventname; - } - - @JsonDeserialize( as=String.class ) - public void setEventname(String val ) { - eventname = val; - } - - /** Custom Userevent data */ - private String userevent; - public String getUserevent() { - return userevent; - } - - @JsonDeserialize( as=String.class ) - public void setUserevent(String val ) { - userevent = val; - } - -/********************************************************** - * A bridge that is signaled with the user event. - * - * @since ari_1_5_0 - *********************************************************/ - public void setBridge(Bridge val ){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * A endpoint that is signaled with the user event. - * - * @since ari_1_5_0 - *********************************************************/ - public void setEndpoint(Endpoint val ){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * A endpoint that is signaled with the user event. - * - * @since ari_1_5_0 - *********************************************************/ - public Endpoint getEndpoint(){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * A bridge that is signaled with the user event. - * - * @since ari_1_5_0 - *********************************************************/ - public Bridge getBridge(){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/ChannelVarset_impl_ari_0_0_1.java b/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/ChannelVarset_impl_ari_0_0_1.java deleted file mode 100644 index 988b544c..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/ChannelVarset_impl_ari_0_0_1.java +++ /dev/null @@ -1,61 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_0_0_1.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Channel variable changed. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelVarset_impl_ari_0_0_1 extends Event_impl_ari_0_0_1 implements ChannelVarset, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The channel on which the variable was set. - -If missing, the variable is a global variable. */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_0_0_1.class ) - public void setChannel(Channel val ) { - channel = val; - } - - /** The new value of the variable. */ - private String value; - public String getValue() { - return value; - } - - @JsonDeserialize( as=String.class ) - public void setValue(String val ) { - value = val; - } - - /** The variable that changed. */ - private String variable; - public String getVariable() { - return variable; - } - - @JsonDeserialize( as=String.class ) - public void setVariable(String val ) { - variable = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/Channel_impl_ari_0_0_1.java b/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/Channel_impl_ari_0_0_1.java deleted file mode 100644 index 00fe519d..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/Channel_impl_ari_0_0_1.java +++ /dev/null @@ -1,133 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_0_0_1.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A specific communication connection between Asterisk and an Endpoint. - * - * Defined in file: channels.json - * Generated by: Model - *********************************************************/ - -public class Channel_impl_ari_0_0_1 implements Channel, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private String accountcode; - public String getAccountcode() { - return accountcode; - } - - @JsonDeserialize( as=String.class ) - public void setAccountcode(String val ) { - accountcode = val; - } - - /** */ - private CallerID caller; - public CallerID getCaller() { - return caller; - } - - @JsonDeserialize( as=CallerID_impl_ari_0_0_1.class ) - public void setCaller(CallerID val ) { - caller = val; - } - - /** */ - private CallerID connected; - public CallerID getConnected() { - return connected; - } - - @JsonDeserialize( as=CallerID_impl_ari_0_0_1.class ) - public void setConnected(CallerID val ) { - connected = val; - } - - /** Timestamp when channel was created */ - private Date creationtime; - public Date getCreationtime() { - return creationtime; - } - - @JsonDeserialize( as=Date.class ) - public void setCreationtime(Date val ) { - creationtime = val; - } - - /** Current location in the dialplan */ - private DialplanCEP dialplan; - public DialplanCEP getDialplan() { - return dialplan; - } - - @JsonDeserialize( as=DialplanCEP_impl_ari_0_0_1.class ) - public void setDialplan(DialplanCEP val ) { - dialplan = val; - } - - /** Unique identifier of the channel. - -This is the same as the Uniqueid field in AMI. */ - private String id; - public String getId() { - return id; - } - - @JsonDeserialize( as=String.class ) - public void setId(String val ) { - id = val; - } - - /** Name of the channel (i.e. SIP/foo-0000a7e3) */ - private String name; - public String getName() { - return name; - } - - @JsonDeserialize( as=String.class ) - public void setName(String val ) { - name = val; - } - - /** */ - private String state; - public String getState() { - return state; - } - - @JsonDeserialize( as=String.class ) - public void setState(String val ) { - state = val; - } - -/********************************************************** - * The default spoken language - * - * @since ari_1_7_0 - *********************************************************/ - public String getLanguage(){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * The default spoken language - * - * @since ari_1_7_0 - *********************************************************/ - public void setLanguage(String val ){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/ConfigInfo_impl_ari_0_0_1.java b/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/ConfigInfo_impl_ari_0_0_1.java deleted file mode 100644 index eed84b88..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/ConfigInfo_impl_ari_0_0_1.java +++ /dev/null @@ -1,92 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_0_0_1.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Info about Asterisk configuration - * - * Defined in file: asterisk.json - * Generated by: Model - *********************************************************/ - -public class ConfigInfo_impl_ari_0_0_1 implements ConfigInfo, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Default language for media playback. */ - private String default_language; - public String getDefault_language() { - return default_language; - } - - @JsonDeserialize( as=String.class ) - public void setDefault_language(String val ) { - default_language = val; - } - - /** Maximum number of simultaneous channels. */ - private int max_channels; - public int getMax_channels() { - return max_channels; - } - - @JsonDeserialize( as=int.class ) - public void setMax_channels(int val ) { - max_channels = val; - } - - /** Maximum load avg on system. */ - private double max_load; - public double getMax_load() { - return max_load; - } - - @JsonDeserialize( as=double.class ) - public void setMax_load(double val ) { - max_load = val; - } - - /** Maximum number of open file handles (files, sockets). */ - private int max_open_files; - public int getMax_open_files() { - return max_open_files; - } - - @JsonDeserialize( as=int.class ) - public void setMax_open_files(int val ) { - max_open_files = val; - } - - /** Asterisk system name. */ - private String name; - public String getName() { - return name; - } - - @JsonDeserialize( as=String.class ) - public void setName(String val ) { - name = val; - } - - /** Effective user/group id for running Asterisk. */ - private SetId setid; - public SetId getSetid() { - return setid; - } - - @JsonDeserialize( as=SetId_impl_ari_0_0_1.class ) - public void setSetid(SetId val ) { - setid = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/DeviceStateChanged_impl_ari_0_0_1.java b/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/DeviceStateChanged_impl_ari_0_0_1.java deleted file mode 100644 index f7af8868..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/DeviceStateChanged_impl_ari_0_0_1.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_0_0_1.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a device state has changed. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class DeviceStateChanged_impl_ari_0_0_1 extends Event_impl_ari_0_0_1 implements DeviceStateChanged, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Device state object */ - private DeviceState device_state; - public DeviceState getDevice_state() { - return device_state; - } - - @JsonDeserialize( as=DeviceState_impl_ari_0_0_1.class ) - public void setDevice_state(DeviceState val ) { - device_state = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/DeviceState_impl_ari_0_0_1.java b/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/DeviceState_impl_ari_0_0_1.java deleted file mode 100644 index 5a64548b..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/DeviceState_impl_ari_0_0_1.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_0_0_1.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Represents the state of a device. - * - * Defined in file: deviceStates.json - * Generated by: Model - *********************************************************/ - -public class DeviceState_impl_ari_0_0_1 implements DeviceState, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Name of the device. */ - private String name; - public String getName() { - return name; - } - - @JsonDeserialize( as=String.class ) - public void setName(String val ) { - name = val; - } - - /** Device's state */ - private String state; - public String getState() { - return state; - } - - @JsonDeserialize( as=String.class ) - public void setState(String val ) { - state = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/Dialed_impl_ari_0_0_1.java b/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/Dialed_impl_ari_0_0_1.java deleted file mode 100644 index 06744518..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/Dialed_impl_ari_0_0_1.java +++ /dev/null @@ -1,26 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_0_0_1.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Dialed channel information. - * - * Defined in file: channels.json - * Generated by: Model - *********************************************************/ - -public class Dialed_impl_ari_0_0_1 implements Dialed, java.io.Serializable { -private static final long serialVersionUID = 1L; -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/DialplanCEP_impl_ari_0_0_1.java b/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/DialplanCEP_impl_ari_0_0_1.java deleted file mode 100644 index e3ab1ff4..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/DialplanCEP_impl_ari_0_0_1.java +++ /dev/null @@ -1,59 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_0_0_1.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Dialplan location (context/extension/priority) - * - * Defined in file: channels.json - * Generated by: Model - *********************************************************/ - -public class DialplanCEP_impl_ari_0_0_1 implements DialplanCEP, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Context in the dialplan */ - private String context; - public String getContext() { - return context; - } - - @JsonDeserialize( as=String.class ) - public void setContext(String val ) { - context = val; - } - - /** Extension in the dialplan */ - private String exten; - public String getExten() { - return exten; - } - - @JsonDeserialize( as=String.class ) - public void setExten(String val ) { - exten = val; - } - - /** Priority in the dialplan */ - private long priority; - public long getPriority() { - return priority; - } - - @JsonDeserialize( as=long.class ) - public void setPriority(long val ) { - priority = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/EndpointStateChange_impl_ari_0_0_1.java b/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/EndpointStateChange_impl_ari_0_0_1.java deleted file mode 100644 index 796b5224..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/EndpointStateChange_impl_ari_0_0_1.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_0_0_1.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Endpoint state changed. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class EndpointStateChange_impl_ari_0_0_1 extends Event_impl_ari_0_0_1 implements EndpointStateChange, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Endpoint endpoint; - public Endpoint getEndpoint() { - return endpoint; - } - - @JsonDeserialize( as=Endpoint_impl_ari_0_0_1.class ) - public void setEndpoint(Endpoint val ) { - endpoint = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/Endpoint_impl_ari_0_0_1.java b/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/Endpoint_impl_ari_0_0_1.java deleted file mode 100644 index 857fa476..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/Endpoint_impl_ari_0_0_1.java +++ /dev/null @@ -1,72 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_0_0_1.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * An external device that may offer/accept calls to/from Asterisk. - * - * Unlike most resources, which have a single unique identifier, an endpoint is uniquely identified by the technology/resource pair. - * - * Defined in file: endpoints.json - * Generated by: Model - *********************************************************/ - -public class Endpoint_impl_ari_0_0_1 implements Endpoint, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Id's of channels associated with this endpoint */ - private List channel_ids; - public List getChannel_ids() { - return channel_ids; - } - - @JsonDeserialize( contentAs=String.class ) - public void setChannel_ids(List val ) { - channel_ids = val; - } - - /** Identifier of the endpoint, specific to the given technology. */ - private String resource; - public String getResource() { - return resource; - } - - @JsonDeserialize( as=String.class ) - public void setResource(String val ) { - resource = val; - } - - /** Endpoint's state */ - private String state; - public String getState() { - return state; - } - - @JsonDeserialize( as=String.class ) - public void setState(String val ) { - state = val; - } - - /** Technology of the endpoint */ - private String technology; - public String getTechnology() { - return technology; - } - - @JsonDeserialize( as=String.class ) - public void setTechnology(String val ) { - technology = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/Event_impl_ari_0_0_1.java b/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/Event_impl_ari_0_0_1.java deleted file mode 100644 index d4f17c03..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/Event_impl_ari_0_0_1.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_0_0_1.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Base type for asynchronous events from Asterisk. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class Event_impl_ari_0_0_1 extends Message_impl_ari_0_0_1 implements Event, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Name of the application receiving the event. */ - private String application; - public String getApplication() { - return application; - } - - @JsonDeserialize( as=String.class ) - public void setApplication(String val ) { - application = val; - } - - /** Time at which this event was created. */ - private Date timestamp; - public Date getTimestamp() { - return timestamp; - } - - @JsonDeserialize( as=Date.class ) - public void setTimestamp(Date val ) { - timestamp = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/FormatLangPair_impl_ari_0_0_1.java b/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/FormatLangPair_impl_ari_0_0_1.java deleted file mode 100644 index 80b15a36..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/FormatLangPair_impl_ari_0_0_1.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_0_0_1.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Identifies the format and language of a sound file - * - * Defined in file: sounds.json - * Generated by: Model - *********************************************************/ - -public class FormatLangPair_impl_ari_0_0_1 implements FormatLangPair, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private String format; - public String getFormat() { - return format; - } - - @JsonDeserialize( as=String.class ) - public void setFormat(String val ) { - format = val; - } - - /** */ - private String language; - public String getLanguage() { - return language; - } - - @JsonDeserialize( as=String.class ) - public void setLanguage(String val ) { - language = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/LiveRecording_impl_ari_0_0_1.java b/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/LiveRecording_impl_ari_0_0_1.java deleted file mode 100644 index a559c80b..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/LiveRecording_impl_ari_0_0_1.java +++ /dev/null @@ -1,141 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_0_0_1.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A recording that is in progress - * - * Defined in file: recordings.json - * Generated by: Model - *********************************************************/ - -public class LiveRecording_impl_ari_0_0_1 implements LiveRecording, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Cause for recording failure if failed */ - private String cause; - public String getCause() { - return cause; - } - - @JsonDeserialize( as=String.class ) - public void setCause(String val ) { - cause = val; - } - - /** */ - private String format; - public String getFormat() { - return format; - } - - @JsonDeserialize( as=String.class ) - public void setFormat(String val ) { - format = val; - } - - /** Base name for the recording */ - private String name; - public String getName() { - return name; - } - - @JsonDeserialize( as=String.class ) - public void setName(String val ) { - name = val; - } - - /** */ - private String state; - public String getState() { - return state; - } - - @JsonDeserialize( as=String.class ) - public void setState(String val ) { - state = val; - } - -/********************************************************** - * Duration of silence, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds. - * - * @since ari_1_5_0 - *********************************************************/ - public int getSilence_duration(){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * URI for the channel or bridge being recorded - * - * @since ari_1_5_0 - *********************************************************/ - public void setTarget_uri(String val ){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * URI for the channel or bridge being recorded - * - * @since ari_1_5_0 - *********************************************************/ - public String getTarget_uri(){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Duration in seconds of the recording - * - * @since ari_1_5_0 - *********************************************************/ - public void setDuration(int val ){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Duration of talking, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds. - * - * @since ari_1_5_0 - *********************************************************/ - public void setTalking_duration(int val ){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Duration in seconds of the recording - * - * @since ari_1_5_0 - *********************************************************/ - public int getDuration(){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Duration of talking, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds. - * - * @since ari_1_5_0 - *********************************************************/ - public int getTalking_duration(){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Duration of silence, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds. - * - * @since ari_1_5_0 - *********************************************************/ - public void setSilence_duration(int val ){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/Message_impl_ari_0_0_1.java b/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/Message_impl_ari_0_0_1.java deleted file mode 100644 index 045d5acb..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/Message_impl_ari_0_0_1.java +++ /dev/null @@ -1,69 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_0_0_1.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonSubTypes.Type; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Base type for errors and events - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") - @JsonSubTypes({ @Type(value = MissingParams_impl_ari_0_0_1.class, name = "MissingParams") -, @Type(value = Event_impl_ari_0_0_1.class, name = "Event") -, @Type(value = DeviceStateChanged_impl_ari_0_0_1.class, name = "DeviceStateChanged") -, @Type(value = PlaybackStarted_impl_ari_0_0_1.class, name = "PlaybackStarted") -, @Type(value = PlaybackFinished_impl_ari_0_0_1.class, name = "PlaybackFinished") -, @Type(value = RecordingStarted_impl_ari_0_0_1.class, name = "RecordingStarted") -, @Type(value = RecordingFinished_impl_ari_0_0_1.class, name = "RecordingFinished") -, @Type(value = RecordingFailed_impl_ari_0_0_1.class, name = "RecordingFailed") -, @Type(value = ApplicationReplaced_impl_ari_0_0_1.class, name = "ApplicationReplaced") -, @Type(value = BridgeCreated_impl_ari_0_0_1.class, name = "BridgeCreated") -, @Type(value = BridgeDestroyed_impl_ari_0_0_1.class, name = "BridgeDestroyed") -, @Type(value = BridgeMerged_impl_ari_0_0_1.class, name = "BridgeMerged") -, @Type(value = ChannelCreated_impl_ari_0_0_1.class, name = "ChannelCreated") -, @Type(value = ChannelDestroyed_impl_ari_0_0_1.class, name = "ChannelDestroyed") -, @Type(value = ChannelEnteredBridge_impl_ari_0_0_1.class, name = "ChannelEnteredBridge") -, @Type(value = ChannelLeftBridge_impl_ari_0_0_1.class, name = "ChannelLeftBridge") -, @Type(value = ChannelStateChange_impl_ari_0_0_1.class, name = "ChannelStateChange") -, @Type(value = ChannelDtmfReceived_impl_ari_0_0_1.class, name = "ChannelDtmfReceived") -, @Type(value = ChannelDialplan_impl_ari_0_0_1.class, name = "ChannelDialplan") -, @Type(value = ChannelCallerId_impl_ari_0_0_1.class, name = "ChannelCallerId") -, @Type(value = ChannelUserevent_impl_ari_0_0_1.class, name = "ChannelUserevent") -, @Type(value = ChannelHangupRequest_impl_ari_0_0_1.class, name = "ChannelHangupRequest") -, @Type(value = ChannelVarset_impl_ari_0_0_1.class, name = "ChannelVarset") -, @Type(value = EndpointStateChange_impl_ari_0_0_1.class, name = "EndpointStateChange") -, @Type(value = StasisEnd_impl_ari_0_0_1.class, name = "StasisEnd") -, @Type(value = StasisStart_impl_ari_0_0_1.class, name = "StasisStart") - }) - - -public class Message_impl_ari_0_0_1 implements Message, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Indicates the type of this message. */ - private String type; - public String getType() { - return type; - } - - @JsonDeserialize( as=String.class ) - public void setType(String val ) { - type = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/MissingParams_impl_ari_0_0_1.java b/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/MissingParams_impl_ari_0_0_1.java deleted file mode 100644 index d6bcc182..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/MissingParams_impl_ari_0_0_1.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_0_0_1.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Error event sent when required params are missing. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class MissingParams_impl_ari_0_0_1 extends Message_impl_ari_0_0_1 implements MissingParams, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** A list of the missing parameters */ - private List params; - public List getParams() { - return params; - } - - @JsonDeserialize( contentAs=String.class ) - public void setParams(List val ) { - params = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/PlaybackFinished_impl_ari_0_0_1.java b/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/PlaybackFinished_impl_ari_0_0_1.java deleted file mode 100644 index 74b47e78..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/PlaybackFinished_impl_ari_0_0_1.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_0_0_1.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Event showing the completion of a media playback operation. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class PlaybackFinished_impl_ari_0_0_1 extends Event_impl_ari_0_0_1 implements PlaybackFinished, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Playback control object */ - private Playback playback; - public Playback getPlayback() { - return playback; - } - - @JsonDeserialize( as=Playback_impl_ari_0_0_1.class ) - public void setPlayback(Playback val ) { - playback = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/PlaybackStarted_impl_ari_0_0_1.java b/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/PlaybackStarted_impl_ari_0_0_1.java deleted file mode 100644 index 182dc93d..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/PlaybackStarted_impl_ari_0_0_1.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_0_0_1.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Event showing the start of a media playback operation. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class PlaybackStarted_impl_ari_0_0_1 extends Event_impl_ari_0_0_1 implements PlaybackStarted, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Playback control object */ - private Playback playback; - public Playback getPlayback() { - return playback; - } - - @JsonDeserialize( as=Playback_impl_ari_0_0_1.class ) - public void setPlayback(Playback val ) { - playback = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/Playback_impl_ari_0_0_1.java b/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/Playback_impl_ari_0_0_1.java deleted file mode 100644 index 9cd2d9fc..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/Playback_impl_ari_0_0_1.java +++ /dev/null @@ -1,98 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_0_0_1.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Object representing the playback of media to a channel - * - * Defined in file: playbacks.json - * Generated by: Model - *********************************************************/ - -public class Playback_impl_ari_0_0_1 implements Playback, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** ID for this playback operation */ - private String id; - public String getId() { - return id; - } - - @JsonDeserialize( as=String.class ) - public void setId(String val ) { - id = val; - } - - /** For media types that support multiple languages, the language requested for playback. */ - private String language; - public String getLanguage() { - return language; - } - - @JsonDeserialize( as=String.class ) - public void setLanguage(String val ) { - language = val; - } - - /** URI for the media to play back. */ - private String media_uri; - public String getMedia_uri() { - return media_uri; - } - - @JsonDeserialize( as=String.class ) - public void setMedia_uri(String val ) { - media_uri = val; - } - - /** Current state of the playback operation. */ - private String state; - public String getState() { - return state; - } - - @JsonDeserialize( as=String.class ) - public void setState(String val ) { - state = val; - } - - /** URI for the channel or bridge to play the media on */ - private String target_uri; - public String getTarget_uri() { - return target_uri; - } - - @JsonDeserialize( as=String.class ) - public void setTarget_uri(String val ) { - target_uri = val; - } - -/********************************************************** - * If a list of URIs is being played, the next media URI to be played back. - * - * @since ari_1_10_0 - *********************************************************/ - public void setNext_media_uri(String val ){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * If a list of URIs is being played, the next media URI to be played back. - * - * @since ari_1_10_0 - *********************************************************/ - public String getNext_media_uri(){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/RecordingFailed_impl_ari_0_0_1.java b/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/RecordingFailed_impl_ari_0_0_1.java deleted file mode 100644 index 31fab45b..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/RecordingFailed_impl_ari_0_0_1.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_0_0_1.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Event showing failure of a recording operation. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class RecordingFailed_impl_ari_0_0_1 extends Event_impl_ari_0_0_1 implements RecordingFailed, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Recording control object */ - private LiveRecording recording; - public LiveRecording getRecording() { - return recording; - } - - @JsonDeserialize( as=LiveRecording_impl_ari_0_0_1.class ) - public void setRecording(LiveRecording val ) { - recording = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/RecordingFinished_impl_ari_0_0_1.java b/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/RecordingFinished_impl_ari_0_0_1.java deleted file mode 100644 index 7b4c8045..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/RecordingFinished_impl_ari_0_0_1.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_0_0_1.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Event showing the completion of a recording operation. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class RecordingFinished_impl_ari_0_0_1 extends Event_impl_ari_0_0_1 implements RecordingFinished, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Recording control object */ - private LiveRecording recording; - public LiveRecording getRecording() { - return recording; - } - - @JsonDeserialize( as=LiveRecording_impl_ari_0_0_1.class ) - public void setRecording(LiveRecording val ) { - recording = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/RecordingStarted_impl_ari_0_0_1.java b/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/RecordingStarted_impl_ari_0_0_1.java deleted file mode 100644 index fa0db25b..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/RecordingStarted_impl_ari_0_0_1.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_0_0_1.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Event showing the start of a recording operation. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class RecordingStarted_impl_ari_0_0_1 extends Event_impl_ari_0_0_1 implements RecordingStarted, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Recording control object */ - private LiveRecording recording; - public LiveRecording getRecording() { - return recording; - } - - @JsonDeserialize( as=LiveRecording_impl_ari_0_0_1.class ) - public void setRecording(LiveRecording val ) { - recording = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/SetId_impl_ari_0_0_1.java b/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/SetId_impl_ari_0_0_1.java deleted file mode 100644 index 5ec725b3..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/SetId_impl_ari_0_0_1.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_0_0_1.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Effective user/group id - * - * Defined in file: asterisk.json - * Generated by: Model - *********************************************************/ - -public class SetId_impl_ari_0_0_1 implements SetId, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Effective group id. */ - private String group; - public String getGroup() { - return group; - } - - @JsonDeserialize( as=String.class ) - public void setGroup(String val ) { - group = val; - } - - /** Effective user id. */ - private String user; - public String getUser() { - return user; - } - - @JsonDeserialize( as=String.class ) - public void setUser(String val ) { - user = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/Sound_impl_ari_0_0_1.java b/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/Sound_impl_ari_0_0_1.java deleted file mode 100644 index 9fb3df9a..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/Sound_impl_ari_0_0_1.java +++ /dev/null @@ -1,59 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_0_0_1.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A media file that may be played back. - * - * Defined in file: sounds.json - * Generated by: Model - *********************************************************/ - -public class Sound_impl_ari_0_0_1 implements Sound, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The formats and languages in which this sound is available. */ - private List formats; - public List getFormats() { - return formats; - } - - @JsonDeserialize( contentAs=FormatLangPair_impl_ari_0_0_1.class ) - public void setFormats(List val ) { - formats = val; - } - - /** Sound's identifier. */ - private String id; - public String getId() { - return id; - } - - @JsonDeserialize( as=String.class ) - public void setId(String val ) { - id = val; - } - - /** Text description of the sound, usually the words spoken. */ - private String text; - public String getText() { - return text; - } - - @JsonDeserialize( as=String.class ) - public void setText(String val ) { - text = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/StasisEnd_impl_ari_0_0_1.java b/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/StasisEnd_impl_ari_0_0_1.java deleted file mode 100644 index 2e7bb292..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/StasisEnd_impl_ari_0_0_1.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_0_0_1.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a channel has left a Stasis application. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class StasisEnd_impl_ari_0_0_1 extends Event_impl_ari_0_0_1 implements StasisEnd, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_0_0_1.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/StasisStart_impl_ari_0_0_1.java b/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/StasisStart_impl_ari_0_0_1.java deleted file mode 100644 index 097de81e..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/StasisStart_impl_ari_0_0_1.java +++ /dev/null @@ -1,65 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_0_0_1.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a channel has entered a Stasis application. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class StasisStart_impl_ari_0_0_1 extends Event_impl_ari_0_0_1 implements StasisStart, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Arguments to the application */ - private List args; - public List getArgs() { - return args; - } - - @JsonDeserialize( contentAs=String.class ) - public void setArgs(List val ) { - args = val; - } - - /** */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_0_0_1.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/********************************************************** - * - * - * @since ari_1_5_0 - *********************************************************/ - public void setReplace_channel(Channel val ){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_5_0 - *********************************************************/ - public Channel getReplace_channel(){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/StatusInfo_impl_ari_0_0_1.java b/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/StatusInfo_impl_ari_0_0_1.java deleted file mode 100644 index dde892e1..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/StatusInfo_impl_ari_0_0_1.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_0_0_1.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Info about Asterisk status - * - * Defined in file: asterisk.json - * Generated by: Model - *********************************************************/ - -public class StatusInfo_impl_ari_0_0_1 implements StatusInfo, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Time when Asterisk was last reloaded. */ - private Date last_reload_time; - public Date getLast_reload_time() { - return last_reload_time; - } - - @JsonDeserialize( as=Date.class ) - public void setLast_reload_time(Date val ) { - last_reload_time = val; - } - - /** Time when Asterisk was started. */ - private Date startup_time; - public Date getStartup_time() { - return startup_time; - } - - @JsonDeserialize( as=Date.class ) - public void setStartup_time(Date val ) { - startup_time = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/StoredRecording_impl_ari_0_0_1.java b/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/StoredRecording_impl_ari_0_0_1.java deleted file mode 100644 index e658cfe7..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/StoredRecording_impl_ari_0_0_1.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_0_0_1.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A past recording that may be played back. - * - * Defined in file: recordings.json - * Generated by: Model - *********************************************************/ - -public class StoredRecording_impl_ari_0_0_1 implements StoredRecording, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private String format; - public String getFormat() { - return format; - } - - @JsonDeserialize( as=String.class ) - public void setFormat(String val ) { - format = val; - } - - /** */ - private String name; - public String getName() { - return name; - } - - @JsonDeserialize( as=String.class ) - public void setName(String val ) { - name = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/SystemInfo_impl_ari_0_0_1.java b/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/SystemInfo_impl_ari_0_0_1.java deleted file mode 100644 index a66ad6bc..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/SystemInfo_impl_ari_0_0_1.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_0_0_1.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Info about Asterisk - * - * Defined in file: asterisk.json - * Generated by: Model - *********************************************************/ - -public class SystemInfo_impl_ari_0_0_1 implements SystemInfo, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private String entity_id; - public String getEntity_id() { - return entity_id; - } - - @JsonDeserialize( as=String.class ) - public void setEntity_id(String val ) { - entity_id = val; - } - - /** Asterisk version. */ - private String version; - public String getVersion() { - return version; - } - - @JsonDeserialize( as=String.class ) - public void setVersion(String val ) { - version = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/Variable_impl_ari_0_0_1.java b/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/Variable_impl_ari_0_0_1.java deleted file mode 100644 index 5d69d4e8..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_0_0_1/models/Variable_impl_ari_0_0_1.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_0_0_1.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * The value of a channel variable - * - * Defined in file: asterisk.json - * Generated by: Model - *********************************************************/ - -public class Variable_impl_ari_0_0_1 implements Variable, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The value of the variable requested */ - private String value; - public String getValue() { - return value; - } - - @JsonDeserialize( as=String.class ) - public void setValue(String val ) { - value = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/AriBuilder_impl_ari_1_0_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/AriBuilder_impl_ari_1_0_0.java deleted file mode 100644 index d2536a67..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/AriBuilder_impl_ari_1_0_0.java +++ /dev/null @@ -1,324 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_0_0; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.ari_1_0_0.models.*; -import ch.loway.oss.ari4java.generated.ari_1_0_0.actions.*; -import ch.loway.oss.ari4java.generated.*; -import ch.loway.oss.ari4java.ARI; - -public class AriBuilder_impl_ari_1_0_0 implements AriBuilder { - -public ActionDeviceStates actionDeviceStates() { - return new ActionDeviceStates_impl_ari_1_0_0(); - }; - -public ActionSounds actionSounds() { - return new ActionSounds_impl_ari_1_0_0(); - }; - -public ActionEndpoints actionEndpoints() { - return new ActionEndpoints_impl_ari_1_0_0(); - }; - -public ActionAsterisk actionAsterisk() { - return new ActionAsterisk_impl_ari_1_0_0(); - }; - -public ActionChannels actionChannels() { - return new ActionChannels_impl_ari_1_0_0(); - }; - -public ActionPlaybacks actionPlaybacks() { - return new ActionPlaybacks_impl_ari_1_0_0(); - }; - -public ActionEvents actionEvents() { - return new ActionEvents_impl_ari_1_0_0(); - }; - -public ActionBridges actionBridges() { - return new ActionBridges_impl_ari_1_0_0(); - }; - -public ActionRecordings actionRecordings() { - return new ActionRecordings_impl_ari_1_0_0(); - }; - -public ActionApplications actionApplications() { - return new ActionApplications_impl_ari_1_0_0(); - }; - -public ChannelStateChange channelStateChange() { - return new ChannelStateChange_impl_ari_1_0_0(); - }; - -public ChannelDtmfReceived channelDtmfReceived() { - return new ChannelDtmfReceived_impl_ari_1_0_0(); - }; - -public CallerID callerID() { - return new CallerID_impl_ari_1_0_0(); - }; - -public DeviceStateChanged deviceStateChanged() { - return new DeviceStateChanged_impl_ari_1_0_0(); - }; - -public DialplanCEP dialplanCEP() { - return new DialplanCEP_impl_ari_1_0_0(); - }; - -public RecordingFailed recordingFailed() { - return new RecordingFailed_impl_ari_1_0_0(); - }; - -public StoredRecording storedRecording() { - return new StoredRecording_impl_ari_1_0_0(); - }; - -public LiveRecording liveRecording() { - return new LiveRecording_impl_ari_1_0_0(); - }; - -public RecordingFinished recordingFinished() { - return new RecordingFinished_impl_ari_1_0_0(); - }; - -public BridgeDestroyed bridgeDestroyed() { - return new BridgeDestroyed_impl_ari_1_0_0(); - }; - -public Bridge bridge() { - return new Bridge_impl_ari_1_0_0(); - }; - -public Endpoint endpoint() { - return new Endpoint_impl_ari_1_0_0(); - }; - -public Dial dial() { - return new Dial_impl_ari_1_0_0(); - }; - -public StasisStart stasisStart() { - return new StasisStart_impl_ari_1_0_0(); - }; - -public RecordingStarted recordingStarted() { - return new RecordingStarted_impl_ari_1_0_0(); - }; - -public MissingParams missingParams() { - return new MissingParams_impl_ari_1_0_0(); - }; - -public StasisEnd stasisEnd() { - return new StasisEnd_impl_ari_1_0_0(); - }; - -public Message message() { - return new Message_impl_ari_1_0_0(); - }; - -public BridgeCreated bridgeCreated() { - return new BridgeCreated_impl_ari_1_0_0(); - }; - -public Channel channel() { - return new Channel_impl_ari_1_0_0(); - }; - -public ChannelVarset channelVarset() { - return new ChannelVarset_impl_ari_1_0_0(); - }; - -public ChannelHangupRequest channelHangupRequest() { - return new ChannelHangupRequest_impl_ari_1_0_0(); - }; - -public ChannelDialplan channelDialplan() { - return new ChannelDialplan_impl_ari_1_0_0(); - }; - -public DeviceState deviceState() { - return new DeviceState_impl_ari_1_0_0(); - }; - -public ChannelCallerId channelCallerId() { - return new ChannelCallerId_impl_ari_1_0_0(); - }; - -public ChannelLeftBridge channelLeftBridge() { - return new ChannelLeftBridge_impl_ari_1_0_0(); - }; - -public BridgeMerged bridgeMerged() { - return new BridgeMerged_impl_ari_1_0_0(); - }; - -public PlaybackFinished playbackFinished() { - return new PlaybackFinished_impl_ari_1_0_0(); - }; - -public ChannelUserevent channelUserevent() { - return new ChannelUserevent_impl_ari_1_0_0(); - }; - -public Dialed dialed() { - return new Dialed_impl_ari_1_0_0(); - }; - -public ChannelEnteredBridge channelEnteredBridge() { - return new ChannelEnteredBridge_impl_ari_1_0_0(); - }; - -public ApplicationReplaced applicationReplaced() { - return new ApplicationReplaced_impl_ari_1_0_0(); - }; - -public StatusInfo statusInfo() { - return new StatusInfo_impl_ari_1_0_0(); - }; - -public ChannelDestroyed channelDestroyed() { - return new ChannelDestroyed_impl_ari_1_0_0(); - }; - -public Event event() { - return new Event_impl_ari_1_0_0(); - }; - -public EndpointStateChange endpointStateChange() { - return new EndpointStateChange_impl_ari_1_0_0(); - }; - -public SystemInfo systemInfo() { - return new SystemInfo_impl_ari_1_0_0(); - }; - -public BuildInfo buildInfo() { - return new BuildInfo_impl_ari_1_0_0(); - }; - -public Variable variable() { - return new Variable_impl_ari_1_0_0(); - }; - -public PlaybackStarted playbackStarted() { - return new PlaybackStarted_impl_ari_1_0_0(); - }; - -public AsteriskInfo asteriskInfo() { - return new AsteriskInfo_impl_ari_1_0_0(); - }; - -public Application application() { - return new Application_impl_ari_1_0_0(); - }; - -public Playback playback() { - return new Playback_impl_ari_1_0_0(); - }; - -public FormatLangPair formatLangPair() { - return new FormatLangPair_impl_ari_1_0_0(); - }; - -public ConfigInfo configInfo() { - return new ConfigInfo_impl_ari_1_0_0(); - }; - -public SetId setId() { - return new SetId_impl_ari_1_0_0(); - }; - -public Sound sound() { - return new Sound_impl_ari_1_0_0(); - }; - -public ChannelCreated channelCreated() { - return new ChannelCreated_impl_ari_1_0_0(); - }; - -public BridgeAttendedTransfer bridgeAttendedTransfer() { - throw new UnsupportedOperationException(); - }; - -public BridgeBlindTransfer bridgeBlindTransfer() { - throw new UnsupportedOperationException(); - }; - -public ChannelConnectedLine channelConnectedLine() { - throw new UnsupportedOperationException(); - }; - -public ChannelHold channelHold() { - throw new UnsupportedOperationException(); - }; - -public ChannelTalkingFinished channelTalkingFinished() { - throw new UnsupportedOperationException(); - }; - -public ChannelTalkingStarted channelTalkingStarted() { - throw new UnsupportedOperationException(); - }; - -public ChannelUnhold channelUnhold() { - throw new UnsupportedOperationException(); - }; - -public ConfigTuple configTuple() { - throw new UnsupportedOperationException(); - }; - -public ContactInfo contactInfo() { - throw new UnsupportedOperationException(); - }; - -public ContactStatusChange contactStatusChange() { - throw new UnsupportedOperationException(); - }; - -public LogChannel logChannel() { - throw new UnsupportedOperationException(); - }; - -public Module module() { - throw new UnsupportedOperationException(); - }; - -public Peer peer() { - throw new UnsupportedOperationException(); - }; - -public PeerStatusChange peerStatusChange() { - throw new UnsupportedOperationException(); - }; - -public PlaybackContinuing playbackContinuing() { - throw new UnsupportedOperationException(); - }; - -public TextMessage textMessage() { - throw new UnsupportedOperationException(); - }; - -public TextMessageReceived textMessageReceived() { - throw new UnsupportedOperationException(); - }; - -public TextMessageVariable textMessageVariable() { - throw new UnsupportedOperationException(); - }; - -public ARI.ClassFactory getClassFactory() { - return new ClassTranslator_impl_ari_1_0_0(); -}; - -}; diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/ClassTranslator_impl_ari_1_0_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/ClassTranslator_impl_ari_1_0_0.java deleted file mode 100644 index 45a8c42d..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/ClassTranslator_impl_ari_1_0_0.java +++ /dev/null @@ -1,259 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_0_0; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.ARI; -import ch.loway.oss.ari4java.generated.*; -import ch.loway.oss.ari4java.generated.ari_1_0_0.models.*; -import ch.loway.oss.ari4java.generated.ari_1_0_0.actions.*; - -/********************************************************** - * This is a class translator. - *********************************************************/ -public class ClassTranslator_impl_ari_1_0_0 implements ARI.ClassFactory { - - @Override - public Class getImplementationFor(Class interfaceClass) { - - if ( interfaceClass.equals(ActionApplications.class) ) { - return (ActionApplications_impl_ari_1_0_0.class); - } else - - if ( interfaceClass.equals(ActionAsterisk.class) ) { - return (ActionAsterisk_impl_ari_1_0_0.class); - } else - - if ( interfaceClass.equals(ActionBridges.class) ) { - return (ActionBridges_impl_ari_1_0_0.class); - } else - - if ( interfaceClass.equals(ActionChannels.class) ) { - return (ActionChannels_impl_ari_1_0_0.class); - } else - - if ( interfaceClass.equals(ActionDeviceStates.class) ) { - return (ActionDeviceStates_impl_ari_1_0_0.class); - } else - - if ( interfaceClass.equals(ActionEndpoints.class) ) { - return (ActionEndpoints_impl_ari_1_0_0.class); - } else - - if ( interfaceClass.equals(ActionEvents.class) ) { - return (ActionEvents_impl_ari_1_0_0.class); - } else - - if ( interfaceClass.equals(ActionPlaybacks.class) ) { - return (ActionPlaybacks_impl_ari_1_0_0.class); - } else - - if ( interfaceClass.equals(ActionRecordings.class) ) { - return (ActionRecordings_impl_ari_1_0_0.class); - } else - - if ( interfaceClass.equals(ActionSounds.class) ) { - return (ActionSounds_impl_ari_1_0_0.class); - } else - - if ( interfaceClass.equals(Application.class) ) { - return (Application_impl_ari_1_0_0.class); - } else - - if ( interfaceClass.equals(ApplicationReplaced.class) ) { - return (ApplicationReplaced_impl_ari_1_0_0.class); - } else - - if ( interfaceClass.equals(AsteriskInfo.class) ) { - return (AsteriskInfo_impl_ari_1_0_0.class); - } else - - if ( interfaceClass.equals(Bridge.class) ) { - return (Bridge_impl_ari_1_0_0.class); - } else - - if ( interfaceClass.equals(BridgeCreated.class) ) { - return (BridgeCreated_impl_ari_1_0_0.class); - } else - - if ( interfaceClass.equals(BridgeDestroyed.class) ) { - return (BridgeDestroyed_impl_ari_1_0_0.class); - } else - - if ( interfaceClass.equals(BridgeMerged.class) ) { - return (BridgeMerged_impl_ari_1_0_0.class); - } else - - if ( interfaceClass.equals(BuildInfo.class) ) { - return (BuildInfo_impl_ari_1_0_0.class); - } else - - if ( interfaceClass.equals(CallerID.class) ) { - return (CallerID_impl_ari_1_0_0.class); - } else - - if ( interfaceClass.equals(Channel.class) ) { - return (Channel_impl_ari_1_0_0.class); - } else - - if ( interfaceClass.equals(ChannelCallerId.class) ) { - return (ChannelCallerId_impl_ari_1_0_0.class); - } else - - if ( interfaceClass.equals(ChannelCreated.class) ) { - return (ChannelCreated_impl_ari_1_0_0.class); - } else - - if ( interfaceClass.equals(ChannelDestroyed.class) ) { - return (ChannelDestroyed_impl_ari_1_0_0.class); - } else - - if ( interfaceClass.equals(ChannelDialplan.class) ) { - return (ChannelDialplan_impl_ari_1_0_0.class); - } else - - if ( interfaceClass.equals(ChannelDtmfReceived.class) ) { - return (ChannelDtmfReceived_impl_ari_1_0_0.class); - } else - - if ( interfaceClass.equals(ChannelEnteredBridge.class) ) { - return (ChannelEnteredBridge_impl_ari_1_0_0.class); - } else - - if ( interfaceClass.equals(ChannelHangupRequest.class) ) { - return (ChannelHangupRequest_impl_ari_1_0_0.class); - } else - - if ( interfaceClass.equals(ChannelLeftBridge.class) ) { - return (ChannelLeftBridge_impl_ari_1_0_0.class); - } else - - if ( interfaceClass.equals(ChannelStateChange.class) ) { - return (ChannelStateChange_impl_ari_1_0_0.class); - } else - - if ( interfaceClass.equals(ChannelUserevent.class) ) { - return (ChannelUserevent_impl_ari_1_0_0.class); - } else - - if ( interfaceClass.equals(ChannelVarset.class) ) { - return (ChannelVarset_impl_ari_1_0_0.class); - } else - - if ( interfaceClass.equals(ConfigInfo.class) ) { - return (ConfigInfo_impl_ari_1_0_0.class); - } else - - if ( interfaceClass.equals(DeviceState.class) ) { - return (DeviceState_impl_ari_1_0_0.class); - } else - - if ( interfaceClass.equals(DeviceStateChanged.class) ) { - return (DeviceStateChanged_impl_ari_1_0_0.class); - } else - - if ( interfaceClass.equals(Dial.class) ) { - return (Dial_impl_ari_1_0_0.class); - } else - - if ( interfaceClass.equals(Dialed.class) ) { - return (Dialed_impl_ari_1_0_0.class); - } else - - if ( interfaceClass.equals(DialplanCEP.class) ) { - return (DialplanCEP_impl_ari_1_0_0.class); - } else - - if ( interfaceClass.equals(Endpoint.class) ) { - return (Endpoint_impl_ari_1_0_0.class); - } else - - if ( interfaceClass.equals(EndpointStateChange.class) ) { - return (EndpointStateChange_impl_ari_1_0_0.class); - } else - - if ( interfaceClass.equals(Event.class) ) { - return (Event_impl_ari_1_0_0.class); - } else - - if ( interfaceClass.equals(FormatLangPair.class) ) { - return (FormatLangPair_impl_ari_1_0_0.class); - } else - - if ( interfaceClass.equals(LiveRecording.class) ) { - return (LiveRecording_impl_ari_1_0_0.class); - } else - - if ( interfaceClass.equals(Message.class) ) { - return (Message_impl_ari_1_0_0.class); - } else - - if ( interfaceClass.equals(MissingParams.class) ) { - return (MissingParams_impl_ari_1_0_0.class); - } else - - if ( interfaceClass.equals(Playback.class) ) { - return (Playback_impl_ari_1_0_0.class); - } else - - if ( interfaceClass.equals(PlaybackFinished.class) ) { - return (PlaybackFinished_impl_ari_1_0_0.class); - } else - - if ( interfaceClass.equals(PlaybackStarted.class) ) { - return (PlaybackStarted_impl_ari_1_0_0.class); - } else - - if ( interfaceClass.equals(RecordingFailed.class) ) { - return (RecordingFailed_impl_ari_1_0_0.class); - } else - - if ( interfaceClass.equals(RecordingFinished.class) ) { - return (RecordingFinished_impl_ari_1_0_0.class); - } else - - if ( interfaceClass.equals(RecordingStarted.class) ) { - return (RecordingStarted_impl_ari_1_0_0.class); - } else - - if ( interfaceClass.equals(SetId.class) ) { - return (SetId_impl_ari_1_0_0.class); - } else - - if ( interfaceClass.equals(Sound.class) ) { - return (Sound_impl_ari_1_0_0.class); - } else - - if ( interfaceClass.equals(StasisEnd.class) ) { - return (StasisEnd_impl_ari_1_0_0.class); - } else - - if ( interfaceClass.equals(StasisStart.class) ) { - return (StasisStart_impl_ari_1_0_0.class); - } else - - if ( interfaceClass.equals(StatusInfo.class) ) { - return (StatusInfo_impl_ari_1_0_0.class); - } else - - if ( interfaceClass.equals(StoredRecording.class) ) { - return (StoredRecording_impl_ari_1_0_0.class); - } else - - if ( interfaceClass.equals(SystemInfo.class) ) { - return (SystemInfo_impl_ari_1_0_0.class); - } else - - if ( interfaceClass.equals(Variable.class) ) { - return (Variable_impl_ari_1_0_0.class); - } else - { - return null; - } - } -} - - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/actions/ActionApplications_impl_ari_1_0_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/actions/ActionApplications_impl_ari_1_0_0.java deleted file mode 100644 index 5676109b..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/actions/ActionApplications_impl_ari_1_0_0.java +++ /dev/null @@ -1,140 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_0_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_0_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionApplications_impl_ari_1_0_0 extends BaseAriAction implements ActionApplications { -/********************************************************** - * Stasis applications - * - * List all applications. - *********************************************************/ -private void buildList() { -reset(); -url = "/applications"; -method = "GET"; -} - -@Override -public List list() throws RestException { -buildList(); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void list(AriCallback> callback) { -buildList(); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Stasis application - * - * Get details of an application. - *********************************************************/ -private void buildGet(String applicationName) { -reset(); -url = "/applications/" + applicationName + ""; -method = "GET"; -lE.add( HttpResponse.build( 404, "Application does not exist.") ); -} - -@Override -public Application get(String applicationName) throws RestException { -buildGet(applicationName); -String json = httpActionSync(); -return deserializeJson( json, Application_impl_ari_1_0_0.class ); -} - -@Override -public void get(String applicationName, AriCallback callback) { -buildGet(applicationName); -httpActionAsync(callback, Application_impl_ari_1_0_0.class); -} - -/********************************************************** - * Stasis application - * - * Subscribe an application to a event source. - * Returns the state of the application after the subscriptions have changed - *********************************************************/ -private void buildSubscribe(String applicationName, String eventSource) { -reset(); -url = "/applications/" + applicationName + "/subscription"; -method = "POST"; -lParamQuery.add( HttpParam.build( "eventSource", eventSource) ); -lE.add( HttpResponse.build( 400, "Missing parameter.") ); -lE.add( HttpResponse.build( 404, "Application does not exist.") ); -lE.add( HttpResponse.build( 422, "Event source does not exist.") ); -} - -@Override -public Application subscribe(String applicationName, String eventSource) throws RestException { -buildSubscribe(applicationName, eventSource); -String json = httpActionSync(); -return deserializeJson( json, Application_impl_ari_1_0_0.class ); -} - -@Override -public void subscribe(String applicationName, String eventSource, AriCallback callback) { -buildSubscribe(applicationName, eventSource); -httpActionAsync(callback, Application_impl_ari_1_0_0.class); -} - -/********************************************************** - * Stasis application - * - * Unsubscribe an application from an event source. - * Returns the state of the application after the subscriptions have changed - *********************************************************/ -private void buildUnsubscribe(String applicationName, String eventSource) { -reset(); -url = "/applications/" + applicationName + "/subscription"; -method = "DELETE"; -lParamQuery.add( HttpParam.build( "eventSource", eventSource) ); -lE.add( HttpResponse.build( 400, "Missing parameter; event source scheme not recognized.") ); -lE.add( HttpResponse.build( 404, "Application does not exist.") ); -lE.add( HttpResponse.build( 409, "Application not subscribed to event source.") ); -lE.add( HttpResponse.build( 422, "Event source does not exist.") ); -} - -@Override -public Application unsubscribe(String applicationName, String eventSource) throws RestException { -buildUnsubscribe(applicationName, eventSource); -String json = httpActionSync(); -return deserializeJson( json, Application_impl_ari_1_0_0.class ); -} - -@Override -public void unsubscribe(String applicationName, String eventSource, AriCallback callback) { -buildUnsubscribe(applicationName, eventSource); -httpActionAsync(callback, Application_impl_ari_1_0_0.class); -} - -/** No missing signatures from interface */ -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/actions/ActionAsterisk_impl_ari_1_0_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/actions/ActionAsterisk_impl_ari_1_0_0.java deleted file mode 100644 index d5fe6d6c..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/actions/ActionAsterisk_impl_ari_1_0_0.java +++ /dev/null @@ -1,335 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_0_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_0_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionAsterisk_impl_ari_1_0_0 extends BaseAriAction implements ActionAsterisk { -/********************************************************** - * Asterisk system information (similar to core show settings) - * - * Gets Asterisk system information. - *********************************************************/ -private void buildGetInfo(String only) { -reset(); -url = "/asterisk/info"; -method = "GET"; -lParamQuery.add( HttpParam.build( "only", only) ); -} - -@Override -public AsteriskInfo getInfo(String only) throws RestException { -buildGetInfo(only); -String json = httpActionSync(); -return deserializeJson( json, AsteriskInfo_impl_ari_1_0_0.class ); -} - -@Override -public void getInfo(String only, AriCallback callback) { -buildGetInfo(only); -httpActionAsync(callback, AsteriskInfo_impl_ari_1_0_0.class); -} - -/********************************************************** - * Global variables - * - * Get the value of a global variable. - *********************************************************/ -private void buildGetGlobalVar(String variable) { -reset(); -url = "/asterisk/variable"; -method = "GET"; -lParamQuery.add( HttpParam.build( "variable", variable) ); -lE.add( HttpResponse.build( 400, "Missing variable parameter.") ); -} - -@Override -public Variable getGlobalVar(String variable) throws RestException { -buildGetGlobalVar(variable); -String json = httpActionSync(); -return deserializeJson( json, Variable_impl_ari_1_0_0.class ); -} - -@Override -public void getGlobalVar(String variable, AriCallback callback) { -buildGetGlobalVar(variable); -httpActionAsync(callback, Variable_impl_ari_1_0_0.class); -} - -/********************************************************** - * Global variables - * - * Set the value of a global variable. - *********************************************************/ -private void buildSetGlobalVar(String variable, String value) { -reset(); -url = "/asterisk/variable"; -method = "POST"; -lParamQuery.add( HttpParam.build( "variable", variable) ); -lParamQuery.add( HttpParam.build( "value", value) ); -lE.add( HttpResponse.build( 400, "Missing variable parameter.") ); -} - -@Override -public void setGlobalVar(String variable, String value) throws RestException { -buildSetGlobalVar(variable, value); -String json = httpActionSync(); -} - -@Override -public void setGlobalVar(String variable, String value, AriCallback callback) { -buildSetGlobalVar(variable, value); -httpActionAsync(callback); -} - -/********************************************************** - * Reload an Asterisk module. - * - * - * @since ari_1_8_0 - *********************************************************/ -public void reloadModule(String moduleName) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create or update a dynamic configuration object. - * - * - * @since ari_1_8_0 - *********************************************************/ -public List updateObject(String configClass, String objectType, String id, Map fields) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_8_0 - *********************************************************/ -public void deleteObject(String configClass, String objectType, String id, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_8_0 - *********************************************************/ -public void reloadModule(String moduleName, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_9_0 - *********************************************************/ -public void addLog(String logChannelName, String configuration, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_8_0 - *********************************************************/ -public void unloadModule(String moduleName, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * List Asterisk modules. - * - * - * @since ari_1_8_0 - *********************************************************/ -public List listModules() throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Gets Asterisk log channel information. - * - * - * @since ari_1_9_0 - *********************************************************/ -public List listLogChannels() throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Get Asterisk module information. - * - * - * @since ari_1_8_0 - *********************************************************/ -public Module getModule(String moduleName) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_9_0 - *********************************************************/ -public void rotateLog(String logChannelName, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Retrieve a dynamic configuration object. - * - * - * @since ari_1_8_0 - *********************************************************/ -public List getObject(String configClass, String objectType, String id) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Load an Asterisk module. - * - * - * @since ari_1_8_0 - *********************************************************/ -public void loadModule(String moduleName) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Unload an Asterisk module. - * - * - * @since ari_1_8_0 - *********************************************************/ -public void unloadModule(String moduleName) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_8_0 - *********************************************************/ -public void getModule(String moduleName, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_8_0 - *********************************************************/ -public void updateObject(String configClass, String objectType, String id, Map fields, AriCallback> callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Delete a dynamic configuration object. - * - * - * @since ari_1_8_0 - *********************************************************/ -public void deleteObject(String configClass, String objectType, String id) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Rotates a log channel. - * - * - * @since ari_1_9_0 - *********************************************************/ -public void rotateLog(String logChannelName) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_9_0 - *********************************************************/ -public void listLogChannels(AriCallback> callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Adds a log channel. - * - * - * @since ari_1_9_0 - *********************************************************/ -public void addLog(String logChannelName, String configuration) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_8_0 - *********************************************************/ -public void listModules(AriCallback> callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Deletes a log channel. - * - * - * @since ari_1_9_0 - *********************************************************/ -public void deleteLog(String logChannelName) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_9_0 - *********************************************************/ -public void deleteLog(String logChannelName, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_8_0 - *********************************************************/ -public void loadModule(String moduleName, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_8_0 - *********************************************************/ -public void getObject(String configClass, String objectType, String id, AriCallback> callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/actions/ActionBridges_impl_ari_1_0_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/actions/ActionBridges_impl_ari_1_0_0.java deleted file mode 100644 index 85027a6a..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/actions/ActionBridges_impl_ari_1_0_0.java +++ /dev/null @@ -1,422 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_0_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_0_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionBridges_impl_ari_1_0_0 extends BaseAriAction implements ActionBridges { -/********************************************************** - * Active bridges - * - * List all active bridges in Asterisk. - *********************************************************/ -private void buildList() { -reset(); -url = "/bridges"; -method = "GET"; -} - -@Override -public List list() throws RestException { -buildList(); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void list(AriCallback> callback) { -buildList(); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Active bridges - * - * Create a new bridge. - * This bridge persists until it has been shut down, or Asterisk has been shut down. - *********************************************************/ -private void buildCreate(String type, String name) { -reset(); -url = "/bridges"; -method = "POST"; -lParamQuery.add( HttpParam.build( "type", type) ); -lParamQuery.add( HttpParam.build( "name", name) ); -} - -@Override -public Bridge create(String type, String name) throws RestException { -buildCreate(type, name); -String json = httpActionSync(); -return deserializeJson( json, Bridge_impl_ari_1_0_0.class ); -} - -@Override -public void create(String type, String name, AriCallback callback) { -buildCreate(type, name); -httpActionAsync(callback, Bridge_impl_ari_1_0_0.class); -} - -/********************************************************** - * Individual bridge - * - * Get bridge details. - *********************************************************/ -private void buildGet(String bridgeId) { -reset(); -url = "/bridges/" + bridgeId + ""; -method = "GET"; -lE.add( HttpResponse.build( 404, "Bridge not found") ); -} - -@Override -public Bridge get(String bridgeId) throws RestException { -buildGet(bridgeId); -String json = httpActionSync(); -return deserializeJson( json, Bridge_impl_ari_1_0_0.class ); -} - -@Override -public void get(String bridgeId, AriCallback callback) { -buildGet(bridgeId); -httpActionAsync(callback, Bridge_impl_ari_1_0_0.class); -} - -/********************************************************** - * Individual bridge - * - * Shut down a bridge. - * If any channels are in this bridge, they will be removed and resume whatever they were doing beforehand. - *********************************************************/ -private void buildDestroy(String bridgeId) { -reset(); -url = "/bridges/" + bridgeId + ""; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Bridge not found") ); -} - -@Override -public void destroy(String bridgeId) throws RestException { -buildDestroy(bridgeId); -String json = httpActionSync(); -} - -@Override -public void destroy(String bridgeId, AriCallback callback) { -buildDestroy(bridgeId); -httpActionAsync(callback); -} - -/********************************************************** - * Add a channel to a bridge - * - * Add a channel to a bridge. - *********************************************************/ -private void buildAddChannel(String bridgeId, String channel, String role) { -reset(); -url = "/bridges/" + bridgeId + "/addChannel"; -method = "POST"; -lParamQuery.add( HttpParam.build( "channel", channel) ); -lParamQuery.add( HttpParam.build( "role", role) ); -lE.add( HttpResponse.build( 400, "Channel not found") ); -lE.add( HttpResponse.build( 404, "Bridge not found") ); -lE.add( HttpResponse.build( 409, "Bridge not in Stasis application; Channel currently recording") ); -lE.add( HttpResponse.build( 422, "Channel not in Stasis application") ); -} - -@Override -public void addChannel(String bridgeId, String channel, String role) throws RestException { -buildAddChannel(bridgeId, channel, role); -String json = httpActionSync(); -} - -@Override -public void addChannel(String bridgeId, String channel, String role, AriCallback callback) { -buildAddChannel(bridgeId, channel, role); -httpActionAsync(callback); -} - -/********************************************************** - * Play music on hold to a bridge - * - * Play music on hold to a bridge or change the MOH class that is playing. - *********************************************************/ -private void buildStartMoh(String bridgeId, String mohClass) { -reset(); -url = "/bridges/" + bridgeId + "/moh"; -method = "POST"; -lParamQuery.add( HttpParam.build( "mohClass", mohClass) ); -lE.add( HttpResponse.build( 404, "Bridge not found") ); -lE.add( HttpResponse.build( 409, "Bridge not in Stasis application") ); -} - -@Override -public void startMoh(String bridgeId, String mohClass) throws RestException { -buildStartMoh(bridgeId, mohClass); -String json = httpActionSync(); -} - -@Override -public void startMoh(String bridgeId, String mohClass, AriCallback callback) { -buildStartMoh(bridgeId, mohClass); -httpActionAsync(callback); -} - -/********************************************************** - * Play music on hold to a bridge - * - * Stop playing music on hold to a bridge. - * This will only stop music on hold being played via POST bridges/{bridgeId}/moh. - *********************************************************/ -private void buildStopMoh(String bridgeId) { -reset(); -url = "/bridges/" + bridgeId + "/moh"; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Bridge not found") ); -lE.add( HttpResponse.build( 409, "Bridge not in Stasis application") ); -} - -@Override -public void stopMoh(String bridgeId) throws RestException { -buildStopMoh(bridgeId); -String json = httpActionSync(); -} - -@Override -public void stopMoh(String bridgeId, AriCallback callback) { -buildStopMoh(bridgeId); -httpActionAsync(callback); -} - -/********************************************************** - * Play media to the participants of a bridge - * - * Start playback of media on a bridge. - * 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.) - *********************************************************/ -private void buildPlay(String bridgeId, String media, String lang, int offsetms, int skipms) { -reset(); -url = "/bridges/" + bridgeId + "/play"; -method = "POST"; -lParamQuery.add( HttpParam.build( "media", media) ); -lParamQuery.add( HttpParam.build( "lang", lang) ); -lParamQuery.add( HttpParam.build( "offsetms", offsetms) ); -lParamQuery.add( HttpParam.build( "skipms", skipms) ); -lE.add( HttpResponse.build( 404, "Bridge not found") ); -lE.add( HttpResponse.build( 409, "Bridge not in a Stasis application") ); -} - -@Override -public Playback play(String bridgeId, String media, String lang, int offsetms, int skipms) throws RestException { -buildPlay(bridgeId, media, lang, offsetms, skipms); -String json = httpActionSync(); -return deserializeJson( json, Playback_impl_ari_1_0_0.class ); -} - -@Override -public void play(String bridgeId, String media, String lang, int offsetms, int skipms, AriCallback callback) { -buildPlay(bridgeId, media, lang, offsetms, skipms); -httpActionAsync(callback, Playback_impl_ari_1_0_0.class); -} - -/********************************************************** - * Record audio on a bridge - * - * Start a recording. - * This records the mixed audio from all channels participating in this bridge. - *********************************************************/ -private void buildRecord(String bridgeId, String name, String format, int maxDurationSeconds, int maxSilenceSeconds, String ifExists, boolean beep, String terminateOn) { -reset(); -url = "/bridges/" + bridgeId + "/record"; -method = "POST"; -lParamQuery.add( HttpParam.build( "name", name) ); -lParamQuery.add( HttpParam.build( "format", format) ); -lParamQuery.add( HttpParam.build( "maxDurationSeconds", maxDurationSeconds) ); -lParamQuery.add( HttpParam.build( "maxSilenceSeconds", maxSilenceSeconds) ); -lParamQuery.add( HttpParam.build( "ifExists", ifExists) ); -lParamQuery.add( HttpParam.build( "beep", beep) ); -lParamQuery.add( HttpParam.build( "terminateOn", terminateOn) ); -lE.add( HttpResponse.build( 400, "Invalid parameters") ); -lE.add( HttpResponse.build( 404, "Bridge not found") ); -lE.add( HttpResponse.build( 409, "Bridge is not in a Stasis application; A recording with the same name already exists on the system and can not be overwritten because it is in progress or ifExists=fail") ); -lE.add( HttpResponse.build( 422, "The format specified is unknown on this system") ); -} - -@Override -public LiveRecording record(String bridgeId, String name, String format, int maxDurationSeconds, int maxSilenceSeconds, String ifExists, boolean beep, String terminateOn) throws RestException { -buildRecord(bridgeId, name, format, maxDurationSeconds, maxSilenceSeconds, ifExists, beep, terminateOn); -String json = httpActionSync(); -return deserializeJson( json, LiveRecording_impl_ari_1_0_0.class ); -} - -@Override -public void record(String bridgeId, String name, String format, int maxDurationSeconds, int maxSilenceSeconds, String ifExists, boolean beep, String terminateOn, AriCallback callback) { -buildRecord(bridgeId, name, format, maxDurationSeconds, maxSilenceSeconds, ifExists, beep, terminateOn); -httpActionAsync(callback, LiveRecording_impl_ari_1_0_0.class); -} - -/********************************************************** - * Remove a channel from a bridge - * - * Remove a channel from a bridge. - *********************************************************/ -private void buildRemoveChannel(String bridgeId, String channel) { -reset(); -url = "/bridges/" + bridgeId + "/removeChannel"; -method = "POST"; -lParamQuery.add( HttpParam.build( "channel", channel) ); -lE.add( HttpResponse.build( 400, "Channel not found") ); -lE.add( HttpResponse.build( 404, "Bridge not found") ); -lE.add( HttpResponse.build( 409, "Bridge not in Stasis application") ); -lE.add( HttpResponse.build( 422, "Channel not in this bridge") ); -} - -@Override -public void removeChannel(String bridgeId, String channel) throws RestException { -buildRemoveChannel(bridgeId, channel); -String json = httpActionSync(); -} - -@Override -public void removeChannel(String bridgeId, String channel, AriCallback callback) { -buildRemoveChannel(bridgeId, channel); -httpActionAsync(callback); -} - -/********************************************************** - * - * - * @since ari_1_5_0 - *********************************************************/ -public void create(String type, String bridgeId, String name, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_7_0 - *********************************************************/ -public void createWithId(String type, String bridgeId, String name, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void create(String type, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_5_0 - *********************************************************/ -public void playWithId(String bridgeId, String playbackId, String media, String lang, int offsetms, int skipms, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new bridge or updates an existing one. - * This bridge persists until it has been shut down, or Asterisk has been shut down. - * - * @since ari_1_7_0 - *********************************************************/ -public Bridge createWithId(String type, String bridgeId, String name) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new bridge. - * This bridge persists until it has been shut down, or Asterisk has been shut down. - * - * @since ari_1_5_0 - *********************************************************/ -public Bridge create(String type, String bridgeId, String name) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new bridge. - * This bridge persists until it has been shut down, or Asterisk has been shut down. - * - * @since ari_0_0_1 - *********************************************************/ -public Bridge create(String type) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Start playback of media on a bridge. - * The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.) - * - * @since ari_1_5_0 - *********************************************************/ -public Playback play(String bridgeId, String media, String lang, int offsetms, int skipms, String playbackId) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Start playback of media on a bridge. - * 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.) - * - * @since ari_1_5_0 - *********************************************************/ -public Playback playWithId(String bridgeId, String playbackId, String media, String lang, int offsetms, int skipms) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_5_0 - *********************************************************/ -public void play(String bridgeId, String media, String lang, int offsetms, int skipms, String playbackId, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_5_0 - *********************************************************/ -public void create_or_update_with_id(String type, String bridgeId, String name, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new bridge or updates an existing one. - * This bridge persists until it has been shut down, or Asterisk has been shut down. - * - * @since ari_1_5_0 - *********************************************************/ -public Bridge create_or_update_with_id(String type, String bridgeId, String name) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/actions/ActionChannels_impl_ari_1_0_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/actions/ActionChannels_impl_ari_1_0_0.java deleted file mode 100644 index d373be06..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/actions/ActionChannels_impl_ari_1_0_0.java +++ /dev/null @@ -1,901 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_0_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_0_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionChannels_impl_ari_1_0_0 extends BaseAriAction implements ActionChannels { -/********************************************************** - * Active channels - * - * List all active channels in Asterisk. - *********************************************************/ -private void buildList() { -reset(); -url = "/channels"; -method = "GET"; -} - -@Override -public List list() throws RestException { -buildList(); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void list(AriCallback> callback) { -buildList(); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Active channels - * - * Create a new channel (originate). - * 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. - *********************************************************/ -private void buildOriginate(String endpoint, String extension, String context, long priority, String app, String appArgs, String callerId, int timeout) { -reset(); -url = "/channels"; -method = "POST"; -lParamQuery.add( HttpParam.build( "endpoint", endpoint) ); -lParamQuery.add( HttpParam.build( "extension", extension) ); -lParamQuery.add( HttpParam.build( "context", context) ); -lParamQuery.add( HttpParam.build( "priority", priority) ); -lParamQuery.add( HttpParam.build( "app", app) ); -lParamQuery.add( HttpParam.build( "appArgs", appArgs) ); -lParamQuery.add( HttpParam.build( "callerId", callerId) ); -lParamQuery.add( HttpParam.build( "timeout", timeout) ); -lE.add( HttpResponse.build( 400, "Invalid parameters for originating a channel.") ); -} - -@Override -public Channel originate(String endpoint, String extension, String context, long priority, String app, String appArgs, String callerId, int timeout) throws RestException { -buildOriginate(endpoint, extension, context, priority, app, appArgs, callerId, timeout); -String json = httpActionSync(); -return deserializeJson( json, Channel_impl_ari_1_0_0.class ); -} - -@Override -public void originate(String endpoint, String extension, String context, long priority, String app, String appArgs, String callerId, int timeout, AriCallback callback) { -buildOriginate(endpoint, extension, context, priority, app, appArgs, callerId, timeout); -httpActionAsync(callback, Channel_impl_ari_1_0_0.class); -} - -/********************************************************** - * Active channel - * - * Channel details. - *********************************************************/ -private void buildGet(String channelId) { -reset(); -url = "/channels/" + channelId + ""; -method = "GET"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -} - -@Override -public Channel get(String channelId) throws RestException { -buildGet(channelId); -String json = httpActionSync(); -return deserializeJson( json, Channel_impl_ari_1_0_0.class ); -} - -@Override -public void get(String channelId, AriCallback callback) { -buildGet(channelId); -httpActionAsync(callback, Channel_impl_ari_1_0_0.class); -} - -/********************************************************** - * Active channel - * - * Delete (i.e. hangup) a channel. - *********************************************************/ -private void buildHangup(String channelId, String reason) { -reset(); -url = "/channels/" + channelId + ""; -method = "DELETE"; -lParamQuery.add( HttpParam.build( "reason", reason) ); -lE.add( HttpResponse.build( 400, "Invalid reason for hangup provided") ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -} - -@Override -public void hangup(String channelId, String reason) throws RestException { -buildHangup(channelId, reason); -String json = httpActionSync(); -} - -@Override -public void hangup(String channelId, String reason, AriCallback callback) { -buildHangup(channelId, reason); -httpActionAsync(callback); -} - -/********************************************************** - * Answer a channel - * - * Answer a channel. - *********************************************************/ -private void buildAnswer(String channelId) { -reset(); -url = "/channels/" + channelId + "/answer"; -method = "POST"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void answer(String channelId) throws RestException { -buildAnswer(channelId); -String json = httpActionSync(); -} - -@Override -public void answer(String channelId, AriCallback callback) { -buildAnswer(channelId); -httpActionAsync(callback); -} - -/********************************************************** - * Exit application; continue execution in the dialplan - * - * Exit application; continue execution in the dialplan. - *********************************************************/ -private void buildContinueInDialplan(String channelId, String context, String extension, int priority) { -reset(); -url = "/channels/" + channelId + "/continue"; -method = "POST"; -lParamQuery.add( HttpParam.build( "context", context) ); -lParamQuery.add( HttpParam.build( "extension", extension) ); -lParamQuery.add( HttpParam.build( "priority", priority) ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void continueInDialplan(String channelId, String context, String extension, int priority) throws RestException { -buildContinueInDialplan(channelId, context, extension, priority); -String json = httpActionSync(); -} - -@Override -public void continueInDialplan(String channelId, String context, String extension, int priority, AriCallback callback) { -buildContinueInDialplan(channelId, context, extension, priority); -httpActionAsync(callback); -} - -/********************************************************** - * Send DTMF to a channel - * - * Send provided DTMF to a given channel. - *********************************************************/ -private void buildSendDTMF(String channelId, String dtmf, int before, int between, int duration, int after) { -reset(); -url = "/channels/" + channelId + "/dtmf"; -method = "POST"; -lParamQuery.add( HttpParam.build( "dtmf", dtmf) ); -lParamQuery.add( HttpParam.build( "before", before) ); -lParamQuery.add( HttpParam.build( "between", between) ); -lParamQuery.add( HttpParam.build( "duration", duration) ); -lParamQuery.add( HttpParam.build( "after", after) ); -lE.add( HttpResponse.build( 400, "DTMF is required") ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void sendDTMF(String channelId, String dtmf, int before, int between, int duration, int after) throws RestException { -buildSendDTMF(channelId, dtmf, before, between, duration, after); -String json = httpActionSync(); -} - -@Override -public void sendDTMF(String channelId, String dtmf, int before, int between, int duration, int after, AriCallback callback) { -buildSendDTMF(channelId, dtmf, before, between, duration, after); -httpActionAsync(callback); -} - -/********************************************************** - * Put a channel on hold - * - * Hold a channel. - *********************************************************/ -private void buildHold(String channelId) { -reset(); -url = "/channels/" + channelId + "/hold"; -method = "POST"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void hold(String channelId) throws RestException { -buildHold(channelId); -String json = httpActionSync(); -} - -@Override -public void hold(String channelId, AriCallback callback) { -buildHold(channelId); -httpActionAsync(callback); -} - -/********************************************************** - * Put a channel on hold - * - * Remove a channel from hold. - *********************************************************/ -private void buildUnhold(String channelId) { -reset(); -url = "/channels/" + channelId + "/hold"; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void unhold(String channelId) throws RestException { -buildUnhold(channelId); -String json = httpActionSync(); -} - -@Override -public void unhold(String channelId, AriCallback callback) { -buildUnhold(channelId); -httpActionAsync(callback); -} - -/********************************************************** - * Play music on hold to a channel - * - * Play music on hold to a channel. - * Using media operations such as /play on a channel playing MOH in this manner will suspend MOH without resuming automatically. If continuing music on hold is desired, the stasis application must reinitiate music on hold. - *********************************************************/ -private void buildStartMoh(String channelId, String mohClass) { -reset(); -url = "/channels/" + channelId + "/moh"; -method = "POST"; -lParamQuery.add( HttpParam.build( "mohClass", mohClass) ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void startMoh(String channelId, String mohClass) throws RestException { -buildStartMoh(channelId, mohClass); -String json = httpActionSync(); -} - -@Override -public void startMoh(String channelId, String mohClass, AriCallback callback) { -buildStartMoh(channelId, mohClass); -httpActionAsync(callback); -} - -/********************************************************** - * Play music on hold to a channel - * - * Stop playing music on hold to a channel. - *********************************************************/ -private void buildStopMoh(String channelId) { -reset(); -url = "/channels/" + channelId + "/moh"; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void stopMoh(String channelId) throws RestException { -buildStopMoh(channelId); -String json = httpActionSync(); -} - -@Override -public void stopMoh(String channelId, AriCallback callback) { -buildStopMoh(channelId); -httpActionAsync(callback); -} - -/********************************************************** - * Mute a channel - * - * Mute a channel. - *********************************************************/ -private void buildMute(String channelId, String direction) { -reset(); -url = "/channels/" + channelId + "/mute"; -method = "POST"; -lParamQuery.add( HttpParam.build( "direction", direction) ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void mute(String channelId, String direction) throws RestException { -buildMute(channelId, direction); -String json = httpActionSync(); -} - -@Override -public void mute(String channelId, String direction, AriCallback callback) { -buildMute(channelId, direction); -httpActionAsync(callback); -} - -/********************************************************** - * Mute a channel - * - * Unmute a channel. - *********************************************************/ -private void buildUnmute(String channelId, String direction) { -reset(); -url = "/channels/" + channelId + "/mute"; -method = "DELETE"; -lParamQuery.add( HttpParam.build( "direction", direction) ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void unmute(String channelId, String direction) throws RestException { -buildUnmute(channelId, direction); -String json = httpActionSync(); -} - -@Override -public void unmute(String channelId, String direction, AriCallback callback) { -buildUnmute(channelId, direction); -httpActionAsync(callback); -} - -/********************************************************** - * Play media to a channel - * - * Start playback of media. - * 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.) - *********************************************************/ -private void buildPlay(String channelId, String media, String lang, int offsetms, int skipms) { -reset(); -url = "/channels/" + channelId + "/play"; -method = "POST"; -lParamQuery.add( HttpParam.build( "media", media) ); -lParamQuery.add( HttpParam.build( "lang", lang) ); -lParamQuery.add( HttpParam.build( "offsetms", offsetms) ); -lParamQuery.add( HttpParam.build( "skipms", skipms) ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public Playback play(String channelId, String media, String lang, int offsetms, int skipms) throws RestException { -buildPlay(channelId, media, lang, offsetms, skipms); -String json = httpActionSync(); -return deserializeJson( json, Playback_impl_ari_1_0_0.class ); -} - -@Override -public void play(String channelId, String media, String lang, int offsetms, int skipms, AriCallback callback) { -buildPlay(channelId, media, lang, offsetms, skipms); -httpActionAsync(callback, Playback_impl_ari_1_0_0.class); -} - -/********************************************************** - * Record audio from a channel - * - * Start a recording. - * 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. - *********************************************************/ -private void buildRecord(String channelId, String name, String format, int maxDurationSeconds, int maxSilenceSeconds, String ifExists, boolean beep, String terminateOn) { -reset(); -url = "/channels/" + channelId + "/record"; -method = "POST"; -lParamQuery.add( HttpParam.build( "name", name) ); -lParamQuery.add( HttpParam.build( "format", format) ); -lParamQuery.add( HttpParam.build( "maxDurationSeconds", maxDurationSeconds) ); -lParamQuery.add( HttpParam.build( "maxSilenceSeconds", maxSilenceSeconds) ); -lParamQuery.add( HttpParam.build( "ifExists", ifExists) ); -lParamQuery.add( HttpParam.build( "beep", beep) ); -lParamQuery.add( HttpParam.build( "terminateOn", terminateOn) ); -lE.add( HttpResponse.build( 400, "Invalid parameters") ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "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") ); -lE.add( HttpResponse.build( 422, "The format specified is unknown on this system") ); -} - -@Override -public LiveRecording record(String channelId, String name, String format, int maxDurationSeconds, int maxSilenceSeconds, String ifExists, boolean beep, String terminateOn) throws RestException { -buildRecord(channelId, name, format, maxDurationSeconds, maxSilenceSeconds, ifExists, beep, terminateOn); -String json = httpActionSync(); -return deserializeJson( json, LiveRecording_impl_ari_1_0_0.class ); -} - -@Override -public void record(String channelId, String name, String format, int maxDurationSeconds, int maxSilenceSeconds, String ifExists, boolean beep, String terminateOn, AriCallback callback) { -buildRecord(channelId, name, format, maxDurationSeconds, maxSilenceSeconds, ifExists, beep, terminateOn); -httpActionAsync(callback, LiveRecording_impl_ari_1_0_0.class); -} - -/********************************************************** - * Send a ringing indication to a channel - * - * Indicate ringing to a channel. - *********************************************************/ -private void buildRing(String channelId) { -reset(); -url = "/channels/" + channelId + "/ring"; -method = "POST"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void ring(String channelId) throws RestException { -buildRing(channelId); -String json = httpActionSync(); -} - -@Override -public void ring(String channelId, AriCallback callback) { -buildRing(channelId); -httpActionAsync(callback); -} - -/********************************************************** - * Send a ringing indication to a channel - * - * Stop ringing indication on a channel if locally generated. - *********************************************************/ -private void buildRingStop(String channelId) { -reset(); -url = "/channels/" + channelId + "/ring"; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void ringStop(String channelId) throws RestException { -buildRingStop(channelId); -String json = httpActionSync(); -} - -@Override -public void ringStop(String channelId, AriCallback callback) { -buildRingStop(channelId); -httpActionAsync(callback); -} - -/********************************************************** - * Play silence to a channel - * - * Play silence to a channel. - * Using media operations such as /play on a channel playing silence in this manner will suspend silence without resuming automatically. - *********************************************************/ -private void buildStartSilence(String channelId) { -reset(); -url = "/channels/" + channelId + "/silence"; -method = "POST"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void startSilence(String channelId) throws RestException { -buildStartSilence(channelId); -String json = httpActionSync(); -} - -@Override -public void startSilence(String channelId, AriCallback callback) { -buildStartSilence(channelId); -httpActionAsync(callback); -} - -/********************************************************** - * Play silence to a channel - * - * Stop playing silence to a channel. - *********************************************************/ -private void buildStopSilence(String channelId) { -reset(); -url = "/channels/" + channelId + "/silence"; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void stopSilence(String channelId) throws RestException { -buildStopSilence(channelId); -String json = httpActionSync(); -} - -@Override -public void stopSilence(String channelId, AriCallback callback) { -buildStopSilence(channelId); -httpActionAsync(callback); -} - -/********************************************************** - * Snoop (spy/whisper) on a channel - * - * Start snooping. - * Snoop (spy/whisper) on a specific channel. - *********************************************************/ -private void buildSnoopChannel(String channelId, String spy, String whisper, String app, String appArgs) { -reset(); -url = "/channels/" + channelId + "/snoop"; -method = "POST"; -lParamQuery.add( HttpParam.build( "spy", spy) ); -lParamQuery.add( HttpParam.build( "whisper", whisper) ); -lParamQuery.add( HttpParam.build( "app", app) ); -lParamQuery.add( HttpParam.build( "appArgs", appArgs) ); -lE.add( HttpResponse.build( 400, "Invalid parameters") ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -} - -@Override -public Channel snoopChannel(String channelId, String spy, String whisper, String app, String appArgs) throws RestException { -buildSnoopChannel(channelId, spy, whisper, app, appArgs); -String json = httpActionSync(); -return deserializeJson( json, Channel_impl_ari_1_0_0.class ); -} - -@Override -public void snoopChannel(String channelId, String spy, String whisper, String app, String appArgs, AriCallback callback) { -buildSnoopChannel(channelId, spy, whisper, app, appArgs); -httpActionAsync(callback, Channel_impl_ari_1_0_0.class); -} - -/********************************************************** - * Variables on a channel - * - * Get the value of a channel variable or function. - *********************************************************/ -private void buildGetChannelVar(String channelId, String variable) { -reset(); -url = "/channels/" + channelId + "/variable"; -method = "GET"; -lParamQuery.add( HttpParam.build( "variable", variable) ); -lE.add( HttpResponse.build( 400, "Missing variable parameter.") ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public Variable getChannelVar(String channelId, String variable) throws RestException { -buildGetChannelVar(channelId, variable); -String json = httpActionSync(); -return deserializeJson( json, Variable_impl_ari_1_0_0.class ); -} - -@Override -public void getChannelVar(String channelId, String variable, AriCallback callback) { -buildGetChannelVar(channelId, variable); -httpActionAsync(callback, Variable_impl_ari_1_0_0.class); -} - -/********************************************************** - * Variables on a channel - * - * Set the value of a channel variable or function. - *********************************************************/ -private void buildSetChannelVar(String channelId, String variable, String value) { -reset(); -url = "/channels/" + channelId + "/variable"; -method = "POST"; -lParamQuery.add( HttpParam.build( "variable", variable) ); -lParamQuery.add( HttpParam.build( "value", value) ); -lE.add( HttpResponse.build( 400, "Missing variable parameter.") ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void setChannelVar(String channelId, String variable, String value) throws RestException { -buildSetChannelVar(channelId, variable, value); -String json = httpActionSync(); -} - -@Override -public void setChannelVar(String channelId, String variable, String value, AriCallback callback) { -buildSetChannelVar(channelId, variable, value); -httpActionAsync(callback); -} - -/********************************************************** - * - * - * @since ari_1_5_0 - *********************************************************/ -public void originateWithId(String channelId, String endpoint, String extension, String context, long priority, String app, String appArgs, String callerId, int timeout, Map variables, String otherChannelId, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_10_0 - *********************************************************/ -public void dial(String channelId, String caller, int timeout, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_5_0 - *********************************************************/ -public void playWithId(String channelId, String playbackId, String media, String lang, int offsetms, int skipms, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Dial a created channel. - * - * - * @since ari_1_10_0 - *********************************************************/ -public void dial(String channelId, String caller, int timeout) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_5_0 - *********************************************************/ -public void snoopChannelWithId(String channelId, String snoopId, String spy, String whisper, String app, String appArgs, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_7_0 - *********************************************************/ -public void continueInDialplan(String channelId, String context, String extension, int priority, String label, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_10_0 - *********************************************************/ -public void originateWithId(String channelId, String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String otherChannelId, String originator, String formats, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new channel (originate). - * 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. - * - * @since ari_1_10_0 - *********************************************************/ -public Channel originate(String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String channelId, String otherChannelId, String originator, String formats) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Start playback of media. - * The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.) - * - * @since ari_1_5_0 - *********************************************************/ -public Playback play(String channelId, String media, String lang, int offsetms, int skipms, String playbackId) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Redirect the channel to a different location. - * - * - * @since ari_1_8_0 - *********************************************************/ -public void redirect(String channelId, String endpoint) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_8_0 - *********************************************************/ -public void redirect(String channelId, String endpoint, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Start snooping. - * Snoop (spy/whisper) on a specific channel. - * - * @since ari_1_5_0 - *********************************************************/ -public Channel snoopChannelWithId(String channelId, String snoopId, String spy, String whisper, String app, String appArgs) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_7_0 - *********************************************************/ -public void originate(String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String channelId, String otherChannelId, String originator, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new channel (originate). - * 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. - * - * @since ari_1_7_0 - *********************************************************/ -public Channel originate(String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String channelId, String otherChannelId, String originator) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create channel. - * - * - * @since ari_1_10_0 - *********************************************************/ -public Channel create(String endpoint, String app, String appArgs, String channelId, String otherChannelId, String originator, String formats) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_5_0 - *********************************************************/ -public void snoopChannel(String channelId, String spy, String whisper, String app, String appArgs, String snoopId, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_5_0 - *********************************************************/ -public void play(String channelId, String media, String lang, int offsetms, int skipms, String playbackId, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_5_0 - *********************************************************/ -public void originate(String endpoint, String extension, String context, long priority, String app, String appArgs, String callerId, int timeout, Map variables, String channelId, String otherChannelId, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new channel (originate with id). - * 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. - * - * @since ari_1_5_0 - *********************************************************/ -public Channel originateWithId(String channelId, String endpoint, String extension, String context, long priority, String app, String appArgs, String callerId, int timeout, Map variables, String otherChannelId) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new channel (originate with id). - * 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. - * - * @since ari_1_10_0 - *********************************************************/ -public Channel originateWithId(String channelId, String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String otherChannelId, String originator, String formats) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_7_0 - *********************************************************/ -public void originateWithId(String channelId, String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String otherChannelId, String originator, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_10_0 - *********************************************************/ -public void create(String endpoint, String app, String appArgs, String channelId, String otherChannelId, String originator, String formats, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new channel (originate). - * 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. - * - * @since ari_1_5_0 - *********************************************************/ -public Channel originate(String endpoint, String extension, String context, long priority, String app, String appArgs, String callerId, int timeout, Map variables, String channelId, String otherChannelId) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new channel (originate with id). - * 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. - * - * @since ari_1_7_0 - *********************************************************/ -public Channel originateWithId(String channelId, String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String otherChannelId, String originator) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Start snooping. - * Snoop (spy/whisper) on a specific channel. - * - * @since ari_1_5_0 - *********************************************************/ -public Channel snoopChannel(String channelId, String spy, String whisper, String app, String appArgs, String snoopId) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Exit application{ - throw new UnsupportedOperationException("Method availble from ..."); -}; continue execution in the dialplan. - * - * - * @since ari_1_7_0 - *********************************************************/ -public void continueInDialplan(String channelId, String context, String extension, int priority, String label) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Start playback of media and specify the playbackId. - * 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.) - * - * @since ari_1_5_0 - *********************************************************/ -public Playback playWithId(String channelId, String playbackId, String media, String lang, int offsetms, int skipms) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_10_0 - *********************************************************/ -public void originate(String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String channelId, String otherChannelId, String originator, String formats, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/actions/ActionDeviceStates_impl_ari_1_0_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/actions/ActionDeviceStates_impl_ari_1_0_0.java deleted file mode 100644 index bdb1d057..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/actions/ActionDeviceStates_impl_ari_1_0_0.java +++ /dev/null @@ -1,131 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_0_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_0_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionDeviceStates_impl_ari_1_0_0 extends BaseAriAction implements ActionDeviceStates { -/********************************************************** - * Device states - * - * List all ARI controlled device states. - *********************************************************/ -private void buildList() { -reset(); -url = "/deviceStates"; -method = "GET"; -} - -@Override -public List list() throws RestException { -buildList(); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void list(AriCallback> callback) { -buildList(); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Device state - * - * Retrieve the current state of a device. - *********************************************************/ -private void buildGet(String deviceName) { -reset(); -url = "/deviceStates/" + deviceName + ""; -method = "GET"; -} - -@Override -public DeviceState get(String deviceName) throws RestException { -buildGet(deviceName); -String json = httpActionSync(); -return deserializeJson( json, DeviceState_impl_ari_1_0_0.class ); -} - -@Override -public void get(String deviceName, AriCallback callback) { -buildGet(deviceName); -httpActionAsync(callback, DeviceState_impl_ari_1_0_0.class); -} - -/********************************************************** - * Device state - * - * Change the state of a device controlled by ARI. (Note - implicitly creates the device state). - *********************************************************/ -private void buildUpdate(String deviceName, String deviceState) { -reset(); -url = "/deviceStates/" + deviceName + ""; -method = "PUT"; -lParamQuery.add( HttpParam.build( "deviceState", deviceState) ); -lE.add( HttpResponse.build( 404, "Device name is missing") ); -lE.add( HttpResponse.build( 409, "Uncontrolled device specified") ); -} - -@Override -public void update(String deviceName, String deviceState) throws RestException { -buildUpdate(deviceName, deviceState); -String json = httpActionSync(); -} - -@Override -public void update(String deviceName, String deviceState, AriCallback callback) { -buildUpdate(deviceName, deviceState); -httpActionAsync(callback); -} - -/********************************************************** - * Device state - * - * Destroy a device-state controlled by ARI. - *********************************************************/ -private void buildDelete(String deviceName) { -reset(); -url = "/deviceStates/" + deviceName + ""; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Device name is missing") ); -lE.add( HttpResponse.build( 409, "Uncontrolled device specified") ); -} - -@Override -public void delete(String deviceName) throws RestException { -buildDelete(deviceName); -String json = httpActionSync(); -} - -@Override -public void delete(String deviceName, AriCallback callback) { -buildDelete(deviceName); -httpActionAsync(callback); -} - -/** No missing signatures from interface */ -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/actions/ActionEndpoints_impl_ari_1_0_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/actions/ActionEndpoints_impl_ari_1_0_0.java deleted file mode 100644 index 7c19c7e4..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/actions/ActionEndpoints_impl_ari_1_0_0.java +++ /dev/null @@ -1,144 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_0_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_0_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionEndpoints_impl_ari_1_0_0 extends BaseAriAction implements ActionEndpoints { -/********************************************************** - * Asterisk endpoints - * - * List all endpoints. - *********************************************************/ -private void buildList() { -reset(); -url = "/endpoints"; -method = "GET"; -} - -@Override -public List list() throws RestException { -buildList(); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void list(AriCallback> callback) { -buildList(); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Asterisk endpoints - * - * List available endoints for a given endpoint technology. - *********************************************************/ -private void buildListByTech(String tech) { -reset(); -url = "/endpoints/" + tech + ""; -method = "GET"; -lE.add( HttpResponse.build( 404, "Endpoints not found") ); -} - -@Override -public List listByTech(String tech) throws RestException { -buildListByTech(tech); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void listByTech(String tech, AriCallback> callback) { -buildListByTech(tech); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Single endpoint - * - * Details for an endpoint. - *********************************************************/ -private void buildGet(String tech, String resource) { -reset(); -url = "/endpoints/" + tech + "/" + resource + ""; -method = "GET"; -lE.add( HttpResponse.build( 404, "Endpoints not found") ); -} - -@Override -public Endpoint get(String tech, String resource) throws RestException { -buildGet(tech, resource); -String json = httpActionSync(); -return deserializeJson( json, Endpoint_impl_ari_1_0_0.class ); -} - -@Override -public void get(String tech, String resource, AriCallback callback) { -buildGet(tech, resource); -httpActionAsync(callback, Endpoint_impl_ari_1_0_0.class); -} - -/********************************************************** - * - * - * @since ari_1_5_0 - *********************************************************/ -public void sendMessage(String to, String from, String body, Map variables, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_5_0 - *********************************************************/ -public void sendMessageToEndpoint(String tech, String resource, String from, String body, Map variables, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Send a message to some endpoint in a technology. - * - * - * @since ari_1_5_0 - *********************************************************/ -public void sendMessageToEndpoint(String tech, String resource, String from, String body, Map variables) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Send a message to some technology URI or endpoint. - * - * - * @since ari_1_5_0 - *********************************************************/ -public void sendMessage(String to, String from, String body, Map variables) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/actions/ActionEvents_impl_ari_1_0_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/actions/ActionEvents_impl_ari_1_0_0.java deleted file mode 100644 index 371be715..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/actions/ActionEvents_impl_ari_1_0_0.java +++ /dev/null @@ -1,92 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_0_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_0_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionEvents_impl_ari_1_0_0 extends BaseAriAction implements ActionEvents { -/********************************************************** - * Events from Asterisk to applications - * - * WebSocket connection for events. - *********************************************************/ -private void buildEventWebsocket(String app) { -reset(); -url = "/events"; -method = "GET"; -lParamQuery.add( HttpParam.build( "app", app) ); -wsUpgrade = true; -} - -@Override -public Message eventWebsocket(String app) throws RestException { -throw new RestException("No synchronous operation on WebSocket"); -} - -@Override -public void eventWebsocket(String app, AriCallback callback) { -buildEventWebsocket(app); -httpActionAsync(callback, Message_impl_ari_1_0_0.class); -} - -/********************************************************** - * Generate a user event. - * - * - * @since ari_1_5_0 - *********************************************************/ -public void userEvent(String eventName, String application, String source, Map variables) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_9_0 - *********************************************************/ -public void eventWebsocket(String app, boolean subscribeAll, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_5_0 - *********************************************************/ -public void userEvent(String eventName, String application, String source, Map variables, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * WebSocket connection for events. - * - * - * @since ari_1_9_0 - *********************************************************/ -public Message eventWebsocket(String app, boolean subscribeAll) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/actions/ActionPlaybacks_impl_ari_1_0_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/actions/ActionPlaybacks_impl_ari_1_0_0.java deleted file mode 100644 index 6b2d5f0a..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/actions/ActionPlaybacks_impl_ari_1_0_0.java +++ /dev/null @@ -1,107 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_0_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_0_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionPlaybacks_impl_ari_1_0_0 extends BaseAriAction implements ActionPlaybacks { -/********************************************************** - * Control object for a playback operation. - * - * Get a playback's details. - *********************************************************/ -private void buildGet(String playbackId) { -reset(); -url = "/playbacks/" + playbackId + ""; -method = "GET"; -lE.add( HttpResponse.build( 404, "The playback cannot be found") ); -} - -@Override -public Playback get(String playbackId) throws RestException { -buildGet(playbackId); -String json = httpActionSync(); -return deserializeJson( json, Playback_impl_ari_1_0_0.class ); -} - -@Override -public void get(String playbackId, AriCallback callback) { -buildGet(playbackId); -httpActionAsync(callback, Playback_impl_ari_1_0_0.class); -} - -/********************************************************** - * Control object for a playback operation. - * - * Stop a playback. - *********************************************************/ -private void buildStop(String playbackId) { -reset(); -url = "/playbacks/" + playbackId + ""; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "The playback cannot be found") ); -} - -@Override -public void stop(String playbackId) throws RestException { -buildStop(playbackId); -String json = httpActionSync(); -} - -@Override -public void stop(String playbackId, AriCallback callback) { -buildStop(playbackId); -httpActionAsync(callback); -} - -/********************************************************** - * Control object for a playback operation. - * - * Control a playback. - *********************************************************/ -private void buildControl(String playbackId, String operation) { -reset(); -url = "/playbacks/" + playbackId + "/control"; -method = "POST"; -lParamQuery.add( HttpParam.build( "operation", operation) ); -lE.add( HttpResponse.build( 400, "The provided operation parameter was invalid") ); -lE.add( HttpResponse.build( 404, "The playback cannot be found") ); -lE.add( HttpResponse.build( 409, "The operation cannot be performed in the playback's current state") ); -} - -@Override -public void control(String playbackId, String operation) throws RestException { -buildControl(playbackId, operation); -String json = httpActionSync(); -} - -@Override -public void control(String playbackId, String operation, AriCallback callback) { -buildControl(playbackId, operation); -httpActionAsync(callback); -} - -/** No missing signatures from interface */ -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/actions/ActionRecordings_impl_ari_1_0_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/actions/ActionRecordings_impl_ari_1_0_0.java deleted file mode 100644 index 6b700a59..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/actions/ActionRecordings_impl_ari_1_0_0.java +++ /dev/null @@ -1,317 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_0_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_0_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionRecordings_impl_ari_1_0_0 extends BaseAriAction implements ActionRecordings { -/********************************************************** - * A recording that is in progress - * - * List live recordings. - *********************************************************/ -private void buildGetLive(String recordingName) { -reset(); -url = "/recordings/live/" + recordingName + ""; -method = "GET"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -} - -@Override -public LiveRecording getLive(String recordingName) throws RestException { -buildGetLive(recordingName); -String json = httpActionSync(); -return deserializeJson( json, LiveRecording_impl_ari_1_0_0.class ); -} - -@Override -public void getLive(String recordingName, AriCallback callback) { -buildGetLive(recordingName); -httpActionAsync(callback, LiveRecording_impl_ari_1_0_0.class); -} - -/********************************************************** - * A recording that is in progress - * - * Stop a live recording and discard it. - *********************************************************/ -private void buildCancel(String recordingName) { -reset(); -url = "/recordings/live/" + recordingName + ""; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -} - -@Override -public void cancel(String recordingName) throws RestException { -buildCancel(recordingName); -String json = httpActionSync(); -} - -@Override -public void cancel(String recordingName, AriCallback callback) { -buildCancel(recordingName); -httpActionAsync(callback); -} - -/********************************************************** - * - * - * Mute a live recording. - * Muting a recording suspends silence detection, which will be restarted when the recording is unmuted. - *********************************************************/ -private void buildMute(String recordingName) { -reset(); -url = "/recordings/live/" + recordingName + "/mute"; -method = "POST"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -lE.add( HttpResponse.build( 409, "Recording not in session") ); -} - -@Override -public void mute(String recordingName) throws RestException { -buildMute(recordingName); -String json = httpActionSync(); -} - -@Override -public void mute(String recordingName, AriCallback callback) { -buildMute(recordingName); -httpActionAsync(callback); -} - -/********************************************************** - * - * - * Unmute a live recording. - *********************************************************/ -private void buildUnmute(String recordingName) { -reset(); -url = "/recordings/live/" + recordingName + "/mute"; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -lE.add( HttpResponse.build( 409, "Recording not in session") ); -} - -@Override -public void unmute(String recordingName) throws RestException { -buildUnmute(recordingName); -String json = httpActionSync(); -} - -@Override -public void unmute(String recordingName, AriCallback callback) { -buildUnmute(recordingName); -httpActionAsync(callback); -} - -/********************************************************** - * - * - * Pause a live recording. - * Pausing a recording suspends silence detection, which will be restarted when the recording is unpaused. Paused time is not included in the accounting for maxDurationSeconds. - *********************************************************/ -private void buildPause(String recordingName) { -reset(); -url = "/recordings/live/" + recordingName + "/pause"; -method = "POST"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -lE.add( HttpResponse.build( 409, "Recording not in session") ); -} - -@Override -public void pause(String recordingName) throws RestException { -buildPause(recordingName); -String json = httpActionSync(); -} - -@Override -public void pause(String recordingName, AriCallback callback) { -buildPause(recordingName); -httpActionAsync(callback); -} - -/********************************************************** - * - * - * Unpause a live recording. - *********************************************************/ -private void buildUnpause(String recordingName) { -reset(); -url = "/recordings/live/" + recordingName + "/pause"; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -lE.add( HttpResponse.build( 409, "Recording not in session") ); -} - -@Override -public void unpause(String recordingName) throws RestException { -buildUnpause(recordingName); -String json = httpActionSync(); -} - -@Override -public void unpause(String recordingName, AriCallback callback) { -buildUnpause(recordingName); -httpActionAsync(callback); -} - -/********************************************************** - * - * - * Stop a live recording and store it. - *********************************************************/ -private void buildStop(String recordingName) { -reset(); -url = "/recordings/live/" + recordingName + "/stop"; -method = "POST"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -} - -@Override -public void stop(String recordingName) throws RestException { -buildStop(recordingName); -String json = httpActionSync(); -} - -@Override -public void stop(String recordingName, AriCallback callback) { -buildStop(recordingName); -httpActionAsync(callback); -} - -/********************************************************** - * Recordings - * - * List recordings that are complete. - *********************************************************/ -private void buildListStored() { -reset(); -url = "/recordings/stored"; -method = "GET"; -} - -@Override -public List listStored() throws RestException { -buildListStored(); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void listStored(AriCallback> callback) { -buildListStored(); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Individual recording - * - * Get a stored recording's details. - *********************************************************/ -private void buildGetStored(String recordingName) { -reset(); -url = "/recordings/stored/" + recordingName + ""; -method = "GET"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -} - -@Override -public StoredRecording getStored(String recordingName) throws RestException { -buildGetStored(recordingName); -String json = httpActionSync(); -return deserializeJson( json, StoredRecording_impl_ari_1_0_0.class ); -} - -@Override -public void getStored(String recordingName, AriCallback callback) { -buildGetStored(recordingName); -httpActionAsync(callback, StoredRecording_impl_ari_1_0_0.class); -} - -/********************************************************** - * Individual recording - * - * Delete a stored recording. - *********************************************************/ -private void buildDeleteStored(String recordingName) { -reset(); -url = "/recordings/stored/" + recordingName + ""; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -} - -@Override -public void deleteStored(String recordingName) throws RestException { -buildDeleteStored(recordingName); -String json = httpActionSync(); -} - -@Override -public void deleteStored(String recordingName, AriCallback callback) { -buildDeleteStored(recordingName); -httpActionAsync(callback); -} - -/********************************************************** - * Copy a stored recording. - * - * - * @since ari_1_5_0 - *********************************************************/ -public StoredRecording copyStored(String recordingName, String destinationRecordingName) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_10_0 - *********************************************************/ -public void getStoredFile(String recordingName, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Get the file associated with the stored recording. - * - * - * @since ari_1_10_0 - *********************************************************/ -public byte[] getStoredFile(String recordingName) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_5_0 - *********************************************************/ -public void copyStored(String recordingName, String destinationRecordingName, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/actions/ActionSounds_impl_ari_1_0_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/actions/ActionSounds_impl_ari_1_0_0.java deleted file mode 100644 index a162e6df..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/actions/ActionSounds_impl_ari_1_0_0.java +++ /dev/null @@ -1,82 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_0_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_0_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionSounds_impl_ari_1_0_0 extends BaseAriAction implements ActionSounds { -/********************************************************** - * Sounds - * - * List all sounds. - *********************************************************/ -private void buildList(String lang, String format) { -reset(); -url = "/sounds"; -method = "GET"; -lParamQuery.add( HttpParam.build( "lang", lang) ); -lParamQuery.add( HttpParam.build( "format", format) ); -} - -@Override -public List list(String lang, String format) throws RestException { -buildList(lang, format); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void list(String lang, String format, AriCallback> callback) { -buildList(lang, format); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Individual sound - * - * Get a sound's details. - *********************************************************/ -private void buildGet(String soundId) { -reset(); -url = "/sounds/" + soundId + ""; -method = "GET"; -} - -@Override -public Sound get(String soundId) throws RestException { -buildGet(soundId); -String json = httpActionSync(); -return deserializeJson( json, Sound_impl_ari_1_0_0.class ); -} - -@Override -public void get(String soundId, AriCallback callback) { -buildGet(soundId); -httpActionAsync(callback, Sound_impl_ari_1_0_0.class); -} - -/** No missing signatures from interface */ -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/ApplicationReplaced_impl_ari_1_0_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/ApplicationReplaced_impl_ari_1_0_0.java deleted file mode 100644 index d249ddaa..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/ApplicationReplaced_impl_ari_1_0_0.java +++ /dev/null @@ -1,28 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_0_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that another WebSocket has taken over for an application. - * - * An 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. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ApplicationReplaced_impl_ari_1_0_0 extends Event_impl_ari_1_0_0 implements ApplicationReplaced, java.io.Serializable { -private static final long serialVersionUID = 1L; -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/Application_impl_ari_1_0_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/Application_impl_ari_1_0_0.java deleted file mode 100644 index 05252a02..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/Application_impl_ari_1_0_0.java +++ /dev/null @@ -1,81 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_0_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Details of a Stasis application - * - * Defined in file: applications.json - * Generated by: Model - *********************************************************/ - -public class Application_impl_ari_1_0_0 implements Application, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Id's for bridges subscribed to. */ - private List bridge_ids; - public List getBridge_ids() { - return bridge_ids; - } - - @JsonDeserialize( contentAs=String.class ) - public void setBridge_ids(List val ) { - bridge_ids = val; - } - - /** Id's for channels subscribed to. */ - private List channel_ids; - public List getChannel_ids() { - return channel_ids; - } - - @JsonDeserialize( contentAs=String.class ) - public void setChannel_ids(List val ) { - channel_ids = val; - } - - /** Names of the devices subscribed to. */ - private List device_names; - public List getDevice_names() { - return device_names; - } - - @JsonDeserialize( contentAs=String.class ) - public void setDevice_names(List val ) { - device_names = val; - } - - /** {tech}/{resource} for endpoints subscribed to. */ - private List endpoint_ids; - public List getEndpoint_ids() { - return endpoint_ids; - } - - @JsonDeserialize( contentAs=String.class ) - public void setEndpoint_ids(List val ) { - endpoint_ids = val; - } - - /** Name of this application */ - private String name; - public String getName() { - return name; - } - - @JsonDeserialize( as=String.class ) - public void setName(String val ) { - name = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/AsteriskInfo_impl_ari_1_0_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/AsteriskInfo_impl_ari_1_0_0.java deleted file mode 100644 index b1079833..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/AsteriskInfo_impl_ari_1_0_0.java +++ /dev/null @@ -1,70 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_0_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Asterisk system information - * - * Defined in file: asterisk.json - * Generated by: Model - *********************************************************/ - -public class AsteriskInfo_impl_ari_1_0_0 implements AsteriskInfo, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Info about how Asterisk was built */ - private BuildInfo build; - public BuildInfo getBuild() { - return build; - } - - @JsonDeserialize( as=BuildInfo_impl_ari_1_0_0.class ) - public void setBuild(BuildInfo val ) { - build = val; - } - - /** Info about Asterisk configuration */ - private ConfigInfo config; - public ConfigInfo getConfig() { - return config; - } - - @JsonDeserialize( as=ConfigInfo_impl_ari_1_0_0.class ) - public void setConfig(ConfigInfo val ) { - config = val; - } - - /** Info about Asterisk status */ - private StatusInfo status; - public StatusInfo getStatus() { - return status; - } - - @JsonDeserialize( as=StatusInfo_impl_ari_1_0_0.class ) - public void setStatus(StatusInfo val ) { - status = val; - } - - /** Info about the system running Asterisk */ - private SystemInfo system; - public SystemInfo getSystem() { - return system; - } - - @JsonDeserialize( as=SystemInfo_impl_ari_1_0_0.class ) - public void setSystem(SystemInfo val ) { - system = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/BridgeCreated_impl_ari_1_0_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/BridgeCreated_impl_ari_1_0_0.java deleted file mode 100644 index f7c6bf83..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/BridgeCreated_impl_ari_1_0_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_0_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a bridge has been created. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class BridgeCreated_impl_ari_1_0_0 extends Event_impl_ari_1_0_0 implements BridgeCreated, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Bridge bridge; - public Bridge getBridge() { - return bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_0_0.class ) - public void setBridge(Bridge val ) { - bridge = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/BridgeDestroyed_impl_ari_1_0_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/BridgeDestroyed_impl_ari_1_0_0.java deleted file mode 100644 index b1787e23..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/BridgeDestroyed_impl_ari_1_0_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_0_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a bridge has been destroyed. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class BridgeDestroyed_impl_ari_1_0_0 extends Event_impl_ari_1_0_0 implements BridgeDestroyed, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Bridge bridge; - public Bridge getBridge() { - return bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_0_0.class ) - public void setBridge(Bridge val ) { - bridge = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/BridgeMerged_impl_ari_1_0_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/BridgeMerged_impl_ari_1_0_0.java deleted file mode 100644 index 2df23a07..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/BridgeMerged_impl_ari_1_0_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_0_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that one bridge has merged into another. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class BridgeMerged_impl_ari_1_0_0 extends Event_impl_ari_1_0_0 implements BridgeMerged, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Bridge bridge; - public Bridge getBridge() { - return bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_0_0.class ) - public void setBridge(Bridge val ) { - bridge = val; - } - - /** */ - private Bridge bridge_from; - public Bridge getBridge_from() { - return bridge_from; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_0_0.class ) - public void setBridge_from(Bridge val ) { - bridge_from = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/Bridge_impl_ari_1_0_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/Bridge_impl_ari_1_0_0.java deleted file mode 100644 index ec2f7ba2..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/Bridge_impl_ari_1_0_0.java +++ /dev/null @@ -1,105 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_0_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * The merging of media from one or more channels. - * - * Everyone on the bridge receives the same audio. - * - * Defined in file: bridges.json - * Generated by: Model - *********************************************************/ - -public class Bridge_impl_ari_1_0_0 implements Bridge, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Bridging class */ - private String bridge_class; - public String getBridge_class() { - return bridge_class; - } - - @JsonDeserialize( as=String.class ) - public void setBridge_class(String val ) { - bridge_class = val; - } - - /** Type of bridge technology */ - private String bridge_type; - public String getBridge_type() { - return bridge_type; - } - - @JsonDeserialize( as=String.class ) - public void setBridge_type(String val ) { - bridge_type = val; - } - - /** Ids of channels participating in this bridge */ - private List channels; - public List getChannels() { - return channels; - } - - @JsonDeserialize( contentAs=String.class ) - public void setChannels(List val ) { - channels = val; - } - - /** Entity that created the bridge */ - private String creator; - public String getCreator() { - return creator; - } - - @JsonDeserialize( as=String.class ) - public void setCreator(String val ) { - creator = val; - } - - /** Unique identifier for this bridge */ - private String id; - public String getId() { - return id; - } - - @JsonDeserialize( as=String.class ) - public void setId(String val ) { - id = val; - } - - /** Name the creator gave the bridge */ - private String name; - public String getName() { - return name; - } - - @JsonDeserialize( as=String.class ) - public void setName(String val ) { - name = val; - } - - /** Name of the current bridging technology */ - private String technology; - public String getTechnology() { - return technology; - } - - @JsonDeserialize( as=String.class ) - public void setTechnology(String val ) { - technology = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/BuildInfo_impl_ari_1_0_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/BuildInfo_impl_ari_1_0_0.java deleted file mode 100644 index dba0a3f5..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/BuildInfo_impl_ari_1_0_0.java +++ /dev/null @@ -1,92 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_0_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Info about how Asterisk was built - * - * Defined in file: asterisk.json - * Generated by: Model - *********************************************************/ - -public class BuildInfo_impl_ari_1_0_0 implements BuildInfo, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Date and time when Asterisk was built. */ - private String date; - public String getDate() { - return date; - } - - @JsonDeserialize( as=String.class ) - public void setDate(String val ) { - date = val; - } - - /** Kernel version Asterisk was built on. */ - private String kernel; - public String getKernel() { - return kernel; - } - - @JsonDeserialize( as=String.class ) - public void setKernel(String val ) { - kernel = val; - } - - /** Machine architecture (x86_64, i686, ppc, etc.) */ - private String machine; - public String getMachine() { - return machine; - } - - @JsonDeserialize( as=String.class ) - public void setMachine(String val ) { - machine = val; - } - - /** Compile time options, or empty string if default. */ - private String options; - public String getOptions() { - return options; - } - - @JsonDeserialize( as=String.class ) - public void setOptions(String val ) { - options = val; - } - - /** OS Asterisk was built on. */ - private String os; - public String getOs() { - return os; - } - - @JsonDeserialize( as=String.class ) - public void setOs(String val ) { - os = val; - } - - /** Username that build Asterisk */ - private String user; - public String getUser() { - return user; - } - - @JsonDeserialize( as=String.class ) - public void setUser(String val ) { - user = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/CallerID_impl_ari_1_0_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/CallerID_impl_ari_1_0_0.java deleted file mode 100644 index 94ed7b8c..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/CallerID_impl_ari_1_0_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_0_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Caller identification - * - * Defined in file: channels.json - * Generated by: Model - *********************************************************/ - -public class CallerID_impl_ari_1_0_0 implements CallerID, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private String name; - public String getName() { - return name; - } - - @JsonDeserialize( as=String.class ) - public void setName(String val ) { - name = val; - } - - /** */ - private String number; - public String getNumber() { - return number; - } - - @JsonDeserialize( as=String.class ) - public void setNumber(String val ) { - number = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/ChannelCallerId_impl_ari_1_0_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/ChannelCallerId_impl_ari_1_0_0.java deleted file mode 100644 index b3eb9ac7..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/ChannelCallerId_impl_ari_1_0_0.java +++ /dev/null @@ -1,59 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_0_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Channel changed Caller ID. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelCallerId_impl_ari_1_0_0 extends Event_impl_ari_1_0_0 implements ChannelCallerId, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The integer representation of the Caller Presentation value. */ - private int caller_presentation; - public int getCaller_presentation() { - return caller_presentation; - } - - @JsonDeserialize( as=int.class ) - public void setCaller_presentation(int val ) { - caller_presentation = val; - } - - /** The text representation of the Caller Presentation value. */ - private String caller_presentation_txt; - public String getCaller_presentation_txt() { - return caller_presentation_txt; - } - - @JsonDeserialize( as=String.class ) - public void setCaller_presentation_txt(String val ) { - caller_presentation_txt = val; - } - - /** The channel that changed Caller ID. */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_0_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/ChannelCreated_impl_ari_1_0_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/ChannelCreated_impl_ari_1_0_0.java deleted file mode 100644 index 6c446ecc..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/ChannelCreated_impl_ari_1_0_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_0_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a channel has been created. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelCreated_impl_ari_1_0_0 extends Event_impl_ari_1_0_0 implements ChannelCreated, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_0_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/ChannelDestroyed_impl_ari_1_0_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/ChannelDestroyed_impl_ari_1_0_0.java deleted file mode 100644 index 0c21405a..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/ChannelDestroyed_impl_ari_1_0_0.java +++ /dev/null @@ -1,59 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_0_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a channel has been destroyed. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelDestroyed_impl_ari_1_0_0 extends Event_impl_ari_1_0_0 implements ChannelDestroyed, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Integer representation of the cause of the hangup */ - private int cause; - public int getCause() { - return cause; - } - - @JsonDeserialize( as=int.class ) - public void setCause(int val ) { - cause = val; - } - - /** Text representation of the cause of the hangup */ - private String cause_txt; - public String getCause_txt() { - return cause_txt; - } - - @JsonDeserialize( as=String.class ) - public void setCause_txt(String val ) { - cause_txt = val; - } - - /** */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_0_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/ChannelDialplan_impl_ari_1_0_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/ChannelDialplan_impl_ari_1_0_0.java deleted file mode 100644 index f011699d..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/ChannelDialplan_impl_ari_1_0_0.java +++ /dev/null @@ -1,59 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_0_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Channel changed location in the dialplan. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelDialplan_impl_ari_1_0_0 extends Event_impl_ari_1_0_0 implements ChannelDialplan, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The channel that changed dialplan location. */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_0_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - - /** The application about to be executed. */ - private String dialplan_app; - public String getDialplan_app() { - return dialplan_app; - } - - @JsonDeserialize( as=String.class ) - public void setDialplan_app(String val ) { - dialplan_app = val; - } - - /** The data to be passed to the application. */ - private String dialplan_app_data; - public String getDialplan_app_data() { - return dialplan_app_data; - } - - @JsonDeserialize( as=String.class ) - public void setDialplan_app_data(String val ) { - dialplan_app_data = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/ChannelDtmfReceived_impl_ari_1_0_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/ChannelDtmfReceived_impl_ari_1_0_0.java deleted file mode 100644 index 7a03ea22..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/ChannelDtmfReceived_impl_ari_1_0_0.java +++ /dev/null @@ -1,61 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_0_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * DTMF received on a channel. - * - * This event is sent when the DTMF ends. There is no notification about the start of DTMF - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelDtmfReceived_impl_ari_1_0_0 extends Event_impl_ari_1_0_0 implements ChannelDtmfReceived, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The channel on which DTMF was received */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_0_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - - /** DTMF digit received (0-9, A-E, # or *) */ - private String digit; - public String getDigit() { - return digit; - } - - @JsonDeserialize( as=String.class ) - public void setDigit(String val ) { - digit = val; - } - - /** Number of milliseconds DTMF was received */ - private int duration_ms; - public int getDuration_ms() { - return duration_ms; - } - - @JsonDeserialize( as=int.class ) - public void setDuration_ms(int val ) { - duration_ms = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/ChannelEnteredBridge_impl_ari_1_0_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/ChannelEnteredBridge_impl_ari_1_0_0.java deleted file mode 100644 index db8efac8..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/ChannelEnteredBridge_impl_ari_1_0_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_0_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a channel has entered a bridge. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelEnteredBridge_impl_ari_1_0_0 extends Event_impl_ari_1_0_0 implements ChannelEnteredBridge, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Bridge bridge; - public Bridge getBridge() { - return bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_0_0.class ) - public void setBridge(Bridge val ) { - bridge = val; - } - - /** */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_0_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/ChannelHangupRequest_impl_ari_1_0_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/ChannelHangupRequest_impl_ari_1_0_0.java deleted file mode 100644 index 952f4dae..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/ChannelHangupRequest_impl_ari_1_0_0.java +++ /dev/null @@ -1,59 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_0_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A hangup was requested on the channel. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelHangupRequest_impl_ari_1_0_0 extends Event_impl_ari_1_0_0 implements ChannelHangupRequest, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Integer representation of the cause of the hangup. */ - private int cause; - public int getCause() { - return cause; - } - - @JsonDeserialize( as=int.class ) - public void setCause(int val ) { - cause = val; - } - - /** The channel on which the hangup was requested. */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_0_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - - /** Whether the hangup request was a soft hangup request. */ - private boolean soft; - public boolean getSoft() { - return soft; - } - - @JsonDeserialize( as=boolean.class ) - public void setSoft(boolean val ) { - soft = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/ChannelLeftBridge_impl_ari_1_0_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/ChannelLeftBridge_impl_ari_1_0_0.java deleted file mode 100644 index 12908cc1..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/ChannelLeftBridge_impl_ari_1_0_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_0_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a channel has left a bridge. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelLeftBridge_impl_ari_1_0_0 extends Event_impl_ari_1_0_0 implements ChannelLeftBridge, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Bridge bridge; - public Bridge getBridge() { - return bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_0_0.class ) - public void setBridge(Bridge val ) { - bridge = val; - } - - /** */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_0_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/ChannelStateChange_impl_ari_1_0_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/ChannelStateChange_impl_ari_1_0_0.java deleted file mode 100644 index b5488969..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/ChannelStateChange_impl_ari_1_0_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_0_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification of a channel's state change. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelStateChange_impl_ari_1_0_0 extends Event_impl_ari_1_0_0 implements ChannelStateChange, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_0_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/ChannelUserevent_impl_ari_1_0_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/ChannelUserevent_impl_ari_1_0_0.java deleted file mode 100644 index fb3979a7..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/ChannelUserevent_impl_ari_1_0_0.java +++ /dev/null @@ -1,94 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_0_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * User-generated event with additional user-defined fields in the object. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelUserevent_impl_ari_1_0_0 extends Event_impl_ari_1_0_0 implements ChannelUserevent, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The channel that signaled the user event. */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_0_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - - /** The name of the user event. */ - private String eventname; - public String getEventname() { - return eventname; - } - - @JsonDeserialize( as=String.class ) - public void setEventname(String val ) { - eventname = val; - } - - /** Custom Userevent data */ - private String userevent; - public String getUserevent() { - return userevent; - } - - @JsonDeserialize( as=String.class ) - public void setUserevent(String val ) { - userevent = val; - } - -/********************************************************** - * A bridge that is signaled with the user event. - * - * @since ari_1_5_0 - *********************************************************/ - public void setBridge(Bridge val ){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * A endpoint that is signaled with the user event. - * - * @since ari_1_5_0 - *********************************************************/ - public void setEndpoint(Endpoint val ){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * A endpoint that is signaled with the user event. - * - * @since ari_1_5_0 - *********************************************************/ - public Endpoint getEndpoint(){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * A bridge that is signaled with the user event. - * - * @since ari_1_5_0 - *********************************************************/ - public Bridge getBridge(){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/ChannelVarset_impl_ari_1_0_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/ChannelVarset_impl_ari_1_0_0.java deleted file mode 100644 index 4506519c..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/ChannelVarset_impl_ari_1_0_0.java +++ /dev/null @@ -1,61 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_0_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Channel variable changed. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelVarset_impl_ari_1_0_0 extends Event_impl_ari_1_0_0 implements ChannelVarset, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The channel on which the variable was set. - -If missing, the variable is a global variable. */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_0_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - - /** The new value of the variable. */ - private String value; - public String getValue() { - return value; - } - - @JsonDeserialize( as=String.class ) - public void setValue(String val ) { - value = val; - } - - /** The variable that changed. */ - private String variable; - public String getVariable() { - return variable; - } - - @JsonDeserialize( as=String.class ) - public void setVariable(String val ) { - variable = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/Channel_impl_ari_1_0_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/Channel_impl_ari_1_0_0.java deleted file mode 100644 index 9d15cd36..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/Channel_impl_ari_1_0_0.java +++ /dev/null @@ -1,133 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_0_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A specific communication connection between Asterisk and an Endpoint. - * - * Defined in file: channels.json - * Generated by: Model - *********************************************************/ - -public class Channel_impl_ari_1_0_0 implements Channel, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private String accountcode; - public String getAccountcode() { - return accountcode; - } - - @JsonDeserialize( as=String.class ) - public void setAccountcode(String val ) { - accountcode = val; - } - - /** */ - private CallerID caller; - public CallerID getCaller() { - return caller; - } - - @JsonDeserialize( as=CallerID_impl_ari_1_0_0.class ) - public void setCaller(CallerID val ) { - caller = val; - } - - /** */ - private CallerID connected; - public CallerID getConnected() { - return connected; - } - - @JsonDeserialize( as=CallerID_impl_ari_1_0_0.class ) - public void setConnected(CallerID val ) { - connected = val; - } - - /** Timestamp when channel was created */ - private Date creationtime; - public Date getCreationtime() { - return creationtime; - } - - @JsonDeserialize( as=Date.class ) - public void setCreationtime(Date val ) { - creationtime = val; - } - - /** Current location in the dialplan */ - private DialplanCEP dialplan; - public DialplanCEP getDialplan() { - return dialplan; - } - - @JsonDeserialize( as=DialplanCEP_impl_ari_1_0_0.class ) - public void setDialplan(DialplanCEP val ) { - dialplan = val; - } - - /** Unique identifier of the channel. - -This is the same as the Uniqueid field in AMI. */ - private String id; - public String getId() { - return id; - } - - @JsonDeserialize( as=String.class ) - public void setId(String val ) { - id = val; - } - - /** Name of the channel (i.e. SIP/foo-0000a7e3) */ - private String name; - public String getName() { - return name; - } - - @JsonDeserialize( as=String.class ) - public void setName(String val ) { - name = val; - } - - /** */ - private String state; - public String getState() { - return state; - } - - @JsonDeserialize( as=String.class ) - public void setState(String val ) { - state = val; - } - -/********************************************************** - * The default spoken language - * - * @since ari_1_7_0 - *********************************************************/ - public String getLanguage(){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * The default spoken language - * - * @since ari_1_7_0 - *********************************************************/ - public void setLanguage(String val ){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/ConfigInfo_impl_ari_1_0_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/ConfigInfo_impl_ari_1_0_0.java deleted file mode 100644 index 2664e39f..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/ConfigInfo_impl_ari_1_0_0.java +++ /dev/null @@ -1,92 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_0_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Info about Asterisk configuration - * - * Defined in file: asterisk.json - * Generated by: Model - *********************************************************/ - -public class ConfigInfo_impl_ari_1_0_0 implements ConfigInfo, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Default language for media playback. */ - private String default_language; - public String getDefault_language() { - return default_language; - } - - @JsonDeserialize( as=String.class ) - public void setDefault_language(String val ) { - default_language = val; - } - - /** Maximum number of simultaneous channels. */ - private int max_channels; - public int getMax_channels() { - return max_channels; - } - - @JsonDeserialize( as=int.class ) - public void setMax_channels(int val ) { - max_channels = val; - } - - /** Maximum load avg on system. */ - private double max_load; - public double getMax_load() { - return max_load; - } - - @JsonDeserialize( as=double.class ) - public void setMax_load(double val ) { - max_load = val; - } - - /** Maximum number of open file handles (files, sockets). */ - private int max_open_files; - public int getMax_open_files() { - return max_open_files; - } - - @JsonDeserialize( as=int.class ) - public void setMax_open_files(int val ) { - max_open_files = val; - } - - /** Asterisk system name. */ - private String name; - public String getName() { - return name; - } - - @JsonDeserialize( as=String.class ) - public void setName(String val ) { - name = val; - } - - /** Effective user/group id for running Asterisk. */ - private SetId setid; - public SetId getSetid() { - return setid; - } - - @JsonDeserialize( as=SetId_impl_ari_1_0_0.class ) - public void setSetid(SetId val ) { - setid = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/DeviceStateChanged_impl_ari_1_0_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/DeviceStateChanged_impl_ari_1_0_0.java deleted file mode 100644 index d6f4bcea..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/DeviceStateChanged_impl_ari_1_0_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_0_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a device state has changed. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class DeviceStateChanged_impl_ari_1_0_0 extends Event_impl_ari_1_0_0 implements DeviceStateChanged, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Device state object */ - private DeviceState device_state; - public DeviceState getDevice_state() { - return device_state; - } - - @JsonDeserialize( as=DeviceState_impl_ari_1_0_0.class ) - public void setDevice_state(DeviceState val ) { - device_state = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/DeviceState_impl_ari_1_0_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/DeviceState_impl_ari_1_0_0.java deleted file mode 100644 index fe80b84e..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/DeviceState_impl_ari_1_0_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_0_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Represents the state of a device. - * - * Defined in file: deviceStates.json - * Generated by: Model - *********************************************************/ - -public class DeviceState_impl_ari_1_0_0 implements DeviceState, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Name of the device. */ - private String name; - public String getName() { - return name; - } - - @JsonDeserialize( as=String.class ) - public void setName(String val ) { - name = val; - } - - /** Device's state */ - private String state; - public String getState() { - return state; - } - - @JsonDeserialize( as=String.class ) - public void setState(String val ) { - state = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/Dial_impl_ari_1_0_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/Dial_impl_ari_1_0_0.java deleted file mode 100644 index 325f92b9..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/Dial_impl_ari_1_0_0.java +++ /dev/null @@ -1,92 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_0_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Dialing state has changed. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class Dial_impl_ari_1_0_0 extends Event_impl_ari_1_0_0 implements Dial, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The calling channel. */ - private Channel caller; - public Channel getCaller() { - return caller; - } - - @JsonDeserialize( as=Channel_impl_ari_1_0_0.class ) - public void setCaller(Channel val ) { - caller = val; - } - - /** Current status of the dialing attempt to the peer. */ - private String dialstatus; - public String getDialstatus() { - return dialstatus; - } - - @JsonDeserialize( as=String.class ) - public void setDialstatus(String val ) { - dialstatus = val; - } - - /** The dial string for calling the peer channel. */ - private String dialstring; - public String getDialstring() { - return dialstring; - } - - @JsonDeserialize( as=String.class ) - public void setDialstring(String val ) { - dialstring = val; - } - - /** Forwarding target requested by the original dialed channel. */ - private String forward; - public String getForward() { - return forward; - } - - @JsonDeserialize( as=String.class ) - public void setForward(String val ) { - forward = val; - } - - /** Channel that the caller has been forwarded to. */ - private Channel forwarded; - public Channel getForwarded() { - return forwarded; - } - - @JsonDeserialize( as=Channel_impl_ari_1_0_0.class ) - public void setForwarded(Channel val ) { - forwarded = val; - } - - /** The dialed channel. */ - private Channel peer; - public Channel getPeer() { - return peer; - } - - @JsonDeserialize( as=Channel_impl_ari_1_0_0.class ) - public void setPeer(Channel val ) { - peer = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/Dialed_impl_ari_1_0_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/Dialed_impl_ari_1_0_0.java deleted file mode 100644 index 3153186a..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/Dialed_impl_ari_1_0_0.java +++ /dev/null @@ -1,26 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_0_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Dialed channel information. - * - * Defined in file: channels.json - * Generated by: Model - *********************************************************/ - -public class Dialed_impl_ari_1_0_0 implements Dialed, java.io.Serializable { -private static final long serialVersionUID = 1L; -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/DialplanCEP_impl_ari_1_0_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/DialplanCEP_impl_ari_1_0_0.java deleted file mode 100644 index 3f60aa94..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/DialplanCEP_impl_ari_1_0_0.java +++ /dev/null @@ -1,59 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_0_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Dialplan location (context/extension/priority) - * - * Defined in file: channels.json - * Generated by: Model - *********************************************************/ - -public class DialplanCEP_impl_ari_1_0_0 implements DialplanCEP, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Context in the dialplan */ - private String context; - public String getContext() { - return context; - } - - @JsonDeserialize( as=String.class ) - public void setContext(String val ) { - context = val; - } - - /** Extension in the dialplan */ - private String exten; - public String getExten() { - return exten; - } - - @JsonDeserialize( as=String.class ) - public void setExten(String val ) { - exten = val; - } - - /** Priority in the dialplan */ - private long priority; - public long getPriority() { - return priority; - } - - @JsonDeserialize( as=long.class ) - public void setPriority(long val ) { - priority = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/EndpointStateChange_impl_ari_1_0_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/EndpointStateChange_impl_ari_1_0_0.java deleted file mode 100644 index c93e6f54..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/EndpointStateChange_impl_ari_1_0_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_0_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Endpoint state changed. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class EndpointStateChange_impl_ari_1_0_0 extends Event_impl_ari_1_0_0 implements EndpointStateChange, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Endpoint endpoint; - public Endpoint getEndpoint() { - return endpoint; - } - - @JsonDeserialize( as=Endpoint_impl_ari_1_0_0.class ) - public void setEndpoint(Endpoint val ) { - endpoint = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/Endpoint_impl_ari_1_0_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/Endpoint_impl_ari_1_0_0.java deleted file mode 100644 index 66cea54e..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/Endpoint_impl_ari_1_0_0.java +++ /dev/null @@ -1,72 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_0_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * An external device that may offer/accept calls to/from Asterisk. - * - * Unlike most resources, which have a single unique identifier, an endpoint is uniquely identified by the technology/resource pair. - * - * Defined in file: endpoints.json - * Generated by: Model - *********************************************************/ - -public class Endpoint_impl_ari_1_0_0 implements Endpoint, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Id's of channels associated with this endpoint */ - private List channel_ids; - public List getChannel_ids() { - return channel_ids; - } - - @JsonDeserialize( contentAs=String.class ) - public void setChannel_ids(List val ) { - channel_ids = val; - } - - /** Identifier of the endpoint, specific to the given technology. */ - private String resource; - public String getResource() { - return resource; - } - - @JsonDeserialize( as=String.class ) - public void setResource(String val ) { - resource = val; - } - - /** Endpoint's state */ - private String state; - public String getState() { - return state; - } - - @JsonDeserialize( as=String.class ) - public void setState(String val ) { - state = val; - } - - /** Technology of the endpoint */ - private String technology; - public String getTechnology() { - return technology; - } - - @JsonDeserialize( as=String.class ) - public void setTechnology(String val ) { - technology = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/Event_impl_ari_1_0_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/Event_impl_ari_1_0_0.java deleted file mode 100644 index 04c2f024..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/Event_impl_ari_1_0_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_0_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Base type for asynchronous events from Asterisk. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class Event_impl_ari_1_0_0 extends Message_impl_ari_1_0_0 implements Event, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Name of the application receiving the event. */ - private String application; - public String getApplication() { - return application; - } - - @JsonDeserialize( as=String.class ) - public void setApplication(String val ) { - application = val; - } - - /** Time at which this event was created. */ - private Date timestamp; - public Date getTimestamp() { - return timestamp; - } - - @JsonDeserialize( as=Date.class ) - public void setTimestamp(Date val ) { - timestamp = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/FormatLangPair_impl_ari_1_0_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/FormatLangPair_impl_ari_1_0_0.java deleted file mode 100644 index 3db8b437..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/FormatLangPair_impl_ari_1_0_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_0_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Identifies the format and language of a sound file - * - * Defined in file: sounds.json - * Generated by: Model - *********************************************************/ - -public class FormatLangPair_impl_ari_1_0_0 implements FormatLangPair, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private String format; - public String getFormat() { - return format; - } - - @JsonDeserialize( as=String.class ) - public void setFormat(String val ) { - format = val; - } - - /** */ - private String language; - public String getLanguage() { - return language; - } - - @JsonDeserialize( as=String.class ) - public void setLanguage(String val ) { - language = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/LiveRecording_impl_ari_1_0_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/LiveRecording_impl_ari_1_0_0.java deleted file mode 100644 index c0d227ac..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/LiveRecording_impl_ari_1_0_0.java +++ /dev/null @@ -1,141 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_0_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A recording that is in progress - * - * Defined in file: recordings.json - * Generated by: Model - *********************************************************/ - -public class LiveRecording_impl_ari_1_0_0 implements LiveRecording, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Cause for recording failure if failed */ - private String cause; - public String getCause() { - return cause; - } - - @JsonDeserialize( as=String.class ) - public void setCause(String val ) { - cause = val; - } - - /** */ - private String format; - public String getFormat() { - return format; - } - - @JsonDeserialize( as=String.class ) - public void setFormat(String val ) { - format = val; - } - - /** Base name for the recording */ - private String name; - public String getName() { - return name; - } - - @JsonDeserialize( as=String.class ) - public void setName(String val ) { - name = val; - } - - /** */ - private String state; - public String getState() { - return state; - } - - @JsonDeserialize( as=String.class ) - public void setState(String val ) { - state = val; - } - -/********************************************************** - * Duration of silence, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds. - * - * @since ari_1_5_0 - *********************************************************/ - public int getSilence_duration(){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * URI for the channel or bridge being recorded - * - * @since ari_1_5_0 - *********************************************************/ - public void setTarget_uri(String val ){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * URI for the channel or bridge being recorded - * - * @since ari_1_5_0 - *********************************************************/ - public String getTarget_uri(){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Duration in seconds of the recording - * - * @since ari_1_5_0 - *********************************************************/ - public void setDuration(int val ){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Duration of talking, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds. - * - * @since ari_1_5_0 - *********************************************************/ - public void setTalking_duration(int val ){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Duration in seconds of the recording - * - * @since ari_1_5_0 - *********************************************************/ - public int getDuration(){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Duration of talking, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds. - * - * @since ari_1_5_0 - *********************************************************/ - public int getTalking_duration(){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Duration of silence, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds. - * - * @since ari_1_5_0 - *********************************************************/ - public void setSilence_duration(int val ){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/Message_impl_ari_1_0_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/Message_impl_ari_1_0_0.java deleted file mode 100644 index 185b0552..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/Message_impl_ari_1_0_0.java +++ /dev/null @@ -1,70 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_0_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonSubTypes.Type; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Base type for errors and events - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") - @JsonSubTypes({ @Type(value = MissingParams_impl_ari_1_0_0.class, name = "MissingParams") -, @Type(value = Event_impl_ari_1_0_0.class, name = "Event") -, @Type(value = DeviceStateChanged_impl_ari_1_0_0.class, name = "DeviceStateChanged") -, @Type(value = PlaybackStarted_impl_ari_1_0_0.class, name = "PlaybackStarted") -, @Type(value = PlaybackFinished_impl_ari_1_0_0.class, name = "PlaybackFinished") -, @Type(value = RecordingStarted_impl_ari_1_0_0.class, name = "RecordingStarted") -, @Type(value = RecordingFinished_impl_ari_1_0_0.class, name = "RecordingFinished") -, @Type(value = RecordingFailed_impl_ari_1_0_0.class, name = "RecordingFailed") -, @Type(value = ApplicationReplaced_impl_ari_1_0_0.class, name = "ApplicationReplaced") -, @Type(value = BridgeCreated_impl_ari_1_0_0.class, name = "BridgeCreated") -, @Type(value = BridgeDestroyed_impl_ari_1_0_0.class, name = "BridgeDestroyed") -, @Type(value = BridgeMerged_impl_ari_1_0_0.class, name = "BridgeMerged") -, @Type(value = ChannelCreated_impl_ari_1_0_0.class, name = "ChannelCreated") -, @Type(value = ChannelDestroyed_impl_ari_1_0_0.class, name = "ChannelDestroyed") -, @Type(value = ChannelEnteredBridge_impl_ari_1_0_0.class, name = "ChannelEnteredBridge") -, @Type(value = ChannelLeftBridge_impl_ari_1_0_0.class, name = "ChannelLeftBridge") -, @Type(value = ChannelStateChange_impl_ari_1_0_0.class, name = "ChannelStateChange") -, @Type(value = ChannelDtmfReceived_impl_ari_1_0_0.class, name = "ChannelDtmfReceived") -, @Type(value = ChannelDialplan_impl_ari_1_0_0.class, name = "ChannelDialplan") -, @Type(value = ChannelCallerId_impl_ari_1_0_0.class, name = "ChannelCallerId") -, @Type(value = ChannelUserevent_impl_ari_1_0_0.class, name = "ChannelUserevent") -, @Type(value = ChannelHangupRequest_impl_ari_1_0_0.class, name = "ChannelHangupRequest") -, @Type(value = ChannelVarset_impl_ari_1_0_0.class, name = "ChannelVarset") -, @Type(value = EndpointStateChange_impl_ari_1_0_0.class, name = "EndpointStateChange") -, @Type(value = Dial_impl_ari_1_0_0.class, name = "Dial") -, @Type(value = StasisEnd_impl_ari_1_0_0.class, name = "StasisEnd") -, @Type(value = StasisStart_impl_ari_1_0_0.class, name = "StasisStart") - }) - - -public class Message_impl_ari_1_0_0 implements Message, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Indicates the type of this message. */ - private String type; - public String getType() { - return type; - } - - @JsonDeserialize( as=String.class ) - public void setType(String val ) { - type = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/MissingParams_impl_ari_1_0_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/MissingParams_impl_ari_1_0_0.java deleted file mode 100644 index 7dd1d53f..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/MissingParams_impl_ari_1_0_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_0_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Error event sent when required params are missing. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class MissingParams_impl_ari_1_0_0 extends Message_impl_ari_1_0_0 implements MissingParams, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** A list of the missing parameters */ - private List params; - public List getParams() { - return params; - } - - @JsonDeserialize( contentAs=String.class ) - public void setParams(List val ) { - params = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/PlaybackFinished_impl_ari_1_0_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/PlaybackFinished_impl_ari_1_0_0.java deleted file mode 100644 index 2e9ecd54..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/PlaybackFinished_impl_ari_1_0_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_0_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Event showing the completion of a media playback operation. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class PlaybackFinished_impl_ari_1_0_0 extends Event_impl_ari_1_0_0 implements PlaybackFinished, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Playback control object */ - private Playback playback; - public Playback getPlayback() { - return playback; - } - - @JsonDeserialize( as=Playback_impl_ari_1_0_0.class ) - public void setPlayback(Playback val ) { - playback = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/PlaybackStarted_impl_ari_1_0_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/PlaybackStarted_impl_ari_1_0_0.java deleted file mode 100644 index c06d0385..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/PlaybackStarted_impl_ari_1_0_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_0_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Event showing the start of a media playback operation. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class PlaybackStarted_impl_ari_1_0_0 extends Event_impl_ari_1_0_0 implements PlaybackStarted, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Playback control object */ - private Playback playback; - public Playback getPlayback() { - return playback; - } - - @JsonDeserialize( as=Playback_impl_ari_1_0_0.class ) - public void setPlayback(Playback val ) { - playback = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/Playback_impl_ari_1_0_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/Playback_impl_ari_1_0_0.java deleted file mode 100644 index f2ec2231..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/Playback_impl_ari_1_0_0.java +++ /dev/null @@ -1,98 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_0_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Object representing the playback of media to a channel - * - * Defined in file: playbacks.json - * Generated by: Model - *********************************************************/ - -public class Playback_impl_ari_1_0_0 implements Playback, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** ID for this playback operation */ - private String id; - public String getId() { - return id; - } - - @JsonDeserialize( as=String.class ) - public void setId(String val ) { - id = val; - } - - /** For media types that support multiple languages, the language requested for playback. */ - private String language; - public String getLanguage() { - return language; - } - - @JsonDeserialize( as=String.class ) - public void setLanguage(String val ) { - language = val; - } - - /** URI for the media to play back. */ - private String media_uri; - public String getMedia_uri() { - return media_uri; - } - - @JsonDeserialize( as=String.class ) - public void setMedia_uri(String val ) { - media_uri = val; - } - - /** Current state of the playback operation. */ - private String state; - public String getState() { - return state; - } - - @JsonDeserialize( as=String.class ) - public void setState(String val ) { - state = val; - } - - /** URI for the channel or bridge to play the media on */ - private String target_uri; - public String getTarget_uri() { - return target_uri; - } - - @JsonDeserialize( as=String.class ) - public void setTarget_uri(String val ) { - target_uri = val; - } - -/********************************************************** - * If a list of URIs is being played, the next media URI to be played back. - * - * @since ari_1_10_0 - *********************************************************/ - public void setNext_media_uri(String val ){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * If a list of URIs is being played, the next media URI to be played back. - * - * @since ari_1_10_0 - *********************************************************/ - public String getNext_media_uri(){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/RecordingFailed_impl_ari_1_0_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/RecordingFailed_impl_ari_1_0_0.java deleted file mode 100644 index cf189602..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/RecordingFailed_impl_ari_1_0_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_0_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Event showing failure of a recording operation. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class RecordingFailed_impl_ari_1_0_0 extends Event_impl_ari_1_0_0 implements RecordingFailed, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Recording control object */ - private LiveRecording recording; - public LiveRecording getRecording() { - return recording; - } - - @JsonDeserialize( as=LiveRecording_impl_ari_1_0_0.class ) - public void setRecording(LiveRecording val ) { - recording = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/RecordingFinished_impl_ari_1_0_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/RecordingFinished_impl_ari_1_0_0.java deleted file mode 100644 index 760f1d45..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/RecordingFinished_impl_ari_1_0_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_0_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Event showing the completion of a recording operation. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class RecordingFinished_impl_ari_1_0_0 extends Event_impl_ari_1_0_0 implements RecordingFinished, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Recording control object */ - private LiveRecording recording; - public LiveRecording getRecording() { - return recording; - } - - @JsonDeserialize( as=LiveRecording_impl_ari_1_0_0.class ) - public void setRecording(LiveRecording val ) { - recording = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/RecordingStarted_impl_ari_1_0_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/RecordingStarted_impl_ari_1_0_0.java deleted file mode 100644 index 6e59d77a..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/RecordingStarted_impl_ari_1_0_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_0_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Event showing the start of a recording operation. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class RecordingStarted_impl_ari_1_0_0 extends Event_impl_ari_1_0_0 implements RecordingStarted, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Recording control object */ - private LiveRecording recording; - public LiveRecording getRecording() { - return recording; - } - - @JsonDeserialize( as=LiveRecording_impl_ari_1_0_0.class ) - public void setRecording(LiveRecording val ) { - recording = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/SetId_impl_ari_1_0_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/SetId_impl_ari_1_0_0.java deleted file mode 100644 index 3c89dd31..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/SetId_impl_ari_1_0_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_0_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Effective user/group id - * - * Defined in file: asterisk.json - * Generated by: Model - *********************************************************/ - -public class SetId_impl_ari_1_0_0 implements SetId, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Effective group id. */ - private String group; - public String getGroup() { - return group; - } - - @JsonDeserialize( as=String.class ) - public void setGroup(String val ) { - group = val; - } - - /** Effective user id. */ - private String user; - public String getUser() { - return user; - } - - @JsonDeserialize( as=String.class ) - public void setUser(String val ) { - user = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/Sound_impl_ari_1_0_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/Sound_impl_ari_1_0_0.java deleted file mode 100644 index 8505d73b..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/Sound_impl_ari_1_0_0.java +++ /dev/null @@ -1,59 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_0_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A media file that may be played back. - * - * Defined in file: sounds.json - * Generated by: Model - *********************************************************/ - -public class Sound_impl_ari_1_0_0 implements Sound, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The formats and languages in which this sound is available. */ - private List formats; - public List getFormats() { - return formats; - } - - @JsonDeserialize( contentAs=FormatLangPair_impl_ari_1_0_0.class ) - public void setFormats(List val ) { - formats = val; - } - - /** Sound's identifier. */ - private String id; - public String getId() { - return id; - } - - @JsonDeserialize( as=String.class ) - public void setId(String val ) { - id = val; - } - - /** Text description of the sound, usually the words spoken. */ - private String text; - public String getText() { - return text; - } - - @JsonDeserialize( as=String.class ) - public void setText(String val ) { - text = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/StasisEnd_impl_ari_1_0_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/StasisEnd_impl_ari_1_0_0.java deleted file mode 100644 index aad2ac88..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/StasisEnd_impl_ari_1_0_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_0_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a channel has left a Stasis application. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class StasisEnd_impl_ari_1_0_0 extends Event_impl_ari_1_0_0 implements StasisEnd, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_0_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/StasisStart_impl_ari_1_0_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/StasisStart_impl_ari_1_0_0.java deleted file mode 100644 index 9b5e78dd..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/StasisStart_impl_ari_1_0_0.java +++ /dev/null @@ -1,65 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_0_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a channel has entered a Stasis application. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class StasisStart_impl_ari_1_0_0 extends Event_impl_ari_1_0_0 implements StasisStart, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Arguments to the application */ - private List args; - public List getArgs() { - return args; - } - - @JsonDeserialize( contentAs=String.class ) - public void setArgs(List val ) { - args = val; - } - - /** */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_0_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/********************************************************** - * - * - * @since ari_1_5_0 - *********************************************************/ - public void setReplace_channel(Channel val ){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_5_0 - *********************************************************/ - public Channel getReplace_channel(){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/StatusInfo_impl_ari_1_0_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/StatusInfo_impl_ari_1_0_0.java deleted file mode 100644 index b246d476..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/StatusInfo_impl_ari_1_0_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_0_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Info about Asterisk status - * - * Defined in file: asterisk.json - * Generated by: Model - *********************************************************/ - -public class StatusInfo_impl_ari_1_0_0 implements StatusInfo, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Time when Asterisk was last reloaded. */ - private Date last_reload_time; - public Date getLast_reload_time() { - return last_reload_time; - } - - @JsonDeserialize( as=Date.class ) - public void setLast_reload_time(Date val ) { - last_reload_time = val; - } - - /** Time when Asterisk was started. */ - private Date startup_time; - public Date getStartup_time() { - return startup_time; - } - - @JsonDeserialize( as=Date.class ) - public void setStartup_time(Date val ) { - startup_time = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/StoredRecording_impl_ari_1_0_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/StoredRecording_impl_ari_1_0_0.java deleted file mode 100644 index 89045ff4..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/StoredRecording_impl_ari_1_0_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_0_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A past recording that may be played back. - * - * Defined in file: recordings.json - * Generated by: Model - *********************************************************/ - -public class StoredRecording_impl_ari_1_0_0 implements StoredRecording, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private String format; - public String getFormat() { - return format; - } - - @JsonDeserialize( as=String.class ) - public void setFormat(String val ) { - format = val; - } - - /** */ - private String name; - public String getName() { - return name; - } - - @JsonDeserialize( as=String.class ) - public void setName(String val ) { - name = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/SystemInfo_impl_ari_1_0_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/SystemInfo_impl_ari_1_0_0.java deleted file mode 100644 index f54c78b7..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/SystemInfo_impl_ari_1_0_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_0_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Info about Asterisk - * - * Defined in file: asterisk.json - * Generated by: Model - *********************************************************/ - -public class SystemInfo_impl_ari_1_0_0 implements SystemInfo, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private String entity_id; - public String getEntity_id() { - return entity_id; - } - - @JsonDeserialize( as=String.class ) - public void setEntity_id(String val ) { - entity_id = val; - } - - /** Asterisk version. */ - private String version; - public String getVersion() { - return version; - } - - @JsonDeserialize( as=String.class ) - public void setVersion(String val ) { - version = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/Variable_impl_ari_1_0_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/Variable_impl_ari_1_0_0.java deleted file mode 100644 index a242c8a7..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_0_0/models/Variable_impl_ari_1_0_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_0_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * The value of a channel variable - * - * Defined in file: asterisk.json - * Generated by: Model - *********************************************************/ - -public class Variable_impl_ari_1_0_0 implements Variable, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The value of the variable requested */ - private String value; - public String getValue() { - return value; - } - - @JsonDeserialize( as=String.class ) - public void setValue(String val ) { - value = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/AriBuilder_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/AriBuilder_impl_ari_1_10_0.java deleted file mode 100644 index 9382913a..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/AriBuilder_impl_ari_1_10_0.java +++ /dev/null @@ -1,324 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.ari_1_10_0.models.*; -import ch.loway.oss.ari4java.generated.ari_1_10_0.actions.*; -import ch.loway.oss.ari4java.generated.*; -import ch.loway.oss.ari4java.ARI; - -public class AriBuilder_impl_ari_1_10_0 implements AriBuilder { - -public ActionEvents actionEvents() { - return new ActionEvents_impl_ari_1_10_0(); - }; - -public ActionAsterisk actionAsterisk() { - return new ActionAsterisk_impl_ari_1_10_0(); - }; - -public ActionRecordings actionRecordings() { - return new ActionRecordings_impl_ari_1_10_0(); - }; - -public ActionPlaybacks actionPlaybacks() { - return new ActionPlaybacks_impl_ari_1_10_0(); - }; - -public ActionBridges actionBridges() { - return new ActionBridges_impl_ari_1_10_0(); - }; - -public ActionApplications actionApplications() { - return new ActionApplications_impl_ari_1_10_0(); - }; - -public ActionSounds actionSounds() { - return new ActionSounds_impl_ari_1_10_0(); - }; - -public ActionEndpoints actionEndpoints() { - return new ActionEndpoints_impl_ari_1_10_0(); - }; - -public ActionChannels actionChannels() { - return new ActionChannels_impl_ari_1_10_0(); - }; - -public ActionDeviceStates actionDeviceStates() { - return new ActionDeviceStates_impl_ari_1_10_0(); - }; - -public Channel channel() { - return new Channel_impl_ari_1_10_0(); - }; - -public DeviceState deviceState() { - return new DeviceState_impl_ari_1_10_0(); - }; - -public ContactStatusChange contactStatusChange() { - return new ContactStatusChange_impl_ari_1_10_0(); - }; - -public ChannelDialplan channelDialplan() { - return new ChannelDialplan_impl_ari_1_10_0(); - }; - -public BridgeBlindTransfer bridgeBlindTransfer() { - return new BridgeBlindTransfer_impl_ari_1_10_0(); - }; - -public CallerID callerID() { - return new CallerID_impl_ari_1_10_0(); - }; - -public ChannelVarset channelVarset() { - return new ChannelVarset_impl_ari_1_10_0(); - }; - -public ChannelDtmfReceived channelDtmfReceived() { - return new ChannelDtmfReceived_impl_ari_1_10_0(); - }; - -public Endpoint endpoint() { - return new Endpoint_impl_ari_1_10_0(); - }; - -public Playback playback() { - return new Playback_impl_ari_1_10_0(); - }; - -public PlaybackFinished playbackFinished() { - return new PlaybackFinished_impl_ari_1_10_0(); - }; - -public Application application() { - return new Application_impl_ari_1_10_0(); - }; - -public LiveRecording liveRecording() { - return new LiveRecording_impl_ari_1_10_0(); - }; - -public TextMessageReceived textMessageReceived() { - return new TextMessageReceived_impl_ari_1_10_0(); - }; - -public SetId setId() { - return new SetId_impl_ari_1_10_0(); - }; - -public Message message() { - return new Message_impl_ari_1_10_0(); - }; - -public DeviceStateChanged deviceStateChanged() { - return new DeviceStateChanged_impl_ari_1_10_0(); - }; - -public RecordingFailed recordingFailed() { - return new RecordingFailed_impl_ari_1_10_0(); - }; - -public ChannelStateChange channelStateChange() { - return new ChannelStateChange_impl_ari_1_10_0(); - }; - -public ChannelEnteredBridge channelEnteredBridge() { - return new ChannelEnteredBridge_impl_ari_1_10_0(); - }; - -public EndpointStateChange endpointStateChange() { - return new EndpointStateChange_impl_ari_1_10_0(); - }; - -public SystemInfo systemInfo() { - return new SystemInfo_impl_ari_1_10_0(); - }; - -public StoredRecording storedRecording() { - return new StoredRecording_impl_ari_1_10_0(); - }; - -public BridgeCreated bridgeCreated() { - return new BridgeCreated_impl_ari_1_10_0(); - }; - -public Dial dial() { - return new Dial_impl_ari_1_10_0(); - }; - -public Module module() { - return new Module_impl_ari_1_10_0(); - }; - -public BridgeDestroyed bridgeDestroyed() { - return new BridgeDestroyed_impl_ari_1_10_0(); - }; - -public TextMessage textMessage() { - return new TextMessage_impl_ari_1_10_0(); - }; - -public PlaybackContinuing playbackContinuing() { - return new PlaybackContinuing_impl_ari_1_10_0(); - }; - -public ApplicationReplaced applicationReplaced() { - return new ApplicationReplaced_impl_ari_1_10_0(); - }; - -public Peer peer() { - return new Peer_impl_ari_1_10_0(); - }; - -public Variable variable() { - return new Variable_impl_ari_1_10_0(); - }; - -public StasisEnd stasisEnd() { - return new StasisEnd_impl_ari_1_10_0(); - }; - -public ChannelTalkingFinished channelTalkingFinished() { - return new ChannelTalkingFinished_impl_ari_1_10_0(); - }; - -public Bridge bridge() { - return new Bridge_impl_ari_1_10_0(); - }; - -public RecordingFinished recordingFinished() { - return new RecordingFinished_impl_ari_1_10_0(); - }; - -public ConfigTuple configTuple() { - return new ConfigTuple_impl_ari_1_10_0(); - }; - -public LogChannel logChannel() { - return new LogChannel_impl_ari_1_10_0(); - }; - -public StatusInfo statusInfo() { - return new StatusInfo_impl_ari_1_10_0(); - }; - -public MissingParams missingParams() { - return new MissingParams_impl_ari_1_10_0(); - }; - -public BridgeMerged bridgeMerged() { - return new BridgeMerged_impl_ari_1_10_0(); - }; - -public ChannelLeftBridge channelLeftBridge() { - return new ChannelLeftBridge_impl_ari_1_10_0(); - }; - -public AsteriskInfo asteriskInfo() { - return new AsteriskInfo_impl_ari_1_10_0(); - }; - -public TextMessageVariable textMessageVariable() { - return new TextMessageVariable_impl_ari_1_10_0(); - }; - -public RecordingStarted recordingStarted() { - return new RecordingStarted_impl_ari_1_10_0(); - }; - -public FormatLangPair formatLangPair() { - return new FormatLangPair_impl_ari_1_10_0(); - }; - -public ChannelHangupRequest channelHangupRequest() { - return new ChannelHangupRequest_impl_ari_1_10_0(); - }; - -public Sound sound() { - return new Sound_impl_ari_1_10_0(); - }; - -public StasisStart stasisStart() { - return new StasisStart_impl_ari_1_10_0(); - }; - -public BridgeAttendedTransfer bridgeAttendedTransfer() { - return new BridgeAttendedTransfer_impl_ari_1_10_0(); - }; - -public ChannelTalkingStarted channelTalkingStarted() { - return new ChannelTalkingStarted_impl_ari_1_10_0(); - }; - -public Dialed dialed() { - return new Dialed_impl_ari_1_10_0(); - }; - -public ChannelCallerId channelCallerId() { - return new ChannelCallerId_impl_ari_1_10_0(); - }; - -public ConfigInfo configInfo() { - return new ConfigInfo_impl_ari_1_10_0(); - }; - -public ChannelCreated channelCreated() { - return new ChannelCreated_impl_ari_1_10_0(); - }; - -public ChannelUserevent channelUserevent() { - return new ChannelUserevent_impl_ari_1_10_0(); - }; - -public PlaybackStarted playbackStarted() { - return new PlaybackStarted_impl_ari_1_10_0(); - }; - -public ChannelHold channelHold() { - return new ChannelHold_impl_ari_1_10_0(); - }; - -public DialplanCEP dialplanCEP() { - return new DialplanCEP_impl_ari_1_10_0(); - }; - -public ChannelDestroyed channelDestroyed() { - return new ChannelDestroyed_impl_ari_1_10_0(); - }; - -public ChannelConnectedLine channelConnectedLine() { - return new ChannelConnectedLine_impl_ari_1_10_0(); - }; - -public PeerStatusChange peerStatusChange() { - return new PeerStatusChange_impl_ari_1_10_0(); - }; - -public Event event() { - return new Event_impl_ari_1_10_0(); - }; - -public ContactInfo contactInfo() { - return new ContactInfo_impl_ari_1_10_0(); - }; - -public BuildInfo buildInfo() { - return new BuildInfo_impl_ari_1_10_0(); - }; - -public ChannelUnhold channelUnhold() { - return new ChannelUnhold_impl_ari_1_10_0(); - }; - -public ARI.ClassFactory getClassFactory() { - return new ClassTranslator_impl_ari_1_10_0(); -}; - -}; diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/ClassTranslator_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/ClassTranslator_impl_ari_1_10_0.java deleted file mode 100644 index 4e01b6d8..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/ClassTranslator_impl_ari_1_10_0.java +++ /dev/null @@ -1,331 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.ARI; -import ch.loway.oss.ari4java.generated.*; -import ch.loway.oss.ari4java.generated.ari_1_10_0.models.*; -import ch.loway.oss.ari4java.generated.ari_1_10_0.actions.*; - -/********************************************************** - * This is a class translator. - *********************************************************/ -public class ClassTranslator_impl_ari_1_10_0 implements ARI.ClassFactory { - - @Override - public Class getImplementationFor(Class interfaceClass) { - - if ( interfaceClass.equals(ActionApplications.class) ) { - return (ActionApplications_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(ActionAsterisk.class) ) { - return (ActionAsterisk_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(ActionBridges.class) ) { - return (ActionBridges_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(ActionChannels.class) ) { - return (ActionChannels_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(ActionDeviceStates.class) ) { - return (ActionDeviceStates_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(ActionEndpoints.class) ) { - return (ActionEndpoints_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(ActionEvents.class) ) { - return (ActionEvents_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(ActionPlaybacks.class) ) { - return (ActionPlaybacks_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(ActionRecordings.class) ) { - return (ActionRecordings_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(ActionSounds.class) ) { - return (ActionSounds_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(Application.class) ) { - return (Application_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(ApplicationReplaced.class) ) { - return (ApplicationReplaced_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(AsteriskInfo.class) ) { - return (AsteriskInfo_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(Bridge.class) ) { - return (Bridge_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(BridgeAttendedTransfer.class) ) { - return (BridgeAttendedTransfer_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(BridgeBlindTransfer.class) ) { - return (BridgeBlindTransfer_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(BridgeCreated.class) ) { - return (BridgeCreated_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(BridgeDestroyed.class) ) { - return (BridgeDestroyed_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(BridgeMerged.class) ) { - return (BridgeMerged_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(BuildInfo.class) ) { - return (BuildInfo_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(CallerID.class) ) { - return (CallerID_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(Channel.class) ) { - return (Channel_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(ChannelCallerId.class) ) { - return (ChannelCallerId_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(ChannelConnectedLine.class) ) { - return (ChannelConnectedLine_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(ChannelCreated.class) ) { - return (ChannelCreated_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(ChannelDestroyed.class) ) { - return (ChannelDestroyed_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(ChannelDialplan.class) ) { - return (ChannelDialplan_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(ChannelDtmfReceived.class) ) { - return (ChannelDtmfReceived_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(ChannelEnteredBridge.class) ) { - return (ChannelEnteredBridge_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(ChannelHangupRequest.class) ) { - return (ChannelHangupRequest_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(ChannelHold.class) ) { - return (ChannelHold_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(ChannelLeftBridge.class) ) { - return (ChannelLeftBridge_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(ChannelStateChange.class) ) { - return (ChannelStateChange_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(ChannelTalkingFinished.class) ) { - return (ChannelTalkingFinished_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(ChannelTalkingStarted.class) ) { - return (ChannelTalkingStarted_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(ChannelUnhold.class) ) { - return (ChannelUnhold_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(ChannelUserevent.class) ) { - return (ChannelUserevent_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(ChannelVarset.class) ) { - return (ChannelVarset_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(ConfigInfo.class) ) { - return (ConfigInfo_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(ConfigTuple.class) ) { - return (ConfigTuple_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(ContactInfo.class) ) { - return (ContactInfo_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(ContactStatusChange.class) ) { - return (ContactStatusChange_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(DeviceState.class) ) { - return (DeviceState_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(DeviceStateChanged.class) ) { - return (DeviceStateChanged_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(Dial.class) ) { - return (Dial_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(Dialed.class) ) { - return (Dialed_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(DialplanCEP.class) ) { - return (DialplanCEP_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(Endpoint.class) ) { - return (Endpoint_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(EndpointStateChange.class) ) { - return (EndpointStateChange_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(Event.class) ) { - return (Event_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(FormatLangPair.class) ) { - return (FormatLangPair_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(LiveRecording.class) ) { - return (LiveRecording_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(LogChannel.class) ) { - return (LogChannel_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(Message.class) ) { - return (Message_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(MissingParams.class) ) { - return (MissingParams_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(Module.class) ) { - return (Module_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(Peer.class) ) { - return (Peer_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(PeerStatusChange.class) ) { - return (PeerStatusChange_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(Playback.class) ) { - return (Playback_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(PlaybackContinuing.class) ) { - return (PlaybackContinuing_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(PlaybackFinished.class) ) { - return (PlaybackFinished_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(PlaybackStarted.class) ) { - return (PlaybackStarted_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(RecordingFailed.class) ) { - return (RecordingFailed_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(RecordingFinished.class) ) { - return (RecordingFinished_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(RecordingStarted.class) ) { - return (RecordingStarted_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(SetId.class) ) { - return (SetId_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(Sound.class) ) { - return (Sound_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(StasisEnd.class) ) { - return (StasisEnd_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(StasisStart.class) ) { - return (StasisStart_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(StatusInfo.class) ) { - return (StatusInfo_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(StoredRecording.class) ) { - return (StoredRecording_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(SystemInfo.class) ) { - return (SystemInfo_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(TextMessage.class) ) { - return (TextMessage_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(TextMessageReceived.class) ) { - return (TextMessageReceived_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(TextMessageVariable.class) ) { - return (TextMessageVariable_impl_ari_1_10_0.class); - } else - - if ( interfaceClass.equals(Variable.class) ) { - return (Variable_impl_ari_1_10_0.class); - } else - { - return null; - } - } -} - - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/actions/ActionApplications_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/actions/ActionApplications_impl_ari_1_10_0.java deleted file mode 100644 index d2cc93a3..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/actions/ActionApplications_impl_ari_1_10_0.java +++ /dev/null @@ -1,140 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_10_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionApplications_impl_ari_1_10_0 extends BaseAriAction implements ActionApplications { -/********************************************************** - * Stasis applications - * - * List all applications. - *********************************************************/ -private void buildList() { -reset(); -url = "/applications"; -method = "GET"; -} - -@Override -public List list() throws RestException { -buildList(); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void list(AriCallback> callback) { -buildList(); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Stasis application - * - * Get details of an application. - *********************************************************/ -private void buildGet(String applicationName) { -reset(); -url = "/applications/" + applicationName + ""; -method = "GET"; -lE.add( HttpResponse.build( 404, "Application does not exist.") ); -} - -@Override -public Application get(String applicationName) throws RestException { -buildGet(applicationName); -String json = httpActionSync(); -return deserializeJson( json, Application_impl_ari_1_10_0.class ); -} - -@Override -public void get(String applicationName, AriCallback callback) { -buildGet(applicationName); -httpActionAsync(callback, Application_impl_ari_1_10_0.class); -} - -/********************************************************** - * Stasis application - * - * Subscribe an application to a event source. - * Returns the state of the application after the subscriptions have changed - *********************************************************/ -private void buildSubscribe(String applicationName, String eventSource) { -reset(); -url = "/applications/" + applicationName + "/subscription"; -method = "POST"; -lParamQuery.add( HttpParam.build( "eventSource", eventSource) ); -lE.add( HttpResponse.build( 400, "Missing parameter.") ); -lE.add( HttpResponse.build( 404, "Application does not exist.") ); -lE.add( HttpResponse.build( 422, "Event source does not exist.") ); -} - -@Override -public Application subscribe(String applicationName, String eventSource) throws RestException { -buildSubscribe(applicationName, eventSource); -String json = httpActionSync(); -return deserializeJson( json, Application_impl_ari_1_10_0.class ); -} - -@Override -public void subscribe(String applicationName, String eventSource, AriCallback callback) { -buildSubscribe(applicationName, eventSource); -httpActionAsync(callback, Application_impl_ari_1_10_0.class); -} - -/********************************************************** - * Stasis application - * - * Unsubscribe an application from an event source. - * Returns the state of the application after the subscriptions have changed - *********************************************************/ -private void buildUnsubscribe(String applicationName, String eventSource) { -reset(); -url = "/applications/" + applicationName + "/subscription"; -method = "DELETE"; -lParamQuery.add( HttpParam.build( "eventSource", eventSource) ); -lE.add( HttpResponse.build( 400, "Missing parameter; event source scheme not recognized.") ); -lE.add( HttpResponse.build( 404, "Application does not exist.") ); -lE.add( HttpResponse.build( 409, "Application not subscribed to event source.") ); -lE.add( HttpResponse.build( 422, "Event source does not exist.") ); -} - -@Override -public Application unsubscribe(String applicationName, String eventSource) throws RestException { -buildUnsubscribe(applicationName, eventSource); -String json = httpActionSync(); -return deserializeJson( json, Application_impl_ari_1_10_0.class ); -} - -@Override -public void unsubscribe(String applicationName, String eventSource, AriCallback callback) { -buildUnsubscribe(applicationName, eventSource); -httpActionAsync(callback, Application_impl_ari_1_10_0.class); -} - -/** No missing signatures from interface */ -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/actions/ActionAsterisk_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/actions/ActionAsterisk_impl_ari_1_10_0.java deleted file mode 100644 index c792f9ea..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/actions/ActionAsterisk_impl_ari_1_10_0.java +++ /dev/null @@ -1,412 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_10_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionAsterisk_impl_ari_1_10_0 extends BaseAriAction implements ActionAsterisk { -/********************************************************** - * Asterisk dynamic configuration - * - * Retrieve a dynamic configuration object. - *********************************************************/ -private void buildGetObject(String configClass, String objectType, String id) { -reset(); -url = "/asterisk/config/dynamic/" + configClass + "/" + objectType + "/" + id + ""; -method = "GET"; -lE.add( HttpResponse.build( 404, "{configClass|objectType|id} not found") ); -} - -@Override -public List getObject(String configClass, String objectType, String id) throws RestException { -buildGetObject(configClass, objectType, id); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void getObject(String configClass, String objectType, String id, AriCallback> callback) { -buildGetObject(configClass, objectType, id); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Asterisk dynamic configuration - * - * Create or update a dynamic configuration object. - *********************************************************/ -private void buildUpdateObject(String configClass, String objectType, String id, Map fields) { -reset(); -url = "/asterisk/config/dynamic/" + configClass + "/" + objectType + "/" + id + ""; -method = "PUT"; -lParamBody.addAll( HttpParam.build( "fields", fields) ); -lE.add( HttpResponse.build( 400, "Bad request body") ); -lE.add( HttpResponse.build( 403, "Could not create or update object") ); -lE.add( HttpResponse.build( 404, "{configClass|objectType} not found") ); -} - -@Override -public List updateObject(String configClass, String objectType, String id, Map fields) throws RestException { -buildUpdateObject(configClass, objectType, id, fields); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void updateObject(String configClass, String objectType, String id, Map fields, AriCallback> callback) { -buildUpdateObject(configClass, objectType, id, fields); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Asterisk dynamic configuration - * - * Delete a dynamic configuration object. - *********************************************************/ -private void buildDeleteObject(String configClass, String objectType, String id) { -reset(); -url = "/asterisk/config/dynamic/" + configClass + "/" + objectType + "/" + id + ""; -method = "DELETE"; -lE.add( HttpResponse.build( 403, "Could not delete object") ); -lE.add( HttpResponse.build( 404, "{configClass|objectType|id} not found") ); -} - -@Override -public void deleteObject(String configClass, String objectType, String id) throws RestException { -buildDeleteObject(configClass, objectType, id); -String json = httpActionSync(); -} - -@Override -public void deleteObject(String configClass, String objectType, String id, AriCallback callback) { -buildDeleteObject(configClass, objectType, id); -httpActionAsync(callback); -} - -/********************************************************** - * Asterisk system information (similar to core show settings) - * - * Gets Asterisk system information. - *********************************************************/ -private void buildGetInfo(String only) { -reset(); -url = "/asterisk/info"; -method = "GET"; -lParamQuery.add( HttpParam.build( "only", only) ); -} - -@Override -public AsteriskInfo getInfo(String only) throws RestException { -buildGetInfo(only); -String json = httpActionSync(); -return deserializeJson( json, AsteriskInfo_impl_ari_1_10_0.class ); -} - -@Override -public void getInfo(String only, AriCallback callback) { -buildGetInfo(only); -httpActionAsync(callback, AsteriskInfo_impl_ari_1_10_0.class); -} - -/********************************************************** - * Asterisk log channels - * - * Gets Asterisk log channel information. - *********************************************************/ -private void buildListLogChannels() { -reset(); -url = "/asterisk/logging"; -method = "GET"; -} - -@Override -public List listLogChannels() throws RestException { -buildListLogChannels(); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void listLogChannels(AriCallback> callback) { -buildListLogChannels(); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Asterisk log channel - * - * Adds a log channel. - *********************************************************/ -private void buildAddLog(String logChannelName, String configuration) { -reset(); -url = "/asterisk/logging/" + logChannelName + ""; -method = "POST"; -lParamQuery.add( HttpParam.build( "configuration", configuration) ); -lE.add( HttpResponse.build( 400, "Bad request body") ); -lE.add( HttpResponse.build( 409, "Log channel could not be created.") ); -} - -@Override -public void addLog(String logChannelName, String configuration) throws RestException { -buildAddLog(logChannelName, configuration); -String json = httpActionSync(); -} - -@Override -public void addLog(String logChannelName, String configuration, AriCallback callback) { -buildAddLog(logChannelName, configuration); -httpActionAsync(callback); -} - -/********************************************************** - * Asterisk log channel - * - * Deletes a log channel. - *********************************************************/ -private void buildDeleteLog(String logChannelName) { -reset(); -url = "/asterisk/logging/" + logChannelName + ""; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Log channel does not exist.") ); -} - -@Override -public void deleteLog(String logChannelName) throws RestException { -buildDeleteLog(logChannelName); -String json = httpActionSync(); -} - -@Override -public void deleteLog(String logChannelName, AriCallback callback) { -buildDeleteLog(logChannelName); -httpActionAsync(callback); -} - -/********************************************************** - * Asterisk log channel - * - * Rotates a log channel. - *********************************************************/ -private void buildRotateLog(String logChannelName) { -reset(); -url = "/asterisk/logging/" + logChannelName + "/rotate"; -method = "PUT"; -lE.add( HttpResponse.build( 404, "Log channel does not exist.") ); -} - -@Override -public void rotateLog(String logChannelName) throws RestException { -buildRotateLog(logChannelName); -String json = httpActionSync(); -} - -@Override -public void rotateLog(String logChannelName, AriCallback callback) { -buildRotateLog(logChannelName); -httpActionAsync(callback); -} - -/********************************************************** - * Asterisk modules - * - * List Asterisk modules. - *********************************************************/ -private void buildListModules() { -reset(); -url = "/asterisk/modules"; -method = "GET"; -} - -@Override -public List listModules() throws RestException { -buildListModules(); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void listModules(AriCallback> callback) { -buildListModules(); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Asterisk module - * - * Get Asterisk module information. - *********************************************************/ -private void buildGetModule(String moduleName) { -reset(); -url = "/asterisk/modules/" + moduleName + ""; -method = "GET"; -lE.add( HttpResponse.build( 404, "Module could not be found in running modules.") ); -lE.add( HttpResponse.build( 409, "Module information could not be retrieved.") ); -} - -@Override -public Module getModule(String moduleName) throws RestException { -buildGetModule(moduleName); -String json = httpActionSync(); -return deserializeJson( json, Module_impl_ari_1_10_0.class ); -} - -@Override -public void getModule(String moduleName, AriCallback callback) { -buildGetModule(moduleName); -httpActionAsync(callback, Module_impl_ari_1_10_0.class); -} - -/********************************************************** - * Asterisk module - * - * Load an Asterisk module. - *********************************************************/ -private void buildLoadModule(String moduleName) { -reset(); -url = "/asterisk/modules/" + moduleName + ""; -method = "POST"; -lE.add( HttpResponse.build( 409, "Module could not be loaded.") ); -} - -@Override -public void loadModule(String moduleName) throws RestException { -buildLoadModule(moduleName); -String json = httpActionSync(); -} - -@Override -public void loadModule(String moduleName, AriCallback callback) { -buildLoadModule(moduleName); -httpActionAsync(callback); -} - -/********************************************************** - * Asterisk module - * - * Unload an Asterisk module. - *********************************************************/ -private void buildUnloadModule(String moduleName) { -reset(); -url = "/asterisk/modules/" + moduleName + ""; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Module not found in running modules.") ); -lE.add( HttpResponse.build( 409, "Module could not be unloaded.") ); -} - -@Override -public void unloadModule(String moduleName) throws RestException { -buildUnloadModule(moduleName); -String json = httpActionSync(); -} - -@Override -public void unloadModule(String moduleName, AriCallback callback) { -buildUnloadModule(moduleName); -httpActionAsync(callback); -} - -/********************************************************** - * Asterisk module - * - * Reload an Asterisk module. - *********************************************************/ -private void buildReloadModule(String moduleName) { -reset(); -url = "/asterisk/modules/" + moduleName + ""; -method = "PUT"; -lE.add( HttpResponse.build( 404, "Module not found in running modules.") ); -lE.add( HttpResponse.build( 409, "Module could not be reloaded.") ); -} - -@Override -public void reloadModule(String moduleName) throws RestException { -buildReloadModule(moduleName); -String json = httpActionSync(); -} - -@Override -public void reloadModule(String moduleName, AriCallback callback) { -buildReloadModule(moduleName); -httpActionAsync(callback); -} - -/********************************************************** - * Global variables - * - * Get the value of a global variable. - *********************************************************/ -private void buildGetGlobalVar(String variable) { -reset(); -url = "/asterisk/variable"; -method = "GET"; -lParamQuery.add( HttpParam.build( "variable", variable) ); -lE.add( HttpResponse.build( 400, "Missing variable parameter.") ); -} - -@Override -public Variable getGlobalVar(String variable) throws RestException { -buildGetGlobalVar(variable); -String json = httpActionSync(); -return deserializeJson( json, Variable_impl_ari_1_10_0.class ); -} - -@Override -public void getGlobalVar(String variable, AriCallback callback) { -buildGetGlobalVar(variable); -httpActionAsync(callback, Variable_impl_ari_1_10_0.class); -} - -/********************************************************** - * Global variables - * - * Set the value of a global variable. - *********************************************************/ -private void buildSetGlobalVar(String variable, String value) { -reset(); -url = "/asterisk/variable"; -method = "POST"; -lParamQuery.add( HttpParam.build( "variable", variable) ); -lParamQuery.add( HttpParam.build( "value", value) ); -lE.add( HttpResponse.build( 400, "Missing variable parameter.") ); -} - -@Override -public void setGlobalVar(String variable, String value) throws RestException { -buildSetGlobalVar(variable, value); -String json = httpActionSync(); -} - -@Override -public void setGlobalVar(String variable, String value, AriCallback callback) { -buildSetGlobalVar(variable, value); -httpActionAsync(callback); -} - -/** No missing signatures from interface */ -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/actions/ActionBridges_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/actions/ActionBridges_impl_ari_1_10_0.java deleted file mode 100644 index e24ef904..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/actions/ActionBridges_impl_ari_1_10_0.java +++ /dev/null @@ -1,444 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_10_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionBridges_impl_ari_1_10_0 extends BaseAriAction implements ActionBridges { -/********************************************************** - * Active bridges - * - * List all active bridges in Asterisk. - *********************************************************/ -private void buildList() { -reset(); -url = "/bridges"; -method = "GET"; -} - -@Override -public List list() throws RestException { -buildList(); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void list(AriCallback> callback) { -buildList(); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Active bridges - * - * Create a new bridge. - * This bridge persists until it has been shut down, or Asterisk has been shut down. - *********************************************************/ -private void buildCreate(String type, String bridgeId, String name) { -reset(); -url = "/bridges"; -method = "POST"; -lParamQuery.add( HttpParam.build( "type", type) ); -lParamQuery.add( HttpParam.build( "bridgeId", bridgeId) ); -lParamQuery.add( HttpParam.build( "name", name) ); -} - -@Override -public Bridge create(String type, String bridgeId, String name) throws RestException { -buildCreate(type, bridgeId, name); -String json = httpActionSync(); -return deserializeJson( json, Bridge_impl_ari_1_10_0.class ); -} - -@Override -public void create(String type, String bridgeId, String name, AriCallback callback) { -buildCreate(type, bridgeId, name); -httpActionAsync(callback, Bridge_impl_ari_1_10_0.class); -} - -/********************************************************** - * Individual bridge - * - * Create a new bridge or updates an existing one. - * This bridge persists until it has been shut down, or Asterisk has been shut down. - *********************************************************/ -private void buildCreateWithId(String type, String bridgeId, String name) { -reset(); -url = "/bridges/" + bridgeId + ""; -method = "POST"; -lParamQuery.add( HttpParam.build( "type", type) ); -lParamQuery.add( HttpParam.build( "name", name) ); -} - -@Override -public Bridge createWithId(String type, String bridgeId, String name) throws RestException { -buildCreateWithId(type, bridgeId, name); -String json = httpActionSync(); -return deserializeJson( json, Bridge_impl_ari_1_10_0.class ); -} - -@Override -public void createWithId(String type, String bridgeId, String name, AriCallback callback) { -buildCreateWithId(type, bridgeId, name); -httpActionAsync(callback, Bridge_impl_ari_1_10_0.class); -} - -/********************************************************** - * Individual bridge - * - * Get bridge details. - *********************************************************/ -private void buildGet(String bridgeId) { -reset(); -url = "/bridges/" + bridgeId + ""; -method = "GET"; -lE.add( HttpResponse.build( 404, "Bridge not found") ); -} - -@Override -public Bridge get(String bridgeId) throws RestException { -buildGet(bridgeId); -String json = httpActionSync(); -return deserializeJson( json, Bridge_impl_ari_1_10_0.class ); -} - -@Override -public void get(String bridgeId, AriCallback callback) { -buildGet(bridgeId); -httpActionAsync(callback, Bridge_impl_ari_1_10_0.class); -} - -/********************************************************** - * Individual bridge - * - * Shut down a bridge. - * If any channels are in this bridge, they will be removed and resume whatever they were doing beforehand. - *********************************************************/ -private void buildDestroy(String bridgeId) { -reset(); -url = "/bridges/" + bridgeId + ""; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Bridge not found") ); -} - -@Override -public void destroy(String bridgeId) throws RestException { -buildDestroy(bridgeId); -String json = httpActionSync(); -} - -@Override -public void destroy(String bridgeId, AriCallback callback) { -buildDestroy(bridgeId); -httpActionAsync(callback); -} - -/********************************************************** - * Add a channel to a bridge - * - * Add a channel to a bridge. - *********************************************************/ -private void buildAddChannel(String bridgeId, String channel, String role) { -reset(); -url = "/bridges/" + bridgeId + "/addChannel"; -method = "POST"; -lParamQuery.add( HttpParam.build( "channel", channel) ); -lParamQuery.add( HttpParam.build( "role", role) ); -lE.add( HttpResponse.build( 400, "Channel not found") ); -lE.add( HttpResponse.build( 404, "Bridge not found") ); -lE.add( HttpResponse.build( 409, "Bridge not in Stasis application; Channel currently recording") ); -lE.add( HttpResponse.build( 422, "Channel not in Stasis application") ); -} - -@Override -public void addChannel(String bridgeId, String channel, String role) throws RestException { -buildAddChannel(bridgeId, channel, role); -String json = httpActionSync(); -} - -@Override -public void addChannel(String bridgeId, String channel, String role, AriCallback callback) { -buildAddChannel(bridgeId, channel, role); -httpActionAsync(callback); -} - -/********************************************************** - * Play music on hold to a bridge - * - * Play music on hold to a bridge or change the MOH class that is playing. - *********************************************************/ -private void buildStartMoh(String bridgeId, String mohClass) { -reset(); -url = "/bridges/" + bridgeId + "/moh"; -method = "POST"; -lParamQuery.add( HttpParam.build( "mohClass", mohClass) ); -lE.add( HttpResponse.build( 404, "Bridge not found") ); -lE.add( HttpResponse.build( 409, "Bridge not in Stasis application") ); -} - -@Override -public void startMoh(String bridgeId, String mohClass) throws RestException { -buildStartMoh(bridgeId, mohClass); -String json = httpActionSync(); -} - -@Override -public void startMoh(String bridgeId, String mohClass, AriCallback callback) { -buildStartMoh(bridgeId, mohClass); -httpActionAsync(callback); -} - -/********************************************************** - * Play music on hold to a bridge - * - * Stop playing music on hold to a bridge. - * This will only stop music on hold being played via POST bridges/{bridgeId}/moh. - *********************************************************/ -private void buildStopMoh(String bridgeId) { -reset(); -url = "/bridges/" + bridgeId + "/moh"; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Bridge not found") ); -lE.add( HttpResponse.build( 409, "Bridge not in Stasis application") ); -} - -@Override -public void stopMoh(String bridgeId) throws RestException { -buildStopMoh(bridgeId); -String json = httpActionSync(); -} - -@Override -public void stopMoh(String bridgeId, AriCallback callback) { -buildStopMoh(bridgeId); -httpActionAsync(callback); -} - -/********************************************************** - * Play media to the participants of a bridge - * - * Start playback of media on a bridge. - * The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.) - *********************************************************/ -private void buildPlay(String bridgeId, String media, String lang, int offsetms, int skipms, String playbackId) { -reset(); -url = "/bridges/" + bridgeId + "/play"; -method = "POST"; -lParamQuery.add( HttpParam.build( "media", media) ); -lParamQuery.add( HttpParam.build( "lang", lang) ); -lParamQuery.add( HttpParam.build( "offsetms", offsetms) ); -lParamQuery.add( HttpParam.build( "skipms", skipms) ); -lParamQuery.add( HttpParam.build( "playbackId", playbackId) ); -lE.add( HttpResponse.build( 404, "Bridge not found") ); -lE.add( HttpResponse.build( 409, "Bridge not in a Stasis application") ); -} - -@Override -public Playback play(String bridgeId, String media, String lang, int offsetms, int skipms, String playbackId) throws RestException { -buildPlay(bridgeId, media, lang, offsetms, skipms, playbackId); -String json = httpActionSync(); -return deserializeJson( json, Playback_impl_ari_1_10_0.class ); -} - -@Override -public void play(String bridgeId, String media, String lang, int offsetms, int skipms, String playbackId, AriCallback callback) { -buildPlay(bridgeId, media, lang, offsetms, skipms, playbackId); -httpActionAsync(callback, Playback_impl_ari_1_10_0.class); -} - -/********************************************************** - * Play media to a bridge - * - * Start playback of media on a bridge. - * The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.) - *********************************************************/ -private void buildPlayWithId(String bridgeId, String playbackId, String media, String lang, int offsetms, int skipms) { -reset(); -url = "/bridges/" + bridgeId + "/play/" + playbackId + ""; -method = "POST"; -lParamQuery.add( HttpParam.build( "media", media) ); -lParamQuery.add( HttpParam.build( "lang", lang) ); -lParamQuery.add( HttpParam.build( "offsetms", offsetms) ); -lParamQuery.add( HttpParam.build( "skipms", skipms) ); -lE.add( HttpResponse.build( 404, "Bridge not found") ); -lE.add( HttpResponse.build( 409, "Bridge not in a Stasis application") ); -} - -@Override -public Playback playWithId(String bridgeId, String playbackId, String media, String lang, int offsetms, int skipms) throws RestException { -buildPlayWithId(bridgeId, playbackId, media, lang, offsetms, skipms); -String json = httpActionSync(); -return deserializeJson( json, Playback_impl_ari_1_10_0.class ); -} - -@Override -public void playWithId(String bridgeId, String playbackId, String media, String lang, int offsetms, int skipms, AriCallback callback) { -buildPlayWithId(bridgeId, playbackId, media, lang, offsetms, skipms); -httpActionAsync(callback, Playback_impl_ari_1_10_0.class); -} - -/********************************************************** - * Record audio on a bridge - * - * Start a recording. - * This records the mixed audio from all channels participating in this bridge. - *********************************************************/ -private void buildRecord(String bridgeId, String name, String format, int maxDurationSeconds, int maxSilenceSeconds, String ifExists, boolean beep, String terminateOn) { -reset(); -url = "/bridges/" + bridgeId + "/record"; -method = "POST"; -lParamQuery.add( HttpParam.build( "name", name) ); -lParamQuery.add( HttpParam.build( "format", format) ); -lParamQuery.add( HttpParam.build( "maxDurationSeconds", maxDurationSeconds) ); -lParamQuery.add( HttpParam.build( "maxSilenceSeconds", maxSilenceSeconds) ); -lParamQuery.add( HttpParam.build( "ifExists", ifExists) ); -lParamQuery.add( HttpParam.build( "beep", beep) ); -lParamQuery.add( HttpParam.build( "terminateOn", terminateOn) ); -lE.add( HttpResponse.build( 400, "Invalid parameters") ); -lE.add( HttpResponse.build( 404, "Bridge not found") ); -lE.add( HttpResponse.build( 409, "Bridge is not in a Stasis application; A recording with the same name already exists on the system and can not be overwritten because it is in progress or ifExists=fail") ); -lE.add( HttpResponse.build( 422, "The format specified is unknown on this system") ); -} - -@Override -public LiveRecording record(String bridgeId, String name, String format, int maxDurationSeconds, int maxSilenceSeconds, String ifExists, boolean beep, String terminateOn) throws RestException { -buildRecord(bridgeId, name, format, maxDurationSeconds, maxSilenceSeconds, ifExists, beep, terminateOn); -String json = httpActionSync(); -return deserializeJson( json, LiveRecording_impl_ari_1_10_0.class ); -} - -@Override -public void record(String bridgeId, String name, String format, int maxDurationSeconds, int maxSilenceSeconds, String ifExists, boolean beep, String terminateOn, AriCallback callback) { -buildRecord(bridgeId, name, format, maxDurationSeconds, maxSilenceSeconds, ifExists, beep, terminateOn); -httpActionAsync(callback, LiveRecording_impl_ari_1_10_0.class); -} - -/********************************************************** - * Remove a channel from a bridge - * - * Remove a channel from a bridge. - *********************************************************/ -private void buildRemoveChannel(String bridgeId, String channel) { -reset(); -url = "/bridges/" + bridgeId + "/removeChannel"; -method = "POST"; -lParamQuery.add( HttpParam.build( "channel", channel) ); -lE.add( HttpResponse.build( 400, "Channel not found") ); -lE.add( HttpResponse.build( 404, "Bridge not found") ); -lE.add( HttpResponse.build( 409, "Bridge not in Stasis application") ); -lE.add( HttpResponse.build( 422, "Channel not in this bridge") ); -} - -@Override -public void removeChannel(String bridgeId, String channel) throws RestException { -buildRemoveChannel(bridgeId, channel); -String json = httpActionSync(); -} - -@Override -public void removeChannel(String bridgeId, String channel, AriCallback callback) { -buildRemoveChannel(bridgeId, channel); -httpActionAsync(callback); -} - -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void create(String type, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new bridge. - * This bridge persists until it has been shut down, or Asterisk has been shut down. - * - * @since ari_1_0_0 - *********************************************************/ -public Bridge create(String type, String name) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new bridge. - * This bridge persists until it has been shut down, or Asterisk has been shut down. - * - * @since ari_0_0_1 - *********************************************************/ -public Bridge create(String type) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void play(String bridgeId, String media, String lang, int offsetms, int skipms, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Start playback of media on a bridge. - * 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.) - * - * @since ari_0_0_1 - *********************************************************/ -public Playback play(String bridgeId, String media, String lang, int offsetms, int skipms) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_0_0 - *********************************************************/ -public void create(String type, String name, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_5_0 - *********************************************************/ -public void create_or_update_with_id(String type, String bridgeId, String name, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new bridge or updates an existing one. - * This bridge persists until it has been shut down, or Asterisk has been shut down. - * - * @since ari_1_5_0 - *********************************************************/ -public Bridge create_or_update_with_id(String type, String bridgeId, String name) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/actions/ActionChannels_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/actions/ActionChannels_impl_ari_1_10_0.java deleted file mode 100644 index 0cd216ae..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/actions/ActionChannels_impl_ari_1_10_0.java +++ /dev/null @@ -1,999 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_10_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionChannels_impl_ari_1_10_0 extends BaseAriAction implements ActionChannels { -/********************************************************** - * Active channels - * - * List all active channels in Asterisk. - *********************************************************/ -private void buildList() { -reset(); -url = "/channels"; -method = "GET"; -} - -@Override -public List list() throws RestException { -buildList(); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void list(AriCallback> callback) { -buildList(); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Active channels - * - * Create a new channel (originate). - * 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. - *********************************************************/ -private void buildOriginate(String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String channelId, String otherChannelId, String originator, String formats) { -reset(); -url = "/channels"; -method = "POST"; -lParamQuery.add( HttpParam.build( "endpoint", endpoint) ); -lParamQuery.add( HttpParam.build( "extension", extension) ); -lParamQuery.add( HttpParam.build( "context", context) ); -lParamQuery.add( HttpParam.build( "priority", priority) ); -lParamQuery.add( HttpParam.build( "label", label) ); -lParamQuery.add( HttpParam.build( "app", app) ); -lParamQuery.add( HttpParam.build( "appArgs", appArgs) ); -lParamQuery.add( HttpParam.build( "callerId", callerId) ); -lParamQuery.add( HttpParam.build( "timeout", timeout) ); -lParamBody.addAll( HttpParam.build( "variables", variables) ); -lParamQuery.add( HttpParam.build( "channelId", channelId) ); -lParamQuery.add( HttpParam.build( "otherChannelId", otherChannelId) ); -lParamQuery.add( HttpParam.build( "originator", originator) ); -lParamQuery.add( HttpParam.build( "formats", formats) ); -lE.add( HttpResponse.build( 400, "Invalid parameters for originating a channel.") ); -} - -@Override -public Channel originate(String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String channelId, String otherChannelId, String originator, String formats) throws RestException { -buildOriginate(endpoint, extension, context, priority, label, app, appArgs, callerId, timeout, variables, channelId, otherChannelId, originator, formats); -String json = httpActionSync(); -return deserializeJson( json, Channel_impl_ari_1_10_0.class ); -} - -@Override -public void originate(String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String channelId, String otherChannelId, String originator, String formats, AriCallback callback) { -buildOriginate(endpoint, extension, context, priority, label, app, appArgs, callerId, timeout, variables, channelId, otherChannelId, originator, formats); -httpActionAsync(callback, Channel_impl_ari_1_10_0.class); -} - -/********************************************************** - * Create a channel and place it in a Stasis app, but do not dial the channel yet. - * - * Create channel. - *********************************************************/ -private void buildCreate(String endpoint, String app, String appArgs, String channelId, String otherChannelId, String originator, String formats) { -reset(); -url = "/channels/create"; -method = "POST"; -lParamQuery.add( HttpParam.build( "endpoint", endpoint) ); -lParamQuery.add( HttpParam.build( "app", app) ); -lParamQuery.add( HttpParam.build( "appArgs", appArgs) ); -lParamQuery.add( HttpParam.build( "channelId", channelId) ); -lParamQuery.add( HttpParam.build( "otherChannelId", otherChannelId) ); -lParamQuery.add( HttpParam.build( "originator", originator) ); -lParamQuery.add( HttpParam.build( "formats", formats) ); -} - -@Override -public Channel create(String endpoint, String app, String appArgs, String channelId, String otherChannelId, String originator, String formats) throws RestException { -buildCreate(endpoint, app, appArgs, channelId, otherChannelId, originator, formats); -String json = httpActionSync(); -return deserializeJson( json, Channel_impl_ari_1_10_0.class ); -} - -@Override -public void create(String endpoint, String app, String appArgs, String channelId, String otherChannelId, String originator, String formats, AriCallback callback) { -buildCreate(endpoint, app, appArgs, channelId, otherChannelId, originator, formats); -httpActionAsync(callback, Channel_impl_ari_1_10_0.class); -} - -/********************************************************** - * Active channel - * - * Channel details. - *********************************************************/ -private void buildGet(String channelId) { -reset(); -url = "/channels/" + channelId + ""; -method = "GET"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -} - -@Override -public Channel get(String channelId) throws RestException { -buildGet(channelId); -String json = httpActionSync(); -return deserializeJson( json, Channel_impl_ari_1_10_0.class ); -} - -@Override -public void get(String channelId, AriCallback callback) { -buildGet(channelId); -httpActionAsync(callback, Channel_impl_ari_1_10_0.class); -} - -/********************************************************** - * Active channel - * - * Create a new channel (originate with id). - * 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. - *********************************************************/ -private void buildOriginateWithId(String channelId, String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String otherChannelId, String originator, String formats) { -reset(); -url = "/channels/" + channelId + ""; -method = "POST"; -lParamQuery.add( HttpParam.build( "endpoint", endpoint) ); -lParamQuery.add( HttpParam.build( "extension", extension) ); -lParamQuery.add( HttpParam.build( "context", context) ); -lParamQuery.add( HttpParam.build( "priority", priority) ); -lParamQuery.add( HttpParam.build( "label", label) ); -lParamQuery.add( HttpParam.build( "app", app) ); -lParamQuery.add( HttpParam.build( "appArgs", appArgs) ); -lParamQuery.add( HttpParam.build( "callerId", callerId) ); -lParamQuery.add( HttpParam.build( "timeout", timeout) ); -lParamBody.addAll( HttpParam.build( "variables", variables) ); -lParamQuery.add( HttpParam.build( "otherChannelId", otherChannelId) ); -lParamQuery.add( HttpParam.build( "originator", originator) ); -lParamQuery.add( HttpParam.build( "formats", formats) ); -lE.add( HttpResponse.build( 400, "Invalid parameters for originating a channel.") ); -} - -@Override -public Channel originateWithId(String channelId, String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String otherChannelId, String originator, String formats) throws RestException { -buildOriginateWithId(channelId, endpoint, extension, context, priority, label, app, appArgs, callerId, timeout, variables, otherChannelId, originator, formats); -String json = httpActionSync(); -return deserializeJson( json, Channel_impl_ari_1_10_0.class ); -} - -@Override -public void originateWithId(String channelId, String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String otherChannelId, String originator, String formats, AriCallback callback) { -buildOriginateWithId(channelId, endpoint, extension, context, priority, label, app, appArgs, callerId, timeout, variables, otherChannelId, originator, formats); -httpActionAsync(callback, Channel_impl_ari_1_10_0.class); -} - -/********************************************************** - * Active channel - * - * Delete (i.e. hangup) a channel. - *********************************************************/ -private void buildHangup(String channelId, String reason) { -reset(); -url = "/channels/" + channelId + ""; -method = "DELETE"; -lParamQuery.add( HttpParam.build( "reason", reason) ); -lE.add( HttpResponse.build( 400, "Invalid reason for hangup provided") ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -} - -@Override -public void hangup(String channelId, String reason) throws RestException { -buildHangup(channelId, reason); -String json = httpActionSync(); -} - -@Override -public void hangup(String channelId, String reason, AriCallback callback) { -buildHangup(channelId, reason); -httpActionAsync(callback); -} - -/********************************************************** - * Answer a channel - * - * Answer a channel. - *********************************************************/ -private void buildAnswer(String channelId) { -reset(); -url = "/channels/" + channelId + "/answer"; -method = "POST"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -lE.add( HttpResponse.build( 412, "Channel in invalid state") ); -} - -@Override -public void answer(String channelId) throws RestException { -buildAnswer(channelId); -String json = httpActionSync(); -} - -@Override -public void answer(String channelId, AriCallback callback) { -buildAnswer(channelId); -httpActionAsync(callback); -} - -/********************************************************** - * Exit application; continue execution in the dialplan - * - * Exit application; continue execution in the dialplan. - *********************************************************/ -private void buildContinueInDialplan(String channelId, String context, String extension, int priority, String label) { -reset(); -url = "/channels/" + channelId + "/continue"; -method = "POST"; -lParamQuery.add( HttpParam.build( "context", context) ); -lParamQuery.add( HttpParam.build( "extension", extension) ); -lParamQuery.add( HttpParam.build( "priority", priority) ); -lParamQuery.add( HttpParam.build( "label", label) ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -lE.add( HttpResponse.build( 412, "Channel in invalid state") ); -} - -@Override -public void continueInDialplan(String channelId, String context, String extension, int priority, String label) throws RestException { -buildContinueInDialplan(channelId, context, extension, priority, label); -String json = httpActionSync(); -} - -@Override -public void continueInDialplan(String channelId, String context, String extension, int priority, String label, AriCallback callback) { -buildContinueInDialplan(channelId, context, extension, priority, label); -httpActionAsync(callback); -} - -/********************************************************** - * Dial a channel - * - * Dial a created channel. - *********************************************************/ -private void buildDial(String channelId, String caller, int timeout) { -reset(); -url = "/channels/" + channelId + "/dial"; -method = "POST"; -lParamQuery.add( HttpParam.build( "caller", caller) ); -lParamQuery.add( HttpParam.build( "timeout", timeout) ); -lE.add( HttpResponse.build( 404, "Channel cannot be found.") ); -lE.add( HttpResponse.build( 409, "Channel cannot be dialed.") ); -} - -@Override -public void dial(String channelId, String caller, int timeout) throws RestException { -buildDial(channelId, caller, timeout); -String json = httpActionSync(); -} - -@Override -public void dial(String channelId, String caller, int timeout, AriCallback callback) { -buildDial(channelId, caller, timeout); -httpActionAsync(callback); -} - -/********************************************************** - * Send DTMF to a channel - * - * Send provided DTMF to a given channel. - *********************************************************/ -private void buildSendDTMF(String channelId, String dtmf, int before, int between, int duration, int after) { -reset(); -url = "/channels/" + channelId + "/dtmf"; -method = "POST"; -lParamQuery.add( HttpParam.build( "dtmf", dtmf) ); -lParamQuery.add( HttpParam.build( "before", before) ); -lParamQuery.add( HttpParam.build( "between", between) ); -lParamQuery.add( HttpParam.build( "duration", duration) ); -lParamQuery.add( HttpParam.build( "after", after) ); -lE.add( HttpResponse.build( 400, "DTMF is required") ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -lE.add( HttpResponse.build( 412, "Channel in invalid state") ); -} - -@Override -public void sendDTMF(String channelId, String dtmf, int before, int between, int duration, int after) throws RestException { -buildSendDTMF(channelId, dtmf, before, between, duration, after); -String json = httpActionSync(); -} - -@Override -public void sendDTMF(String channelId, String dtmf, int before, int between, int duration, int after, AriCallback callback) { -buildSendDTMF(channelId, dtmf, before, between, duration, after); -httpActionAsync(callback); -} - -/********************************************************** - * Put a channel on hold - * - * Hold a channel. - *********************************************************/ -private void buildHold(String channelId) { -reset(); -url = "/channels/" + channelId + "/hold"; -method = "POST"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -lE.add( HttpResponse.build( 412, "Channel in invalid state") ); -} - -@Override -public void hold(String channelId) throws RestException { -buildHold(channelId); -String json = httpActionSync(); -} - -@Override -public void hold(String channelId, AriCallback callback) { -buildHold(channelId); -httpActionAsync(callback); -} - -/********************************************************** - * Put a channel on hold - * - * Remove a channel from hold. - *********************************************************/ -private void buildUnhold(String channelId) { -reset(); -url = "/channels/" + channelId + "/hold"; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -lE.add( HttpResponse.build( 412, "Channel in invalid state") ); -} - -@Override -public void unhold(String channelId) throws RestException { -buildUnhold(channelId); -String json = httpActionSync(); -} - -@Override -public void unhold(String channelId, AriCallback callback) { -buildUnhold(channelId); -httpActionAsync(callback); -} - -/********************************************************** - * Play music on hold to a channel - * - * Play music on hold to a channel. - * Using media operations such as /play on a channel playing MOH in this manner will suspend MOH without resuming automatically. If continuing music on hold is desired, the stasis application must reinitiate music on hold. - *********************************************************/ -private void buildStartMoh(String channelId, String mohClass) { -reset(); -url = "/channels/" + channelId + "/moh"; -method = "POST"; -lParamQuery.add( HttpParam.build( "mohClass", mohClass) ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -lE.add( HttpResponse.build( 412, "Channel in invalid state") ); -} - -@Override -public void startMoh(String channelId, String mohClass) throws RestException { -buildStartMoh(channelId, mohClass); -String json = httpActionSync(); -} - -@Override -public void startMoh(String channelId, String mohClass, AriCallback callback) { -buildStartMoh(channelId, mohClass); -httpActionAsync(callback); -} - -/********************************************************** - * Play music on hold to a channel - * - * Stop playing music on hold to a channel. - *********************************************************/ -private void buildStopMoh(String channelId) { -reset(); -url = "/channels/" + channelId + "/moh"; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -lE.add( HttpResponse.build( 412, "Channel in invalid state") ); -} - -@Override -public void stopMoh(String channelId) throws RestException { -buildStopMoh(channelId); -String json = httpActionSync(); -} - -@Override -public void stopMoh(String channelId, AriCallback callback) { -buildStopMoh(channelId); -httpActionAsync(callback); -} - -/********************************************************** - * Mute a channel - * - * Mute a channel. - *********************************************************/ -private void buildMute(String channelId, String direction) { -reset(); -url = "/channels/" + channelId + "/mute"; -method = "POST"; -lParamQuery.add( HttpParam.build( "direction", direction) ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -lE.add( HttpResponse.build( 412, "Channel in invalid state") ); -} - -@Override -public void mute(String channelId, String direction) throws RestException { -buildMute(channelId, direction); -String json = httpActionSync(); -} - -@Override -public void mute(String channelId, String direction, AriCallback callback) { -buildMute(channelId, direction); -httpActionAsync(callback); -} - -/********************************************************** - * Mute a channel - * - * Unmute a channel. - *********************************************************/ -private void buildUnmute(String channelId, String direction) { -reset(); -url = "/channels/" + channelId + "/mute"; -method = "DELETE"; -lParamQuery.add( HttpParam.build( "direction", direction) ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -lE.add( HttpResponse.build( 412, "Channel in invalid state") ); -} - -@Override -public void unmute(String channelId, String direction) throws RestException { -buildUnmute(channelId, direction); -String json = httpActionSync(); -} - -@Override -public void unmute(String channelId, String direction, AriCallback callback) { -buildUnmute(channelId, direction); -httpActionAsync(callback); -} - -/********************************************************** - * Play media to a channel - * - * Start playback of media. - * The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.) - *********************************************************/ -private void buildPlay(String channelId, String media, String lang, int offsetms, int skipms, String playbackId) { -reset(); -url = "/channels/" + channelId + "/play"; -method = "POST"; -lParamQuery.add( HttpParam.build( "media", media) ); -lParamQuery.add( HttpParam.build( "lang", lang) ); -lParamQuery.add( HttpParam.build( "offsetms", offsetms) ); -lParamQuery.add( HttpParam.build( "skipms", skipms) ); -lParamQuery.add( HttpParam.build( "playbackId", playbackId) ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -lE.add( HttpResponse.build( 412, "Channel in invalid state") ); -} - -@Override -public Playback play(String channelId, String media, String lang, int offsetms, int skipms, String playbackId) throws RestException { -buildPlay(channelId, media, lang, offsetms, skipms, playbackId); -String json = httpActionSync(); -return deserializeJson( json, Playback_impl_ari_1_10_0.class ); -} - -@Override -public void play(String channelId, String media, String lang, int offsetms, int skipms, String playbackId, AriCallback callback) { -buildPlay(channelId, media, lang, offsetms, skipms, playbackId); -httpActionAsync(callback, Playback_impl_ari_1_10_0.class); -} - -/********************************************************** - * Play media to a channel - * - * Start playback of media and specify the playbackId. - * The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.) - *********************************************************/ -private void buildPlayWithId(String channelId, String playbackId, String media, String lang, int offsetms, int skipms) { -reset(); -url = "/channels/" + channelId + "/play/" + playbackId + ""; -method = "POST"; -lParamQuery.add( HttpParam.build( "media", media) ); -lParamQuery.add( HttpParam.build( "lang", lang) ); -lParamQuery.add( HttpParam.build( "offsetms", offsetms) ); -lParamQuery.add( HttpParam.build( "skipms", skipms) ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -lE.add( HttpResponse.build( 412, "Channel in invalid state") ); -} - -@Override -public Playback playWithId(String channelId, String playbackId, String media, String lang, int offsetms, int skipms) throws RestException { -buildPlayWithId(channelId, playbackId, media, lang, offsetms, skipms); -String json = httpActionSync(); -return deserializeJson( json, Playback_impl_ari_1_10_0.class ); -} - -@Override -public void playWithId(String channelId, String playbackId, String media, String lang, int offsetms, int skipms, AriCallback callback) { -buildPlayWithId(channelId, playbackId, media, lang, offsetms, skipms); -httpActionAsync(callback, Playback_impl_ari_1_10_0.class); -} - -/********************************************************** - * Record audio from a channel - * - * Start a recording. - * 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. - *********************************************************/ -private void buildRecord(String channelId, String name, String format, int maxDurationSeconds, int maxSilenceSeconds, String ifExists, boolean beep, String terminateOn) { -reset(); -url = "/channels/" + channelId + "/record"; -method = "POST"; -lParamQuery.add( HttpParam.build( "name", name) ); -lParamQuery.add( HttpParam.build( "format", format) ); -lParamQuery.add( HttpParam.build( "maxDurationSeconds", maxDurationSeconds) ); -lParamQuery.add( HttpParam.build( "maxSilenceSeconds", maxSilenceSeconds) ); -lParamQuery.add( HttpParam.build( "ifExists", ifExists) ); -lParamQuery.add( HttpParam.build( "beep", beep) ); -lParamQuery.add( HttpParam.build( "terminateOn", terminateOn) ); -lE.add( HttpResponse.build( 400, "Invalid parameters") ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "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") ); -lE.add( HttpResponse.build( 422, "The format specified is unknown on this system") ); -} - -@Override -public LiveRecording record(String channelId, String name, String format, int maxDurationSeconds, int maxSilenceSeconds, String ifExists, boolean beep, String terminateOn) throws RestException { -buildRecord(channelId, name, format, maxDurationSeconds, maxSilenceSeconds, ifExists, beep, terminateOn); -String json = httpActionSync(); -return deserializeJson( json, LiveRecording_impl_ari_1_10_0.class ); -} - -@Override -public void record(String channelId, String name, String format, int maxDurationSeconds, int maxSilenceSeconds, String ifExists, boolean beep, String terminateOn, AriCallback callback) { -buildRecord(channelId, name, format, maxDurationSeconds, maxSilenceSeconds, ifExists, beep, terminateOn); -httpActionAsync(callback, LiveRecording_impl_ari_1_10_0.class); -} - -/********************************************************** - * Inform the channel that it should redirect itself to a different location. Note that this will almost certainly cause the channel to exit the application. - * - * Redirect the channel to a different location. - *********************************************************/ -private void buildRedirect(String channelId, String endpoint) { -reset(); -url = "/channels/" + channelId + "/redirect"; -method = "POST"; -lParamQuery.add( HttpParam.build( "endpoint", endpoint) ); -lE.add( HttpResponse.build( 400, "Endpoint parameter not provided") ); -lE.add( HttpResponse.build( 404, "Channel or endpoint not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -lE.add( HttpResponse.build( 422, "Endpoint is not the same type as the channel") ); -lE.add( HttpResponse.build( 412, "Channel in invalid state") ); -} - -@Override -public void redirect(String channelId, String endpoint) throws RestException { -buildRedirect(channelId, endpoint); -String json = httpActionSync(); -} - -@Override -public void redirect(String channelId, String endpoint, AriCallback callback) { -buildRedirect(channelId, endpoint); -httpActionAsync(callback); -} - -/********************************************************** - * Send a ringing indication to a channel - * - * Indicate ringing to a channel. - *********************************************************/ -private void buildRing(String channelId) { -reset(); -url = "/channels/" + channelId + "/ring"; -method = "POST"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -lE.add( HttpResponse.build( 412, "Channel in invalid state") ); -} - -@Override -public void ring(String channelId) throws RestException { -buildRing(channelId); -String json = httpActionSync(); -} - -@Override -public void ring(String channelId, AriCallback callback) { -buildRing(channelId); -httpActionAsync(callback); -} - -/********************************************************** - * Send a ringing indication to a channel - * - * Stop ringing indication on a channel if locally generated. - *********************************************************/ -private void buildRingStop(String channelId) { -reset(); -url = "/channels/" + channelId + "/ring"; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -lE.add( HttpResponse.build( 412, "Channel in invalid state") ); -} - -@Override -public void ringStop(String channelId) throws RestException { -buildRingStop(channelId); -String json = httpActionSync(); -} - -@Override -public void ringStop(String channelId, AriCallback callback) { -buildRingStop(channelId); -httpActionAsync(callback); -} - -/********************************************************** - * Play silence to a channel - * - * Play silence to a channel. - * Using media operations such as /play on a channel playing silence in this manner will suspend silence without resuming automatically. - *********************************************************/ -private void buildStartSilence(String channelId) { -reset(); -url = "/channels/" + channelId + "/silence"; -method = "POST"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -lE.add( HttpResponse.build( 412, "Channel in invalid state") ); -} - -@Override -public void startSilence(String channelId) throws RestException { -buildStartSilence(channelId); -String json = httpActionSync(); -} - -@Override -public void startSilence(String channelId, AriCallback callback) { -buildStartSilence(channelId); -httpActionAsync(callback); -} - -/********************************************************** - * Play silence to a channel - * - * Stop playing silence to a channel. - *********************************************************/ -private void buildStopSilence(String channelId) { -reset(); -url = "/channels/" + channelId + "/silence"; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -lE.add( HttpResponse.build( 412, "Channel in invalid state") ); -} - -@Override -public void stopSilence(String channelId) throws RestException { -buildStopSilence(channelId); -String json = httpActionSync(); -} - -@Override -public void stopSilence(String channelId, AriCallback callback) { -buildStopSilence(channelId); -httpActionAsync(callback); -} - -/********************************************************** - * Snoop (spy/whisper) on a channel - * - * Start snooping. - * Snoop (spy/whisper) on a specific channel. - *********************************************************/ -private void buildSnoopChannel(String channelId, String spy, String whisper, String app, String appArgs, String snoopId) { -reset(); -url = "/channels/" + channelId + "/snoop"; -method = "POST"; -lParamQuery.add( HttpParam.build( "spy", spy) ); -lParamQuery.add( HttpParam.build( "whisper", whisper) ); -lParamQuery.add( HttpParam.build( "app", app) ); -lParamQuery.add( HttpParam.build( "appArgs", appArgs) ); -lParamQuery.add( HttpParam.build( "snoopId", snoopId) ); -lE.add( HttpResponse.build( 400, "Invalid parameters") ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -} - -@Override -public Channel snoopChannel(String channelId, String spy, String whisper, String app, String appArgs, String snoopId) throws RestException { -buildSnoopChannel(channelId, spy, whisper, app, appArgs, snoopId); -String json = httpActionSync(); -return deserializeJson( json, Channel_impl_ari_1_10_0.class ); -} - -@Override -public void snoopChannel(String channelId, String spy, String whisper, String app, String appArgs, String snoopId, AriCallback callback) { -buildSnoopChannel(channelId, spy, whisper, app, appArgs, snoopId); -httpActionAsync(callback, Channel_impl_ari_1_10_0.class); -} - -/********************************************************** - * Snoop (spy/whisper) on a channel - * - * Start snooping. - * Snoop (spy/whisper) on a specific channel. - *********************************************************/ -private void buildSnoopChannelWithId(String channelId, String snoopId, String spy, String whisper, String app, String appArgs) { -reset(); -url = "/channels/" + channelId + "/snoop/" + snoopId + ""; -method = "POST"; -lParamQuery.add( HttpParam.build( "spy", spy) ); -lParamQuery.add( HttpParam.build( "whisper", whisper) ); -lParamQuery.add( HttpParam.build( "app", app) ); -lParamQuery.add( HttpParam.build( "appArgs", appArgs) ); -lE.add( HttpResponse.build( 400, "Invalid parameters") ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -} - -@Override -public Channel snoopChannelWithId(String channelId, String snoopId, String spy, String whisper, String app, String appArgs) throws RestException { -buildSnoopChannelWithId(channelId, snoopId, spy, whisper, app, appArgs); -String json = httpActionSync(); -return deserializeJson( json, Channel_impl_ari_1_10_0.class ); -} - -@Override -public void snoopChannelWithId(String channelId, String snoopId, String spy, String whisper, String app, String appArgs, AriCallback callback) { -buildSnoopChannelWithId(channelId, snoopId, spy, whisper, app, appArgs); -httpActionAsync(callback, Channel_impl_ari_1_10_0.class); -} - -/********************************************************** - * Variables on a channel - * - * Get the value of a channel variable or function. - *********************************************************/ -private void buildGetChannelVar(String channelId, String variable) { -reset(); -url = "/channels/" + channelId + "/variable"; -method = "GET"; -lParamQuery.add( HttpParam.build( "variable", variable) ); -lE.add( HttpResponse.build( 400, "Missing variable parameter.") ); -lE.add( HttpResponse.build( 404, "Channel or variable not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public Variable getChannelVar(String channelId, String variable) throws RestException { -buildGetChannelVar(channelId, variable); -String json = httpActionSync(); -return deserializeJson( json, Variable_impl_ari_1_10_0.class ); -} - -@Override -public void getChannelVar(String channelId, String variable, AriCallback callback) { -buildGetChannelVar(channelId, variable); -httpActionAsync(callback, Variable_impl_ari_1_10_0.class); -} - -/********************************************************** - * Variables on a channel - * - * Set the value of a channel variable or function. - *********************************************************/ -private void buildSetChannelVar(String channelId, String variable, String value) { -reset(); -url = "/channels/" + channelId + "/variable"; -method = "POST"; -lParamQuery.add( HttpParam.build( "variable", variable) ); -lParamQuery.add( HttpParam.build( "value", value) ); -lE.add( HttpResponse.build( 400, "Missing variable parameter.") ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void setChannelVar(String channelId, String variable, String value) throws RestException { -buildSetChannelVar(channelId, variable, value); -String json = httpActionSync(); -} - -@Override -public void setChannelVar(String channelId, String variable, String value, AriCallback callback) { -buildSetChannelVar(channelId, variable, value); -httpActionAsync(callback); -} - -/********************************************************** - * - * - * @since ari_1_5_0 - *********************************************************/ -public void originateWithId(String channelId, String endpoint, String extension, String context, long priority, String app, String appArgs, String callerId, int timeout, Map variables, String otherChannelId, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void snoopChannel(String channelId, String spy, String whisper, String app, String appArgs, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void continueInDialplan(String channelId, String context, String extension, int priority, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Start playback of media. - * 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.) - * - * @since ari_0_0_1 - *********************************************************/ -public Playback play(String channelId, String media, String lang, int offsetms, int skipms) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Exit application{ - throw new UnsupportedOperationException("Method availble from ..."); -}; continue execution in the dialplan. - * - * - * @since ari_0_0_1 - *********************************************************/ -public void continueInDialplan(String channelId, String context, String extension, int priority) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void originate(String endpoint, String extension, String context, long priority, String app, String appArgs, String callerId, int timeout, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_7_0 - *********************************************************/ -public void originate(String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String channelId, String otherChannelId, String originator, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new channel (originate). - * 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. - * - * @since ari_1_7_0 - *********************************************************/ -public Channel originate(String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String channelId, String otherChannelId, String originator) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_5_0 - *********************************************************/ -public void originate(String endpoint, String extension, String context, long priority, String app, String appArgs, String callerId, int timeout, Map variables, String channelId, String otherChannelId, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new channel (originate). - * 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. - * - * @since ari_0_0_1 - *********************************************************/ -public Channel originate(String endpoint, String extension, String context, long priority, String app, String appArgs, String callerId, int timeout) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new channel (originate with id). - * 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. - * - * @since ari_1_5_0 - *********************************************************/ -public Channel originateWithId(String channelId, String endpoint, String extension, String context, long priority, String app, String appArgs, String callerId, int timeout, Map variables, String otherChannelId) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_7_0 - *********************************************************/ -public void originateWithId(String channelId, String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String otherChannelId, String originator, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new channel (originate). - * 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. - * - * @since ari_1_5_0 - *********************************************************/ -public Channel originate(String endpoint, String extension, String context, long priority, String app, String appArgs, String callerId, int timeout, Map variables, String channelId, String otherChannelId) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void play(String channelId, String media, String lang, int offsetms, int skipms, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new channel (originate with id). - * 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. - * - * @since ari_1_7_0 - *********************************************************/ -public Channel originateWithId(String channelId, String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String otherChannelId, String originator) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Start snooping. - * Snoop (spy/whisper) on a specific channel. - * - * @since ari_0_0_1 - *********************************************************/ -public Channel snoopChannel(String channelId, String spy, String whisper, String app, String appArgs) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/actions/ActionDeviceStates_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/actions/ActionDeviceStates_impl_ari_1_10_0.java deleted file mode 100644 index cfc3eff5..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/actions/ActionDeviceStates_impl_ari_1_10_0.java +++ /dev/null @@ -1,131 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_10_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionDeviceStates_impl_ari_1_10_0 extends BaseAriAction implements ActionDeviceStates { -/********************************************************** - * Device states - * - * List all ARI controlled device states. - *********************************************************/ -private void buildList() { -reset(); -url = "/deviceStates"; -method = "GET"; -} - -@Override -public List list() throws RestException { -buildList(); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void list(AriCallback> callback) { -buildList(); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Device state - * - * Retrieve the current state of a device. - *********************************************************/ -private void buildGet(String deviceName) { -reset(); -url = "/deviceStates/" + deviceName + ""; -method = "GET"; -} - -@Override -public DeviceState get(String deviceName) throws RestException { -buildGet(deviceName); -String json = httpActionSync(); -return deserializeJson( json, DeviceState_impl_ari_1_10_0.class ); -} - -@Override -public void get(String deviceName, AriCallback callback) { -buildGet(deviceName); -httpActionAsync(callback, DeviceState_impl_ari_1_10_0.class); -} - -/********************************************************** - * Device state - * - * Change the state of a device controlled by ARI. (Note - implicitly creates the device state). - *********************************************************/ -private void buildUpdate(String deviceName, String deviceState) { -reset(); -url = "/deviceStates/" + deviceName + ""; -method = "PUT"; -lParamQuery.add( HttpParam.build( "deviceState", deviceState) ); -lE.add( HttpResponse.build( 404, "Device name is missing") ); -lE.add( HttpResponse.build( 409, "Uncontrolled device specified") ); -} - -@Override -public void update(String deviceName, String deviceState) throws RestException { -buildUpdate(deviceName, deviceState); -String json = httpActionSync(); -} - -@Override -public void update(String deviceName, String deviceState, AriCallback callback) { -buildUpdate(deviceName, deviceState); -httpActionAsync(callback); -} - -/********************************************************** - * Device state - * - * Destroy a device-state controlled by ARI. - *********************************************************/ -private void buildDelete(String deviceName) { -reset(); -url = "/deviceStates/" + deviceName + ""; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Device name is missing") ); -lE.add( HttpResponse.build( 409, "Uncontrolled device specified") ); -} - -@Override -public void delete(String deviceName) throws RestException { -buildDelete(deviceName); -String json = httpActionSync(); -} - -@Override -public void delete(String deviceName, AriCallback callback) { -buildDelete(deviceName); -httpActionAsync(callback); -} - -/** No missing signatures from interface */ -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/actions/ActionEndpoints_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/actions/ActionEndpoints_impl_ari_1_10_0.java deleted file mode 100644 index bb25b0ec..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/actions/ActionEndpoints_impl_ari_1_10_0.java +++ /dev/null @@ -1,165 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_10_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionEndpoints_impl_ari_1_10_0 extends BaseAriAction implements ActionEndpoints { -/********************************************************** - * Asterisk endpoints - * - * List all endpoints. - *********************************************************/ -private void buildList() { -reset(); -url = "/endpoints"; -method = "GET"; -} - -@Override -public List list() throws RestException { -buildList(); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void list(AriCallback> callback) { -buildList(); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Send a message to some technology URI or endpoint. - * - * Send a message to some technology URI or endpoint. - *********************************************************/ -private void buildSendMessage(String to, String from, String body, Map variables) { -reset(); -url = "/endpoints/sendMessage"; -method = "PUT"; -lParamQuery.add( HttpParam.build( "to", to) ); -lParamQuery.add( HttpParam.build( "from", from) ); -lParamQuery.add( HttpParam.build( "body", body) ); -lParamBody.addAll( HttpParam.build( "variables", variables) ); -lE.add( HttpResponse.build( 400, "Invalid parameters for sending a message.") ); -lE.add( HttpResponse.build( 404, "Endpoint not found") ); -} - -@Override -public void sendMessage(String to, String from, String body, Map variables) throws RestException { -buildSendMessage(to, from, body, variables); -String json = httpActionSync(); -} - -@Override -public void sendMessage(String to, String from, String body, Map variables, AriCallback callback) { -buildSendMessage(to, from, body, variables); -httpActionAsync(callback); -} - -/********************************************************** - * Asterisk endpoints - * - * List available endoints for a given endpoint technology. - *********************************************************/ -private void buildListByTech(String tech) { -reset(); -url = "/endpoints/" + tech + ""; -method = "GET"; -lE.add( HttpResponse.build( 404, "Endpoints not found") ); -} - -@Override -public List listByTech(String tech) throws RestException { -buildListByTech(tech); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void listByTech(String tech, AriCallback> callback) { -buildListByTech(tech); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Single endpoint - * - * Details for an endpoint. - *********************************************************/ -private void buildGet(String tech, String resource) { -reset(); -url = "/endpoints/" + tech + "/" + resource + ""; -method = "GET"; -lE.add( HttpResponse.build( 400, "Invalid parameters for sending a message.") ); -lE.add( HttpResponse.build( 404, "Endpoints not found") ); -} - -@Override -public Endpoint get(String tech, String resource) throws RestException { -buildGet(tech, resource); -String json = httpActionSync(); -return deserializeJson( json, Endpoint_impl_ari_1_10_0.class ); -} - -@Override -public void get(String tech, String resource, AriCallback callback) { -buildGet(tech, resource); -httpActionAsync(callback, Endpoint_impl_ari_1_10_0.class); -} - -/********************************************************** - * Send a message to some endpoint in a technology. - * - * Send a message to some endpoint in a technology. - *********************************************************/ -private void buildSendMessageToEndpoint(String tech, String resource, String from, String body, Map variables) { -reset(); -url = "/endpoints/" + tech + "/" + resource + "/sendMessage"; -method = "PUT"; -lParamQuery.add( HttpParam.build( "from", from) ); -lParamQuery.add( HttpParam.build( "body", body) ); -lParamBody.addAll( HttpParam.build( "variables", variables) ); -lE.add( HttpResponse.build( 400, "Invalid parameters for sending a message.") ); -lE.add( HttpResponse.build( 404, "Endpoint not found") ); -} - -@Override -public void sendMessageToEndpoint(String tech, String resource, String from, String body, Map variables) throws RestException { -buildSendMessageToEndpoint(tech, resource, from, body, variables); -String json = httpActionSync(); -} - -@Override -public void sendMessageToEndpoint(String tech, String resource, String from, String body, Map variables, AriCallback callback) { -buildSendMessageToEndpoint(tech, resource, from, body, variables); -httpActionAsync(callback); -} - -/** No missing signatures from interface */ -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/actions/ActionEvents_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/actions/ActionEvents_impl_ari_1_10_0.java deleted file mode 100644 index ad1c9424..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/actions/ActionEvents_impl_ari_1_10_0.java +++ /dev/null @@ -1,103 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_10_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionEvents_impl_ari_1_10_0 extends BaseAriAction implements ActionEvents { -/********************************************************** - * Events from Asterisk to applications - * - * WebSocket connection for events. - *********************************************************/ -private void buildEventWebsocket(String app, boolean subscribeAll) { -reset(); -url = "/events"; -method = "GET"; -lParamQuery.add( HttpParam.build( "app", app) ); -lParamQuery.add( HttpParam.build( "subscribeAll", subscribeAll) ); -wsUpgrade = true; -} - -@Override -public Message eventWebsocket(String app, boolean subscribeAll) throws RestException { -throw new RestException("No synchronous operation on WebSocket"); -} - -@Override -public void eventWebsocket(String app, boolean subscribeAll, AriCallback callback) { -buildEventWebsocket(app, subscribeAll); -httpActionAsync(callback, Message_impl_ari_1_10_0.class); -} - -/********************************************************** - * Stasis application user events - * - * Generate a user event. - *********************************************************/ -private void buildUserEvent(String eventName, String application, String source, Map variables) { -reset(); -url = "/events/user/" + eventName + ""; -method = "POST"; -lParamQuery.add( HttpParam.build( "application", application) ); -lParamQuery.add( HttpParam.build( "source", source) ); -lParamBody.addAll( HttpParam.build( "variables", variables) ); -lE.add( HttpResponse.build( 404, "Application does not exist.") ); -lE.add( HttpResponse.build( 422, "Event source not found.") ); -lE.add( HttpResponse.build( 400, "Invalid even tsource URI or userevent data.") ); -} - -@Override -public void userEvent(String eventName, String application, String source, Map variables) throws RestException { -buildUserEvent(eventName, application, source, variables); -String json = httpActionSync(); -} - -@Override -public void userEvent(String eventName, String application, String source, Map variables, AriCallback callback) { -buildUserEvent(eventName, application, source, variables); -httpActionAsync(callback); -} - -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void eventWebsocket(String app, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * WebSocket connection for events. - * - * - * @since ari_0_0_1 - *********************************************************/ -public Message eventWebsocket(String app) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/actions/ActionPlaybacks_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/actions/ActionPlaybacks_impl_ari_1_10_0.java deleted file mode 100644 index 0be19c2a..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/actions/ActionPlaybacks_impl_ari_1_10_0.java +++ /dev/null @@ -1,107 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_10_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionPlaybacks_impl_ari_1_10_0 extends BaseAriAction implements ActionPlaybacks { -/********************************************************** - * Control object for a playback operation. - * - * Get a playback's details. - *********************************************************/ -private void buildGet(String playbackId) { -reset(); -url = "/playbacks/" + playbackId + ""; -method = "GET"; -lE.add( HttpResponse.build( 404, "The playback cannot be found") ); -} - -@Override -public Playback get(String playbackId) throws RestException { -buildGet(playbackId); -String json = httpActionSync(); -return deserializeJson( json, Playback_impl_ari_1_10_0.class ); -} - -@Override -public void get(String playbackId, AriCallback callback) { -buildGet(playbackId); -httpActionAsync(callback, Playback_impl_ari_1_10_0.class); -} - -/********************************************************** - * Control object for a playback operation. - * - * Stop a playback. - *********************************************************/ -private void buildStop(String playbackId) { -reset(); -url = "/playbacks/" + playbackId + ""; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "The playback cannot be found") ); -} - -@Override -public void stop(String playbackId) throws RestException { -buildStop(playbackId); -String json = httpActionSync(); -} - -@Override -public void stop(String playbackId, AriCallback callback) { -buildStop(playbackId); -httpActionAsync(callback); -} - -/********************************************************** - * Control object for a playback operation. - * - * Control a playback. - *********************************************************/ -private void buildControl(String playbackId, String operation) { -reset(); -url = "/playbacks/" + playbackId + "/control"; -method = "POST"; -lParamQuery.add( HttpParam.build( "operation", operation) ); -lE.add( HttpResponse.build( 400, "The provided operation parameter was invalid") ); -lE.add( HttpResponse.build( 404, "The playback cannot be found") ); -lE.add( HttpResponse.build( 409, "The operation cannot be performed in the playback's current state") ); -} - -@Override -public void control(String playbackId, String operation) throws RestException { -buildControl(playbackId, operation); -String json = httpActionSync(); -} - -@Override -public void control(String playbackId, String operation, AriCallback callback) { -buildControl(playbackId, operation); -httpActionAsync(callback); -} - -/** No missing signatures from interface */ -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/actions/ActionRecordings_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/actions/ActionRecordings_impl_ari_1_10_0.java deleted file mode 100644 index 9ed2c32a..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/actions/ActionRecordings_impl_ari_1_10_0.java +++ /dev/null @@ -1,333 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_10_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionRecordings_impl_ari_1_10_0 extends BaseAriAction implements ActionRecordings { -/********************************************************** - * A recording that is in progress - * - * List live recordings. - *********************************************************/ -private void buildGetLive(String recordingName) { -reset(); -url = "/recordings/live/" + recordingName + ""; -method = "GET"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -} - -@Override -public LiveRecording getLive(String recordingName) throws RestException { -buildGetLive(recordingName); -String json = httpActionSync(); -return deserializeJson( json, LiveRecording_impl_ari_1_10_0.class ); -} - -@Override -public void getLive(String recordingName, AriCallback callback) { -buildGetLive(recordingName); -httpActionAsync(callback, LiveRecording_impl_ari_1_10_0.class); -} - -/********************************************************** - * A recording that is in progress - * - * Stop a live recording and discard it. - *********************************************************/ -private void buildCancel(String recordingName) { -reset(); -url = "/recordings/live/" + recordingName + ""; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -} - -@Override -public void cancel(String recordingName) throws RestException { -buildCancel(recordingName); -String json = httpActionSync(); -} - -@Override -public void cancel(String recordingName, AriCallback callback) { -buildCancel(recordingName); -httpActionAsync(callback); -} - -/********************************************************** - * - * - * Mute a live recording. - * Muting a recording suspends silence detection, which will be restarted when the recording is unmuted. - *********************************************************/ -private void buildMute(String recordingName) { -reset(); -url = "/recordings/live/" + recordingName + "/mute"; -method = "POST"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -lE.add( HttpResponse.build( 409, "Recording not in session") ); -} - -@Override -public void mute(String recordingName) throws RestException { -buildMute(recordingName); -String json = httpActionSync(); -} - -@Override -public void mute(String recordingName, AriCallback callback) { -buildMute(recordingName); -httpActionAsync(callback); -} - -/********************************************************** - * - * - * Unmute a live recording. - *********************************************************/ -private void buildUnmute(String recordingName) { -reset(); -url = "/recordings/live/" + recordingName + "/mute"; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -lE.add( HttpResponse.build( 409, "Recording not in session") ); -} - -@Override -public void unmute(String recordingName) throws RestException { -buildUnmute(recordingName); -String json = httpActionSync(); -} - -@Override -public void unmute(String recordingName, AriCallback callback) { -buildUnmute(recordingName); -httpActionAsync(callback); -} - -/********************************************************** - * - * - * Pause a live recording. - * Pausing a recording suspends silence detection, which will be restarted when the recording is unpaused. Paused time is not included in the accounting for maxDurationSeconds. - *********************************************************/ -private void buildPause(String recordingName) { -reset(); -url = "/recordings/live/" + recordingName + "/pause"; -method = "POST"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -lE.add( HttpResponse.build( 409, "Recording not in session") ); -} - -@Override -public void pause(String recordingName) throws RestException { -buildPause(recordingName); -String json = httpActionSync(); -} - -@Override -public void pause(String recordingName, AriCallback callback) { -buildPause(recordingName); -httpActionAsync(callback); -} - -/********************************************************** - * - * - * Unpause a live recording. - *********************************************************/ -private void buildUnpause(String recordingName) { -reset(); -url = "/recordings/live/" + recordingName + "/pause"; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -lE.add( HttpResponse.build( 409, "Recording not in session") ); -} - -@Override -public void unpause(String recordingName) throws RestException { -buildUnpause(recordingName); -String json = httpActionSync(); -} - -@Override -public void unpause(String recordingName, AriCallback callback) { -buildUnpause(recordingName); -httpActionAsync(callback); -} - -/********************************************************** - * - * - * Stop a live recording and store it. - *********************************************************/ -private void buildStop(String recordingName) { -reset(); -url = "/recordings/live/" + recordingName + "/stop"; -method = "POST"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -} - -@Override -public void stop(String recordingName) throws RestException { -buildStop(recordingName); -String json = httpActionSync(); -} - -@Override -public void stop(String recordingName, AriCallback callback) { -buildStop(recordingName); -httpActionAsync(callback); -} - -/********************************************************** - * Recordings - * - * List recordings that are complete. - *********************************************************/ -private void buildListStored() { -reset(); -url = "/recordings/stored"; -method = "GET"; -} - -@Override -public List listStored() throws RestException { -buildListStored(); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void listStored(AriCallback> callback) { -buildListStored(); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Individual recording - * - * Get a stored recording's details. - *********************************************************/ -private void buildGetStored(String recordingName) { -reset(); -url = "/recordings/stored/" + recordingName + ""; -method = "GET"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -} - -@Override -public StoredRecording getStored(String recordingName) throws RestException { -buildGetStored(recordingName); -String json = httpActionSync(); -return deserializeJson( json, StoredRecording_impl_ari_1_10_0.class ); -} - -@Override -public void getStored(String recordingName, AriCallback callback) { -buildGetStored(recordingName); -httpActionAsync(callback, StoredRecording_impl_ari_1_10_0.class); -} - -/********************************************************** - * Individual recording - * - * Delete a stored recording. - *********************************************************/ -private void buildDeleteStored(String recordingName) { -reset(); -url = "/recordings/stored/" + recordingName + ""; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -} - -@Override -public void deleteStored(String recordingName) throws RestException { -buildDeleteStored(recordingName); -String json = httpActionSync(); -} - -@Override -public void deleteStored(String recordingName, AriCallback callback) { -buildDeleteStored(recordingName); -httpActionAsync(callback); -} - -/********************************************************** - * Copy an individual recording - * - * Copy a stored recording. - *********************************************************/ -private void buildCopyStored(String recordingName, String destinationRecordingName) { -reset(); -url = "/recordings/stored/" + recordingName + "/copy"; -method = "POST"; -lParamQuery.add( HttpParam.build( "destinationRecordingName", destinationRecordingName) ); -lE.add( HttpResponse.build( 404, "Recording not found") ); -lE.add( HttpResponse.build( 409, "A recording with the same name already exists on the system") ); -} - -@Override -public StoredRecording copyStored(String recordingName, String destinationRecordingName) throws RestException { -buildCopyStored(recordingName, destinationRecordingName); -String json = httpActionSync(); -return deserializeJson( json, StoredRecording_impl_ari_1_10_0.class ); -} - -@Override -public void copyStored(String recordingName, String destinationRecordingName, AriCallback callback) { -buildCopyStored(recordingName, destinationRecordingName); -httpActionAsync(callback, StoredRecording_impl_ari_1_10_0.class); -} - -/********************************************************** - * The actual file associated with the stored recording - * - * Get the file associated with the stored recording. - *********************************************************/ -private void buildGetStoredFile(String recordingName) { -reset(); -url = "/recordings/stored/" + recordingName + "/file"; -method = "GET"; -lE.add( HttpResponse.build( 403, "The recording file could not be opened") ); -lE.add( HttpResponse.build( 404, "Recording not found") ); -} - -@Override -public byte[] getStoredFile(String recordingName) throws RestException { -buildGetStoredFile(recordingName); -String json = httpActionSync(); -return deserializeJson( json, byte[].class ); -} - -@Override -public void getStoredFile(String recordingName, AriCallback callback) { -buildGetStoredFile(recordingName); -httpActionAsync(callback, byte[].class); -} - -/** No missing signatures from interface */ -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/actions/ActionSounds_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/actions/ActionSounds_impl_ari_1_10_0.java deleted file mode 100644 index edeca389..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/actions/ActionSounds_impl_ari_1_10_0.java +++ /dev/null @@ -1,82 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_10_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionSounds_impl_ari_1_10_0 extends BaseAriAction implements ActionSounds { -/********************************************************** - * Sounds - * - * List all sounds. - *********************************************************/ -private void buildList(String lang, String format) { -reset(); -url = "/sounds"; -method = "GET"; -lParamQuery.add( HttpParam.build( "lang", lang) ); -lParamQuery.add( HttpParam.build( "format", format) ); -} - -@Override -public List list(String lang, String format) throws RestException { -buildList(lang, format); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void list(String lang, String format, AriCallback> callback) { -buildList(lang, format); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Individual sound - * - * Get a sound's details. - *********************************************************/ -private void buildGet(String soundId) { -reset(); -url = "/sounds/" + soundId + ""; -method = "GET"; -} - -@Override -public Sound get(String soundId) throws RestException { -buildGet(soundId); -String json = httpActionSync(); -return deserializeJson( json, Sound_impl_ari_1_10_0.class ); -} - -@Override -public void get(String soundId, AriCallback callback) { -buildGet(soundId); -httpActionAsync(callback, Sound_impl_ari_1_10_0.class); -} - -/** No missing signatures from interface */ -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/ApplicationReplaced_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/ApplicationReplaced_impl_ari_1_10_0.java deleted file mode 100644 index b7309907..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/ApplicationReplaced_impl_ari_1_10_0.java +++ /dev/null @@ -1,28 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that another WebSocket has taken over for an application. - * - * An 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. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ApplicationReplaced_impl_ari_1_10_0 extends Event_impl_ari_1_10_0 implements ApplicationReplaced, java.io.Serializable { -private static final long serialVersionUID = 1L; -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/Application_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/Application_impl_ari_1_10_0.java deleted file mode 100644 index 68df81bd..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/Application_impl_ari_1_10_0.java +++ /dev/null @@ -1,81 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Details of a Stasis application - * - * Defined in file: applications.json - * Generated by: Model - *********************************************************/ - -public class Application_impl_ari_1_10_0 implements Application, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Id's for bridges subscribed to. */ - private List bridge_ids; - public List getBridge_ids() { - return bridge_ids; - } - - @JsonDeserialize( contentAs=String.class ) - public void setBridge_ids(List val ) { - bridge_ids = val; - } - - /** Id's for channels subscribed to. */ - private List channel_ids; - public List getChannel_ids() { - return channel_ids; - } - - @JsonDeserialize( contentAs=String.class ) - public void setChannel_ids(List val ) { - channel_ids = val; - } - - /** Names of the devices subscribed to. */ - private List device_names; - public List getDevice_names() { - return device_names; - } - - @JsonDeserialize( contentAs=String.class ) - public void setDevice_names(List val ) { - device_names = val; - } - - /** {tech}/{resource} for endpoints subscribed to. */ - private List endpoint_ids; - public List getEndpoint_ids() { - return endpoint_ids; - } - - @JsonDeserialize( contentAs=String.class ) - public void setEndpoint_ids(List val ) { - endpoint_ids = val; - } - - /** Name of this application */ - private String name; - public String getName() { - return name; - } - - @JsonDeserialize( as=String.class ) - public void setName(String val ) { - name = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/AsteriskInfo_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/AsteriskInfo_impl_ari_1_10_0.java deleted file mode 100644 index 445660e5..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/AsteriskInfo_impl_ari_1_10_0.java +++ /dev/null @@ -1,70 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Asterisk system information - * - * Defined in file: asterisk.json - * Generated by: Model - *********************************************************/ - -public class AsteriskInfo_impl_ari_1_10_0 implements AsteriskInfo, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Info about how Asterisk was built */ - private BuildInfo build; - public BuildInfo getBuild() { - return build; - } - - @JsonDeserialize( as=BuildInfo_impl_ari_1_10_0.class ) - public void setBuild(BuildInfo val ) { - build = val; - } - - /** Info about Asterisk configuration */ - private ConfigInfo config; - public ConfigInfo getConfig() { - return config; - } - - @JsonDeserialize( as=ConfigInfo_impl_ari_1_10_0.class ) - public void setConfig(ConfigInfo val ) { - config = val; - } - - /** Info about Asterisk status */ - private StatusInfo status; - public StatusInfo getStatus() { - return status; - } - - @JsonDeserialize( as=StatusInfo_impl_ari_1_10_0.class ) - public void setStatus(StatusInfo val ) { - status = val; - } - - /** Info about the system running Asterisk */ - private SystemInfo system; - public SystemInfo getSystem() { - return system; - } - - @JsonDeserialize( as=SystemInfo_impl_ari_1_10_0.class ) - public void setSystem(SystemInfo val ) { - system = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/BridgeAttendedTransfer_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/BridgeAttendedTransfer_impl_ari_1_10_0.java deleted file mode 100644 index 9f18f923..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/BridgeAttendedTransfer_impl_ari_1_10_0.java +++ /dev/null @@ -1,202 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that an attended transfer has occurred. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class BridgeAttendedTransfer_impl_ari_1_10_0 extends Event_impl_ari_1_10_0 implements BridgeAttendedTransfer, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Application that has been transferred into */ - private String destination_application; - public String getDestination_application() { - return destination_application; - } - - @JsonDeserialize( as=String.class ) - public void setDestination_application(String val ) { - destination_application = val; - } - - /** Bridge that survived the merge result */ - private String destination_bridge; - public String getDestination_bridge() { - return destination_bridge; - } - - @JsonDeserialize( as=String.class ) - public void setDestination_bridge(String val ) { - destination_bridge = val; - } - - /** First leg of a link transfer result */ - private Channel destination_link_first_leg; - public Channel getDestination_link_first_leg() { - return destination_link_first_leg; - } - - @JsonDeserialize( as=Channel_impl_ari_1_10_0.class ) - public void setDestination_link_first_leg(Channel val ) { - destination_link_first_leg = val; - } - - /** Second leg of a link transfer result */ - private Channel destination_link_second_leg; - public Channel getDestination_link_second_leg() { - return destination_link_second_leg; - } - - @JsonDeserialize( as=Channel_impl_ari_1_10_0.class ) - public void setDestination_link_second_leg(Channel val ) { - destination_link_second_leg = val; - } - - /** Bridge that survived the threeway result */ - private Bridge destination_threeway_bridge; - public Bridge getDestination_threeway_bridge() { - return destination_threeway_bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_10_0.class ) - public void setDestination_threeway_bridge(Bridge val ) { - destination_threeway_bridge = val; - } - - /** Transferer channel that survived the threeway result */ - private Channel destination_threeway_channel; - public Channel getDestination_threeway_channel() { - return destination_threeway_channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_10_0.class ) - public void setDestination_threeway_channel(Channel val ) { - destination_threeway_channel = val; - } - - /** How the transfer was accomplished */ - private String destination_type; - public String getDestination_type() { - return destination_type; - } - - @JsonDeserialize( as=String.class ) - public void setDestination_type(String val ) { - destination_type = val; - } - - /** Whether the transfer was externally initiated or not */ - private boolean is_external; - public boolean getIs_external() { - return is_external; - } - - @JsonDeserialize( as=boolean.class ) - public void setIs_external(boolean val ) { - is_external = val; - } - - /** The channel that is replacing transferer_first_leg in the swap */ - private Channel replace_channel; - public Channel getReplace_channel() { - return replace_channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_10_0.class ) - public void setReplace_channel(Channel val ) { - replace_channel = val; - } - - /** The result of the transfer attempt */ - private String result; - public String getResult() { - return result; - } - - @JsonDeserialize( as=String.class ) - public void setResult(String val ) { - result = val; - } - - /** The channel that is being transferred to */ - private Channel transfer_target; - public Channel getTransfer_target() { - return transfer_target; - } - - @JsonDeserialize( as=Channel_impl_ari_1_10_0.class ) - public void setTransfer_target(Channel val ) { - transfer_target = val; - } - - /** The channel that is being transferred */ - private Channel transferee; - public Channel getTransferee() { - return transferee; - } - - @JsonDeserialize( as=Channel_impl_ari_1_10_0.class ) - public void setTransferee(Channel val ) { - transferee = val; - } - - /** First leg of the transferer */ - private Channel transferer_first_leg; - public Channel getTransferer_first_leg() { - return transferer_first_leg; - } - - @JsonDeserialize( as=Channel_impl_ari_1_10_0.class ) - public void setTransferer_first_leg(Channel val ) { - transferer_first_leg = val; - } - - /** Bridge the transferer first leg is in */ - private Bridge transferer_first_leg_bridge; - public Bridge getTransferer_first_leg_bridge() { - return transferer_first_leg_bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_10_0.class ) - public void setTransferer_first_leg_bridge(Bridge val ) { - transferer_first_leg_bridge = val; - } - - /** Second leg of the transferer */ - private Channel transferer_second_leg; - public Channel getTransferer_second_leg() { - return transferer_second_leg; - } - - @JsonDeserialize( as=Channel_impl_ari_1_10_0.class ) - public void setTransferer_second_leg(Channel val ) { - transferer_second_leg = val; - } - - /** Bridge the transferer second leg is in */ - private Bridge transferer_second_leg_bridge; - public Bridge getTransferer_second_leg_bridge() { - return transferer_second_leg_bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_10_0.class ) - public void setTransferer_second_leg_bridge(Bridge val ) { - transferer_second_leg_bridge = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/BridgeBlindTransfer_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/BridgeBlindTransfer_impl_ari_1_10_0.java deleted file mode 100644 index 4bc78eb2..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/BridgeBlindTransfer_impl_ari_1_10_0.java +++ /dev/null @@ -1,114 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a blind transfer has occurred. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class BridgeBlindTransfer_impl_ari_1_10_0 extends Event_impl_ari_1_10_0 implements BridgeBlindTransfer, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The bridge being transferred */ - private Bridge bridge; - public Bridge getBridge() { - return bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_10_0.class ) - public void setBridge(Bridge val ) { - bridge = val; - } - - /** The channel performing the blind transfer */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_10_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - - /** The context transferred to */ - private String context; - public String getContext() { - return context; - } - - @JsonDeserialize( as=String.class ) - public void setContext(String val ) { - context = val; - } - - /** The extension transferred to */ - private String exten; - public String getExten() { - return exten; - } - - @JsonDeserialize( as=String.class ) - public void setExten(String val ) { - exten = val; - } - - /** Whether the transfer was externally initiated or not */ - private boolean is_external; - public boolean getIs_external() { - return is_external; - } - - @JsonDeserialize( as=boolean.class ) - public void setIs_external(boolean val ) { - is_external = val; - } - - /** The channel that is replacing transferer when the transferee(s) can not be transferred directly */ - private Channel replace_channel; - public Channel getReplace_channel() { - return replace_channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_10_0.class ) - public void setReplace_channel(Channel val ) { - replace_channel = val; - } - - /** The result of the transfer attempt */ - private String result; - public String getResult() { - return result; - } - - @JsonDeserialize( as=String.class ) - public void setResult(String val ) { - result = val; - } - - /** The channel that is being transferred */ - private Channel transferee; - public Channel getTransferee() { - return transferee; - } - - @JsonDeserialize( as=Channel_impl_ari_1_10_0.class ) - public void setTransferee(Channel val ) { - transferee = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/BridgeCreated_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/BridgeCreated_impl_ari_1_10_0.java deleted file mode 100644 index deb0f081..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/BridgeCreated_impl_ari_1_10_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a bridge has been created. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class BridgeCreated_impl_ari_1_10_0 extends Event_impl_ari_1_10_0 implements BridgeCreated, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Bridge bridge; - public Bridge getBridge() { - return bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_10_0.class ) - public void setBridge(Bridge val ) { - bridge = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/BridgeDestroyed_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/BridgeDestroyed_impl_ari_1_10_0.java deleted file mode 100644 index 83a5b676..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/BridgeDestroyed_impl_ari_1_10_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a bridge has been destroyed. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class BridgeDestroyed_impl_ari_1_10_0 extends Event_impl_ari_1_10_0 implements BridgeDestroyed, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Bridge bridge; - public Bridge getBridge() { - return bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_10_0.class ) - public void setBridge(Bridge val ) { - bridge = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/BridgeMerged_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/BridgeMerged_impl_ari_1_10_0.java deleted file mode 100644 index 76040d41..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/BridgeMerged_impl_ari_1_10_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that one bridge has merged into another. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class BridgeMerged_impl_ari_1_10_0 extends Event_impl_ari_1_10_0 implements BridgeMerged, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Bridge bridge; - public Bridge getBridge() { - return bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_10_0.class ) - public void setBridge(Bridge val ) { - bridge = val; - } - - /** */ - private Bridge bridge_from; - public Bridge getBridge_from() { - return bridge_from; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_10_0.class ) - public void setBridge_from(Bridge val ) { - bridge_from = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/Bridge_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/Bridge_impl_ari_1_10_0.java deleted file mode 100644 index 09bc6694..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/Bridge_impl_ari_1_10_0.java +++ /dev/null @@ -1,105 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * The merging of media from one or more channels. - * - * Everyone on the bridge receives the same audio. - * - * Defined in file: bridges.json - * Generated by: Model - *********************************************************/ - -public class Bridge_impl_ari_1_10_0 implements Bridge, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Bridging class */ - private String bridge_class; - public String getBridge_class() { - return bridge_class; - } - - @JsonDeserialize( as=String.class ) - public void setBridge_class(String val ) { - bridge_class = val; - } - - /** Type of bridge technology */ - private String bridge_type; - public String getBridge_type() { - return bridge_type; - } - - @JsonDeserialize( as=String.class ) - public void setBridge_type(String val ) { - bridge_type = val; - } - - /** Ids of channels participating in this bridge */ - private List channels; - public List getChannels() { - return channels; - } - - @JsonDeserialize( contentAs=String.class ) - public void setChannels(List val ) { - channels = val; - } - - /** Entity that created the bridge */ - private String creator; - public String getCreator() { - return creator; - } - - @JsonDeserialize( as=String.class ) - public void setCreator(String val ) { - creator = val; - } - - /** Unique identifier for this bridge */ - private String id; - public String getId() { - return id; - } - - @JsonDeserialize( as=String.class ) - public void setId(String val ) { - id = val; - } - - /** Name the creator gave the bridge */ - private String name; - public String getName() { - return name; - } - - @JsonDeserialize( as=String.class ) - public void setName(String val ) { - name = val; - } - - /** Name of the current bridging technology */ - private String technology; - public String getTechnology() { - return technology; - } - - @JsonDeserialize( as=String.class ) - public void setTechnology(String val ) { - technology = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/BuildInfo_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/BuildInfo_impl_ari_1_10_0.java deleted file mode 100644 index 2c808c8c..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/BuildInfo_impl_ari_1_10_0.java +++ /dev/null @@ -1,92 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Info about how Asterisk was built - * - * Defined in file: asterisk.json - * Generated by: Model - *********************************************************/ - -public class BuildInfo_impl_ari_1_10_0 implements BuildInfo, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Date and time when Asterisk was built. */ - private String date; - public String getDate() { - return date; - } - - @JsonDeserialize( as=String.class ) - public void setDate(String val ) { - date = val; - } - - /** Kernel version Asterisk was built on. */ - private String kernel; - public String getKernel() { - return kernel; - } - - @JsonDeserialize( as=String.class ) - public void setKernel(String val ) { - kernel = val; - } - - /** Machine architecture (x86_64, i686, ppc, etc.) */ - private String machine; - public String getMachine() { - return machine; - } - - @JsonDeserialize( as=String.class ) - public void setMachine(String val ) { - machine = val; - } - - /** Compile time options, or empty string if default. */ - private String options; - public String getOptions() { - return options; - } - - @JsonDeserialize( as=String.class ) - public void setOptions(String val ) { - options = val; - } - - /** OS Asterisk was built on. */ - private String os; - public String getOs() { - return os; - } - - @JsonDeserialize( as=String.class ) - public void setOs(String val ) { - os = val; - } - - /** Username that build Asterisk */ - private String user; - public String getUser() { - return user; - } - - @JsonDeserialize( as=String.class ) - public void setUser(String val ) { - user = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/CallerID_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/CallerID_impl_ari_1_10_0.java deleted file mode 100644 index d56a272e..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/CallerID_impl_ari_1_10_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Caller identification - * - * Defined in file: channels.json - * Generated by: Model - *********************************************************/ - -public class CallerID_impl_ari_1_10_0 implements CallerID, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private String name; - public String getName() { - return name; - } - - @JsonDeserialize( as=String.class ) - public void setName(String val ) { - name = val; - } - - /** */ - private String number; - public String getNumber() { - return number; - } - - @JsonDeserialize( as=String.class ) - public void setNumber(String val ) { - number = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/ChannelCallerId_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/ChannelCallerId_impl_ari_1_10_0.java deleted file mode 100644 index 1739dbe4..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/ChannelCallerId_impl_ari_1_10_0.java +++ /dev/null @@ -1,59 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Channel changed Caller ID. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelCallerId_impl_ari_1_10_0 extends Event_impl_ari_1_10_0 implements ChannelCallerId, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The integer representation of the Caller Presentation value. */ - private int caller_presentation; - public int getCaller_presentation() { - return caller_presentation; - } - - @JsonDeserialize( as=int.class ) - public void setCaller_presentation(int val ) { - caller_presentation = val; - } - - /** The text representation of the Caller Presentation value. */ - private String caller_presentation_txt; - public String getCaller_presentation_txt() { - return caller_presentation_txt; - } - - @JsonDeserialize( as=String.class ) - public void setCaller_presentation_txt(String val ) { - caller_presentation_txt = val; - } - - /** The channel that changed Caller ID. */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_10_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/ChannelConnectedLine_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/ChannelConnectedLine_impl_ari_1_10_0.java deleted file mode 100644 index a4c98322..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/ChannelConnectedLine_impl_ari_1_10_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Channel changed Connected Line. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelConnectedLine_impl_ari_1_10_0 extends Event_impl_ari_1_10_0 implements ChannelConnectedLine, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The channel whose connected line has changed. */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_10_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/ChannelCreated_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/ChannelCreated_impl_ari_1_10_0.java deleted file mode 100644 index 84a75722..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/ChannelCreated_impl_ari_1_10_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a channel has been created. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelCreated_impl_ari_1_10_0 extends Event_impl_ari_1_10_0 implements ChannelCreated, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_10_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/ChannelDestroyed_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/ChannelDestroyed_impl_ari_1_10_0.java deleted file mode 100644 index 89634699..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/ChannelDestroyed_impl_ari_1_10_0.java +++ /dev/null @@ -1,59 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a channel has been destroyed. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelDestroyed_impl_ari_1_10_0 extends Event_impl_ari_1_10_0 implements ChannelDestroyed, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Integer representation of the cause of the hangup */ - private int cause; - public int getCause() { - return cause; - } - - @JsonDeserialize( as=int.class ) - public void setCause(int val ) { - cause = val; - } - - /** Text representation of the cause of the hangup */ - private String cause_txt; - public String getCause_txt() { - return cause_txt; - } - - @JsonDeserialize( as=String.class ) - public void setCause_txt(String val ) { - cause_txt = val; - } - - /** */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_10_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/ChannelDialplan_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/ChannelDialplan_impl_ari_1_10_0.java deleted file mode 100644 index b6769b3b..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/ChannelDialplan_impl_ari_1_10_0.java +++ /dev/null @@ -1,59 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Channel changed location in the dialplan. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelDialplan_impl_ari_1_10_0 extends Event_impl_ari_1_10_0 implements ChannelDialplan, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The channel that changed dialplan location. */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_10_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - - /** The application about to be executed. */ - private String dialplan_app; - public String getDialplan_app() { - return dialplan_app; - } - - @JsonDeserialize( as=String.class ) - public void setDialplan_app(String val ) { - dialplan_app = val; - } - - /** The data to be passed to the application. */ - private String dialplan_app_data; - public String getDialplan_app_data() { - return dialplan_app_data; - } - - @JsonDeserialize( as=String.class ) - public void setDialplan_app_data(String val ) { - dialplan_app_data = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/ChannelDtmfReceived_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/ChannelDtmfReceived_impl_ari_1_10_0.java deleted file mode 100644 index f1ce01d9..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/ChannelDtmfReceived_impl_ari_1_10_0.java +++ /dev/null @@ -1,61 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * DTMF received on a channel. - * - * This event is sent when the DTMF ends. There is no notification about the start of DTMF - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelDtmfReceived_impl_ari_1_10_0 extends Event_impl_ari_1_10_0 implements ChannelDtmfReceived, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The channel on which DTMF was received */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_10_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - - /** DTMF digit received (0-9, A-E, # or *) */ - private String digit; - public String getDigit() { - return digit; - } - - @JsonDeserialize( as=String.class ) - public void setDigit(String val ) { - digit = val; - } - - /** Number of milliseconds DTMF was received */ - private int duration_ms; - public int getDuration_ms() { - return duration_ms; - } - - @JsonDeserialize( as=int.class ) - public void setDuration_ms(int val ) { - duration_ms = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/ChannelEnteredBridge_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/ChannelEnteredBridge_impl_ari_1_10_0.java deleted file mode 100644 index b4c334ec..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/ChannelEnteredBridge_impl_ari_1_10_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a channel has entered a bridge. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelEnteredBridge_impl_ari_1_10_0 extends Event_impl_ari_1_10_0 implements ChannelEnteredBridge, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Bridge bridge; - public Bridge getBridge() { - return bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_10_0.class ) - public void setBridge(Bridge val ) { - bridge = val; - } - - /** */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_10_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/ChannelHangupRequest_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/ChannelHangupRequest_impl_ari_1_10_0.java deleted file mode 100644 index 837331c4..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/ChannelHangupRequest_impl_ari_1_10_0.java +++ /dev/null @@ -1,59 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A hangup was requested on the channel. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelHangupRequest_impl_ari_1_10_0 extends Event_impl_ari_1_10_0 implements ChannelHangupRequest, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Integer representation of the cause of the hangup. */ - private int cause; - public int getCause() { - return cause; - } - - @JsonDeserialize( as=int.class ) - public void setCause(int val ) { - cause = val; - } - - /** The channel on which the hangup was requested. */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_10_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - - /** Whether the hangup request was a soft hangup request. */ - private boolean soft; - public boolean getSoft() { - return soft; - } - - @JsonDeserialize( as=boolean.class ) - public void setSoft(boolean val ) { - soft = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/ChannelHold_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/ChannelHold_impl_ari_1_10_0.java deleted file mode 100644 index f55318a4..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/ChannelHold_impl_ari_1_10_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A channel initiated a media hold. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelHold_impl_ari_1_10_0 extends Event_impl_ari_1_10_0 implements ChannelHold, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The channel that initiated the hold event. */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_10_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - - /** The music on hold class that the initiator requested. */ - private String musicclass; - public String getMusicclass() { - return musicclass; - } - - @JsonDeserialize( as=String.class ) - public void setMusicclass(String val ) { - musicclass = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/ChannelLeftBridge_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/ChannelLeftBridge_impl_ari_1_10_0.java deleted file mode 100644 index 1a21c8dd..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/ChannelLeftBridge_impl_ari_1_10_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a channel has left a bridge. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelLeftBridge_impl_ari_1_10_0 extends Event_impl_ari_1_10_0 implements ChannelLeftBridge, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Bridge bridge; - public Bridge getBridge() { - return bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_10_0.class ) - public void setBridge(Bridge val ) { - bridge = val; - } - - /** */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_10_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/ChannelStateChange_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/ChannelStateChange_impl_ari_1_10_0.java deleted file mode 100644 index 64f8530e..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/ChannelStateChange_impl_ari_1_10_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification of a channel's state change. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelStateChange_impl_ari_1_10_0 extends Event_impl_ari_1_10_0 implements ChannelStateChange, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_10_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/ChannelTalkingFinished_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/ChannelTalkingFinished_impl_ari_1_10_0.java deleted file mode 100644 index e5d3ef48..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/ChannelTalkingFinished_impl_ari_1_10_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Talking is no longer detected on the channel. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelTalkingFinished_impl_ari_1_10_0 extends Event_impl_ari_1_10_0 implements ChannelTalkingFinished, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The channel on which talking completed. */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_10_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - - /** The length of time, in milliseconds, that talking was detected on the channel */ - private int duration; - public int getDuration() { - return duration; - } - - @JsonDeserialize( as=int.class ) - public void setDuration(int val ) { - duration = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/ChannelTalkingStarted_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/ChannelTalkingStarted_impl_ari_1_10_0.java deleted file mode 100644 index 7fd5353b..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/ChannelTalkingStarted_impl_ari_1_10_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Talking was detected on the channel. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelTalkingStarted_impl_ari_1_10_0 extends Event_impl_ari_1_10_0 implements ChannelTalkingStarted, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The channel on which talking started. */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_10_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/ChannelUnhold_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/ChannelUnhold_impl_ari_1_10_0.java deleted file mode 100644 index 8f1686f9..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/ChannelUnhold_impl_ari_1_10_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A channel initiated a media unhold. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelUnhold_impl_ari_1_10_0 extends Event_impl_ari_1_10_0 implements ChannelUnhold, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The channel that initiated the unhold event. */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_10_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/ChannelUserevent_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/ChannelUserevent_impl_ari_1_10_0.java deleted file mode 100644 index e8e25dc9..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/ChannelUserevent_impl_ari_1_10_0.java +++ /dev/null @@ -1,81 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * User-generated event with additional user-defined fields in the object. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelUserevent_impl_ari_1_10_0 extends Event_impl_ari_1_10_0 implements ChannelUserevent, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** A bridge that is signaled with the user event. */ - private Bridge bridge; - public Bridge getBridge() { - return bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_10_0.class ) - public void setBridge(Bridge val ) { - bridge = val; - } - - /** A channel that is signaled with the user event. */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_10_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - - /** A endpoint that is signaled with the user event. */ - private Endpoint endpoint; - public Endpoint getEndpoint() { - return endpoint; - } - - @JsonDeserialize( as=Endpoint_impl_ari_1_10_0.class ) - public void setEndpoint(Endpoint val ) { - endpoint = val; - } - - /** The name of the user event. */ - private String eventname; - public String getEventname() { - return eventname; - } - - @JsonDeserialize( as=String.class ) - public void setEventname(String val ) { - eventname = val; - } - - /** Custom Userevent data */ - private String userevent; - public String getUserevent() { - return userevent; - } - - @JsonDeserialize( as=String.class ) - public void setUserevent(String val ) { - userevent = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/ChannelVarset_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/ChannelVarset_impl_ari_1_10_0.java deleted file mode 100644 index abb26121..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/ChannelVarset_impl_ari_1_10_0.java +++ /dev/null @@ -1,61 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Channel variable changed. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelVarset_impl_ari_1_10_0 extends Event_impl_ari_1_10_0 implements ChannelVarset, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The channel on which the variable was set. - -If missing, the variable is a global variable. */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_10_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - - /** The new value of the variable. */ - private String value; - public String getValue() { - return value; - } - - @JsonDeserialize( as=String.class ) - public void setValue(String val ) { - value = val; - } - - /** The variable that changed. */ - private String variable; - public String getVariable() { - return variable; - } - - @JsonDeserialize( as=String.class ) - public void setVariable(String val ) { - variable = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/Channel_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/Channel_impl_ari_1_10_0.java deleted file mode 100644 index 5bdcda94..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/Channel_impl_ari_1_10_0.java +++ /dev/null @@ -1,127 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A specific communication connection between Asterisk and an Endpoint. - * - * Defined in file: channels.json - * Generated by: Model - *********************************************************/ - -public class Channel_impl_ari_1_10_0 implements Channel, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private String accountcode; - public String getAccountcode() { - return accountcode; - } - - @JsonDeserialize( as=String.class ) - public void setAccountcode(String val ) { - accountcode = val; - } - - /** */ - private CallerID caller; - public CallerID getCaller() { - return caller; - } - - @JsonDeserialize( as=CallerID_impl_ari_1_10_0.class ) - public void setCaller(CallerID val ) { - caller = val; - } - - /** */ - private CallerID connected; - public CallerID getConnected() { - return connected; - } - - @JsonDeserialize( as=CallerID_impl_ari_1_10_0.class ) - public void setConnected(CallerID val ) { - connected = val; - } - - /** Timestamp when channel was created */ - private Date creationtime; - public Date getCreationtime() { - return creationtime; - } - - @JsonDeserialize( as=Date.class ) - public void setCreationtime(Date val ) { - creationtime = val; - } - - /** Current location in the dialplan */ - private DialplanCEP dialplan; - public DialplanCEP getDialplan() { - return dialplan; - } - - @JsonDeserialize( as=DialplanCEP_impl_ari_1_10_0.class ) - public void setDialplan(DialplanCEP val ) { - dialplan = val; - } - - /** Unique identifier of the channel. - -This is the same as the Uniqueid field in AMI. */ - private String id; - public String getId() { - return id; - } - - @JsonDeserialize( as=String.class ) - public void setId(String val ) { - id = val; - } - - /** The default spoken language */ - private String language; - public String getLanguage() { - return language; - } - - @JsonDeserialize( as=String.class ) - public void setLanguage(String val ) { - language = val; - } - - /** Name of the channel (i.e. SIP/foo-0000a7e3) */ - private String name; - public String getName() { - return name; - } - - @JsonDeserialize( as=String.class ) - public void setName(String val ) { - name = val; - } - - /** */ - private String state; - public String getState() { - return state; - } - - @JsonDeserialize( as=String.class ) - public void setState(String val ) { - state = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/ConfigInfo_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/ConfigInfo_impl_ari_1_10_0.java deleted file mode 100644 index e0775e28..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/ConfigInfo_impl_ari_1_10_0.java +++ /dev/null @@ -1,92 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Info about Asterisk configuration - * - * Defined in file: asterisk.json - * Generated by: Model - *********************************************************/ - -public class ConfigInfo_impl_ari_1_10_0 implements ConfigInfo, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Default language for media playback. */ - private String default_language; - public String getDefault_language() { - return default_language; - } - - @JsonDeserialize( as=String.class ) - public void setDefault_language(String val ) { - default_language = val; - } - - /** Maximum number of simultaneous channels. */ - private int max_channels; - public int getMax_channels() { - return max_channels; - } - - @JsonDeserialize( as=int.class ) - public void setMax_channels(int val ) { - max_channels = val; - } - - /** Maximum load avg on system. */ - private double max_load; - public double getMax_load() { - return max_load; - } - - @JsonDeserialize( as=double.class ) - public void setMax_load(double val ) { - max_load = val; - } - - /** Maximum number of open file handles (files, sockets). */ - private int max_open_files; - public int getMax_open_files() { - return max_open_files; - } - - @JsonDeserialize( as=int.class ) - public void setMax_open_files(int val ) { - max_open_files = val; - } - - /** Asterisk system name. */ - private String name; - public String getName() { - return name; - } - - @JsonDeserialize( as=String.class ) - public void setName(String val ) { - name = val; - } - - /** Effective user/group id for running Asterisk. */ - private SetId setid; - public SetId getSetid() { - return setid; - } - - @JsonDeserialize( as=SetId_impl_ari_1_10_0.class ) - public void setSetid(SetId val ) { - setid = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/ConfigTuple_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/ConfigTuple_impl_ari_1_10_0.java deleted file mode 100644 index 5ed4f392..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/ConfigTuple_impl_ari_1_10_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A key/value pair that makes up part of a configuration object. - * - * Defined in file: asterisk.json - * Generated by: Model - *********************************************************/ - -public class ConfigTuple_impl_ari_1_10_0 implements ConfigTuple, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** A configuration object attribute. */ - private String attribute; - public String getAttribute() { - return attribute; - } - - @JsonDeserialize( as=String.class ) - public void setAttribute(String val ) { - attribute = val; - } - - /** The value for the attribute. */ - private String value; - public String getValue() { - return value; - } - - @JsonDeserialize( as=String.class ) - public void setValue(String val ) { - value = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/ContactInfo_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/ContactInfo_impl_ari_1_10_0.java deleted file mode 100644 index 18cbdfc8..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/ContactInfo_impl_ari_1_10_0.java +++ /dev/null @@ -1,70 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Detailed information about a contact on an endpoint. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ContactInfo_impl_ari_1_10_0 implements ContactInfo, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The Address of Record this contact belongs to. */ - private String aor; - public String getAor() { - return aor; - } - - @JsonDeserialize( as=String.class ) - public void setAor(String val ) { - aor = val; - } - - /** The current status of the contact. */ - private String contact_status; - public String getContact_status() { - return contact_status; - } - - @JsonDeserialize( as=String.class ) - public void setContact_status(String val ) { - contact_status = val; - } - - /** Current round trip time, in microseconds, for the contact. */ - private String roundtrip_usec; - public String getRoundtrip_usec() { - return roundtrip_usec; - } - - @JsonDeserialize( as=String.class ) - public void setRoundtrip_usec(String val ) { - roundtrip_usec = val; - } - - /** The location of the contact. */ - private String uri; - public String getUri() { - return uri; - } - - @JsonDeserialize( as=String.class ) - public void setUri(String val ) { - uri = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/ContactStatusChange_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/ContactStatusChange_impl_ari_1_10_0.java deleted file mode 100644 index 00e0ce4b..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/ContactStatusChange_impl_ari_1_10_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * The state of a contact on an endpoint has changed. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ContactStatusChange_impl_ari_1_10_0 extends Event_impl_ari_1_10_0 implements ContactStatusChange, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private ContactInfo contact_info; - public ContactInfo getContact_info() { - return contact_info; - } - - @JsonDeserialize( as=ContactInfo_impl_ari_1_10_0.class ) - public void setContact_info(ContactInfo val ) { - contact_info = val; - } - - /** */ - private Endpoint endpoint; - public Endpoint getEndpoint() { - return endpoint; - } - - @JsonDeserialize( as=Endpoint_impl_ari_1_10_0.class ) - public void setEndpoint(Endpoint val ) { - endpoint = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/DeviceStateChanged_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/DeviceStateChanged_impl_ari_1_10_0.java deleted file mode 100644 index c772c4ec..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/DeviceStateChanged_impl_ari_1_10_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a device state has changed. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class DeviceStateChanged_impl_ari_1_10_0 extends Event_impl_ari_1_10_0 implements DeviceStateChanged, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Device state object */ - private DeviceState device_state; - public DeviceState getDevice_state() { - return device_state; - } - - @JsonDeserialize( as=DeviceState_impl_ari_1_10_0.class ) - public void setDevice_state(DeviceState val ) { - device_state = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/DeviceState_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/DeviceState_impl_ari_1_10_0.java deleted file mode 100644 index f9294be0..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/DeviceState_impl_ari_1_10_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Represents the state of a device. - * - * Defined in file: deviceStates.json - * Generated by: Model - *********************************************************/ - -public class DeviceState_impl_ari_1_10_0 implements DeviceState, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Name of the device. */ - private String name; - public String getName() { - return name; - } - - @JsonDeserialize( as=String.class ) - public void setName(String val ) { - name = val; - } - - /** Device's state */ - private String state; - public String getState() { - return state; - } - - @JsonDeserialize( as=String.class ) - public void setState(String val ) { - state = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/Dial_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/Dial_impl_ari_1_10_0.java deleted file mode 100644 index c8bb8ec8..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/Dial_impl_ari_1_10_0.java +++ /dev/null @@ -1,92 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Dialing state has changed. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class Dial_impl_ari_1_10_0 extends Event_impl_ari_1_10_0 implements Dial, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The calling channel. */ - private Channel caller; - public Channel getCaller() { - return caller; - } - - @JsonDeserialize( as=Channel_impl_ari_1_10_0.class ) - public void setCaller(Channel val ) { - caller = val; - } - - /** Current status of the dialing attempt to the peer. */ - private String dialstatus; - public String getDialstatus() { - return dialstatus; - } - - @JsonDeserialize( as=String.class ) - public void setDialstatus(String val ) { - dialstatus = val; - } - - /** The dial string for calling the peer channel. */ - private String dialstring; - public String getDialstring() { - return dialstring; - } - - @JsonDeserialize( as=String.class ) - public void setDialstring(String val ) { - dialstring = val; - } - - /** Forwarding target requested by the original dialed channel. */ - private String forward; - public String getForward() { - return forward; - } - - @JsonDeserialize( as=String.class ) - public void setForward(String val ) { - forward = val; - } - - /** Channel that the caller has been forwarded to. */ - private Channel forwarded; - public Channel getForwarded() { - return forwarded; - } - - @JsonDeserialize( as=Channel_impl_ari_1_10_0.class ) - public void setForwarded(Channel val ) { - forwarded = val; - } - - /** The dialed channel. */ - private Channel peer; - public Channel getPeer() { - return peer; - } - - @JsonDeserialize( as=Channel_impl_ari_1_10_0.class ) - public void setPeer(Channel val ) { - peer = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/Dialed_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/Dialed_impl_ari_1_10_0.java deleted file mode 100644 index 0f1addc4..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/Dialed_impl_ari_1_10_0.java +++ /dev/null @@ -1,26 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Dialed channel information. - * - * Defined in file: channels.json - * Generated by: Model - *********************************************************/ - -public class Dialed_impl_ari_1_10_0 implements Dialed, java.io.Serializable { -private static final long serialVersionUID = 1L; -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/DialplanCEP_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/DialplanCEP_impl_ari_1_10_0.java deleted file mode 100644 index 16e0b617..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/DialplanCEP_impl_ari_1_10_0.java +++ /dev/null @@ -1,59 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Dialplan location (context/extension/priority) - * - * Defined in file: channels.json - * Generated by: Model - *********************************************************/ - -public class DialplanCEP_impl_ari_1_10_0 implements DialplanCEP, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Context in the dialplan */ - private String context; - public String getContext() { - return context; - } - - @JsonDeserialize( as=String.class ) - public void setContext(String val ) { - context = val; - } - - /** Extension in the dialplan */ - private String exten; - public String getExten() { - return exten; - } - - @JsonDeserialize( as=String.class ) - public void setExten(String val ) { - exten = val; - } - - /** Priority in the dialplan */ - private long priority; - public long getPriority() { - return priority; - } - - @JsonDeserialize( as=long.class ) - public void setPriority(long val ) { - priority = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/EndpointStateChange_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/EndpointStateChange_impl_ari_1_10_0.java deleted file mode 100644 index f3859881..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/EndpointStateChange_impl_ari_1_10_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Endpoint state changed. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class EndpointStateChange_impl_ari_1_10_0 extends Event_impl_ari_1_10_0 implements EndpointStateChange, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Endpoint endpoint; - public Endpoint getEndpoint() { - return endpoint; - } - - @JsonDeserialize( as=Endpoint_impl_ari_1_10_0.class ) - public void setEndpoint(Endpoint val ) { - endpoint = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/Endpoint_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/Endpoint_impl_ari_1_10_0.java deleted file mode 100644 index 131a4792..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/Endpoint_impl_ari_1_10_0.java +++ /dev/null @@ -1,72 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * An external device that may offer/accept calls to/from Asterisk. - * - * Unlike most resources, which have a single unique identifier, an endpoint is uniquely identified by the technology/resource pair. - * - * Defined in file: endpoints.json - * Generated by: Model - *********************************************************/ - -public class Endpoint_impl_ari_1_10_0 implements Endpoint, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Id's of channels associated with this endpoint */ - private List channel_ids; - public List getChannel_ids() { - return channel_ids; - } - - @JsonDeserialize( contentAs=String.class ) - public void setChannel_ids(List val ) { - channel_ids = val; - } - - /** Identifier of the endpoint, specific to the given technology. */ - private String resource; - public String getResource() { - return resource; - } - - @JsonDeserialize( as=String.class ) - public void setResource(String val ) { - resource = val; - } - - /** Endpoint's state */ - private String state; - public String getState() { - return state; - } - - @JsonDeserialize( as=String.class ) - public void setState(String val ) { - state = val; - } - - /** Technology of the endpoint */ - private String technology; - public String getTechnology() { - return technology; - } - - @JsonDeserialize( as=String.class ) - public void setTechnology(String val ) { - technology = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/Event_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/Event_impl_ari_1_10_0.java deleted file mode 100644 index fa1cf41f..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/Event_impl_ari_1_10_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Base type for asynchronous events from Asterisk. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class Event_impl_ari_1_10_0 extends Message_impl_ari_1_10_0 implements Event, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Name of the application receiving the event. */ - private String application; - public String getApplication() { - return application; - } - - @JsonDeserialize( as=String.class ) - public void setApplication(String val ) { - application = val; - } - - /** Time at which this event was created. */ - private Date timestamp; - public Date getTimestamp() { - return timestamp; - } - - @JsonDeserialize( as=Date.class ) - public void setTimestamp(Date val ) { - timestamp = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/FormatLangPair_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/FormatLangPair_impl_ari_1_10_0.java deleted file mode 100644 index af5730f9..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/FormatLangPair_impl_ari_1_10_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Identifies the format and language of a sound file - * - * Defined in file: sounds.json - * Generated by: Model - *********************************************************/ - -public class FormatLangPair_impl_ari_1_10_0 implements FormatLangPair, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private String format; - public String getFormat() { - return format; - } - - @JsonDeserialize( as=String.class ) - public void setFormat(String val ) { - format = val; - } - - /** */ - private String language; - public String getLanguage() { - return language; - } - - @JsonDeserialize( as=String.class ) - public void setLanguage(String val ) { - language = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/LiveRecording_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/LiveRecording_impl_ari_1_10_0.java deleted file mode 100644 index e48f38d2..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/LiveRecording_impl_ari_1_10_0.java +++ /dev/null @@ -1,114 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A recording that is in progress - * - * Defined in file: recordings.json - * Generated by: Model - *********************************************************/ - -public class LiveRecording_impl_ari_1_10_0 implements LiveRecording, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Cause for recording failure if failed */ - private String cause; - public String getCause() { - return cause; - } - - @JsonDeserialize( as=String.class ) - public void setCause(String val ) { - cause = val; - } - - /** Duration in seconds of the recording */ - private int duration; - public int getDuration() { - return duration; - } - - @JsonDeserialize( as=int.class ) - public void setDuration(int val ) { - duration = val; - } - - /** Recording format (wav, gsm, etc.) */ - private String format; - public String getFormat() { - return format; - } - - @JsonDeserialize( as=String.class ) - public void setFormat(String val ) { - format = val; - } - - /** Base name for the recording */ - private String name; - public String getName() { - return name; - } - - @JsonDeserialize( as=String.class ) - public void setName(String val ) { - name = val; - } - - /** Duration of silence, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds. */ - private int silence_duration; - public int getSilence_duration() { - return silence_duration; - } - - @JsonDeserialize( as=int.class ) - public void setSilence_duration(int val ) { - silence_duration = val; - } - - /** */ - private String state; - public String getState() { - return state; - } - - @JsonDeserialize( as=String.class ) - public void setState(String val ) { - state = val; - } - - /** Duration of talking, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds. */ - private int talking_duration; - public int getTalking_duration() { - return talking_duration; - } - - @JsonDeserialize( as=int.class ) - public void setTalking_duration(int val ) { - talking_duration = val; - } - - /** URI for the channel or bridge being recorded */ - private String target_uri; - public String getTarget_uri() { - return target_uri; - } - - @JsonDeserialize( as=String.class ) - public void setTarget_uri(String val ) { - target_uri = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/LogChannel_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/LogChannel_impl_ari_1_10_0.java deleted file mode 100644 index ad2fbd57..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/LogChannel_impl_ari_1_10_0.java +++ /dev/null @@ -1,70 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Details of an Asterisk log channel - * - * Defined in file: asterisk.json - * Generated by: Model - *********************************************************/ - -public class LogChannel_impl_ari_1_10_0 implements LogChannel, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The log channel path */ - private String channel; - public String getChannel() { - return channel; - } - - @JsonDeserialize( as=String.class ) - public void setChannel(String val ) { - channel = val; - } - - /** The various log levels */ - private String configuration; - public String getConfiguration() { - return configuration; - } - - @JsonDeserialize( as=String.class ) - public void setConfiguration(String val ) { - configuration = val; - } - - /** Whether or not a log type is enabled */ - private String status; - public String getStatus() { - return status; - } - - @JsonDeserialize( as=String.class ) - public void setStatus(String val ) { - status = val; - } - - /** Types of logs for the log channel */ - private String type; - public String getType() { - return type; - } - - @JsonDeserialize( as=String.class ) - public void setType(String val ) { - type = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/Message_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/Message_impl_ari_1_10_0.java deleted file mode 100644 index 53e094c5..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/Message_impl_ari_1_10_0.java +++ /dev/null @@ -1,83 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonSubTypes.Type; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Base type for errors and events - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") - @JsonSubTypes({ @Type(value = MissingParams_impl_ari_1_10_0.class, name = "MissingParams") -, @Type(value = Event_impl_ari_1_10_0.class, name = "Event") -, @Type(value = ContactInfo_impl_ari_1_10_0.class, name = "ContactInfo") -, @Type(value = Peer_impl_ari_1_10_0.class, name = "Peer") -, @Type(value = DeviceStateChanged_impl_ari_1_10_0.class, name = "DeviceStateChanged") -, @Type(value = PlaybackStarted_impl_ari_1_10_0.class, name = "PlaybackStarted") -, @Type(value = PlaybackContinuing_impl_ari_1_10_0.class, name = "PlaybackContinuing") -, @Type(value = PlaybackFinished_impl_ari_1_10_0.class, name = "PlaybackFinished") -, @Type(value = RecordingStarted_impl_ari_1_10_0.class, name = "RecordingStarted") -, @Type(value = RecordingFinished_impl_ari_1_10_0.class, name = "RecordingFinished") -, @Type(value = RecordingFailed_impl_ari_1_10_0.class, name = "RecordingFailed") -, @Type(value = ApplicationReplaced_impl_ari_1_10_0.class, name = "ApplicationReplaced") -, @Type(value = BridgeCreated_impl_ari_1_10_0.class, name = "BridgeCreated") -, @Type(value = BridgeDestroyed_impl_ari_1_10_0.class, name = "BridgeDestroyed") -, @Type(value = BridgeMerged_impl_ari_1_10_0.class, name = "BridgeMerged") -, @Type(value = BridgeBlindTransfer_impl_ari_1_10_0.class, name = "BridgeBlindTransfer") -, @Type(value = BridgeAttendedTransfer_impl_ari_1_10_0.class, name = "BridgeAttendedTransfer") -, @Type(value = ChannelCreated_impl_ari_1_10_0.class, name = "ChannelCreated") -, @Type(value = ChannelDestroyed_impl_ari_1_10_0.class, name = "ChannelDestroyed") -, @Type(value = ChannelEnteredBridge_impl_ari_1_10_0.class, name = "ChannelEnteredBridge") -, @Type(value = ChannelLeftBridge_impl_ari_1_10_0.class, name = "ChannelLeftBridge") -, @Type(value = ChannelStateChange_impl_ari_1_10_0.class, name = "ChannelStateChange") -, @Type(value = ChannelDtmfReceived_impl_ari_1_10_0.class, name = "ChannelDtmfReceived") -, @Type(value = ChannelDialplan_impl_ari_1_10_0.class, name = "ChannelDialplan") -, @Type(value = ChannelCallerId_impl_ari_1_10_0.class, name = "ChannelCallerId") -, @Type(value = ChannelUserevent_impl_ari_1_10_0.class, name = "ChannelUserevent") -, @Type(value = ChannelHangupRequest_impl_ari_1_10_0.class, name = "ChannelHangupRequest") -, @Type(value = ChannelVarset_impl_ari_1_10_0.class, name = "ChannelVarset") -, @Type(value = ChannelHold_impl_ari_1_10_0.class, name = "ChannelHold") -, @Type(value = ChannelUnhold_impl_ari_1_10_0.class, name = "ChannelUnhold") -, @Type(value = ChannelTalkingStarted_impl_ari_1_10_0.class, name = "ChannelTalkingStarted") -, @Type(value = ChannelTalkingFinished_impl_ari_1_10_0.class, name = "ChannelTalkingFinished") -, @Type(value = ContactStatusChange_impl_ari_1_10_0.class, name = "ContactStatusChange") -, @Type(value = PeerStatusChange_impl_ari_1_10_0.class, name = "PeerStatusChange") -, @Type(value = EndpointStateChange_impl_ari_1_10_0.class, name = "EndpointStateChange") -, @Type(value = Dial_impl_ari_1_10_0.class, name = "Dial") -, @Type(value = StasisEnd_impl_ari_1_10_0.class, name = "StasisEnd") -, @Type(value = StasisStart_impl_ari_1_10_0.class, name = "StasisStart") -, @Type(value = TextMessageReceived_impl_ari_1_10_0.class, name = "TextMessageReceived") -, @Type(value = ChannelConnectedLine_impl_ari_1_10_0.class, name = "ChannelConnectedLine") - }) - - -public class Message_impl_ari_1_10_0 implements Message, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Indicates the type of this message. */ - private String type; - public String getType() { - return type; - } - - @JsonDeserialize( as=String.class ) - public void setType(String val ) { - type = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/MissingParams_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/MissingParams_impl_ari_1_10_0.java deleted file mode 100644 index fb24cfa2..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/MissingParams_impl_ari_1_10_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Error event sent when required params are missing. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class MissingParams_impl_ari_1_10_0 extends Message_impl_ari_1_10_0 implements MissingParams, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** A list of the missing parameters */ - private List params; - public List getParams() { - return params; - } - - @JsonDeserialize( contentAs=String.class ) - public void setParams(List val ) { - params = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/Module_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/Module_impl_ari_1_10_0.java deleted file mode 100644 index 317dfaed..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/Module_impl_ari_1_10_0.java +++ /dev/null @@ -1,81 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Details of an Asterisk module - * - * Defined in file: asterisk.json - * Generated by: Model - *********************************************************/ - -public class Module_impl_ari_1_10_0 implements Module, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The description of this module */ - private String description; - public String getDescription() { - return description; - } - - @JsonDeserialize( as=String.class ) - public void setDescription(String val ) { - description = val; - } - - /** The name of this module */ - private String name; - public String getName() { - return name; - } - - @JsonDeserialize( as=String.class ) - public void setName(String val ) { - name = val; - } - - /** The running status of this module */ - private String status; - public String getStatus() { - return status; - } - - @JsonDeserialize( as=String.class ) - public void setStatus(String val ) { - status = val; - } - - /** The support state of this module */ - private String support_level; - public String getSupport_level() { - return support_level; - } - - @JsonDeserialize( as=String.class ) - public void setSupport_level(String val ) { - support_level = val; - } - - /** The number of times this module is being used */ - private int use_count; - public int getUse_count() { - return use_count; - } - - @JsonDeserialize( as=int.class ) - public void setUse_count(int val ) { - use_count = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/PeerStatusChange_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/PeerStatusChange_impl_ari_1_10_0.java deleted file mode 100644 index 4bfe89b0..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/PeerStatusChange_impl_ari_1_10_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * The state of a peer associated with an endpoint has changed. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class PeerStatusChange_impl_ari_1_10_0 extends Event_impl_ari_1_10_0 implements PeerStatusChange, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Endpoint endpoint; - public Endpoint getEndpoint() { - return endpoint; - } - - @JsonDeserialize( as=Endpoint_impl_ari_1_10_0.class ) - public void setEndpoint(Endpoint val ) { - endpoint = val; - } - - /** */ - private Peer peer; - public Peer getPeer() { - return peer; - } - - @JsonDeserialize( as=Peer_impl_ari_1_10_0.class ) - public void setPeer(Peer val ) { - peer = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/Peer_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/Peer_impl_ari_1_10_0.java deleted file mode 100644 index 6eb50188..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/Peer_impl_ari_1_10_0.java +++ /dev/null @@ -1,81 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Detailed information about a remote peer that communicates with Asterisk. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class Peer_impl_ari_1_10_0 implements Peer, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The IP address of the peer. */ - private String address; - public String getAddress() { - return address; - } - - @JsonDeserialize( as=String.class ) - public void setAddress(String val ) { - address = val; - } - - /** An optional reason associated with the change in peer_status. */ - private String cause; - public String getCause() { - return cause; - } - - @JsonDeserialize( as=String.class ) - public void setCause(String val ) { - cause = val; - } - - /** The current state of the peer. Note that the values of the status are dependent on the underlying peer technology. */ - private String peer_status; - public String getPeer_status() { - return peer_status; - } - - @JsonDeserialize( as=String.class ) - public void setPeer_status(String val ) { - peer_status = val; - } - - /** The port of the peer. */ - private String port; - public String getPort() { - return port; - } - - @JsonDeserialize( as=String.class ) - public void setPort(String val ) { - port = val; - } - - /** The last known time the peer was contacted. */ - private String time; - public String getTime() { - return time; - } - - @JsonDeserialize( as=String.class ) - public void setTime(String val ) { - time = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/PlaybackContinuing_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/PlaybackContinuing_impl_ari_1_10_0.java deleted file mode 100644 index a56f412f..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/PlaybackContinuing_impl_ari_1_10_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Event showing the continuation of a media playback operation from one media URI to the next in the list. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class PlaybackContinuing_impl_ari_1_10_0 extends Event_impl_ari_1_10_0 implements PlaybackContinuing, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Playback control object */ - private Playback playback; - public Playback getPlayback() { - return playback; - } - - @JsonDeserialize( as=Playback_impl_ari_1_10_0.class ) - public void setPlayback(Playback val ) { - playback = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/PlaybackFinished_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/PlaybackFinished_impl_ari_1_10_0.java deleted file mode 100644 index 88ee8bde..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/PlaybackFinished_impl_ari_1_10_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Event showing the completion of a media playback operation. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class PlaybackFinished_impl_ari_1_10_0 extends Event_impl_ari_1_10_0 implements PlaybackFinished, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Playback control object */ - private Playback playback; - public Playback getPlayback() { - return playback; - } - - @JsonDeserialize( as=Playback_impl_ari_1_10_0.class ) - public void setPlayback(Playback val ) { - playback = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/PlaybackStarted_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/PlaybackStarted_impl_ari_1_10_0.java deleted file mode 100644 index 3dc80fb6..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/PlaybackStarted_impl_ari_1_10_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Event showing the start of a media playback operation. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class PlaybackStarted_impl_ari_1_10_0 extends Event_impl_ari_1_10_0 implements PlaybackStarted, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Playback control object */ - private Playback playback; - public Playback getPlayback() { - return playback; - } - - @JsonDeserialize( as=Playback_impl_ari_1_10_0.class ) - public void setPlayback(Playback val ) { - playback = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/Playback_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/Playback_impl_ari_1_10_0.java deleted file mode 100644 index 3d7451c2..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/Playback_impl_ari_1_10_0.java +++ /dev/null @@ -1,92 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Object representing the playback of media to a channel - * - * Defined in file: playbacks.json - * Generated by: Model - *********************************************************/ - -public class Playback_impl_ari_1_10_0 implements Playback, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** ID for this playback operation */ - private String id; - public String getId() { - return id; - } - - @JsonDeserialize( as=String.class ) - public void setId(String val ) { - id = val; - } - - /** For media types that support multiple languages, the language requested for playback. */ - private String language; - public String getLanguage() { - return language; - } - - @JsonDeserialize( as=String.class ) - public void setLanguage(String val ) { - language = val; - } - - /** The URI for the media currently being played back. */ - private String media_uri; - public String getMedia_uri() { - return media_uri; - } - - @JsonDeserialize( as=String.class ) - public void setMedia_uri(String val ) { - media_uri = val; - } - - /** If a list of URIs is being played, the next media URI to be played back. */ - private String next_media_uri; - public String getNext_media_uri() { - return next_media_uri; - } - - @JsonDeserialize( as=String.class ) - public void setNext_media_uri(String val ) { - next_media_uri = val; - } - - /** Current state of the playback operation. */ - private String state; - public String getState() { - return state; - } - - @JsonDeserialize( as=String.class ) - public void setState(String val ) { - state = val; - } - - /** URI for the channel or bridge to play the media on */ - private String target_uri; - public String getTarget_uri() { - return target_uri; - } - - @JsonDeserialize( as=String.class ) - public void setTarget_uri(String val ) { - target_uri = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/RecordingFailed_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/RecordingFailed_impl_ari_1_10_0.java deleted file mode 100644 index 39b0f42e..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/RecordingFailed_impl_ari_1_10_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Event showing failure of a recording operation. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class RecordingFailed_impl_ari_1_10_0 extends Event_impl_ari_1_10_0 implements RecordingFailed, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Recording control object */ - private LiveRecording recording; - public LiveRecording getRecording() { - return recording; - } - - @JsonDeserialize( as=LiveRecording_impl_ari_1_10_0.class ) - public void setRecording(LiveRecording val ) { - recording = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/RecordingFinished_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/RecordingFinished_impl_ari_1_10_0.java deleted file mode 100644 index 1b093f5d..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/RecordingFinished_impl_ari_1_10_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Event showing the completion of a recording operation. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class RecordingFinished_impl_ari_1_10_0 extends Event_impl_ari_1_10_0 implements RecordingFinished, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Recording control object */ - private LiveRecording recording; - public LiveRecording getRecording() { - return recording; - } - - @JsonDeserialize( as=LiveRecording_impl_ari_1_10_0.class ) - public void setRecording(LiveRecording val ) { - recording = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/RecordingStarted_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/RecordingStarted_impl_ari_1_10_0.java deleted file mode 100644 index 1844218e..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/RecordingStarted_impl_ari_1_10_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Event showing the start of a recording operation. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class RecordingStarted_impl_ari_1_10_0 extends Event_impl_ari_1_10_0 implements RecordingStarted, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Recording control object */ - private LiveRecording recording; - public LiveRecording getRecording() { - return recording; - } - - @JsonDeserialize( as=LiveRecording_impl_ari_1_10_0.class ) - public void setRecording(LiveRecording val ) { - recording = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/SetId_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/SetId_impl_ari_1_10_0.java deleted file mode 100644 index 69a94e42..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/SetId_impl_ari_1_10_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Effective user/group id - * - * Defined in file: asterisk.json - * Generated by: Model - *********************************************************/ - -public class SetId_impl_ari_1_10_0 implements SetId, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Effective group id. */ - private String group; - public String getGroup() { - return group; - } - - @JsonDeserialize( as=String.class ) - public void setGroup(String val ) { - group = val; - } - - /** Effective user id. */ - private String user; - public String getUser() { - return user; - } - - @JsonDeserialize( as=String.class ) - public void setUser(String val ) { - user = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/Sound_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/Sound_impl_ari_1_10_0.java deleted file mode 100644 index a1bda08d..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/Sound_impl_ari_1_10_0.java +++ /dev/null @@ -1,59 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A media file that may be played back. - * - * Defined in file: sounds.json - * Generated by: Model - *********************************************************/ - -public class Sound_impl_ari_1_10_0 implements Sound, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The formats and languages in which this sound is available. */ - private List formats; - public List getFormats() { - return formats; - } - - @JsonDeserialize( contentAs=FormatLangPair_impl_ari_1_10_0.class ) - public void setFormats(List val ) { - formats = val; - } - - /** Sound's identifier. */ - private String id; - public String getId() { - return id; - } - - @JsonDeserialize( as=String.class ) - public void setId(String val ) { - id = val; - } - - /** Text description of the sound, usually the words spoken. */ - private String text; - public String getText() { - return text; - } - - @JsonDeserialize( as=String.class ) - public void setText(String val ) { - text = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/StasisEnd_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/StasisEnd_impl_ari_1_10_0.java deleted file mode 100644 index f7778fbb..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/StasisEnd_impl_ari_1_10_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a channel has left a Stasis application. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class StasisEnd_impl_ari_1_10_0 extends Event_impl_ari_1_10_0 implements StasisEnd, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_10_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/StasisStart_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/StasisStart_impl_ari_1_10_0.java deleted file mode 100644 index b501db5a..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/StasisStart_impl_ari_1_10_0.java +++ /dev/null @@ -1,59 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a channel has entered a Stasis application. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class StasisStart_impl_ari_1_10_0 extends Event_impl_ari_1_10_0 implements StasisStart, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Arguments to the application */ - private List args; - public List getArgs() { - return args; - } - - @JsonDeserialize( contentAs=String.class ) - public void setArgs(List val ) { - args = val; - } - - /** */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_10_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - - /** */ - private Channel replace_channel; - public Channel getReplace_channel() { - return replace_channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_10_0.class ) - public void setReplace_channel(Channel val ) { - replace_channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/StatusInfo_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/StatusInfo_impl_ari_1_10_0.java deleted file mode 100644 index 41bd5a25..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/StatusInfo_impl_ari_1_10_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Info about Asterisk status - * - * Defined in file: asterisk.json - * Generated by: Model - *********************************************************/ - -public class StatusInfo_impl_ari_1_10_0 implements StatusInfo, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Time when Asterisk was last reloaded. */ - private Date last_reload_time; - public Date getLast_reload_time() { - return last_reload_time; - } - - @JsonDeserialize( as=Date.class ) - public void setLast_reload_time(Date val ) { - last_reload_time = val; - } - - /** Time when Asterisk was started. */ - private Date startup_time; - public Date getStartup_time() { - return startup_time; - } - - @JsonDeserialize( as=Date.class ) - public void setStartup_time(Date val ) { - startup_time = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/StoredRecording_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/StoredRecording_impl_ari_1_10_0.java deleted file mode 100644 index 2d7a46ff..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/StoredRecording_impl_ari_1_10_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A past recording that may be played back. - * - * Defined in file: recordings.json - * Generated by: Model - *********************************************************/ - -public class StoredRecording_impl_ari_1_10_0 implements StoredRecording, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private String format; - public String getFormat() { - return format; - } - - @JsonDeserialize( as=String.class ) - public void setFormat(String val ) { - format = val; - } - - /** */ - private String name; - public String getName() { - return name; - } - - @JsonDeserialize( as=String.class ) - public void setName(String val ) { - name = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/SystemInfo_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/SystemInfo_impl_ari_1_10_0.java deleted file mode 100644 index e2e02cac..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/SystemInfo_impl_ari_1_10_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Info about Asterisk - * - * Defined in file: asterisk.json - * Generated by: Model - *********************************************************/ - -public class SystemInfo_impl_ari_1_10_0 implements SystemInfo, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private String entity_id; - public String getEntity_id() { - return entity_id; - } - - @JsonDeserialize( as=String.class ) - public void setEntity_id(String val ) { - entity_id = val; - } - - /** Asterisk version. */ - private String version; - public String getVersion() { - return version; - } - - @JsonDeserialize( as=String.class ) - public void setVersion(String val ) { - version = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/TextMessageReceived_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/TextMessageReceived_impl_ari_1_10_0.java deleted file mode 100644 index 30c45fa4..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/TextMessageReceived_impl_ari_1_10_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A text message was received from an endpoint. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class TextMessageReceived_impl_ari_1_10_0 extends Event_impl_ari_1_10_0 implements TextMessageReceived, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Endpoint endpoint; - public Endpoint getEndpoint() { - return endpoint; - } - - @JsonDeserialize( as=Endpoint_impl_ari_1_10_0.class ) - public void setEndpoint(Endpoint val ) { - endpoint = val; - } - - /** */ - private TextMessage message; - public TextMessage getMessage() { - return message; - } - - @JsonDeserialize( as=TextMessage_impl_ari_1_10_0.class ) - public void setMessage(TextMessage val ) { - message = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/TextMessageVariable_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/TextMessageVariable_impl_ari_1_10_0.java deleted file mode 100644 index 6bd31088..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/TextMessageVariable_impl_ari_1_10_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A key/value pair variable in a text message. - * - * Defined in file: endpoints.json - * Generated by: Model - *********************************************************/ - -public class TextMessageVariable_impl_ari_1_10_0 implements TextMessageVariable, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** A unique key identifying the variable. */ - private String key; - public String getKey() { - return key; - } - - @JsonDeserialize( as=String.class ) - public void setKey(String val ) { - key = val; - } - - /** The value of the variable. */ - private String value; - public String getValue() { - return value; - } - - @JsonDeserialize( as=String.class ) - public void setValue(String val ) { - value = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/TextMessage_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/TextMessage_impl_ari_1_10_0.java deleted file mode 100644 index 80eaad07..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/TextMessage_impl_ari_1_10_0.java +++ /dev/null @@ -1,70 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A text message. - * - * Defined in file: endpoints.json - * Generated by: Model - *********************************************************/ - -public class TextMessage_impl_ari_1_10_0 implements TextMessage, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The text of the message. */ - private String body; - public String getBody() { - return body; - } - - @JsonDeserialize( as=String.class ) - public void setBody(String val ) { - body = val; - } - - /** A technology specific URI specifying the source of the message. For sip and pjsip technologies, any SIP URI can be specified. For xmpp, the URI must correspond to the client connection being used to send the message. */ - private String from; - public String getFrom() { - return from; - } - - @JsonDeserialize( as=String.class ) - public void setFrom(String val ) { - from = val; - } - - /** A technology specific URI specifying the destination of the message. Valid technologies include sip, pjsip, and xmp. The destination of a message should be an endpoint. */ - private String to; - public String getTo() { - return to; - } - - @JsonDeserialize( as=String.class ) - public void setTo(String val ) { - to = val; - } - - /** Technology specific key/value pairs associated with the message. */ - private List variables; - public List getVariables() { - return variables; - } - - @JsonDeserialize( contentAs=TextMessageVariable_impl_ari_1_10_0.class ) - public void setVariables(List val ) { - variables = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/Variable_impl_ari_1_10_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/Variable_impl_ari_1_10_0.java deleted file mode 100644 index 7f59fb15..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_10_0/models/Variable_impl_ari_1_10_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_10_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * The value of a channel variable - * - * Defined in file: asterisk.json - * Generated by: Model - *********************************************************/ - -public class Variable_impl_ari_1_10_0 implements Variable, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The value of the variable requested */ - private String value; - public String getValue() { - return value; - } - - @JsonDeserialize( as=String.class ) - public void setValue(String val ) { - value = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/AriBuilder_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/AriBuilder_impl_ari_1_5_0.java deleted file mode 100644 index 45bf5e08..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/AriBuilder_impl_ari_1_5_0.java +++ /dev/null @@ -1,324 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.ari_1_5_0.models.*; -import ch.loway.oss.ari4java.generated.ari_1_5_0.actions.*; -import ch.loway.oss.ari4java.generated.*; -import ch.loway.oss.ari4java.ARI; - -public class AriBuilder_impl_ari_1_5_0 implements AriBuilder { - -public ActionEvents actionEvents() { - return new ActionEvents_impl_ari_1_5_0(); - }; - -public ActionSounds actionSounds() { - return new ActionSounds_impl_ari_1_5_0(); - }; - -public ActionChannels actionChannels() { - return new ActionChannels_impl_ari_1_5_0(); - }; - -public ActionPlaybacks actionPlaybacks() { - return new ActionPlaybacks_impl_ari_1_5_0(); - }; - -public ActionRecordings actionRecordings() { - return new ActionRecordings_impl_ari_1_5_0(); - }; - -public ActionApplications actionApplications() { - return new ActionApplications_impl_ari_1_5_0(); - }; - -public ActionEndpoints actionEndpoints() { - return new ActionEndpoints_impl_ari_1_5_0(); - }; - -public ActionBridges actionBridges() { - return new ActionBridges_impl_ari_1_5_0(); - }; - -public ActionDeviceStates actionDeviceStates() { - return new ActionDeviceStates_impl_ari_1_5_0(); - }; - -public ActionAsterisk actionAsterisk() { - return new ActionAsterisk_impl_ari_1_5_0(); - }; - -public PlaybackFinished playbackFinished() { - return new PlaybackFinished_impl_ari_1_5_0(); - }; - -public MissingParams missingParams() { - return new MissingParams_impl_ari_1_5_0(); - }; - -public BridgeDestroyed bridgeDestroyed() { - return new BridgeDestroyed_impl_ari_1_5_0(); - }; - -public DeviceStateChanged deviceStateChanged() { - return new DeviceStateChanged_impl_ari_1_5_0(); - }; - -public Bridge bridge() { - return new Bridge_impl_ari_1_5_0(); - }; - -public CallerID callerID() { - return new CallerID_impl_ari_1_5_0(); - }; - -public LiveRecording liveRecording() { - return new LiveRecording_impl_ari_1_5_0(); - }; - -public SystemInfo systemInfo() { - return new SystemInfo_impl_ari_1_5_0(); - }; - -public ChannelDialplan channelDialplan() { - return new ChannelDialplan_impl_ari_1_5_0(); - }; - -public DialplanCEP dialplanCEP() { - return new DialplanCEP_impl_ari_1_5_0(); - }; - -public ChannelCallerId channelCallerId() { - return new ChannelCallerId_impl_ari_1_5_0(); - }; - -public ChannelTalkingStarted channelTalkingStarted() { - return new ChannelTalkingStarted_impl_ari_1_5_0(); - }; - -public Channel channel() { - return new Channel_impl_ari_1_5_0(); - }; - -public AsteriskInfo asteriskInfo() { - return new AsteriskInfo_impl_ari_1_5_0(); - }; - -public EndpointStateChange endpointStateChange() { - return new EndpointStateChange_impl_ari_1_5_0(); - }; - -public ChannelLeftBridge channelLeftBridge() { - return new ChannelLeftBridge_impl_ari_1_5_0(); - }; - -public StoredRecording storedRecording() { - return new StoredRecording_impl_ari_1_5_0(); - }; - -public BuildInfo buildInfo() { - return new BuildInfo_impl_ari_1_5_0(); - }; - -public TextMessageReceived textMessageReceived() { - return new TextMessageReceived_impl_ari_1_5_0(); - }; - -public ChannelCreated channelCreated() { - return new ChannelCreated_impl_ari_1_5_0(); - }; - -public BridgeAttendedTransfer bridgeAttendedTransfer() { - return new BridgeAttendedTransfer_impl_ari_1_5_0(); - }; - -public Application application() { - return new Application_impl_ari_1_5_0(); - }; - -public RecordingFinished recordingFinished() { - return new RecordingFinished_impl_ari_1_5_0(); - }; - -public SetId setId() { - return new SetId_impl_ari_1_5_0(); - }; - -public BridgeMerged bridgeMerged() { - return new BridgeMerged_impl_ari_1_5_0(); - }; - -public Dialed dialed() { - return new Dialed_impl_ari_1_5_0(); - }; - -public RecordingStarted recordingStarted() { - return new RecordingStarted_impl_ari_1_5_0(); - }; - -public TextMessageVariable textMessageVariable() { - return new TextMessageVariable_impl_ari_1_5_0(); - }; - -public ConfigInfo configInfo() { - return new ConfigInfo_impl_ari_1_5_0(); - }; - -public ChannelEnteredBridge channelEnteredBridge() { - return new ChannelEnteredBridge_impl_ari_1_5_0(); - }; - -public ChannelDtmfReceived channelDtmfReceived() { - return new ChannelDtmfReceived_impl_ari_1_5_0(); - }; - -public Message message() { - return new Message_impl_ari_1_5_0(); - }; - -public StasisStart stasisStart() { - return new StasisStart_impl_ari_1_5_0(); - }; - -public ChannelHangupRequest channelHangupRequest() { - return new ChannelHangupRequest_impl_ari_1_5_0(); - }; - -public ChannelDestroyed channelDestroyed() { - return new ChannelDestroyed_impl_ari_1_5_0(); - }; - -public DeviceState deviceState() { - return new DeviceState_impl_ari_1_5_0(); - }; - -public Endpoint endpoint() { - return new Endpoint_impl_ari_1_5_0(); - }; - -public ChannelUserevent channelUserevent() { - return new ChannelUserevent_impl_ari_1_5_0(); - }; - -public ChannelStateChange channelStateChange() { - return new ChannelStateChange_impl_ari_1_5_0(); - }; - -public BridgeBlindTransfer bridgeBlindTransfer() { - return new BridgeBlindTransfer_impl_ari_1_5_0(); - }; - -public BridgeCreated bridgeCreated() { - return new BridgeCreated_impl_ari_1_5_0(); - }; - -public TextMessage textMessage() { - return new TextMessage_impl_ari_1_5_0(); - }; - -public Dial dial() { - return new Dial_impl_ari_1_5_0(); - }; - -public ChannelTalkingFinished channelTalkingFinished() { - return new ChannelTalkingFinished_impl_ari_1_5_0(); - }; - -public PlaybackStarted playbackStarted() { - return new PlaybackStarted_impl_ari_1_5_0(); - }; - -public Variable variable() { - return new Variable_impl_ari_1_5_0(); - }; - -public StasisEnd stasisEnd() { - return new StasisEnd_impl_ari_1_5_0(); - }; - -public Playback playback() { - return new Playback_impl_ari_1_5_0(); - }; - -public Sound sound() { - return new Sound_impl_ari_1_5_0(); - }; - -public ChannelVarset channelVarset() { - return new ChannelVarset_impl_ari_1_5_0(); - }; - -public RecordingFailed recordingFailed() { - return new RecordingFailed_impl_ari_1_5_0(); - }; - -public FormatLangPair formatLangPair() { - return new FormatLangPair_impl_ari_1_5_0(); - }; - -public Event event() { - return new Event_impl_ari_1_5_0(); - }; - -public ApplicationReplaced applicationReplaced() { - return new ApplicationReplaced_impl_ari_1_5_0(); - }; - -public StatusInfo statusInfo() { - return new StatusInfo_impl_ari_1_5_0(); - }; - -public ChannelConnectedLine channelConnectedLine() { - throw new UnsupportedOperationException(); - }; - -public ChannelHold channelHold() { - throw new UnsupportedOperationException(); - }; - -public ChannelUnhold channelUnhold() { - throw new UnsupportedOperationException(); - }; - -public ConfigTuple configTuple() { - throw new UnsupportedOperationException(); - }; - -public ContactInfo contactInfo() { - throw new UnsupportedOperationException(); - }; - -public ContactStatusChange contactStatusChange() { - throw new UnsupportedOperationException(); - }; - -public LogChannel logChannel() { - throw new UnsupportedOperationException(); - }; - -public Module module() { - throw new UnsupportedOperationException(); - }; - -public Peer peer() { - throw new UnsupportedOperationException(); - }; - -public PeerStatusChange peerStatusChange() { - throw new UnsupportedOperationException(); - }; - -public PlaybackContinuing playbackContinuing() { - throw new UnsupportedOperationException(); - }; - -public ARI.ClassFactory getClassFactory() { - return new ClassTranslator_impl_ari_1_5_0(); -}; - -}; diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/ClassTranslator_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/ClassTranslator_impl_ari_1_5_0.java deleted file mode 100644 index da0f7b29..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/ClassTranslator_impl_ari_1_5_0.java +++ /dev/null @@ -1,287 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.ARI; -import ch.loway.oss.ari4java.generated.*; -import ch.loway.oss.ari4java.generated.ari_1_5_0.models.*; -import ch.loway.oss.ari4java.generated.ari_1_5_0.actions.*; - -/********************************************************** - * This is a class translator. - *********************************************************/ -public class ClassTranslator_impl_ari_1_5_0 implements ARI.ClassFactory { - - @Override - public Class getImplementationFor(Class interfaceClass) { - - if ( interfaceClass.equals(ActionApplications.class) ) { - return (ActionApplications_impl_ari_1_5_0.class); - } else - - if ( interfaceClass.equals(ActionAsterisk.class) ) { - return (ActionAsterisk_impl_ari_1_5_0.class); - } else - - if ( interfaceClass.equals(ActionBridges.class) ) { - return (ActionBridges_impl_ari_1_5_0.class); - } else - - if ( interfaceClass.equals(ActionChannels.class) ) { - return (ActionChannels_impl_ari_1_5_0.class); - } else - - if ( interfaceClass.equals(ActionDeviceStates.class) ) { - return (ActionDeviceStates_impl_ari_1_5_0.class); - } else - - if ( interfaceClass.equals(ActionEndpoints.class) ) { - return (ActionEndpoints_impl_ari_1_5_0.class); - } else - - if ( interfaceClass.equals(ActionEvents.class) ) { - return (ActionEvents_impl_ari_1_5_0.class); - } else - - if ( interfaceClass.equals(ActionPlaybacks.class) ) { - return (ActionPlaybacks_impl_ari_1_5_0.class); - } else - - if ( interfaceClass.equals(ActionRecordings.class) ) { - return (ActionRecordings_impl_ari_1_5_0.class); - } else - - if ( interfaceClass.equals(ActionSounds.class) ) { - return (ActionSounds_impl_ari_1_5_0.class); - } else - - if ( interfaceClass.equals(Application.class) ) { - return (Application_impl_ari_1_5_0.class); - } else - - if ( interfaceClass.equals(ApplicationReplaced.class) ) { - return (ApplicationReplaced_impl_ari_1_5_0.class); - } else - - if ( interfaceClass.equals(AsteriskInfo.class) ) { - return (AsteriskInfo_impl_ari_1_5_0.class); - } else - - if ( interfaceClass.equals(Bridge.class) ) { - return (Bridge_impl_ari_1_5_0.class); - } else - - if ( interfaceClass.equals(BridgeAttendedTransfer.class) ) { - return (BridgeAttendedTransfer_impl_ari_1_5_0.class); - } else - - if ( interfaceClass.equals(BridgeBlindTransfer.class) ) { - return (BridgeBlindTransfer_impl_ari_1_5_0.class); - } else - - if ( interfaceClass.equals(BridgeCreated.class) ) { - return (BridgeCreated_impl_ari_1_5_0.class); - } else - - if ( interfaceClass.equals(BridgeDestroyed.class) ) { - return (BridgeDestroyed_impl_ari_1_5_0.class); - } else - - if ( interfaceClass.equals(BridgeMerged.class) ) { - return (BridgeMerged_impl_ari_1_5_0.class); - } else - - if ( interfaceClass.equals(BuildInfo.class) ) { - return (BuildInfo_impl_ari_1_5_0.class); - } else - - if ( interfaceClass.equals(CallerID.class) ) { - return (CallerID_impl_ari_1_5_0.class); - } else - - if ( interfaceClass.equals(Channel.class) ) { - return (Channel_impl_ari_1_5_0.class); - } else - - if ( interfaceClass.equals(ChannelCallerId.class) ) { - return (ChannelCallerId_impl_ari_1_5_0.class); - } else - - if ( interfaceClass.equals(ChannelCreated.class) ) { - return (ChannelCreated_impl_ari_1_5_0.class); - } else - - if ( interfaceClass.equals(ChannelDestroyed.class) ) { - return (ChannelDestroyed_impl_ari_1_5_0.class); - } else - - if ( interfaceClass.equals(ChannelDialplan.class) ) { - return (ChannelDialplan_impl_ari_1_5_0.class); - } else - - if ( interfaceClass.equals(ChannelDtmfReceived.class) ) { - return (ChannelDtmfReceived_impl_ari_1_5_0.class); - } else - - if ( interfaceClass.equals(ChannelEnteredBridge.class) ) { - return (ChannelEnteredBridge_impl_ari_1_5_0.class); - } else - - if ( interfaceClass.equals(ChannelHangupRequest.class) ) { - return (ChannelHangupRequest_impl_ari_1_5_0.class); - } else - - if ( interfaceClass.equals(ChannelLeftBridge.class) ) { - return (ChannelLeftBridge_impl_ari_1_5_0.class); - } else - - if ( interfaceClass.equals(ChannelStateChange.class) ) { - return (ChannelStateChange_impl_ari_1_5_0.class); - } else - - if ( interfaceClass.equals(ChannelTalkingFinished.class) ) { - return (ChannelTalkingFinished_impl_ari_1_5_0.class); - } else - - if ( interfaceClass.equals(ChannelTalkingStarted.class) ) { - return (ChannelTalkingStarted_impl_ari_1_5_0.class); - } else - - if ( interfaceClass.equals(ChannelUserevent.class) ) { - return (ChannelUserevent_impl_ari_1_5_0.class); - } else - - if ( interfaceClass.equals(ChannelVarset.class) ) { - return (ChannelVarset_impl_ari_1_5_0.class); - } else - - if ( interfaceClass.equals(ConfigInfo.class) ) { - return (ConfigInfo_impl_ari_1_5_0.class); - } else - - if ( interfaceClass.equals(DeviceState.class) ) { - return (DeviceState_impl_ari_1_5_0.class); - } else - - if ( interfaceClass.equals(DeviceStateChanged.class) ) { - return (DeviceStateChanged_impl_ari_1_5_0.class); - } else - - if ( interfaceClass.equals(Dial.class) ) { - return (Dial_impl_ari_1_5_0.class); - } else - - if ( interfaceClass.equals(Dialed.class) ) { - return (Dialed_impl_ari_1_5_0.class); - } else - - if ( interfaceClass.equals(DialplanCEP.class) ) { - return (DialplanCEP_impl_ari_1_5_0.class); - } else - - if ( interfaceClass.equals(Endpoint.class) ) { - return (Endpoint_impl_ari_1_5_0.class); - } else - - if ( interfaceClass.equals(EndpointStateChange.class) ) { - return (EndpointStateChange_impl_ari_1_5_0.class); - } else - - if ( interfaceClass.equals(Event.class) ) { - return (Event_impl_ari_1_5_0.class); - } else - - if ( interfaceClass.equals(FormatLangPair.class) ) { - return (FormatLangPair_impl_ari_1_5_0.class); - } else - - if ( interfaceClass.equals(LiveRecording.class) ) { - return (LiveRecording_impl_ari_1_5_0.class); - } else - - if ( interfaceClass.equals(Message.class) ) { - return (Message_impl_ari_1_5_0.class); - } else - - if ( interfaceClass.equals(MissingParams.class) ) { - return (MissingParams_impl_ari_1_5_0.class); - } else - - if ( interfaceClass.equals(Playback.class) ) { - return (Playback_impl_ari_1_5_0.class); - } else - - if ( interfaceClass.equals(PlaybackFinished.class) ) { - return (PlaybackFinished_impl_ari_1_5_0.class); - } else - - if ( interfaceClass.equals(PlaybackStarted.class) ) { - return (PlaybackStarted_impl_ari_1_5_0.class); - } else - - if ( interfaceClass.equals(RecordingFailed.class) ) { - return (RecordingFailed_impl_ari_1_5_0.class); - } else - - if ( interfaceClass.equals(RecordingFinished.class) ) { - return (RecordingFinished_impl_ari_1_5_0.class); - } else - - if ( interfaceClass.equals(RecordingStarted.class) ) { - return (RecordingStarted_impl_ari_1_5_0.class); - } else - - if ( interfaceClass.equals(SetId.class) ) { - return (SetId_impl_ari_1_5_0.class); - } else - - if ( interfaceClass.equals(Sound.class) ) { - return (Sound_impl_ari_1_5_0.class); - } else - - if ( interfaceClass.equals(StasisEnd.class) ) { - return (StasisEnd_impl_ari_1_5_0.class); - } else - - if ( interfaceClass.equals(StasisStart.class) ) { - return (StasisStart_impl_ari_1_5_0.class); - } else - - if ( interfaceClass.equals(StatusInfo.class) ) { - return (StatusInfo_impl_ari_1_5_0.class); - } else - - if ( interfaceClass.equals(StoredRecording.class) ) { - return (StoredRecording_impl_ari_1_5_0.class); - } else - - if ( interfaceClass.equals(SystemInfo.class) ) { - return (SystemInfo_impl_ari_1_5_0.class); - } else - - if ( interfaceClass.equals(TextMessage.class) ) { - return (TextMessage_impl_ari_1_5_0.class); - } else - - if ( interfaceClass.equals(TextMessageReceived.class) ) { - return (TextMessageReceived_impl_ari_1_5_0.class); - } else - - if ( interfaceClass.equals(TextMessageVariable.class) ) { - return (TextMessageVariable_impl_ari_1_5_0.class); - } else - - if ( interfaceClass.equals(Variable.class) ) { - return (Variable_impl_ari_1_5_0.class); - } else - { - return null; - } - } -} - - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/actions/ActionApplications_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/actions/ActionApplications_impl_ari_1_5_0.java deleted file mode 100644 index 83c2e0f1..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/actions/ActionApplications_impl_ari_1_5_0.java +++ /dev/null @@ -1,140 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_5_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionApplications_impl_ari_1_5_0 extends BaseAriAction implements ActionApplications { -/********************************************************** - * Stasis applications - * - * List all applications. - *********************************************************/ -private void buildList() { -reset(); -url = "/applications"; -method = "GET"; -} - -@Override -public List list() throws RestException { -buildList(); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void list(AriCallback> callback) { -buildList(); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Stasis application - * - * Get details of an application. - *********************************************************/ -private void buildGet(String applicationName) { -reset(); -url = "/applications/" + applicationName + ""; -method = "GET"; -lE.add( HttpResponse.build( 404, "Application does not exist.") ); -} - -@Override -public Application get(String applicationName) throws RestException { -buildGet(applicationName); -String json = httpActionSync(); -return deserializeJson( json, Application_impl_ari_1_5_0.class ); -} - -@Override -public void get(String applicationName, AriCallback callback) { -buildGet(applicationName); -httpActionAsync(callback, Application_impl_ari_1_5_0.class); -} - -/********************************************************** - * Stasis application - * - * Subscribe an application to a event source. - * Returns the state of the application after the subscriptions have changed - *********************************************************/ -private void buildSubscribe(String applicationName, String eventSource) { -reset(); -url = "/applications/" + applicationName + "/subscription"; -method = "POST"; -lParamQuery.add( HttpParam.build( "eventSource", eventSource) ); -lE.add( HttpResponse.build( 400, "Missing parameter.") ); -lE.add( HttpResponse.build( 404, "Application does not exist.") ); -lE.add( HttpResponse.build( 422, "Event source does not exist.") ); -} - -@Override -public Application subscribe(String applicationName, String eventSource) throws RestException { -buildSubscribe(applicationName, eventSource); -String json = httpActionSync(); -return deserializeJson( json, Application_impl_ari_1_5_0.class ); -} - -@Override -public void subscribe(String applicationName, String eventSource, AriCallback callback) { -buildSubscribe(applicationName, eventSource); -httpActionAsync(callback, Application_impl_ari_1_5_0.class); -} - -/********************************************************** - * Stasis application - * - * Unsubscribe an application from an event source. - * Returns the state of the application after the subscriptions have changed - *********************************************************/ -private void buildUnsubscribe(String applicationName, String eventSource) { -reset(); -url = "/applications/" + applicationName + "/subscription"; -method = "DELETE"; -lParamQuery.add( HttpParam.build( "eventSource", eventSource) ); -lE.add( HttpResponse.build( 400, "Missing parameter; event source scheme not recognized.") ); -lE.add( HttpResponse.build( 404, "Application does not exist.") ); -lE.add( HttpResponse.build( 409, "Application not subscribed to event source.") ); -lE.add( HttpResponse.build( 422, "Event source does not exist.") ); -} - -@Override -public Application unsubscribe(String applicationName, String eventSource) throws RestException { -buildUnsubscribe(applicationName, eventSource); -String json = httpActionSync(); -return deserializeJson( json, Application_impl_ari_1_5_0.class ); -} - -@Override -public void unsubscribe(String applicationName, String eventSource, AriCallback callback) { -buildUnsubscribe(applicationName, eventSource); -httpActionAsync(callback, Application_impl_ari_1_5_0.class); -} - -/** No missing signatures from interface */ -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/actions/ActionAsterisk_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/actions/ActionAsterisk_impl_ari_1_5_0.java deleted file mode 100644 index 108e7e90..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/actions/ActionAsterisk_impl_ari_1_5_0.java +++ /dev/null @@ -1,335 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_5_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionAsterisk_impl_ari_1_5_0 extends BaseAriAction implements ActionAsterisk { -/********************************************************** - * Asterisk system information (similar to core show settings) - * - * Gets Asterisk system information. - *********************************************************/ -private void buildGetInfo(String only) { -reset(); -url = "/asterisk/info"; -method = "GET"; -lParamQuery.add( HttpParam.build( "only", only) ); -} - -@Override -public AsteriskInfo getInfo(String only) throws RestException { -buildGetInfo(only); -String json = httpActionSync(); -return deserializeJson( json, AsteriskInfo_impl_ari_1_5_0.class ); -} - -@Override -public void getInfo(String only, AriCallback callback) { -buildGetInfo(only); -httpActionAsync(callback, AsteriskInfo_impl_ari_1_5_0.class); -} - -/********************************************************** - * Global variables - * - * Get the value of a global variable. - *********************************************************/ -private void buildGetGlobalVar(String variable) { -reset(); -url = "/asterisk/variable"; -method = "GET"; -lParamQuery.add( HttpParam.build( "variable", variable) ); -lE.add( HttpResponse.build( 400, "Missing variable parameter.") ); -} - -@Override -public Variable getGlobalVar(String variable) throws RestException { -buildGetGlobalVar(variable); -String json = httpActionSync(); -return deserializeJson( json, Variable_impl_ari_1_5_0.class ); -} - -@Override -public void getGlobalVar(String variable, AriCallback callback) { -buildGetGlobalVar(variable); -httpActionAsync(callback, Variable_impl_ari_1_5_0.class); -} - -/********************************************************** - * Global variables - * - * Set the value of a global variable. - *********************************************************/ -private void buildSetGlobalVar(String variable, String value) { -reset(); -url = "/asterisk/variable"; -method = "POST"; -lParamQuery.add( HttpParam.build( "variable", variable) ); -lParamQuery.add( HttpParam.build( "value", value) ); -lE.add( HttpResponse.build( 400, "Missing variable parameter.") ); -} - -@Override -public void setGlobalVar(String variable, String value) throws RestException { -buildSetGlobalVar(variable, value); -String json = httpActionSync(); -} - -@Override -public void setGlobalVar(String variable, String value, AriCallback callback) { -buildSetGlobalVar(variable, value); -httpActionAsync(callback); -} - -/********************************************************** - * Reload an Asterisk module. - * - * - * @since ari_1_8_0 - *********************************************************/ -public void reloadModule(String moduleName) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create or update a dynamic configuration object. - * - * - * @since ari_1_8_0 - *********************************************************/ -public List updateObject(String configClass, String objectType, String id, Map fields) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_8_0 - *********************************************************/ -public void deleteObject(String configClass, String objectType, String id, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_8_0 - *********************************************************/ -public void reloadModule(String moduleName, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_9_0 - *********************************************************/ -public void addLog(String logChannelName, String configuration, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_8_0 - *********************************************************/ -public void unloadModule(String moduleName, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * List Asterisk modules. - * - * - * @since ari_1_8_0 - *********************************************************/ -public List listModules() throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Gets Asterisk log channel information. - * - * - * @since ari_1_9_0 - *********************************************************/ -public List listLogChannels() throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Get Asterisk module information. - * - * - * @since ari_1_8_0 - *********************************************************/ -public Module getModule(String moduleName) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_9_0 - *********************************************************/ -public void rotateLog(String logChannelName, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Retrieve a dynamic configuration object. - * - * - * @since ari_1_8_0 - *********************************************************/ -public List getObject(String configClass, String objectType, String id) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Load an Asterisk module. - * - * - * @since ari_1_8_0 - *********************************************************/ -public void loadModule(String moduleName) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Unload an Asterisk module. - * - * - * @since ari_1_8_0 - *********************************************************/ -public void unloadModule(String moduleName) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_8_0 - *********************************************************/ -public void getModule(String moduleName, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_8_0 - *********************************************************/ -public void updateObject(String configClass, String objectType, String id, Map fields, AriCallback> callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Delete a dynamic configuration object. - * - * - * @since ari_1_8_0 - *********************************************************/ -public void deleteObject(String configClass, String objectType, String id) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Rotates a log channel. - * - * - * @since ari_1_9_0 - *********************************************************/ -public void rotateLog(String logChannelName) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_9_0 - *********************************************************/ -public void listLogChannels(AriCallback> callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Adds a log channel. - * - * - * @since ari_1_9_0 - *********************************************************/ -public void addLog(String logChannelName, String configuration) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_8_0 - *********************************************************/ -public void listModules(AriCallback> callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Deletes a log channel. - * - * - * @since ari_1_9_0 - *********************************************************/ -public void deleteLog(String logChannelName) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_9_0 - *********************************************************/ -public void deleteLog(String logChannelName, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_8_0 - *********************************************************/ -public void loadModule(String moduleName, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_8_0 - *********************************************************/ -public void getObject(String configClass, String objectType, String id, AriCallback> callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/actions/ActionBridges_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/actions/ActionBridges_impl_ari_1_5_0.java deleted file mode 100644 index ced51f6f..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/actions/ActionBridges_impl_ari_1_5_0.java +++ /dev/null @@ -1,444 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_5_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionBridges_impl_ari_1_5_0 extends BaseAriAction implements ActionBridges { -/********************************************************** - * Active bridges - * - * List all active bridges in Asterisk. - *********************************************************/ -private void buildList() { -reset(); -url = "/bridges"; -method = "GET"; -} - -@Override -public List list() throws RestException { -buildList(); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void list(AriCallback> callback) { -buildList(); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Active bridges - * - * Create a new bridge. - * This bridge persists until it has been shut down, or Asterisk has been shut down. - *********************************************************/ -private void buildCreate(String type, String bridgeId, String name) { -reset(); -url = "/bridges"; -method = "POST"; -lParamQuery.add( HttpParam.build( "type", type) ); -lParamQuery.add( HttpParam.build( "bridgeId", bridgeId) ); -lParamQuery.add( HttpParam.build( "name", name) ); -} - -@Override -public Bridge create(String type, String bridgeId, String name) throws RestException { -buildCreate(type, bridgeId, name); -String json = httpActionSync(); -return deserializeJson( json, Bridge_impl_ari_1_5_0.class ); -} - -@Override -public void create(String type, String bridgeId, String name, AriCallback callback) { -buildCreate(type, bridgeId, name); -httpActionAsync(callback, Bridge_impl_ari_1_5_0.class); -} - -/********************************************************** - * Individual bridge - * - * Create a new bridge or updates an existing one. - * This bridge persists until it has been shut down, or Asterisk has been shut down. - *********************************************************/ -private void buildCreate_or_update_with_id(String type, String bridgeId, String name) { -reset(); -url = "/bridges/" + bridgeId + ""; -method = "POST"; -lParamQuery.add( HttpParam.build( "type", type) ); -lParamQuery.add( HttpParam.build( "name", name) ); -} - -@Override -public Bridge create_or_update_with_id(String type, String bridgeId, String name) throws RestException { -buildCreate_or_update_with_id(type, bridgeId, name); -String json = httpActionSync(); -return deserializeJson( json, Bridge_impl_ari_1_5_0.class ); -} - -@Override -public void create_or_update_with_id(String type, String bridgeId, String name, AriCallback callback) { -buildCreate_or_update_with_id(type, bridgeId, name); -httpActionAsync(callback, Bridge_impl_ari_1_5_0.class); -} - -/********************************************************** - * Individual bridge - * - * Get bridge details. - *********************************************************/ -private void buildGet(String bridgeId) { -reset(); -url = "/bridges/" + bridgeId + ""; -method = "GET"; -lE.add( HttpResponse.build( 404, "Bridge not found") ); -} - -@Override -public Bridge get(String bridgeId) throws RestException { -buildGet(bridgeId); -String json = httpActionSync(); -return deserializeJson( json, Bridge_impl_ari_1_5_0.class ); -} - -@Override -public void get(String bridgeId, AriCallback callback) { -buildGet(bridgeId); -httpActionAsync(callback, Bridge_impl_ari_1_5_0.class); -} - -/********************************************************** - * Individual bridge - * - * Shut down a bridge. - * If any channels are in this bridge, they will be removed and resume whatever they were doing beforehand. - *********************************************************/ -private void buildDestroy(String bridgeId) { -reset(); -url = "/bridges/" + bridgeId + ""; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Bridge not found") ); -} - -@Override -public void destroy(String bridgeId) throws RestException { -buildDestroy(bridgeId); -String json = httpActionSync(); -} - -@Override -public void destroy(String bridgeId, AriCallback callback) { -buildDestroy(bridgeId); -httpActionAsync(callback); -} - -/********************************************************** - * Add a channel to a bridge - * - * Add a channel to a bridge. - *********************************************************/ -private void buildAddChannel(String bridgeId, String channel, String role) { -reset(); -url = "/bridges/" + bridgeId + "/addChannel"; -method = "POST"; -lParamQuery.add( HttpParam.build( "channel", channel) ); -lParamQuery.add( HttpParam.build( "role", role) ); -lE.add( HttpResponse.build( 400, "Channel not found") ); -lE.add( HttpResponse.build( 404, "Bridge not found") ); -lE.add( HttpResponse.build( 409, "Bridge not in Stasis application; Channel currently recording") ); -lE.add( HttpResponse.build( 422, "Channel not in Stasis application") ); -} - -@Override -public void addChannel(String bridgeId, String channel, String role) throws RestException { -buildAddChannel(bridgeId, channel, role); -String json = httpActionSync(); -} - -@Override -public void addChannel(String bridgeId, String channel, String role, AriCallback callback) { -buildAddChannel(bridgeId, channel, role); -httpActionAsync(callback); -} - -/********************************************************** - * Play music on hold to a bridge - * - * Play music on hold to a bridge or change the MOH class that is playing. - *********************************************************/ -private void buildStartMoh(String bridgeId, String mohClass) { -reset(); -url = "/bridges/" + bridgeId + "/moh"; -method = "POST"; -lParamQuery.add( HttpParam.build( "mohClass", mohClass) ); -lE.add( HttpResponse.build( 404, "Bridge not found") ); -lE.add( HttpResponse.build( 409, "Bridge not in Stasis application") ); -} - -@Override -public void startMoh(String bridgeId, String mohClass) throws RestException { -buildStartMoh(bridgeId, mohClass); -String json = httpActionSync(); -} - -@Override -public void startMoh(String bridgeId, String mohClass, AriCallback callback) { -buildStartMoh(bridgeId, mohClass); -httpActionAsync(callback); -} - -/********************************************************** - * Play music on hold to a bridge - * - * Stop playing music on hold to a bridge. - * This will only stop music on hold being played via POST bridges/{bridgeId}/moh. - *********************************************************/ -private void buildStopMoh(String bridgeId) { -reset(); -url = "/bridges/" + bridgeId + "/moh"; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Bridge not found") ); -lE.add( HttpResponse.build( 409, "Bridge not in Stasis application") ); -} - -@Override -public void stopMoh(String bridgeId) throws RestException { -buildStopMoh(bridgeId); -String json = httpActionSync(); -} - -@Override -public void stopMoh(String bridgeId, AriCallback callback) { -buildStopMoh(bridgeId); -httpActionAsync(callback); -} - -/********************************************************** - * Play media to the participants of a bridge - * - * Start playback of media on a bridge. - * The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.) - *********************************************************/ -private void buildPlay(String bridgeId, String media, String lang, int offsetms, int skipms, String playbackId) { -reset(); -url = "/bridges/" + bridgeId + "/play"; -method = "POST"; -lParamQuery.add( HttpParam.build( "media", media) ); -lParamQuery.add( HttpParam.build( "lang", lang) ); -lParamQuery.add( HttpParam.build( "offsetms", offsetms) ); -lParamQuery.add( HttpParam.build( "skipms", skipms) ); -lParamQuery.add( HttpParam.build( "playbackId", playbackId) ); -lE.add( HttpResponse.build( 404, "Bridge not found") ); -lE.add( HttpResponse.build( 409, "Bridge not in a Stasis application") ); -} - -@Override -public Playback play(String bridgeId, String media, String lang, int offsetms, int skipms, String playbackId) throws RestException { -buildPlay(bridgeId, media, lang, offsetms, skipms, playbackId); -String json = httpActionSync(); -return deserializeJson( json, Playback_impl_ari_1_5_0.class ); -} - -@Override -public void play(String bridgeId, String media, String lang, int offsetms, int skipms, String playbackId, AriCallback callback) { -buildPlay(bridgeId, media, lang, offsetms, skipms, playbackId); -httpActionAsync(callback, Playback_impl_ari_1_5_0.class); -} - -/********************************************************** - * Play media to a bridge - * - * Start playback of media on a bridge. - * 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.) - *********************************************************/ -private void buildPlayWithId(String bridgeId, String playbackId, String media, String lang, int offsetms, int skipms) { -reset(); -url = "/bridges/" + bridgeId + "/play/" + playbackId + ""; -method = "POST"; -lParamQuery.add( HttpParam.build( "media", media) ); -lParamQuery.add( HttpParam.build( "lang", lang) ); -lParamQuery.add( HttpParam.build( "offsetms", offsetms) ); -lParamQuery.add( HttpParam.build( "skipms", skipms) ); -lE.add( HttpResponse.build( 404, "Bridge not found") ); -lE.add( HttpResponse.build( 409, "Bridge not in a Stasis application") ); -} - -@Override -public Playback playWithId(String bridgeId, String playbackId, String media, String lang, int offsetms, int skipms) throws RestException { -buildPlayWithId(bridgeId, playbackId, media, lang, offsetms, skipms); -String json = httpActionSync(); -return deserializeJson( json, Playback_impl_ari_1_5_0.class ); -} - -@Override -public void playWithId(String bridgeId, String playbackId, String media, String lang, int offsetms, int skipms, AriCallback callback) { -buildPlayWithId(bridgeId, playbackId, media, lang, offsetms, skipms); -httpActionAsync(callback, Playback_impl_ari_1_5_0.class); -} - -/********************************************************** - * Record audio on a bridge - * - * Start a recording. - * This records the mixed audio from all channels participating in this bridge. - *********************************************************/ -private void buildRecord(String bridgeId, String name, String format, int maxDurationSeconds, int maxSilenceSeconds, String ifExists, boolean beep, String terminateOn) { -reset(); -url = "/bridges/" + bridgeId + "/record"; -method = "POST"; -lParamQuery.add( HttpParam.build( "name", name) ); -lParamQuery.add( HttpParam.build( "format", format) ); -lParamQuery.add( HttpParam.build( "maxDurationSeconds", maxDurationSeconds) ); -lParamQuery.add( HttpParam.build( "maxSilenceSeconds", maxSilenceSeconds) ); -lParamQuery.add( HttpParam.build( "ifExists", ifExists) ); -lParamQuery.add( HttpParam.build( "beep", beep) ); -lParamQuery.add( HttpParam.build( "terminateOn", terminateOn) ); -lE.add( HttpResponse.build( 400, "Invalid parameters") ); -lE.add( HttpResponse.build( 404, "Bridge not found") ); -lE.add( HttpResponse.build( 409, "Bridge is not in a Stasis application; A recording with the same name already exists on the system and can not be overwritten because it is in progress or ifExists=fail") ); -lE.add( HttpResponse.build( 422, "The format specified is unknown on this system") ); -} - -@Override -public LiveRecording record(String bridgeId, String name, String format, int maxDurationSeconds, int maxSilenceSeconds, String ifExists, boolean beep, String terminateOn) throws RestException { -buildRecord(bridgeId, name, format, maxDurationSeconds, maxSilenceSeconds, ifExists, beep, terminateOn); -String json = httpActionSync(); -return deserializeJson( json, LiveRecording_impl_ari_1_5_0.class ); -} - -@Override -public void record(String bridgeId, String name, String format, int maxDurationSeconds, int maxSilenceSeconds, String ifExists, boolean beep, String terminateOn, AriCallback callback) { -buildRecord(bridgeId, name, format, maxDurationSeconds, maxSilenceSeconds, ifExists, beep, terminateOn); -httpActionAsync(callback, LiveRecording_impl_ari_1_5_0.class); -} - -/********************************************************** - * Remove a channel from a bridge - * - * Remove a channel from a bridge. - *********************************************************/ -private void buildRemoveChannel(String bridgeId, String channel) { -reset(); -url = "/bridges/" + bridgeId + "/removeChannel"; -method = "POST"; -lParamQuery.add( HttpParam.build( "channel", channel) ); -lE.add( HttpResponse.build( 400, "Channel not found") ); -lE.add( HttpResponse.build( 404, "Bridge not found") ); -lE.add( HttpResponse.build( 409, "Bridge not in Stasis application") ); -lE.add( HttpResponse.build( 422, "Channel not in this bridge") ); -} - -@Override -public void removeChannel(String bridgeId, String channel) throws RestException { -buildRemoveChannel(bridgeId, channel); -String json = httpActionSync(); -} - -@Override -public void removeChannel(String bridgeId, String channel, AriCallback callback) { -buildRemoveChannel(bridgeId, channel); -httpActionAsync(callback); -} - -/********************************************************** - * - * - * @since ari_1_7_0 - *********************************************************/ -public void createWithId(String type, String bridgeId, String name, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void create(String type, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new bridge or updates an existing one. - * This bridge persists until it has been shut down, or Asterisk has been shut down. - * - * @since ari_1_7_0 - *********************************************************/ -public Bridge createWithId(String type, String bridgeId, String name) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new bridge. - * This bridge persists until it has been shut down, or Asterisk has been shut down. - * - * @since ari_1_0_0 - *********************************************************/ -public Bridge create(String type, String name) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new bridge. - * This bridge persists until it has been shut down, or Asterisk has been shut down. - * - * @since ari_0_0_1 - *********************************************************/ -public Bridge create(String type) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void play(String bridgeId, String media, String lang, int offsetms, int skipms, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Start playback of media on a bridge. - * 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.) - * - * @since ari_0_0_1 - *********************************************************/ -public Playback play(String bridgeId, String media, String lang, int offsetms, int skipms) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_0_0 - *********************************************************/ -public void create(String type, String name, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/actions/ActionChannels_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/actions/ActionChannels_impl_ari_1_5_0.java deleted file mode 100644 index 8bf16089..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/actions/ActionChannels_impl_ari_1_5_0.java +++ /dev/null @@ -1,947 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_5_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionChannels_impl_ari_1_5_0 extends BaseAriAction implements ActionChannels { -/********************************************************** - * Active channels - * - * List all active channels in Asterisk. - *********************************************************/ -private void buildList() { -reset(); -url = "/channels"; -method = "GET"; -} - -@Override -public List list() throws RestException { -buildList(); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void list(AriCallback> callback) { -buildList(); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Active channels - * - * Create a new channel (originate). - * 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. - *********************************************************/ -private void buildOriginate(String endpoint, String extension, String context, long priority, String app, String appArgs, String callerId, int timeout, Map variables, String channelId, String otherChannelId) { -reset(); -url = "/channels"; -method = "POST"; -lParamQuery.add( HttpParam.build( "endpoint", endpoint) ); -lParamQuery.add( HttpParam.build( "extension", extension) ); -lParamQuery.add( HttpParam.build( "context", context) ); -lParamQuery.add( HttpParam.build( "priority", priority) ); -lParamQuery.add( HttpParam.build( "app", app) ); -lParamQuery.add( HttpParam.build( "appArgs", appArgs) ); -lParamQuery.add( HttpParam.build( "callerId", callerId) ); -lParamQuery.add( HttpParam.build( "timeout", timeout) ); -lParamBody.addAll( HttpParam.build( "variables", variables) ); -lParamQuery.add( HttpParam.build( "channelId", channelId) ); -lParamQuery.add( HttpParam.build( "otherChannelId", otherChannelId) ); -lE.add( HttpResponse.build( 400, "Invalid parameters for originating a channel.") ); -} - -@Override -public Channel originate(String endpoint, String extension, String context, long priority, String app, String appArgs, String callerId, int timeout, Map variables, String channelId, String otherChannelId) throws RestException { -buildOriginate(endpoint, extension, context, priority, app, appArgs, callerId, timeout, variables, channelId, otherChannelId); -String json = httpActionSync(); -return deserializeJson( json, Channel_impl_ari_1_5_0.class ); -} - -@Override -public void originate(String endpoint, String extension, String context, long priority, String app, String appArgs, String callerId, int timeout, Map variables, String channelId, String otherChannelId, AriCallback callback) { -buildOriginate(endpoint, extension, context, priority, app, appArgs, callerId, timeout, variables, channelId, otherChannelId); -httpActionAsync(callback, Channel_impl_ari_1_5_0.class); -} - -/********************************************************** - * Active channel - * - * Channel details. - *********************************************************/ -private void buildGet(String channelId) { -reset(); -url = "/channels/" + channelId + ""; -method = "GET"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -} - -@Override -public Channel get(String channelId) throws RestException { -buildGet(channelId); -String json = httpActionSync(); -return deserializeJson( json, Channel_impl_ari_1_5_0.class ); -} - -@Override -public void get(String channelId, AriCallback callback) { -buildGet(channelId); -httpActionAsync(callback, Channel_impl_ari_1_5_0.class); -} - -/********************************************************** - * Active channel - * - * Create a new channel (originate with id). - * 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. - *********************************************************/ -private void buildOriginateWithId(String channelId, String endpoint, String extension, String context, long priority, String app, String appArgs, String callerId, int timeout, Map variables, String otherChannelId) { -reset(); -url = "/channels/" + channelId + ""; -method = "POST"; -lParamQuery.add( HttpParam.build( "endpoint", endpoint) ); -lParamQuery.add( HttpParam.build( "extension", extension) ); -lParamQuery.add( HttpParam.build( "context", context) ); -lParamQuery.add( HttpParam.build( "priority", priority) ); -lParamQuery.add( HttpParam.build( "app", app) ); -lParamQuery.add( HttpParam.build( "appArgs", appArgs) ); -lParamQuery.add( HttpParam.build( "callerId", callerId) ); -lParamQuery.add( HttpParam.build( "timeout", timeout) ); -lParamBody.addAll( HttpParam.build( "variables", variables) ); -lParamQuery.add( HttpParam.build( "otherChannelId", otherChannelId) ); -lE.add( HttpResponse.build( 400, "Invalid parameters for originating a channel.") ); -} - -@Override -public Channel originateWithId(String channelId, String endpoint, String extension, String context, long priority, String app, String appArgs, String callerId, int timeout, Map variables, String otherChannelId) throws RestException { -buildOriginateWithId(channelId, endpoint, extension, context, priority, app, appArgs, callerId, timeout, variables, otherChannelId); -String json = httpActionSync(); -return deserializeJson( json, Channel_impl_ari_1_5_0.class ); -} - -@Override -public void originateWithId(String channelId, String endpoint, String extension, String context, long priority, String app, String appArgs, String callerId, int timeout, Map variables, String otherChannelId, AriCallback callback) { -buildOriginateWithId(channelId, endpoint, extension, context, priority, app, appArgs, callerId, timeout, variables, otherChannelId); -httpActionAsync(callback, Channel_impl_ari_1_5_0.class); -} - -/********************************************************** - * Active channel - * - * Delete (i.e. hangup) a channel. - *********************************************************/ -private void buildHangup(String channelId, String reason) { -reset(); -url = "/channels/" + channelId + ""; -method = "DELETE"; -lParamQuery.add( HttpParam.build( "reason", reason) ); -lE.add( HttpResponse.build( 400, "Invalid reason for hangup provided") ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -} - -@Override -public void hangup(String channelId, String reason) throws RestException { -buildHangup(channelId, reason); -String json = httpActionSync(); -} - -@Override -public void hangup(String channelId, String reason, AriCallback callback) { -buildHangup(channelId, reason); -httpActionAsync(callback); -} - -/********************************************************** - * Answer a channel - * - * Answer a channel. - *********************************************************/ -private void buildAnswer(String channelId) { -reset(); -url = "/channels/" + channelId + "/answer"; -method = "POST"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void answer(String channelId) throws RestException { -buildAnswer(channelId); -String json = httpActionSync(); -} - -@Override -public void answer(String channelId, AriCallback callback) { -buildAnswer(channelId); -httpActionAsync(callback); -} - -/********************************************************** - * Exit application; continue execution in the dialplan - * - * Exit application; continue execution in the dialplan. - *********************************************************/ -private void buildContinueInDialplan(String channelId, String context, String extension, int priority) { -reset(); -url = "/channels/" + channelId + "/continue"; -method = "POST"; -lParamQuery.add( HttpParam.build( "context", context) ); -lParamQuery.add( HttpParam.build( "extension", extension) ); -lParamQuery.add( HttpParam.build( "priority", priority) ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void continueInDialplan(String channelId, String context, String extension, int priority) throws RestException { -buildContinueInDialplan(channelId, context, extension, priority); -String json = httpActionSync(); -} - -@Override -public void continueInDialplan(String channelId, String context, String extension, int priority, AriCallback callback) { -buildContinueInDialplan(channelId, context, extension, priority); -httpActionAsync(callback); -} - -/********************************************************** - * Send DTMF to a channel - * - * Send provided DTMF to a given channel. - *********************************************************/ -private void buildSendDTMF(String channelId, String dtmf, int before, int between, int duration, int after) { -reset(); -url = "/channels/" + channelId + "/dtmf"; -method = "POST"; -lParamQuery.add( HttpParam.build( "dtmf", dtmf) ); -lParamQuery.add( HttpParam.build( "before", before) ); -lParamQuery.add( HttpParam.build( "between", between) ); -lParamQuery.add( HttpParam.build( "duration", duration) ); -lParamQuery.add( HttpParam.build( "after", after) ); -lE.add( HttpResponse.build( 400, "DTMF is required") ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void sendDTMF(String channelId, String dtmf, int before, int between, int duration, int after) throws RestException { -buildSendDTMF(channelId, dtmf, before, between, duration, after); -String json = httpActionSync(); -} - -@Override -public void sendDTMF(String channelId, String dtmf, int before, int between, int duration, int after, AriCallback callback) { -buildSendDTMF(channelId, dtmf, before, between, duration, after); -httpActionAsync(callback); -} - -/********************************************************** - * Put a channel on hold - * - * Hold a channel. - *********************************************************/ -private void buildHold(String channelId) { -reset(); -url = "/channels/" + channelId + "/hold"; -method = "POST"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void hold(String channelId) throws RestException { -buildHold(channelId); -String json = httpActionSync(); -} - -@Override -public void hold(String channelId, AriCallback callback) { -buildHold(channelId); -httpActionAsync(callback); -} - -/********************************************************** - * Put a channel on hold - * - * Remove a channel from hold. - *********************************************************/ -private void buildUnhold(String channelId) { -reset(); -url = "/channels/" + channelId + "/hold"; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void unhold(String channelId) throws RestException { -buildUnhold(channelId); -String json = httpActionSync(); -} - -@Override -public void unhold(String channelId, AriCallback callback) { -buildUnhold(channelId); -httpActionAsync(callback); -} - -/********************************************************** - * Play music on hold to a channel - * - * Play music on hold to a channel. - * Using media operations such as /play on a channel playing MOH in this manner will suspend MOH without resuming automatically. If continuing music on hold is desired, the stasis application must reinitiate music on hold. - *********************************************************/ -private void buildStartMoh(String channelId, String mohClass) { -reset(); -url = "/channels/" + channelId + "/moh"; -method = "POST"; -lParamQuery.add( HttpParam.build( "mohClass", mohClass) ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void startMoh(String channelId, String mohClass) throws RestException { -buildStartMoh(channelId, mohClass); -String json = httpActionSync(); -} - -@Override -public void startMoh(String channelId, String mohClass, AriCallback callback) { -buildStartMoh(channelId, mohClass); -httpActionAsync(callback); -} - -/********************************************************** - * Play music on hold to a channel - * - * Stop playing music on hold to a channel. - *********************************************************/ -private void buildStopMoh(String channelId) { -reset(); -url = "/channels/" + channelId + "/moh"; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void stopMoh(String channelId) throws RestException { -buildStopMoh(channelId); -String json = httpActionSync(); -} - -@Override -public void stopMoh(String channelId, AriCallback callback) { -buildStopMoh(channelId); -httpActionAsync(callback); -} - -/********************************************************** - * Mute a channel - * - * Mute a channel. - *********************************************************/ -private void buildMute(String channelId, String direction) { -reset(); -url = "/channels/" + channelId + "/mute"; -method = "POST"; -lParamQuery.add( HttpParam.build( "direction", direction) ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void mute(String channelId, String direction) throws RestException { -buildMute(channelId, direction); -String json = httpActionSync(); -} - -@Override -public void mute(String channelId, String direction, AriCallback callback) { -buildMute(channelId, direction); -httpActionAsync(callback); -} - -/********************************************************** - * Mute a channel - * - * Unmute a channel. - *********************************************************/ -private void buildUnmute(String channelId, String direction) { -reset(); -url = "/channels/" + channelId + "/mute"; -method = "DELETE"; -lParamQuery.add( HttpParam.build( "direction", direction) ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void unmute(String channelId, String direction) throws RestException { -buildUnmute(channelId, direction); -String json = httpActionSync(); -} - -@Override -public void unmute(String channelId, String direction, AriCallback callback) { -buildUnmute(channelId, direction); -httpActionAsync(callback); -} - -/********************************************************** - * Play media to a channel - * - * Start playback of media. - * The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.) - *********************************************************/ -private void buildPlay(String channelId, String media, String lang, int offsetms, int skipms, String playbackId) { -reset(); -url = "/channels/" + channelId + "/play"; -method = "POST"; -lParamQuery.add( HttpParam.build( "media", media) ); -lParamQuery.add( HttpParam.build( "lang", lang) ); -lParamQuery.add( HttpParam.build( "offsetms", offsetms) ); -lParamQuery.add( HttpParam.build( "skipms", skipms) ); -lParamQuery.add( HttpParam.build( "playbackId", playbackId) ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public Playback play(String channelId, String media, String lang, int offsetms, int skipms, String playbackId) throws RestException { -buildPlay(channelId, media, lang, offsetms, skipms, playbackId); -String json = httpActionSync(); -return deserializeJson( json, Playback_impl_ari_1_5_0.class ); -} - -@Override -public void play(String channelId, String media, String lang, int offsetms, int skipms, String playbackId, AriCallback callback) { -buildPlay(channelId, media, lang, offsetms, skipms, playbackId); -httpActionAsync(callback, Playback_impl_ari_1_5_0.class); -} - -/********************************************************** - * Play media to a channel - * - * Start playback of media and specify the playbackId. - * 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.) - *********************************************************/ -private void buildPlayWithId(String channelId, String playbackId, String media, String lang, int offsetms, int skipms) { -reset(); -url = "/channels/" + channelId + "/play/" + playbackId + ""; -method = "POST"; -lParamQuery.add( HttpParam.build( "media", media) ); -lParamQuery.add( HttpParam.build( "lang", lang) ); -lParamQuery.add( HttpParam.build( "offsetms", offsetms) ); -lParamQuery.add( HttpParam.build( "skipms", skipms) ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public Playback playWithId(String channelId, String playbackId, String media, String lang, int offsetms, int skipms) throws RestException { -buildPlayWithId(channelId, playbackId, media, lang, offsetms, skipms); -String json = httpActionSync(); -return deserializeJson( json, Playback_impl_ari_1_5_0.class ); -} - -@Override -public void playWithId(String channelId, String playbackId, String media, String lang, int offsetms, int skipms, AriCallback callback) { -buildPlayWithId(channelId, playbackId, media, lang, offsetms, skipms); -httpActionAsync(callback, Playback_impl_ari_1_5_0.class); -} - -/********************************************************** - * Record audio from a channel - * - * Start a recording. - * 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. - *********************************************************/ -private void buildRecord(String channelId, String name, String format, int maxDurationSeconds, int maxSilenceSeconds, String ifExists, boolean beep, String terminateOn) { -reset(); -url = "/channels/" + channelId + "/record"; -method = "POST"; -lParamQuery.add( HttpParam.build( "name", name) ); -lParamQuery.add( HttpParam.build( "format", format) ); -lParamQuery.add( HttpParam.build( "maxDurationSeconds", maxDurationSeconds) ); -lParamQuery.add( HttpParam.build( "maxSilenceSeconds", maxSilenceSeconds) ); -lParamQuery.add( HttpParam.build( "ifExists", ifExists) ); -lParamQuery.add( HttpParam.build( "beep", beep) ); -lParamQuery.add( HttpParam.build( "terminateOn", terminateOn) ); -lE.add( HttpResponse.build( 400, "Invalid parameters") ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "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") ); -lE.add( HttpResponse.build( 422, "The format specified is unknown on this system") ); -} - -@Override -public LiveRecording record(String channelId, String name, String format, int maxDurationSeconds, int maxSilenceSeconds, String ifExists, boolean beep, String terminateOn) throws RestException { -buildRecord(channelId, name, format, maxDurationSeconds, maxSilenceSeconds, ifExists, beep, terminateOn); -String json = httpActionSync(); -return deserializeJson( json, LiveRecording_impl_ari_1_5_0.class ); -} - -@Override -public void record(String channelId, String name, String format, int maxDurationSeconds, int maxSilenceSeconds, String ifExists, boolean beep, String terminateOn, AriCallback callback) { -buildRecord(channelId, name, format, maxDurationSeconds, maxSilenceSeconds, ifExists, beep, terminateOn); -httpActionAsync(callback, LiveRecording_impl_ari_1_5_0.class); -} - -/********************************************************** - * Send a ringing indication to a channel - * - * Indicate ringing to a channel. - *********************************************************/ -private void buildRing(String channelId) { -reset(); -url = "/channels/" + channelId + "/ring"; -method = "POST"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void ring(String channelId) throws RestException { -buildRing(channelId); -String json = httpActionSync(); -} - -@Override -public void ring(String channelId, AriCallback callback) { -buildRing(channelId); -httpActionAsync(callback); -} - -/********************************************************** - * Send a ringing indication to a channel - * - * Stop ringing indication on a channel if locally generated. - *********************************************************/ -private void buildRingStop(String channelId) { -reset(); -url = "/channels/" + channelId + "/ring"; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void ringStop(String channelId) throws RestException { -buildRingStop(channelId); -String json = httpActionSync(); -} - -@Override -public void ringStop(String channelId, AriCallback callback) { -buildRingStop(channelId); -httpActionAsync(callback); -} - -/********************************************************** - * Play silence to a channel - * - * Play silence to a channel. - * Using media operations such as /play on a channel playing silence in this manner will suspend silence without resuming automatically. - *********************************************************/ -private void buildStartSilence(String channelId) { -reset(); -url = "/channels/" + channelId + "/silence"; -method = "POST"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void startSilence(String channelId) throws RestException { -buildStartSilence(channelId); -String json = httpActionSync(); -} - -@Override -public void startSilence(String channelId, AriCallback callback) { -buildStartSilence(channelId); -httpActionAsync(callback); -} - -/********************************************************** - * Play silence to a channel - * - * Stop playing silence to a channel. - *********************************************************/ -private void buildStopSilence(String channelId) { -reset(); -url = "/channels/" + channelId + "/silence"; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void stopSilence(String channelId) throws RestException { -buildStopSilence(channelId); -String json = httpActionSync(); -} - -@Override -public void stopSilence(String channelId, AriCallback callback) { -buildStopSilence(channelId); -httpActionAsync(callback); -} - -/********************************************************** - * Snoop (spy/whisper) on a channel - * - * Start snooping. - * Snoop (spy/whisper) on a specific channel. - *********************************************************/ -private void buildSnoopChannel(String channelId, String spy, String whisper, String app, String appArgs, String snoopId) { -reset(); -url = "/channels/" + channelId + "/snoop"; -method = "POST"; -lParamQuery.add( HttpParam.build( "spy", spy) ); -lParamQuery.add( HttpParam.build( "whisper", whisper) ); -lParamQuery.add( HttpParam.build( "app", app) ); -lParamQuery.add( HttpParam.build( "appArgs", appArgs) ); -lParamQuery.add( HttpParam.build( "snoopId", snoopId) ); -lE.add( HttpResponse.build( 400, "Invalid parameters") ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -} - -@Override -public Channel snoopChannel(String channelId, String spy, String whisper, String app, String appArgs, String snoopId) throws RestException { -buildSnoopChannel(channelId, spy, whisper, app, appArgs, snoopId); -String json = httpActionSync(); -return deserializeJson( json, Channel_impl_ari_1_5_0.class ); -} - -@Override -public void snoopChannel(String channelId, String spy, String whisper, String app, String appArgs, String snoopId, AriCallback callback) { -buildSnoopChannel(channelId, spy, whisper, app, appArgs, snoopId); -httpActionAsync(callback, Channel_impl_ari_1_5_0.class); -} - -/********************************************************** - * Snoop (spy/whisper) on a channel - * - * Start snooping. - * Snoop (spy/whisper) on a specific channel. - *********************************************************/ -private void buildSnoopChannelWithId(String channelId, String snoopId, String spy, String whisper, String app, String appArgs) { -reset(); -url = "/channels/" + channelId + "/snoop/" + snoopId + ""; -method = "POST"; -lParamQuery.add( HttpParam.build( "spy", spy) ); -lParamQuery.add( HttpParam.build( "whisper", whisper) ); -lParamQuery.add( HttpParam.build( "app", app) ); -lParamQuery.add( HttpParam.build( "appArgs", appArgs) ); -lE.add( HttpResponse.build( 400, "Invalid parameters") ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -} - -@Override -public Channel snoopChannelWithId(String channelId, String snoopId, String spy, String whisper, String app, String appArgs) throws RestException { -buildSnoopChannelWithId(channelId, snoopId, spy, whisper, app, appArgs); -String json = httpActionSync(); -return deserializeJson( json, Channel_impl_ari_1_5_0.class ); -} - -@Override -public void snoopChannelWithId(String channelId, String snoopId, String spy, String whisper, String app, String appArgs, AriCallback callback) { -buildSnoopChannelWithId(channelId, snoopId, spy, whisper, app, appArgs); -httpActionAsync(callback, Channel_impl_ari_1_5_0.class); -} - -/********************************************************** - * Variables on a channel - * - * Get the value of a channel variable or function. - *********************************************************/ -private void buildGetChannelVar(String channelId, String variable) { -reset(); -url = "/channels/" + channelId + "/variable"; -method = "GET"; -lParamQuery.add( HttpParam.build( "variable", variable) ); -lE.add( HttpResponse.build( 400, "Missing variable parameter.") ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public Variable getChannelVar(String channelId, String variable) throws RestException { -buildGetChannelVar(channelId, variable); -String json = httpActionSync(); -return deserializeJson( json, Variable_impl_ari_1_5_0.class ); -} - -@Override -public void getChannelVar(String channelId, String variable, AriCallback callback) { -buildGetChannelVar(channelId, variable); -httpActionAsync(callback, Variable_impl_ari_1_5_0.class); -} - -/********************************************************** - * Variables on a channel - * - * Set the value of a channel variable or function. - *********************************************************/ -private void buildSetChannelVar(String channelId, String variable, String value) { -reset(); -url = "/channels/" + channelId + "/variable"; -method = "POST"; -lParamQuery.add( HttpParam.build( "variable", variable) ); -lParamQuery.add( HttpParam.build( "value", value) ); -lE.add( HttpResponse.build( 400, "Missing variable parameter.") ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void setChannelVar(String channelId, String variable, String value) throws RestException { -buildSetChannelVar(channelId, variable, value); -String json = httpActionSync(); -} - -@Override -public void setChannelVar(String channelId, String variable, String value, AriCallback callback) { -buildSetChannelVar(channelId, variable, value); -httpActionAsync(callback); -} - -/********************************************************** - * - * - * @since ari_1_10_0 - *********************************************************/ -public void dial(String channelId, String caller, int timeout, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void snoopChannel(String channelId, String spy, String whisper, String app, String appArgs, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Dial a created channel. - * - * - * @since ari_1_10_0 - *********************************************************/ -public void dial(String channelId, String caller, int timeout) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_7_0 - *********************************************************/ -public void continueInDialplan(String channelId, String context, String extension, int priority, String label, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_10_0 - *********************************************************/ -public void originateWithId(String channelId, String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String otherChannelId, String originator, String formats, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Start playback of media. - * 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.) - * - * @since ari_0_0_1 - *********************************************************/ -public Playback play(String channelId, String media, String lang, int offsetms, int skipms) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new channel (originate). - * 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. - * - * @since ari_1_10_0 - *********************************************************/ -public Channel originate(String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String channelId, String otherChannelId, String originator, String formats) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void originate(String endpoint, String extension, String context, long priority, String app, String appArgs, String callerId, int timeout, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Redirect the channel to a different location. - * - * - * @since ari_1_8_0 - *********************************************************/ -public void redirect(String channelId, String endpoint) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_8_0 - *********************************************************/ -public void redirect(String channelId, String endpoint, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_7_0 - *********************************************************/ -public void originate(String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String channelId, String otherChannelId, String originator, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new channel (originate). - * 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. - * - * @since ari_1_7_0 - *********************************************************/ -public Channel originate(String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String channelId, String otherChannelId, String originator) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create channel. - * - * - * @since ari_1_10_0 - *********************************************************/ -public Channel create(String endpoint, String app, String appArgs, String channelId, String otherChannelId, String originator, String formats) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new channel (originate). - * 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. - * - * @since ari_0_0_1 - *********************************************************/ -public Channel originate(String endpoint, String extension, String context, long priority, String app, String appArgs, String callerId, int timeout) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new channel (originate with id). - * 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. - * - * @since ari_1_10_0 - *********************************************************/ -public Channel originateWithId(String channelId, String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String otherChannelId, String originator, String formats) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_7_0 - *********************************************************/ -public void originateWithId(String channelId, String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String otherChannelId, String originator, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_10_0 - *********************************************************/ -public void create(String endpoint, String app, String appArgs, String channelId, String otherChannelId, String originator, String formats, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void play(String channelId, String media, String lang, int offsetms, int skipms, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new channel (originate with id). - * 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. - * - * @since ari_1_7_0 - *********************************************************/ -public Channel originateWithId(String channelId, String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String otherChannelId, String originator) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Exit application{ - throw new UnsupportedOperationException("Method availble from ..."); -}; continue execution in the dialplan. - * - * - * @since ari_1_7_0 - *********************************************************/ -public void continueInDialplan(String channelId, String context, String extension, int priority, String label) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Start snooping. - * Snoop (spy/whisper) on a specific channel. - * - * @since ari_0_0_1 - *********************************************************/ -public Channel snoopChannel(String channelId, String spy, String whisper, String app, String appArgs) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_10_0 - *********************************************************/ -public void originate(String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String channelId, String otherChannelId, String originator, String formats, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/actions/ActionDeviceStates_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/actions/ActionDeviceStates_impl_ari_1_5_0.java deleted file mode 100644 index b09dea33..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/actions/ActionDeviceStates_impl_ari_1_5_0.java +++ /dev/null @@ -1,131 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_5_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionDeviceStates_impl_ari_1_5_0 extends BaseAriAction implements ActionDeviceStates { -/********************************************************** - * Device states - * - * List all ARI controlled device states. - *********************************************************/ -private void buildList() { -reset(); -url = "/deviceStates"; -method = "GET"; -} - -@Override -public List list() throws RestException { -buildList(); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void list(AriCallback> callback) { -buildList(); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Device state - * - * Retrieve the current state of a device. - *********************************************************/ -private void buildGet(String deviceName) { -reset(); -url = "/deviceStates/" + deviceName + ""; -method = "GET"; -} - -@Override -public DeviceState get(String deviceName) throws RestException { -buildGet(deviceName); -String json = httpActionSync(); -return deserializeJson( json, DeviceState_impl_ari_1_5_0.class ); -} - -@Override -public void get(String deviceName, AriCallback callback) { -buildGet(deviceName); -httpActionAsync(callback, DeviceState_impl_ari_1_5_0.class); -} - -/********************************************************** - * Device state - * - * Change the state of a device controlled by ARI. (Note - implicitly creates the device state). - *********************************************************/ -private void buildUpdate(String deviceName, String deviceState) { -reset(); -url = "/deviceStates/" + deviceName + ""; -method = "PUT"; -lParamQuery.add( HttpParam.build( "deviceState", deviceState) ); -lE.add( HttpResponse.build( 404, "Device name is missing") ); -lE.add( HttpResponse.build( 409, "Uncontrolled device specified") ); -} - -@Override -public void update(String deviceName, String deviceState) throws RestException { -buildUpdate(deviceName, deviceState); -String json = httpActionSync(); -} - -@Override -public void update(String deviceName, String deviceState, AriCallback callback) { -buildUpdate(deviceName, deviceState); -httpActionAsync(callback); -} - -/********************************************************** - * Device state - * - * Destroy a device-state controlled by ARI. - *********************************************************/ -private void buildDelete(String deviceName) { -reset(); -url = "/deviceStates/" + deviceName + ""; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Device name is missing") ); -lE.add( HttpResponse.build( 409, "Uncontrolled device specified") ); -} - -@Override -public void delete(String deviceName) throws RestException { -buildDelete(deviceName); -String json = httpActionSync(); -} - -@Override -public void delete(String deviceName, AriCallback callback) { -buildDelete(deviceName); -httpActionAsync(callback); -} - -/** No missing signatures from interface */ -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/actions/ActionEndpoints_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/actions/ActionEndpoints_impl_ari_1_5_0.java deleted file mode 100644 index f1fe60ba..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/actions/ActionEndpoints_impl_ari_1_5_0.java +++ /dev/null @@ -1,164 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_5_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionEndpoints_impl_ari_1_5_0 extends BaseAriAction implements ActionEndpoints { -/********************************************************** - * Asterisk endpoints - * - * List all endpoints. - *********************************************************/ -private void buildList() { -reset(); -url = "/endpoints"; -method = "GET"; -} - -@Override -public List list() throws RestException { -buildList(); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void list(AriCallback> callback) { -buildList(); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Send a message to some technology URI or endpoint. - * - * Send a message to some technology URI or endpoint. - *********************************************************/ -private void buildSendMessage(String to, String from, String body, Map variables) { -reset(); -url = "/endpoints/sendMessage"; -method = "PUT"; -lParamQuery.add( HttpParam.build( "to", to) ); -lParamQuery.add( HttpParam.build( "from", from) ); -lParamQuery.add( HttpParam.build( "body", body) ); -lParamBody.addAll( HttpParam.build( "variables", variables) ); -lE.add( HttpResponse.build( 404, "Endpoint not found") ); -} - -@Override -public void sendMessage(String to, String from, String body, Map variables) throws RestException { -buildSendMessage(to, from, body, variables); -String json = httpActionSync(); -} - -@Override -public void sendMessage(String to, String from, String body, Map variables, AriCallback callback) { -buildSendMessage(to, from, body, variables); -httpActionAsync(callback); -} - -/********************************************************** - * Asterisk endpoints - * - * List available endoints for a given endpoint technology. - *********************************************************/ -private void buildListByTech(String tech) { -reset(); -url = "/endpoints/" + tech + ""; -method = "GET"; -lE.add( HttpResponse.build( 404, "Endpoints not found") ); -} - -@Override -public List listByTech(String tech) throws RestException { -buildListByTech(tech); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void listByTech(String tech, AriCallback> callback) { -buildListByTech(tech); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Single endpoint - * - * Details for an endpoint. - *********************************************************/ -private void buildGet(String tech, String resource) { -reset(); -url = "/endpoints/" + tech + "/" + resource + ""; -method = "GET"; -lE.add( HttpResponse.build( 400, "Invalid parameters for sending a message.") ); -lE.add( HttpResponse.build( 404, "Endpoints not found") ); -} - -@Override -public Endpoint get(String tech, String resource) throws RestException { -buildGet(tech, resource); -String json = httpActionSync(); -return deserializeJson( json, Endpoint_impl_ari_1_5_0.class ); -} - -@Override -public void get(String tech, String resource, AriCallback callback) { -buildGet(tech, resource); -httpActionAsync(callback, Endpoint_impl_ari_1_5_0.class); -} - -/********************************************************** - * Send a message to some endpoint in a technology. - * - * Send a message to some endpoint in a technology. - *********************************************************/ -private void buildSendMessageToEndpoint(String tech, String resource, String from, String body, Map variables) { -reset(); -url = "/endpoints/" + tech + "/" + resource + "/sendMessage"; -method = "PUT"; -lParamQuery.add( HttpParam.build( "from", from) ); -lParamQuery.add( HttpParam.build( "body", body) ); -lParamBody.addAll( HttpParam.build( "variables", variables) ); -lE.add( HttpResponse.build( 400, "Invalid parameters for sending a message.") ); -lE.add( HttpResponse.build( 404, "Endpoint not found") ); -} - -@Override -public void sendMessageToEndpoint(String tech, String resource, String from, String body, Map variables) throws RestException { -buildSendMessageToEndpoint(tech, resource, from, body, variables); -String json = httpActionSync(); -} - -@Override -public void sendMessageToEndpoint(String tech, String resource, String from, String body, Map variables, AriCallback callback) { -buildSendMessageToEndpoint(tech, resource, from, body, variables); -httpActionAsync(callback); -} - -/** No missing signatures from interface */ -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/actions/ActionEvents_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/actions/ActionEvents_impl_ari_1_5_0.java deleted file mode 100644 index 88be6708..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/actions/ActionEvents_impl_ari_1_5_0.java +++ /dev/null @@ -1,102 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_5_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionEvents_impl_ari_1_5_0 extends BaseAriAction implements ActionEvents { -/********************************************************** - * Events from Asterisk to applications - * - * WebSocket connection for events. - *********************************************************/ -private void buildEventWebsocket(String app) { -reset(); -url = "/events"; -method = "GET"; -lParamQuery.add( HttpParam.build( "app", app) ); -wsUpgrade = true; -} - -@Override -public Message eventWebsocket(String app) throws RestException { -throw new RestException("No synchronous operation on WebSocket"); -} - -@Override -public void eventWebsocket(String app, AriCallback callback) { -buildEventWebsocket(app); -httpActionAsync(callback, Message_impl_ari_1_5_0.class); -} - -/********************************************************** - * Stasis application user events - * - * Generate a user event. - *********************************************************/ -private void buildUserEvent(String eventName, String application, String source, Map variables) { -reset(); -url = "/events/user/" + eventName + ""; -method = "POST"; -lParamQuery.add( HttpParam.build( "application", application) ); -lParamQuery.add( HttpParam.build( "source", source) ); -lParamBody.addAll( HttpParam.build( "variables", variables) ); -lE.add( HttpResponse.build( 404, "Application does not exist.") ); -lE.add( HttpResponse.build( 422, "Event source not found.") ); -lE.add( HttpResponse.build( 400, "Invalid even tsource URI or userevent data.") ); -} - -@Override -public void userEvent(String eventName, String application, String source, Map variables) throws RestException { -buildUserEvent(eventName, application, source, variables); -String json = httpActionSync(); -} - -@Override -public void userEvent(String eventName, String application, String source, Map variables, AriCallback callback) { -buildUserEvent(eventName, application, source, variables); -httpActionAsync(callback); -} - -/********************************************************** - * - * - * @since ari_1_9_0 - *********************************************************/ -public void eventWebsocket(String app, boolean subscribeAll, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * WebSocket connection for events. - * - * - * @since ari_1_9_0 - *********************************************************/ -public Message eventWebsocket(String app, boolean subscribeAll) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/actions/ActionPlaybacks_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/actions/ActionPlaybacks_impl_ari_1_5_0.java deleted file mode 100644 index 77d5db84..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/actions/ActionPlaybacks_impl_ari_1_5_0.java +++ /dev/null @@ -1,107 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_5_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionPlaybacks_impl_ari_1_5_0 extends BaseAriAction implements ActionPlaybacks { -/********************************************************** - * Control object for a playback operation. - * - * Get a playback's details. - *********************************************************/ -private void buildGet(String playbackId) { -reset(); -url = "/playbacks/" + playbackId + ""; -method = "GET"; -lE.add( HttpResponse.build( 404, "The playback cannot be found") ); -} - -@Override -public Playback get(String playbackId) throws RestException { -buildGet(playbackId); -String json = httpActionSync(); -return deserializeJson( json, Playback_impl_ari_1_5_0.class ); -} - -@Override -public void get(String playbackId, AriCallback callback) { -buildGet(playbackId); -httpActionAsync(callback, Playback_impl_ari_1_5_0.class); -} - -/********************************************************** - * Control object for a playback operation. - * - * Stop a playback. - *********************************************************/ -private void buildStop(String playbackId) { -reset(); -url = "/playbacks/" + playbackId + ""; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "The playback cannot be found") ); -} - -@Override -public void stop(String playbackId) throws RestException { -buildStop(playbackId); -String json = httpActionSync(); -} - -@Override -public void stop(String playbackId, AriCallback callback) { -buildStop(playbackId); -httpActionAsync(callback); -} - -/********************************************************** - * Control object for a playback operation. - * - * Control a playback. - *********************************************************/ -private void buildControl(String playbackId, String operation) { -reset(); -url = "/playbacks/" + playbackId + "/control"; -method = "POST"; -lParamQuery.add( HttpParam.build( "operation", operation) ); -lE.add( HttpResponse.build( 400, "The provided operation parameter was invalid") ); -lE.add( HttpResponse.build( 404, "The playback cannot be found") ); -lE.add( HttpResponse.build( 409, "The operation cannot be performed in the playback's current state") ); -} - -@Override -public void control(String playbackId, String operation) throws RestException { -buildControl(playbackId, operation); -String json = httpActionSync(); -} - -@Override -public void control(String playbackId, String operation, AriCallback callback) { -buildControl(playbackId, operation); -httpActionAsync(callback); -} - -/** No missing signatures from interface */ -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/actions/ActionRecordings_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/actions/ActionRecordings_impl_ari_1_5_0.java deleted file mode 100644 index c612e395..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/actions/ActionRecordings_impl_ari_1_5_0.java +++ /dev/null @@ -1,325 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_5_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionRecordings_impl_ari_1_5_0 extends BaseAriAction implements ActionRecordings { -/********************************************************** - * A recording that is in progress - * - * List live recordings. - *********************************************************/ -private void buildGetLive(String recordingName) { -reset(); -url = "/recordings/live/" + recordingName + ""; -method = "GET"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -} - -@Override -public LiveRecording getLive(String recordingName) throws RestException { -buildGetLive(recordingName); -String json = httpActionSync(); -return deserializeJson( json, LiveRecording_impl_ari_1_5_0.class ); -} - -@Override -public void getLive(String recordingName, AriCallback callback) { -buildGetLive(recordingName); -httpActionAsync(callback, LiveRecording_impl_ari_1_5_0.class); -} - -/********************************************************** - * A recording that is in progress - * - * Stop a live recording and discard it. - *********************************************************/ -private void buildCancel(String recordingName) { -reset(); -url = "/recordings/live/" + recordingName + ""; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -} - -@Override -public void cancel(String recordingName) throws RestException { -buildCancel(recordingName); -String json = httpActionSync(); -} - -@Override -public void cancel(String recordingName, AriCallback callback) { -buildCancel(recordingName); -httpActionAsync(callback); -} - -/********************************************************** - * - * - * Mute a live recording. - * Muting a recording suspends silence detection, which will be restarted when the recording is unmuted. - *********************************************************/ -private void buildMute(String recordingName) { -reset(); -url = "/recordings/live/" + recordingName + "/mute"; -method = "POST"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -lE.add( HttpResponse.build( 409, "Recording not in session") ); -} - -@Override -public void mute(String recordingName) throws RestException { -buildMute(recordingName); -String json = httpActionSync(); -} - -@Override -public void mute(String recordingName, AriCallback callback) { -buildMute(recordingName); -httpActionAsync(callback); -} - -/********************************************************** - * - * - * Unmute a live recording. - *********************************************************/ -private void buildUnmute(String recordingName) { -reset(); -url = "/recordings/live/" + recordingName + "/mute"; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -lE.add( HttpResponse.build( 409, "Recording not in session") ); -} - -@Override -public void unmute(String recordingName) throws RestException { -buildUnmute(recordingName); -String json = httpActionSync(); -} - -@Override -public void unmute(String recordingName, AriCallback callback) { -buildUnmute(recordingName); -httpActionAsync(callback); -} - -/********************************************************** - * - * - * Pause a live recording. - * Pausing a recording suspends silence detection, which will be restarted when the recording is unpaused. Paused time is not included in the accounting for maxDurationSeconds. - *********************************************************/ -private void buildPause(String recordingName) { -reset(); -url = "/recordings/live/" + recordingName + "/pause"; -method = "POST"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -lE.add( HttpResponse.build( 409, "Recording not in session") ); -} - -@Override -public void pause(String recordingName) throws RestException { -buildPause(recordingName); -String json = httpActionSync(); -} - -@Override -public void pause(String recordingName, AriCallback callback) { -buildPause(recordingName); -httpActionAsync(callback); -} - -/********************************************************** - * - * - * Unpause a live recording. - *********************************************************/ -private void buildUnpause(String recordingName) { -reset(); -url = "/recordings/live/" + recordingName + "/pause"; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -lE.add( HttpResponse.build( 409, "Recording not in session") ); -} - -@Override -public void unpause(String recordingName) throws RestException { -buildUnpause(recordingName); -String json = httpActionSync(); -} - -@Override -public void unpause(String recordingName, AriCallback callback) { -buildUnpause(recordingName); -httpActionAsync(callback); -} - -/********************************************************** - * - * - * Stop a live recording and store it. - *********************************************************/ -private void buildStop(String recordingName) { -reset(); -url = "/recordings/live/" + recordingName + "/stop"; -method = "POST"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -} - -@Override -public void stop(String recordingName) throws RestException { -buildStop(recordingName); -String json = httpActionSync(); -} - -@Override -public void stop(String recordingName, AriCallback callback) { -buildStop(recordingName); -httpActionAsync(callback); -} - -/********************************************************** - * Recordings - * - * List recordings that are complete. - *********************************************************/ -private void buildListStored() { -reset(); -url = "/recordings/stored"; -method = "GET"; -} - -@Override -public List listStored() throws RestException { -buildListStored(); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void listStored(AriCallback> callback) { -buildListStored(); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Individual recording - * - * Get a stored recording's details. - *********************************************************/ -private void buildGetStored(String recordingName) { -reset(); -url = "/recordings/stored/" + recordingName + ""; -method = "GET"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -} - -@Override -public StoredRecording getStored(String recordingName) throws RestException { -buildGetStored(recordingName); -String json = httpActionSync(); -return deserializeJson( json, StoredRecording_impl_ari_1_5_0.class ); -} - -@Override -public void getStored(String recordingName, AriCallback callback) { -buildGetStored(recordingName); -httpActionAsync(callback, StoredRecording_impl_ari_1_5_0.class); -} - -/********************************************************** - * Individual recording - * - * Delete a stored recording. - *********************************************************/ -private void buildDeleteStored(String recordingName) { -reset(); -url = "/recordings/stored/" + recordingName + ""; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -} - -@Override -public void deleteStored(String recordingName) throws RestException { -buildDeleteStored(recordingName); -String json = httpActionSync(); -} - -@Override -public void deleteStored(String recordingName, AriCallback callback) { -buildDeleteStored(recordingName); -httpActionAsync(callback); -} - -/********************************************************** - * Copy an individual recording - * - * Copy a stored recording. - *********************************************************/ -private void buildCopyStored(String recordingName, String destinationRecordingName) { -reset(); -url = "/recordings/stored/" + recordingName + "/copy"; -method = "POST"; -lParamQuery.add( HttpParam.build( "destinationRecordingName", destinationRecordingName) ); -lE.add( HttpResponse.build( 404, "Recording not found") ); -lE.add( HttpResponse.build( 409, "A recording with the same name already exists on the system") ); -} - -@Override -public StoredRecording copyStored(String recordingName, String destinationRecordingName) throws RestException { -buildCopyStored(recordingName, destinationRecordingName); -String json = httpActionSync(); -return deserializeJson( json, StoredRecording_impl_ari_1_5_0.class ); -} - -@Override -public void copyStored(String recordingName, String destinationRecordingName, AriCallback callback) { -buildCopyStored(recordingName, destinationRecordingName); -httpActionAsync(callback, StoredRecording_impl_ari_1_5_0.class); -} - -/********************************************************** - * - * - * @since ari_1_10_0 - *********************************************************/ -public void getStoredFile(String recordingName, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Get the file associated with the stored recording. - * - * - * @since ari_1_10_0 - *********************************************************/ -public byte[] getStoredFile(String recordingName) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/actions/ActionSounds_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/actions/ActionSounds_impl_ari_1_5_0.java deleted file mode 100644 index 5782f81b..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/actions/ActionSounds_impl_ari_1_5_0.java +++ /dev/null @@ -1,82 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_5_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionSounds_impl_ari_1_5_0 extends BaseAriAction implements ActionSounds { -/********************************************************** - * Sounds - * - * List all sounds. - *********************************************************/ -private void buildList(String lang, String format) { -reset(); -url = "/sounds"; -method = "GET"; -lParamQuery.add( HttpParam.build( "lang", lang) ); -lParamQuery.add( HttpParam.build( "format", format) ); -} - -@Override -public List list(String lang, String format) throws RestException { -buildList(lang, format); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void list(String lang, String format, AriCallback> callback) { -buildList(lang, format); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Individual sound - * - * Get a sound's details. - *********************************************************/ -private void buildGet(String soundId) { -reset(); -url = "/sounds/" + soundId + ""; -method = "GET"; -} - -@Override -public Sound get(String soundId) throws RestException { -buildGet(soundId); -String json = httpActionSync(); -return deserializeJson( json, Sound_impl_ari_1_5_0.class ); -} - -@Override -public void get(String soundId, AriCallback callback) { -buildGet(soundId); -httpActionAsync(callback, Sound_impl_ari_1_5_0.class); -} - -/** No missing signatures from interface */ -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/ApplicationReplaced_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/ApplicationReplaced_impl_ari_1_5_0.java deleted file mode 100644 index 232ecac8..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/ApplicationReplaced_impl_ari_1_5_0.java +++ /dev/null @@ -1,28 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that another WebSocket has taken over for an application. - * - * An 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. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ApplicationReplaced_impl_ari_1_5_0 extends Event_impl_ari_1_5_0 implements ApplicationReplaced, java.io.Serializable { -private static final long serialVersionUID = 1L; -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/Application_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/Application_impl_ari_1_5_0.java deleted file mode 100644 index f7f27da7..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/Application_impl_ari_1_5_0.java +++ /dev/null @@ -1,81 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Details of a Stasis application - * - * Defined in file: applications.json - * Generated by: Model - *********************************************************/ - -public class Application_impl_ari_1_5_0 implements Application, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Id's for bridges subscribed to. */ - private List bridge_ids; - public List getBridge_ids() { - return bridge_ids; - } - - @JsonDeserialize( contentAs=String.class ) - public void setBridge_ids(List val ) { - bridge_ids = val; - } - - /** Id's for channels subscribed to. */ - private List channel_ids; - public List getChannel_ids() { - return channel_ids; - } - - @JsonDeserialize( contentAs=String.class ) - public void setChannel_ids(List val ) { - channel_ids = val; - } - - /** Names of the devices subscribed to. */ - private List device_names; - public List getDevice_names() { - return device_names; - } - - @JsonDeserialize( contentAs=String.class ) - public void setDevice_names(List val ) { - device_names = val; - } - - /** {tech}/{resource} for endpoints subscribed to. */ - private List endpoint_ids; - public List getEndpoint_ids() { - return endpoint_ids; - } - - @JsonDeserialize( contentAs=String.class ) - public void setEndpoint_ids(List val ) { - endpoint_ids = val; - } - - /** Name of this application */ - private String name; - public String getName() { - return name; - } - - @JsonDeserialize( as=String.class ) - public void setName(String val ) { - name = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/AsteriskInfo_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/AsteriskInfo_impl_ari_1_5_0.java deleted file mode 100644 index a824a78e..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/AsteriskInfo_impl_ari_1_5_0.java +++ /dev/null @@ -1,70 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Asterisk system information - * - * Defined in file: asterisk.json - * Generated by: Model - *********************************************************/ - -public class AsteriskInfo_impl_ari_1_5_0 implements AsteriskInfo, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Info about how Asterisk was built */ - private BuildInfo build; - public BuildInfo getBuild() { - return build; - } - - @JsonDeserialize( as=BuildInfo_impl_ari_1_5_0.class ) - public void setBuild(BuildInfo val ) { - build = val; - } - - /** Info about Asterisk configuration */ - private ConfigInfo config; - public ConfigInfo getConfig() { - return config; - } - - @JsonDeserialize( as=ConfigInfo_impl_ari_1_5_0.class ) - public void setConfig(ConfigInfo val ) { - config = val; - } - - /** Info about Asterisk status */ - private StatusInfo status; - public StatusInfo getStatus() { - return status; - } - - @JsonDeserialize( as=StatusInfo_impl_ari_1_5_0.class ) - public void setStatus(StatusInfo val ) { - status = val; - } - - /** Info about the system running Asterisk */ - private SystemInfo system; - public SystemInfo getSystem() { - return system; - } - - @JsonDeserialize( as=SystemInfo_impl_ari_1_5_0.class ) - public void setSystem(SystemInfo val ) { - system = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/BridgeAttendedTransfer_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/BridgeAttendedTransfer_impl_ari_1_5_0.java deleted file mode 100644 index 0342d4e9..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/BridgeAttendedTransfer_impl_ari_1_5_0.java +++ /dev/null @@ -1,202 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that an attended transfer has occurred. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class BridgeAttendedTransfer_impl_ari_1_5_0 extends Event_impl_ari_1_5_0 implements BridgeAttendedTransfer, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Application that has been transferred into */ - private String destination_application; - public String getDestination_application() { - return destination_application; - } - - @JsonDeserialize( as=String.class ) - public void setDestination_application(String val ) { - destination_application = val; - } - - /** Bridge that survived the merge result */ - private String destination_bridge; - public String getDestination_bridge() { - return destination_bridge; - } - - @JsonDeserialize( as=String.class ) - public void setDestination_bridge(String val ) { - destination_bridge = val; - } - - /** First leg of a link transfer result */ - private Channel destination_link_first_leg; - public Channel getDestination_link_first_leg() { - return destination_link_first_leg; - } - - @JsonDeserialize( as=Channel_impl_ari_1_5_0.class ) - public void setDestination_link_first_leg(Channel val ) { - destination_link_first_leg = val; - } - - /** Second leg of a link transfer result */ - private Channel destination_link_second_leg; - public Channel getDestination_link_second_leg() { - return destination_link_second_leg; - } - - @JsonDeserialize( as=Channel_impl_ari_1_5_0.class ) - public void setDestination_link_second_leg(Channel val ) { - destination_link_second_leg = val; - } - - /** Bridge that survived the threeway result */ - private Bridge destination_threeway_bridge; - public Bridge getDestination_threeway_bridge() { - return destination_threeway_bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_5_0.class ) - public void setDestination_threeway_bridge(Bridge val ) { - destination_threeway_bridge = val; - } - - /** Transferer channel that survived the threeway result */ - private Channel destination_threeway_channel; - public Channel getDestination_threeway_channel() { - return destination_threeway_channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_5_0.class ) - public void setDestination_threeway_channel(Channel val ) { - destination_threeway_channel = val; - } - - /** How the transfer was accomplished */ - private String destination_type; - public String getDestination_type() { - return destination_type; - } - - @JsonDeserialize( as=String.class ) - public void setDestination_type(String val ) { - destination_type = val; - } - - /** Whether the transfer was externally initiated or not */ - private boolean is_external; - public boolean getIs_external() { - return is_external; - } - - @JsonDeserialize( as=boolean.class ) - public void setIs_external(boolean val ) { - is_external = val; - } - - /** The channel that is replacing transferer_first_leg in the swap */ - private Channel replace_channel; - public Channel getReplace_channel() { - return replace_channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_5_0.class ) - public void setReplace_channel(Channel val ) { - replace_channel = val; - } - - /** The result of the transfer attempt */ - private String result; - public String getResult() { - return result; - } - - @JsonDeserialize( as=String.class ) - public void setResult(String val ) { - result = val; - } - - /** The channel that is being transferred to */ - private Channel transfer_target; - public Channel getTransfer_target() { - return transfer_target; - } - - @JsonDeserialize( as=Channel_impl_ari_1_5_0.class ) - public void setTransfer_target(Channel val ) { - transfer_target = val; - } - - /** The channel that is being transferred */ - private Channel transferee; - public Channel getTransferee() { - return transferee; - } - - @JsonDeserialize( as=Channel_impl_ari_1_5_0.class ) - public void setTransferee(Channel val ) { - transferee = val; - } - - /** First leg of the transferer */ - private Channel transferer_first_leg; - public Channel getTransferer_first_leg() { - return transferer_first_leg; - } - - @JsonDeserialize( as=Channel_impl_ari_1_5_0.class ) - public void setTransferer_first_leg(Channel val ) { - transferer_first_leg = val; - } - - /** Bridge the transferer first leg is in */ - private Bridge transferer_first_leg_bridge; - public Bridge getTransferer_first_leg_bridge() { - return transferer_first_leg_bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_5_0.class ) - public void setTransferer_first_leg_bridge(Bridge val ) { - transferer_first_leg_bridge = val; - } - - /** Second leg of the transferer */ - private Channel transferer_second_leg; - public Channel getTransferer_second_leg() { - return transferer_second_leg; - } - - @JsonDeserialize( as=Channel_impl_ari_1_5_0.class ) - public void setTransferer_second_leg(Channel val ) { - transferer_second_leg = val; - } - - /** Bridge the transferer second leg is in */ - private Bridge transferer_second_leg_bridge; - public Bridge getTransferer_second_leg_bridge() { - return transferer_second_leg_bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_5_0.class ) - public void setTransferer_second_leg_bridge(Bridge val ) { - transferer_second_leg_bridge = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/BridgeBlindTransfer_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/BridgeBlindTransfer_impl_ari_1_5_0.java deleted file mode 100644 index a186cadd..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/BridgeBlindTransfer_impl_ari_1_5_0.java +++ /dev/null @@ -1,114 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a blind transfer has occurred. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class BridgeBlindTransfer_impl_ari_1_5_0 extends Event_impl_ari_1_5_0 implements BridgeBlindTransfer, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The bridge being transferred */ - private Bridge bridge; - public Bridge getBridge() { - return bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_5_0.class ) - public void setBridge(Bridge val ) { - bridge = val; - } - - /** The channel performing the blind transfer */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_5_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - - /** The context transferred to */ - private String context; - public String getContext() { - return context; - } - - @JsonDeserialize( as=String.class ) - public void setContext(String val ) { - context = val; - } - - /** The extension transferred to */ - private String exten; - public String getExten() { - return exten; - } - - @JsonDeserialize( as=String.class ) - public void setExten(String val ) { - exten = val; - } - - /** Whether the transfer was externally initiated or not */ - private boolean is_external; - public boolean getIs_external() { - return is_external; - } - - @JsonDeserialize( as=boolean.class ) - public void setIs_external(boolean val ) { - is_external = val; - } - - /** The channel that is replacing transferer when the transferee(s) can not be transferred directly */ - private Channel replace_channel; - public Channel getReplace_channel() { - return replace_channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_5_0.class ) - public void setReplace_channel(Channel val ) { - replace_channel = val; - } - - /** The result of the transfer attempt */ - private String result; - public String getResult() { - return result; - } - - @JsonDeserialize( as=String.class ) - public void setResult(String val ) { - result = val; - } - - /** The channel that is being transferred */ - private Channel transferee; - public Channel getTransferee() { - return transferee; - } - - @JsonDeserialize( as=Channel_impl_ari_1_5_0.class ) - public void setTransferee(Channel val ) { - transferee = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/BridgeCreated_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/BridgeCreated_impl_ari_1_5_0.java deleted file mode 100644 index 76cd3124..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/BridgeCreated_impl_ari_1_5_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a bridge has been created. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class BridgeCreated_impl_ari_1_5_0 extends Event_impl_ari_1_5_0 implements BridgeCreated, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Bridge bridge; - public Bridge getBridge() { - return bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_5_0.class ) - public void setBridge(Bridge val ) { - bridge = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/BridgeDestroyed_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/BridgeDestroyed_impl_ari_1_5_0.java deleted file mode 100644 index fc0c71cc..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/BridgeDestroyed_impl_ari_1_5_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a bridge has been destroyed. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class BridgeDestroyed_impl_ari_1_5_0 extends Event_impl_ari_1_5_0 implements BridgeDestroyed, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Bridge bridge; - public Bridge getBridge() { - return bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_5_0.class ) - public void setBridge(Bridge val ) { - bridge = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/BridgeMerged_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/BridgeMerged_impl_ari_1_5_0.java deleted file mode 100644 index 15c50c60..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/BridgeMerged_impl_ari_1_5_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that one bridge has merged into another. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class BridgeMerged_impl_ari_1_5_0 extends Event_impl_ari_1_5_0 implements BridgeMerged, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Bridge bridge; - public Bridge getBridge() { - return bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_5_0.class ) - public void setBridge(Bridge val ) { - bridge = val; - } - - /** */ - private Bridge bridge_from; - public Bridge getBridge_from() { - return bridge_from; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_5_0.class ) - public void setBridge_from(Bridge val ) { - bridge_from = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/Bridge_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/Bridge_impl_ari_1_5_0.java deleted file mode 100644 index 90340ebe..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/Bridge_impl_ari_1_5_0.java +++ /dev/null @@ -1,105 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * The merging of media from one or more channels. - * - * Everyone on the bridge receives the same audio. - * - * Defined in file: bridges.json - * Generated by: Model - *********************************************************/ - -public class Bridge_impl_ari_1_5_0 implements Bridge, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Bridging class */ - private String bridge_class; - public String getBridge_class() { - return bridge_class; - } - - @JsonDeserialize( as=String.class ) - public void setBridge_class(String val ) { - bridge_class = val; - } - - /** Type of bridge technology */ - private String bridge_type; - public String getBridge_type() { - return bridge_type; - } - - @JsonDeserialize( as=String.class ) - public void setBridge_type(String val ) { - bridge_type = val; - } - - /** Ids of channels participating in this bridge */ - private List channels; - public List getChannels() { - return channels; - } - - @JsonDeserialize( contentAs=String.class ) - public void setChannels(List val ) { - channels = val; - } - - /** Entity that created the bridge */ - private String creator; - public String getCreator() { - return creator; - } - - @JsonDeserialize( as=String.class ) - public void setCreator(String val ) { - creator = val; - } - - /** Unique identifier for this bridge */ - private String id; - public String getId() { - return id; - } - - @JsonDeserialize( as=String.class ) - public void setId(String val ) { - id = val; - } - - /** Name the creator gave the bridge */ - private String name; - public String getName() { - return name; - } - - @JsonDeserialize( as=String.class ) - public void setName(String val ) { - name = val; - } - - /** Name of the current bridging technology */ - private String technology; - public String getTechnology() { - return technology; - } - - @JsonDeserialize( as=String.class ) - public void setTechnology(String val ) { - technology = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/BuildInfo_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/BuildInfo_impl_ari_1_5_0.java deleted file mode 100644 index b44db633..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/BuildInfo_impl_ari_1_5_0.java +++ /dev/null @@ -1,92 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Info about how Asterisk was built - * - * Defined in file: asterisk.json - * Generated by: Model - *********************************************************/ - -public class BuildInfo_impl_ari_1_5_0 implements BuildInfo, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Date and time when Asterisk was built. */ - private String date; - public String getDate() { - return date; - } - - @JsonDeserialize( as=String.class ) - public void setDate(String val ) { - date = val; - } - - /** Kernel version Asterisk was built on. */ - private String kernel; - public String getKernel() { - return kernel; - } - - @JsonDeserialize( as=String.class ) - public void setKernel(String val ) { - kernel = val; - } - - /** Machine architecture (x86_64, i686, ppc, etc.) */ - private String machine; - public String getMachine() { - return machine; - } - - @JsonDeserialize( as=String.class ) - public void setMachine(String val ) { - machine = val; - } - - /** Compile time options, or empty string if default. */ - private String options; - public String getOptions() { - return options; - } - - @JsonDeserialize( as=String.class ) - public void setOptions(String val ) { - options = val; - } - - /** OS Asterisk was built on. */ - private String os; - public String getOs() { - return os; - } - - @JsonDeserialize( as=String.class ) - public void setOs(String val ) { - os = val; - } - - /** Username that build Asterisk */ - private String user; - public String getUser() { - return user; - } - - @JsonDeserialize( as=String.class ) - public void setUser(String val ) { - user = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/CallerID_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/CallerID_impl_ari_1_5_0.java deleted file mode 100644 index e9c97674..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/CallerID_impl_ari_1_5_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Caller identification - * - * Defined in file: channels.json - * Generated by: Model - *********************************************************/ - -public class CallerID_impl_ari_1_5_0 implements CallerID, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private String name; - public String getName() { - return name; - } - - @JsonDeserialize( as=String.class ) - public void setName(String val ) { - name = val; - } - - /** */ - private String number; - public String getNumber() { - return number; - } - - @JsonDeserialize( as=String.class ) - public void setNumber(String val ) { - number = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/ChannelCallerId_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/ChannelCallerId_impl_ari_1_5_0.java deleted file mode 100644 index c60d39bf..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/ChannelCallerId_impl_ari_1_5_0.java +++ /dev/null @@ -1,59 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Channel changed Caller ID. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelCallerId_impl_ari_1_5_0 extends Event_impl_ari_1_5_0 implements ChannelCallerId, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The integer representation of the Caller Presentation value. */ - private int caller_presentation; - public int getCaller_presentation() { - return caller_presentation; - } - - @JsonDeserialize( as=int.class ) - public void setCaller_presentation(int val ) { - caller_presentation = val; - } - - /** The text representation of the Caller Presentation value. */ - private String caller_presentation_txt; - public String getCaller_presentation_txt() { - return caller_presentation_txt; - } - - @JsonDeserialize( as=String.class ) - public void setCaller_presentation_txt(String val ) { - caller_presentation_txt = val; - } - - /** The channel that changed Caller ID. */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_5_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/ChannelCreated_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/ChannelCreated_impl_ari_1_5_0.java deleted file mode 100644 index 567f0196..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/ChannelCreated_impl_ari_1_5_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a channel has been created. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelCreated_impl_ari_1_5_0 extends Event_impl_ari_1_5_0 implements ChannelCreated, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_5_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/ChannelDestroyed_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/ChannelDestroyed_impl_ari_1_5_0.java deleted file mode 100644 index cfa96fcf..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/ChannelDestroyed_impl_ari_1_5_0.java +++ /dev/null @@ -1,59 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a channel has been destroyed. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelDestroyed_impl_ari_1_5_0 extends Event_impl_ari_1_5_0 implements ChannelDestroyed, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Integer representation of the cause of the hangup */ - private int cause; - public int getCause() { - return cause; - } - - @JsonDeserialize( as=int.class ) - public void setCause(int val ) { - cause = val; - } - - /** Text representation of the cause of the hangup */ - private String cause_txt; - public String getCause_txt() { - return cause_txt; - } - - @JsonDeserialize( as=String.class ) - public void setCause_txt(String val ) { - cause_txt = val; - } - - /** */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_5_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/ChannelDialplan_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/ChannelDialplan_impl_ari_1_5_0.java deleted file mode 100644 index a03eb77e..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/ChannelDialplan_impl_ari_1_5_0.java +++ /dev/null @@ -1,59 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Channel changed location in the dialplan. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelDialplan_impl_ari_1_5_0 extends Event_impl_ari_1_5_0 implements ChannelDialplan, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The channel that changed dialplan location. */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_5_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - - /** The application about to be executed. */ - private String dialplan_app; - public String getDialplan_app() { - return dialplan_app; - } - - @JsonDeserialize( as=String.class ) - public void setDialplan_app(String val ) { - dialplan_app = val; - } - - /** The data to be passed to the application. */ - private String dialplan_app_data; - public String getDialplan_app_data() { - return dialplan_app_data; - } - - @JsonDeserialize( as=String.class ) - public void setDialplan_app_data(String val ) { - dialplan_app_data = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/ChannelDtmfReceived_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/ChannelDtmfReceived_impl_ari_1_5_0.java deleted file mode 100644 index 5bd211b0..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/ChannelDtmfReceived_impl_ari_1_5_0.java +++ /dev/null @@ -1,61 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * DTMF received on a channel. - * - * This event is sent when the DTMF ends. There is no notification about the start of DTMF - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelDtmfReceived_impl_ari_1_5_0 extends Event_impl_ari_1_5_0 implements ChannelDtmfReceived, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The channel on which DTMF was received */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_5_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - - /** DTMF digit received (0-9, A-E, # or *) */ - private String digit; - public String getDigit() { - return digit; - } - - @JsonDeserialize( as=String.class ) - public void setDigit(String val ) { - digit = val; - } - - /** Number of milliseconds DTMF was received */ - private int duration_ms; - public int getDuration_ms() { - return duration_ms; - } - - @JsonDeserialize( as=int.class ) - public void setDuration_ms(int val ) { - duration_ms = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/ChannelEnteredBridge_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/ChannelEnteredBridge_impl_ari_1_5_0.java deleted file mode 100644 index 8c6e2fe6..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/ChannelEnteredBridge_impl_ari_1_5_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a channel has entered a bridge. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelEnteredBridge_impl_ari_1_5_0 extends Event_impl_ari_1_5_0 implements ChannelEnteredBridge, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Bridge bridge; - public Bridge getBridge() { - return bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_5_0.class ) - public void setBridge(Bridge val ) { - bridge = val; - } - - /** */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_5_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/ChannelHangupRequest_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/ChannelHangupRequest_impl_ari_1_5_0.java deleted file mode 100644 index 99d10bcf..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/ChannelHangupRequest_impl_ari_1_5_0.java +++ /dev/null @@ -1,59 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A hangup was requested on the channel. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelHangupRequest_impl_ari_1_5_0 extends Event_impl_ari_1_5_0 implements ChannelHangupRequest, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Integer representation of the cause of the hangup. */ - private int cause; - public int getCause() { - return cause; - } - - @JsonDeserialize( as=int.class ) - public void setCause(int val ) { - cause = val; - } - - /** The channel on which the hangup was requested. */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_5_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - - /** Whether the hangup request was a soft hangup request. */ - private boolean soft; - public boolean getSoft() { - return soft; - } - - @JsonDeserialize( as=boolean.class ) - public void setSoft(boolean val ) { - soft = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/ChannelLeftBridge_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/ChannelLeftBridge_impl_ari_1_5_0.java deleted file mode 100644 index 31876bb9..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/ChannelLeftBridge_impl_ari_1_5_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a channel has left a bridge. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelLeftBridge_impl_ari_1_5_0 extends Event_impl_ari_1_5_0 implements ChannelLeftBridge, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Bridge bridge; - public Bridge getBridge() { - return bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_5_0.class ) - public void setBridge(Bridge val ) { - bridge = val; - } - - /** */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_5_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/ChannelStateChange_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/ChannelStateChange_impl_ari_1_5_0.java deleted file mode 100644 index 7f76c784..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/ChannelStateChange_impl_ari_1_5_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification of a channel's state change. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelStateChange_impl_ari_1_5_0 extends Event_impl_ari_1_5_0 implements ChannelStateChange, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_5_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/ChannelTalkingFinished_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/ChannelTalkingFinished_impl_ari_1_5_0.java deleted file mode 100644 index 7a596dc5..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/ChannelTalkingFinished_impl_ari_1_5_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Talking is no longer detected on the channel. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelTalkingFinished_impl_ari_1_5_0 extends Event_impl_ari_1_5_0 implements ChannelTalkingFinished, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The channel on which talking completed. */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_5_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - - /** The length of time, in milliseconds, that talking was detected on the channel */ - private int duration; - public int getDuration() { - return duration; - } - - @JsonDeserialize( as=int.class ) - public void setDuration(int val ) { - duration = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/ChannelTalkingStarted_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/ChannelTalkingStarted_impl_ari_1_5_0.java deleted file mode 100644 index f46cebf2..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/ChannelTalkingStarted_impl_ari_1_5_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Talking was detected on the channel. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelTalkingStarted_impl_ari_1_5_0 extends Event_impl_ari_1_5_0 implements ChannelTalkingStarted, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The channel on which talking started. */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_5_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/ChannelUserevent_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/ChannelUserevent_impl_ari_1_5_0.java deleted file mode 100644 index 1f5045d1..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/ChannelUserevent_impl_ari_1_5_0.java +++ /dev/null @@ -1,81 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * User-generated event with additional user-defined fields in the object. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelUserevent_impl_ari_1_5_0 extends Event_impl_ari_1_5_0 implements ChannelUserevent, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** A bridge that is signaled with the user event. */ - private Bridge bridge; - public Bridge getBridge() { - return bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_5_0.class ) - public void setBridge(Bridge val ) { - bridge = val; - } - - /** A channel that is signaled with the user event. */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_5_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - - /** A endpoint that is signaled with the user event. */ - private Endpoint endpoint; - public Endpoint getEndpoint() { - return endpoint; - } - - @JsonDeserialize( as=Endpoint_impl_ari_1_5_0.class ) - public void setEndpoint(Endpoint val ) { - endpoint = val; - } - - /** The name of the user event. */ - private String eventname; - public String getEventname() { - return eventname; - } - - @JsonDeserialize( as=String.class ) - public void setEventname(String val ) { - eventname = val; - } - - /** Custom Userevent data */ - private String userevent; - public String getUserevent() { - return userevent; - } - - @JsonDeserialize( as=String.class ) - public void setUserevent(String val ) { - userevent = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/ChannelVarset_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/ChannelVarset_impl_ari_1_5_0.java deleted file mode 100644 index 9afd0401..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/ChannelVarset_impl_ari_1_5_0.java +++ /dev/null @@ -1,61 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Channel variable changed. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelVarset_impl_ari_1_5_0 extends Event_impl_ari_1_5_0 implements ChannelVarset, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The channel on which the variable was set. - -If missing, the variable is a global variable. */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_5_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - - /** The new value of the variable. */ - private String value; - public String getValue() { - return value; - } - - @JsonDeserialize( as=String.class ) - public void setValue(String val ) { - value = val; - } - - /** The variable that changed. */ - private String variable; - public String getVariable() { - return variable; - } - - @JsonDeserialize( as=String.class ) - public void setVariable(String val ) { - variable = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/Channel_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/Channel_impl_ari_1_5_0.java deleted file mode 100644 index 8f47eb64..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/Channel_impl_ari_1_5_0.java +++ /dev/null @@ -1,133 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A specific communication connection between Asterisk and an Endpoint. - * - * Defined in file: channels.json - * Generated by: Model - *********************************************************/ - -public class Channel_impl_ari_1_5_0 implements Channel, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private String accountcode; - public String getAccountcode() { - return accountcode; - } - - @JsonDeserialize( as=String.class ) - public void setAccountcode(String val ) { - accountcode = val; - } - - /** */ - private CallerID caller; - public CallerID getCaller() { - return caller; - } - - @JsonDeserialize( as=CallerID_impl_ari_1_5_0.class ) - public void setCaller(CallerID val ) { - caller = val; - } - - /** */ - private CallerID connected; - public CallerID getConnected() { - return connected; - } - - @JsonDeserialize( as=CallerID_impl_ari_1_5_0.class ) - public void setConnected(CallerID val ) { - connected = val; - } - - /** Timestamp when channel was created */ - private Date creationtime; - public Date getCreationtime() { - return creationtime; - } - - @JsonDeserialize( as=Date.class ) - public void setCreationtime(Date val ) { - creationtime = val; - } - - /** Current location in the dialplan */ - private DialplanCEP dialplan; - public DialplanCEP getDialplan() { - return dialplan; - } - - @JsonDeserialize( as=DialplanCEP_impl_ari_1_5_0.class ) - public void setDialplan(DialplanCEP val ) { - dialplan = val; - } - - /** Unique identifier of the channel. - -This is the same as the Uniqueid field in AMI. */ - private String id; - public String getId() { - return id; - } - - @JsonDeserialize( as=String.class ) - public void setId(String val ) { - id = val; - } - - /** Name of the channel (i.e. SIP/foo-0000a7e3) */ - private String name; - public String getName() { - return name; - } - - @JsonDeserialize( as=String.class ) - public void setName(String val ) { - name = val; - } - - /** */ - private String state; - public String getState() { - return state; - } - - @JsonDeserialize( as=String.class ) - public void setState(String val ) { - state = val; - } - -/********************************************************** - * The default spoken language - * - * @since ari_1_7_0 - *********************************************************/ - public String getLanguage(){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * The default spoken language - * - * @since ari_1_7_0 - *********************************************************/ - public void setLanguage(String val ){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/ConfigInfo_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/ConfigInfo_impl_ari_1_5_0.java deleted file mode 100644 index dcb9985e..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/ConfigInfo_impl_ari_1_5_0.java +++ /dev/null @@ -1,92 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Info about Asterisk configuration - * - * Defined in file: asterisk.json - * Generated by: Model - *********************************************************/ - -public class ConfigInfo_impl_ari_1_5_0 implements ConfigInfo, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Default language for media playback. */ - private String default_language; - public String getDefault_language() { - return default_language; - } - - @JsonDeserialize( as=String.class ) - public void setDefault_language(String val ) { - default_language = val; - } - - /** Maximum number of simultaneous channels. */ - private int max_channels; - public int getMax_channels() { - return max_channels; - } - - @JsonDeserialize( as=int.class ) - public void setMax_channels(int val ) { - max_channels = val; - } - - /** Maximum load avg on system. */ - private double max_load; - public double getMax_load() { - return max_load; - } - - @JsonDeserialize( as=double.class ) - public void setMax_load(double val ) { - max_load = val; - } - - /** Maximum number of open file handles (files, sockets). */ - private int max_open_files; - public int getMax_open_files() { - return max_open_files; - } - - @JsonDeserialize( as=int.class ) - public void setMax_open_files(int val ) { - max_open_files = val; - } - - /** Asterisk system name. */ - private String name; - public String getName() { - return name; - } - - @JsonDeserialize( as=String.class ) - public void setName(String val ) { - name = val; - } - - /** Effective user/group id for running Asterisk. */ - private SetId setid; - public SetId getSetid() { - return setid; - } - - @JsonDeserialize( as=SetId_impl_ari_1_5_0.class ) - public void setSetid(SetId val ) { - setid = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/DeviceStateChanged_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/DeviceStateChanged_impl_ari_1_5_0.java deleted file mode 100644 index e4174724..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/DeviceStateChanged_impl_ari_1_5_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a device state has changed. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class DeviceStateChanged_impl_ari_1_5_0 extends Event_impl_ari_1_5_0 implements DeviceStateChanged, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Device state object */ - private DeviceState device_state; - public DeviceState getDevice_state() { - return device_state; - } - - @JsonDeserialize( as=DeviceState_impl_ari_1_5_0.class ) - public void setDevice_state(DeviceState val ) { - device_state = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/DeviceState_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/DeviceState_impl_ari_1_5_0.java deleted file mode 100644 index b6e8c236..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/DeviceState_impl_ari_1_5_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Represents the state of a device. - * - * Defined in file: deviceStates.json - * Generated by: Model - *********************************************************/ - -public class DeviceState_impl_ari_1_5_0 implements DeviceState, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Name of the device. */ - private String name; - public String getName() { - return name; - } - - @JsonDeserialize( as=String.class ) - public void setName(String val ) { - name = val; - } - - /** Device's state */ - private String state; - public String getState() { - return state; - } - - @JsonDeserialize( as=String.class ) - public void setState(String val ) { - state = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/Dial_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/Dial_impl_ari_1_5_0.java deleted file mode 100644 index 9d4ea1f2..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/Dial_impl_ari_1_5_0.java +++ /dev/null @@ -1,92 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Dialing state has changed. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class Dial_impl_ari_1_5_0 extends Event_impl_ari_1_5_0 implements Dial, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The calling channel. */ - private Channel caller; - public Channel getCaller() { - return caller; - } - - @JsonDeserialize( as=Channel_impl_ari_1_5_0.class ) - public void setCaller(Channel val ) { - caller = val; - } - - /** Current status of the dialing attempt to the peer. */ - private String dialstatus; - public String getDialstatus() { - return dialstatus; - } - - @JsonDeserialize( as=String.class ) - public void setDialstatus(String val ) { - dialstatus = val; - } - - /** The dial string for calling the peer channel. */ - private String dialstring; - public String getDialstring() { - return dialstring; - } - - @JsonDeserialize( as=String.class ) - public void setDialstring(String val ) { - dialstring = val; - } - - /** Forwarding target requested by the original dialed channel. */ - private String forward; - public String getForward() { - return forward; - } - - @JsonDeserialize( as=String.class ) - public void setForward(String val ) { - forward = val; - } - - /** Channel that the caller has been forwarded to. */ - private Channel forwarded; - public Channel getForwarded() { - return forwarded; - } - - @JsonDeserialize( as=Channel_impl_ari_1_5_0.class ) - public void setForwarded(Channel val ) { - forwarded = val; - } - - /** The dialed channel. */ - private Channel peer; - public Channel getPeer() { - return peer; - } - - @JsonDeserialize( as=Channel_impl_ari_1_5_0.class ) - public void setPeer(Channel val ) { - peer = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/Dialed_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/Dialed_impl_ari_1_5_0.java deleted file mode 100644 index 68b86f6d..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/Dialed_impl_ari_1_5_0.java +++ /dev/null @@ -1,26 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Dialed channel information. - * - * Defined in file: channels.json - * Generated by: Model - *********************************************************/ - -public class Dialed_impl_ari_1_5_0 implements Dialed, java.io.Serializable { -private static final long serialVersionUID = 1L; -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/DialplanCEP_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/DialplanCEP_impl_ari_1_5_0.java deleted file mode 100644 index 5e3eb65f..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/DialplanCEP_impl_ari_1_5_0.java +++ /dev/null @@ -1,59 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Dialplan location (context/extension/priority) - * - * Defined in file: channels.json - * Generated by: Model - *********************************************************/ - -public class DialplanCEP_impl_ari_1_5_0 implements DialplanCEP, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Context in the dialplan */ - private String context; - public String getContext() { - return context; - } - - @JsonDeserialize( as=String.class ) - public void setContext(String val ) { - context = val; - } - - /** Extension in the dialplan */ - private String exten; - public String getExten() { - return exten; - } - - @JsonDeserialize( as=String.class ) - public void setExten(String val ) { - exten = val; - } - - /** Priority in the dialplan */ - private long priority; - public long getPriority() { - return priority; - } - - @JsonDeserialize( as=long.class ) - public void setPriority(long val ) { - priority = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/EndpointStateChange_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/EndpointStateChange_impl_ari_1_5_0.java deleted file mode 100644 index 9c45a3f2..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/EndpointStateChange_impl_ari_1_5_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Endpoint state changed. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class EndpointStateChange_impl_ari_1_5_0 extends Event_impl_ari_1_5_0 implements EndpointStateChange, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Endpoint endpoint; - public Endpoint getEndpoint() { - return endpoint; - } - - @JsonDeserialize( as=Endpoint_impl_ari_1_5_0.class ) - public void setEndpoint(Endpoint val ) { - endpoint = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/Endpoint_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/Endpoint_impl_ari_1_5_0.java deleted file mode 100644 index 2671cd55..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/Endpoint_impl_ari_1_5_0.java +++ /dev/null @@ -1,72 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * An external device that may offer/accept calls to/from Asterisk. - * - * Unlike most resources, which have a single unique identifier, an endpoint is uniquely identified by the technology/resource pair. - * - * Defined in file: endpoints.json - * Generated by: Model - *********************************************************/ - -public class Endpoint_impl_ari_1_5_0 implements Endpoint, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Id's of channels associated with this endpoint */ - private List channel_ids; - public List getChannel_ids() { - return channel_ids; - } - - @JsonDeserialize( contentAs=String.class ) - public void setChannel_ids(List val ) { - channel_ids = val; - } - - /** Identifier of the endpoint, specific to the given technology. */ - private String resource; - public String getResource() { - return resource; - } - - @JsonDeserialize( as=String.class ) - public void setResource(String val ) { - resource = val; - } - - /** Endpoint's state */ - private String state; - public String getState() { - return state; - } - - @JsonDeserialize( as=String.class ) - public void setState(String val ) { - state = val; - } - - /** Technology of the endpoint */ - private String technology; - public String getTechnology() { - return technology; - } - - @JsonDeserialize( as=String.class ) - public void setTechnology(String val ) { - technology = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/Event_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/Event_impl_ari_1_5_0.java deleted file mode 100644 index 49355f36..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/Event_impl_ari_1_5_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Base type for asynchronous events from Asterisk. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class Event_impl_ari_1_5_0 extends Message_impl_ari_1_5_0 implements Event, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Name of the application receiving the event. */ - private String application; - public String getApplication() { - return application; - } - - @JsonDeserialize( as=String.class ) - public void setApplication(String val ) { - application = val; - } - - /** Time at which this event was created. */ - private Date timestamp; - public Date getTimestamp() { - return timestamp; - } - - @JsonDeserialize( as=Date.class ) - public void setTimestamp(Date val ) { - timestamp = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/FormatLangPair_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/FormatLangPair_impl_ari_1_5_0.java deleted file mode 100644 index cc515d40..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/FormatLangPair_impl_ari_1_5_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Identifies the format and language of a sound file - * - * Defined in file: sounds.json - * Generated by: Model - *********************************************************/ - -public class FormatLangPair_impl_ari_1_5_0 implements FormatLangPair, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private String format; - public String getFormat() { - return format; - } - - @JsonDeserialize( as=String.class ) - public void setFormat(String val ) { - format = val; - } - - /** */ - private String language; - public String getLanguage() { - return language; - } - - @JsonDeserialize( as=String.class ) - public void setLanguage(String val ) { - language = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/LiveRecording_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/LiveRecording_impl_ari_1_5_0.java deleted file mode 100644 index 80d61fe4..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/LiveRecording_impl_ari_1_5_0.java +++ /dev/null @@ -1,114 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A recording that is in progress - * - * Defined in file: recordings.json - * Generated by: Model - *********************************************************/ - -public class LiveRecording_impl_ari_1_5_0 implements LiveRecording, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Cause for recording failure if failed */ - private String cause; - public String getCause() { - return cause; - } - - @JsonDeserialize( as=String.class ) - public void setCause(String val ) { - cause = val; - } - - /** Duration in seconds of the recording */ - private int duration; - public int getDuration() { - return duration; - } - - @JsonDeserialize( as=int.class ) - public void setDuration(int val ) { - duration = val; - } - - /** Recording format (wav, gsm, etc.) */ - private String format; - public String getFormat() { - return format; - } - - @JsonDeserialize( as=String.class ) - public void setFormat(String val ) { - format = val; - } - - /** Base name for the recording */ - private String name; - public String getName() { - return name; - } - - @JsonDeserialize( as=String.class ) - public void setName(String val ) { - name = val; - } - - /** Duration of silence, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds. */ - private int silence_duration; - public int getSilence_duration() { - return silence_duration; - } - - @JsonDeserialize( as=int.class ) - public void setSilence_duration(int val ) { - silence_duration = val; - } - - /** */ - private String state; - public String getState() { - return state; - } - - @JsonDeserialize( as=String.class ) - public void setState(String val ) { - state = val; - } - - /** Duration of talking, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds. */ - private int talking_duration; - public int getTalking_duration() { - return talking_duration; - } - - @JsonDeserialize( as=int.class ) - public void setTalking_duration(int val ) { - talking_duration = val; - } - - /** URI for the channel or bridge being recorded */ - private String target_uri; - public String getTarget_uri() { - return target_uri; - } - - @JsonDeserialize( as=String.class ) - public void setTarget_uri(String val ) { - target_uri = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/Message_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/Message_impl_ari_1_5_0.java deleted file mode 100644 index 6c87354e..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/Message_impl_ari_1_5_0.java +++ /dev/null @@ -1,75 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonSubTypes.Type; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Base type for errors and events - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") - @JsonSubTypes({ @Type(value = MissingParams_impl_ari_1_5_0.class, name = "MissingParams") -, @Type(value = Event_impl_ari_1_5_0.class, name = "Event") -, @Type(value = DeviceStateChanged_impl_ari_1_5_0.class, name = "DeviceStateChanged") -, @Type(value = PlaybackStarted_impl_ari_1_5_0.class, name = "PlaybackStarted") -, @Type(value = PlaybackFinished_impl_ari_1_5_0.class, name = "PlaybackFinished") -, @Type(value = RecordingStarted_impl_ari_1_5_0.class, name = "RecordingStarted") -, @Type(value = RecordingFinished_impl_ari_1_5_0.class, name = "RecordingFinished") -, @Type(value = RecordingFailed_impl_ari_1_5_0.class, name = "RecordingFailed") -, @Type(value = ApplicationReplaced_impl_ari_1_5_0.class, name = "ApplicationReplaced") -, @Type(value = BridgeCreated_impl_ari_1_5_0.class, name = "BridgeCreated") -, @Type(value = BridgeDestroyed_impl_ari_1_5_0.class, name = "BridgeDestroyed") -, @Type(value = BridgeMerged_impl_ari_1_5_0.class, name = "BridgeMerged") -, @Type(value = BridgeBlindTransfer_impl_ari_1_5_0.class, name = "BridgeBlindTransfer") -, @Type(value = BridgeAttendedTransfer_impl_ari_1_5_0.class, name = "BridgeAttendedTransfer") -, @Type(value = ChannelCreated_impl_ari_1_5_0.class, name = "ChannelCreated") -, @Type(value = ChannelDestroyed_impl_ari_1_5_0.class, name = "ChannelDestroyed") -, @Type(value = ChannelEnteredBridge_impl_ari_1_5_0.class, name = "ChannelEnteredBridge") -, @Type(value = ChannelLeftBridge_impl_ari_1_5_0.class, name = "ChannelLeftBridge") -, @Type(value = ChannelStateChange_impl_ari_1_5_0.class, name = "ChannelStateChange") -, @Type(value = ChannelDtmfReceived_impl_ari_1_5_0.class, name = "ChannelDtmfReceived") -, @Type(value = ChannelDialplan_impl_ari_1_5_0.class, name = "ChannelDialplan") -, @Type(value = ChannelCallerId_impl_ari_1_5_0.class, name = "ChannelCallerId") -, @Type(value = ChannelUserevent_impl_ari_1_5_0.class, name = "ChannelUserevent") -, @Type(value = ChannelHangupRequest_impl_ari_1_5_0.class, name = "ChannelHangupRequest") -, @Type(value = ChannelVarset_impl_ari_1_5_0.class, name = "ChannelVarset") -, @Type(value = ChannelTalkingStarted_impl_ari_1_5_0.class, name = "ChannelTalkingStarted") -, @Type(value = ChannelTalkingFinished_impl_ari_1_5_0.class, name = "ChannelTalkingFinished") -, @Type(value = EndpointStateChange_impl_ari_1_5_0.class, name = "EndpointStateChange") -, @Type(value = Dial_impl_ari_1_5_0.class, name = "Dial") -, @Type(value = StasisEnd_impl_ari_1_5_0.class, name = "StasisEnd") -, @Type(value = StasisStart_impl_ari_1_5_0.class, name = "StasisStart") -, @Type(value = TextMessageReceived_impl_ari_1_5_0.class, name = "TextMessageReceived") - }) - - -public class Message_impl_ari_1_5_0 implements Message, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Indicates the type of this message. */ - private String type; - public String getType() { - return type; - } - - @JsonDeserialize( as=String.class ) - public void setType(String val ) { - type = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/MissingParams_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/MissingParams_impl_ari_1_5_0.java deleted file mode 100644 index af6182af..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/MissingParams_impl_ari_1_5_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Error event sent when required params are missing. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class MissingParams_impl_ari_1_5_0 extends Message_impl_ari_1_5_0 implements MissingParams, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** A list of the missing parameters */ - private List params; - public List getParams() { - return params; - } - - @JsonDeserialize( contentAs=String.class ) - public void setParams(List val ) { - params = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/PlaybackFinished_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/PlaybackFinished_impl_ari_1_5_0.java deleted file mode 100644 index 565d8010..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/PlaybackFinished_impl_ari_1_5_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Event showing the completion of a media playback operation. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class PlaybackFinished_impl_ari_1_5_0 extends Event_impl_ari_1_5_0 implements PlaybackFinished, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Playback control object */ - private Playback playback; - public Playback getPlayback() { - return playback; - } - - @JsonDeserialize( as=Playback_impl_ari_1_5_0.class ) - public void setPlayback(Playback val ) { - playback = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/PlaybackStarted_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/PlaybackStarted_impl_ari_1_5_0.java deleted file mode 100644 index 8f02edbd..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/PlaybackStarted_impl_ari_1_5_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Event showing the start of a media playback operation. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class PlaybackStarted_impl_ari_1_5_0 extends Event_impl_ari_1_5_0 implements PlaybackStarted, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Playback control object */ - private Playback playback; - public Playback getPlayback() { - return playback; - } - - @JsonDeserialize( as=Playback_impl_ari_1_5_0.class ) - public void setPlayback(Playback val ) { - playback = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/Playback_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/Playback_impl_ari_1_5_0.java deleted file mode 100644 index d0086838..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/Playback_impl_ari_1_5_0.java +++ /dev/null @@ -1,98 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Object representing the playback of media to a channel - * - * Defined in file: playbacks.json - * Generated by: Model - *********************************************************/ - -public class Playback_impl_ari_1_5_0 implements Playback, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** ID for this playback operation */ - private String id; - public String getId() { - return id; - } - - @JsonDeserialize( as=String.class ) - public void setId(String val ) { - id = val; - } - - /** For media types that support multiple languages, the language requested for playback. */ - private String language; - public String getLanguage() { - return language; - } - - @JsonDeserialize( as=String.class ) - public void setLanguage(String val ) { - language = val; - } - - /** URI for the media to play back. */ - private String media_uri; - public String getMedia_uri() { - return media_uri; - } - - @JsonDeserialize( as=String.class ) - public void setMedia_uri(String val ) { - media_uri = val; - } - - /** Current state of the playback operation. */ - private String state; - public String getState() { - return state; - } - - @JsonDeserialize( as=String.class ) - public void setState(String val ) { - state = val; - } - - /** URI for the channel or bridge to play the media on */ - private String target_uri; - public String getTarget_uri() { - return target_uri; - } - - @JsonDeserialize( as=String.class ) - public void setTarget_uri(String val ) { - target_uri = val; - } - -/********************************************************** - * If a list of URIs is being played, the next media URI to be played back. - * - * @since ari_1_10_0 - *********************************************************/ - public void setNext_media_uri(String val ){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * If a list of URIs is being played, the next media URI to be played back. - * - * @since ari_1_10_0 - *********************************************************/ - public String getNext_media_uri(){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/RecordingFailed_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/RecordingFailed_impl_ari_1_5_0.java deleted file mode 100644 index 2ccf446f..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/RecordingFailed_impl_ari_1_5_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Event showing failure of a recording operation. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class RecordingFailed_impl_ari_1_5_0 extends Event_impl_ari_1_5_0 implements RecordingFailed, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Recording control object */ - private LiveRecording recording; - public LiveRecording getRecording() { - return recording; - } - - @JsonDeserialize( as=LiveRecording_impl_ari_1_5_0.class ) - public void setRecording(LiveRecording val ) { - recording = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/RecordingFinished_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/RecordingFinished_impl_ari_1_5_0.java deleted file mode 100644 index abe59c9c..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/RecordingFinished_impl_ari_1_5_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Event showing the completion of a recording operation. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class RecordingFinished_impl_ari_1_5_0 extends Event_impl_ari_1_5_0 implements RecordingFinished, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Recording control object */ - private LiveRecording recording; - public LiveRecording getRecording() { - return recording; - } - - @JsonDeserialize( as=LiveRecording_impl_ari_1_5_0.class ) - public void setRecording(LiveRecording val ) { - recording = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/RecordingStarted_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/RecordingStarted_impl_ari_1_5_0.java deleted file mode 100644 index 40d0e632..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/RecordingStarted_impl_ari_1_5_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Event showing the start of a recording operation. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class RecordingStarted_impl_ari_1_5_0 extends Event_impl_ari_1_5_0 implements RecordingStarted, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Recording control object */ - private LiveRecording recording; - public LiveRecording getRecording() { - return recording; - } - - @JsonDeserialize( as=LiveRecording_impl_ari_1_5_0.class ) - public void setRecording(LiveRecording val ) { - recording = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/SetId_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/SetId_impl_ari_1_5_0.java deleted file mode 100644 index ddaf3802..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/SetId_impl_ari_1_5_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Effective user/group id - * - * Defined in file: asterisk.json - * Generated by: Model - *********************************************************/ - -public class SetId_impl_ari_1_5_0 implements SetId, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Effective group id. */ - private String group; - public String getGroup() { - return group; - } - - @JsonDeserialize( as=String.class ) - public void setGroup(String val ) { - group = val; - } - - /** Effective user id. */ - private String user; - public String getUser() { - return user; - } - - @JsonDeserialize( as=String.class ) - public void setUser(String val ) { - user = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/Sound_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/Sound_impl_ari_1_5_0.java deleted file mode 100644 index 677cf13e..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/Sound_impl_ari_1_5_0.java +++ /dev/null @@ -1,59 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A media file that may be played back. - * - * Defined in file: sounds.json - * Generated by: Model - *********************************************************/ - -public class Sound_impl_ari_1_5_0 implements Sound, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The formats and languages in which this sound is available. */ - private List formats; - public List getFormats() { - return formats; - } - - @JsonDeserialize( contentAs=FormatLangPair_impl_ari_1_5_0.class ) - public void setFormats(List val ) { - formats = val; - } - - /** Sound's identifier. */ - private String id; - public String getId() { - return id; - } - - @JsonDeserialize( as=String.class ) - public void setId(String val ) { - id = val; - } - - /** Text description of the sound, usually the words spoken. */ - private String text; - public String getText() { - return text; - } - - @JsonDeserialize( as=String.class ) - public void setText(String val ) { - text = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/StasisEnd_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/StasisEnd_impl_ari_1_5_0.java deleted file mode 100644 index e64abe81..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/StasisEnd_impl_ari_1_5_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a channel has left a Stasis application. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class StasisEnd_impl_ari_1_5_0 extends Event_impl_ari_1_5_0 implements StasisEnd, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_5_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/StasisStart_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/StasisStart_impl_ari_1_5_0.java deleted file mode 100644 index 3e18d912..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/StasisStart_impl_ari_1_5_0.java +++ /dev/null @@ -1,59 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a channel has entered a Stasis application. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class StasisStart_impl_ari_1_5_0 extends Event_impl_ari_1_5_0 implements StasisStart, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Arguments to the application */ - private List args; - public List getArgs() { - return args; - } - - @JsonDeserialize( contentAs=String.class ) - public void setArgs(List val ) { - args = val; - } - - /** */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_5_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - - /** */ - private Channel replace_channel; - public Channel getReplace_channel() { - return replace_channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_5_0.class ) - public void setReplace_channel(Channel val ) { - replace_channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/StatusInfo_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/StatusInfo_impl_ari_1_5_0.java deleted file mode 100644 index 233f60ee..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/StatusInfo_impl_ari_1_5_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Info about Asterisk status - * - * Defined in file: asterisk.json - * Generated by: Model - *********************************************************/ - -public class StatusInfo_impl_ari_1_5_0 implements StatusInfo, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Time when Asterisk was last reloaded. */ - private Date last_reload_time; - public Date getLast_reload_time() { - return last_reload_time; - } - - @JsonDeserialize( as=Date.class ) - public void setLast_reload_time(Date val ) { - last_reload_time = val; - } - - /** Time when Asterisk was started. */ - private Date startup_time; - public Date getStartup_time() { - return startup_time; - } - - @JsonDeserialize( as=Date.class ) - public void setStartup_time(Date val ) { - startup_time = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/StoredRecording_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/StoredRecording_impl_ari_1_5_0.java deleted file mode 100644 index 8d1dfc75..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/StoredRecording_impl_ari_1_5_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A past recording that may be played back. - * - * Defined in file: recordings.json - * Generated by: Model - *********************************************************/ - -public class StoredRecording_impl_ari_1_5_0 implements StoredRecording, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private String format; - public String getFormat() { - return format; - } - - @JsonDeserialize( as=String.class ) - public void setFormat(String val ) { - format = val; - } - - /** */ - private String name; - public String getName() { - return name; - } - - @JsonDeserialize( as=String.class ) - public void setName(String val ) { - name = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/SystemInfo_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/SystemInfo_impl_ari_1_5_0.java deleted file mode 100644 index 23fbfbf9..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/SystemInfo_impl_ari_1_5_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Info about Asterisk - * - * Defined in file: asterisk.json - * Generated by: Model - *********************************************************/ - -public class SystemInfo_impl_ari_1_5_0 implements SystemInfo, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private String entity_id; - public String getEntity_id() { - return entity_id; - } - - @JsonDeserialize( as=String.class ) - public void setEntity_id(String val ) { - entity_id = val; - } - - /** Asterisk version. */ - private String version; - public String getVersion() { - return version; - } - - @JsonDeserialize( as=String.class ) - public void setVersion(String val ) { - version = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/TextMessageReceived_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/TextMessageReceived_impl_ari_1_5_0.java deleted file mode 100644 index baeeb2ee..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/TextMessageReceived_impl_ari_1_5_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A text message was received from an endpoint. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class TextMessageReceived_impl_ari_1_5_0 extends Event_impl_ari_1_5_0 implements TextMessageReceived, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Endpoint endpoint; - public Endpoint getEndpoint() { - return endpoint; - } - - @JsonDeserialize( as=Endpoint_impl_ari_1_5_0.class ) - public void setEndpoint(Endpoint val ) { - endpoint = val; - } - - /** */ - private TextMessage message; - public TextMessage getMessage() { - return message; - } - - @JsonDeserialize( as=TextMessage_impl_ari_1_5_0.class ) - public void setMessage(TextMessage val ) { - message = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/TextMessageVariable_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/TextMessageVariable_impl_ari_1_5_0.java deleted file mode 100644 index 5a7ea157..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/TextMessageVariable_impl_ari_1_5_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A key/value pair variable in a text message. - * - * Defined in file: endpoints.json - * Generated by: Model - *********************************************************/ - -public class TextMessageVariable_impl_ari_1_5_0 implements TextMessageVariable, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** A unique key identifying the variable. */ - private String key; - public String getKey() { - return key; - } - - @JsonDeserialize( as=String.class ) - public void setKey(String val ) { - key = val; - } - - /** The value of the variable. */ - private String value; - public String getValue() { - return value; - } - - @JsonDeserialize( as=String.class ) - public void setValue(String val ) { - value = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/TextMessage_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/TextMessage_impl_ari_1_5_0.java deleted file mode 100644 index 437fc04b..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/TextMessage_impl_ari_1_5_0.java +++ /dev/null @@ -1,70 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A text message. - * - * Defined in file: endpoints.json - * Generated by: Model - *********************************************************/ - -public class TextMessage_impl_ari_1_5_0 implements TextMessage, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The text of the message. */ - private String body; - public String getBody() { - return body; - } - - @JsonDeserialize( as=String.class ) - public void setBody(String val ) { - body = val; - } - - /** A technology specific URI specifying the source of the message. For sip and pjsip technologies, any SIP URI can be specified. For xmpp, the URI must correspond to the client connection being used to send the message. */ - private String from; - public String getFrom() { - return from; - } - - @JsonDeserialize( as=String.class ) - public void setFrom(String val ) { - from = val; - } - - /** A technology specific URI specifying the destination of the message. Valid technologies include sip, pjsip, and xmp. The destination of a message should be an endpoint. */ - private String to; - public String getTo() { - return to; - } - - @JsonDeserialize( as=String.class ) - public void setTo(String val ) { - to = val; - } - - /** Technology specific key/value pairs associated with the message. */ - private List variables; - public List getVariables() { - return variables; - } - - @JsonDeserialize( contentAs=TextMessageVariable_impl_ari_1_5_0.class ) - public void setVariables(List val ) { - variables = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/Variable_impl_ari_1_5_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/Variable_impl_ari_1_5_0.java deleted file mode 100644 index 2e2a9284..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_5_0/models/Variable_impl_ari_1_5_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_5_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * The value of a channel variable - * - * Defined in file: asterisk.json - * Generated by: Model - *********************************************************/ - -public class Variable_impl_ari_1_5_0 implements Variable, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The value of the variable requested */ - private String value; - public String getValue() { - return value; - } - - @JsonDeserialize( as=String.class ) - public void setValue(String val ) { - value = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/AriBuilder_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/AriBuilder_impl_ari_1_6_0.java deleted file mode 100644 index ad8bbe6f..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/AriBuilder_impl_ari_1_6_0.java +++ /dev/null @@ -1,324 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.ari_1_6_0.models.*; -import ch.loway.oss.ari4java.generated.ari_1_6_0.actions.*; -import ch.loway.oss.ari4java.generated.*; -import ch.loway.oss.ari4java.ARI; - -public class AriBuilder_impl_ari_1_6_0 implements AriBuilder { - -public ActionPlaybacks actionPlaybacks() { - return new ActionPlaybacks_impl_ari_1_6_0(); - }; - -public ActionApplications actionApplications() { - return new ActionApplications_impl_ari_1_6_0(); - }; - -public ActionChannels actionChannels() { - return new ActionChannels_impl_ari_1_6_0(); - }; - -public ActionRecordings actionRecordings() { - return new ActionRecordings_impl_ari_1_6_0(); - }; - -public ActionEndpoints actionEndpoints() { - return new ActionEndpoints_impl_ari_1_6_0(); - }; - -public ActionDeviceStates actionDeviceStates() { - return new ActionDeviceStates_impl_ari_1_6_0(); - }; - -public ActionAsterisk actionAsterisk() { - return new ActionAsterisk_impl_ari_1_6_0(); - }; - -public ActionBridges actionBridges() { - return new ActionBridges_impl_ari_1_6_0(); - }; - -public ActionSounds actionSounds() { - return new ActionSounds_impl_ari_1_6_0(); - }; - -public ActionEvents actionEvents() { - return new ActionEvents_impl_ari_1_6_0(); - }; - -public ChannelDestroyed channelDestroyed() { - return new ChannelDestroyed_impl_ari_1_6_0(); - }; - -public AsteriskInfo asteriskInfo() { - return new AsteriskInfo_impl_ari_1_6_0(); - }; - -public TextMessageVariable textMessageVariable() { - return new TextMessageVariable_impl_ari_1_6_0(); - }; - -public ChannelDialplan channelDialplan() { - return new ChannelDialplan_impl_ari_1_6_0(); - }; - -public Event event() { - return new Event_impl_ari_1_6_0(); - }; - -public ChannelDtmfReceived channelDtmfReceived() { - return new ChannelDtmfReceived_impl_ari_1_6_0(); - }; - -public DeviceState deviceState() { - return new DeviceState_impl_ari_1_6_0(); - }; - -public PlaybackFinished playbackFinished() { - return new PlaybackFinished_impl_ari_1_6_0(); - }; - -public ChannelCallerId channelCallerId() { - return new ChannelCallerId_impl_ari_1_6_0(); - }; - -public MissingParams missingParams() { - return new MissingParams_impl_ari_1_6_0(); - }; - -public BridgeAttendedTransfer bridgeAttendedTransfer() { - return new BridgeAttendedTransfer_impl_ari_1_6_0(); - }; - -public StoredRecording storedRecording() { - return new StoredRecording_impl_ari_1_6_0(); - }; - -public ChannelLeftBridge channelLeftBridge() { - return new ChannelLeftBridge_impl_ari_1_6_0(); - }; - -public Message message() { - return new Message_impl_ari_1_6_0(); - }; - -public ChannelCreated channelCreated() { - return new ChannelCreated_impl_ari_1_6_0(); - }; - -public SystemInfo systemInfo() { - return new SystemInfo_impl_ari_1_6_0(); - }; - -public RecordingStarted recordingStarted() { - return new RecordingStarted_impl_ari_1_6_0(); - }; - -public DialplanCEP dialplanCEP() { - return new DialplanCEP_impl_ari_1_6_0(); - }; - -public Bridge bridge() { - return new Bridge_impl_ari_1_6_0(); - }; - -public Channel channel() { - return new Channel_impl_ari_1_6_0(); - }; - -public Sound sound() { - return new Sound_impl_ari_1_6_0(); - }; - -public DeviceStateChanged deviceStateChanged() { - return new DeviceStateChanged_impl_ari_1_6_0(); - }; - -public ChannelConnectedLine channelConnectedLine() { - return new ChannelConnectedLine_impl_ari_1_6_0(); - }; - -public CallerID callerID() { - return new CallerID_impl_ari_1_6_0(); - }; - -public FormatLangPair formatLangPair() { - return new FormatLangPair_impl_ari_1_6_0(); - }; - -public StasisStart stasisStart() { - return new StasisStart_impl_ari_1_6_0(); - }; - -public ChannelEnteredBridge channelEnteredBridge() { - return new ChannelEnteredBridge_impl_ari_1_6_0(); - }; - -public Endpoint endpoint() { - return new Endpoint_impl_ari_1_6_0(); - }; - -public BuildInfo buildInfo() { - return new BuildInfo_impl_ari_1_6_0(); - }; - -public TextMessageReceived textMessageReceived() { - return new TextMessageReceived_impl_ari_1_6_0(); - }; - -public EndpointStateChange endpointStateChange() { - return new EndpointStateChange_impl_ari_1_6_0(); - }; - -public PlaybackStarted playbackStarted() { - return new PlaybackStarted_impl_ari_1_6_0(); - }; - -public ChannelTalkingStarted channelTalkingStarted() { - return new ChannelTalkingStarted_impl_ari_1_6_0(); - }; - -public ChannelVarset channelVarset() { - return new ChannelVarset_impl_ari_1_6_0(); - }; - -public TextMessage textMessage() { - return new TextMessage_impl_ari_1_6_0(); - }; - -public Variable variable() { - return new Variable_impl_ari_1_6_0(); - }; - -public ChannelUserevent channelUserevent() { - return new ChannelUserevent_impl_ari_1_6_0(); - }; - -public BridgeBlindTransfer bridgeBlindTransfer() { - return new BridgeBlindTransfer_impl_ari_1_6_0(); - }; - -public ChannelStateChange channelStateChange() { - return new ChannelStateChange_impl_ari_1_6_0(); - }; - -public ConfigInfo configInfo() { - return new ConfigInfo_impl_ari_1_6_0(); - }; - -public Playback playback() { - return new Playback_impl_ari_1_6_0(); - }; - -public StatusInfo statusInfo() { - return new StatusInfo_impl_ari_1_6_0(); - }; - -public Dial dial() { - return new Dial_impl_ari_1_6_0(); - }; - -public SetId setId() { - return new SetId_impl_ari_1_6_0(); - }; - -public RecordingFailed recordingFailed() { - return new RecordingFailed_impl_ari_1_6_0(); - }; - -public BridgeCreated bridgeCreated() { - return new BridgeCreated_impl_ari_1_6_0(); - }; - -public RecordingFinished recordingFinished() { - return new RecordingFinished_impl_ari_1_6_0(); - }; - -public ChannelTalkingFinished channelTalkingFinished() { - return new ChannelTalkingFinished_impl_ari_1_6_0(); - }; - -public Application application() { - return new Application_impl_ari_1_6_0(); - }; - -public StasisEnd stasisEnd() { - return new StasisEnd_impl_ari_1_6_0(); - }; - -public ApplicationReplaced applicationReplaced() { - return new ApplicationReplaced_impl_ari_1_6_0(); - }; - -public Dialed dialed() { - return new Dialed_impl_ari_1_6_0(); - }; - -public LiveRecording liveRecording() { - return new LiveRecording_impl_ari_1_6_0(); - }; - -public BridgeDestroyed bridgeDestroyed() { - return new BridgeDestroyed_impl_ari_1_6_0(); - }; - -public BridgeMerged bridgeMerged() { - return new BridgeMerged_impl_ari_1_6_0(); - }; - -public ChannelHangupRequest channelHangupRequest() { - return new ChannelHangupRequest_impl_ari_1_6_0(); - }; - -public ChannelHold channelHold() { - throw new UnsupportedOperationException(); - }; - -public ChannelUnhold channelUnhold() { - throw new UnsupportedOperationException(); - }; - -public ConfigTuple configTuple() { - throw new UnsupportedOperationException(); - }; - -public ContactInfo contactInfo() { - throw new UnsupportedOperationException(); - }; - -public ContactStatusChange contactStatusChange() { - throw new UnsupportedOperationException(); - }; - -public LogChannel logChannel() { - throw new UnsupportedOperationException(); - }; - -public Module module() { - throw new UnsupportedOperationException(); - }; - -public Peer peer() { - throw new UnsupportedOperationException(); - }; - -public PeerStatusChange peerStatusChange() { - throw new UnsupportedOperationException(); - }; - -public PlaybackContinuing playbackContinuing() { - throw new UnsupportedOperationException(); - }; - -public ARI.ClassFactory getClassFactory() { - return new ClassTranslator_impl_ari_1_6_0(); -}; - -}; diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/ClassTranslator_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/ClassTranslator_impl_ari_1_6_0.java deleted file mode 100644 index 679defcc..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/ClassTranslator_impl_ari_1_6_0.java +++ /dev/null @@ -1,291 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.ARI; -import ch.loway.oss.ari4java.generated.*; -import ch.loway.oss.ari4java.generated.ari_1_6_0.models.*; -import ch.loway.oss.ari4java.generated.ari_1_6_0.actions.*; - -/********************************************************** - * This is a class translator. - *********************************************************/ -public class ClassTranslator_impl_ari_1_6_0 implements ARI.ClassFactory { - - @Override - public Class getImplementationFor(Class interfaceClass) { - - if ( interfaceClass.equals(ActionApplications.class) ) { - return (ActionApplications_impl_ari_1_6_0.class); - } else - - if ( interfaceClass.equals(ActionAsterisk.class) ) { - return (ActionAsterisk_impl_ari_1_6_0.class); - } else - - if ( interfaceClass.equals(ActionBridges.class) ) { - return (ActionBridges_impl_ari_1_6_0.class); - } else - - if ( interfaceClass.equals(ActionChannels.class) ) { - return (ActionChannels_impl_ari_1_6_0.class); - } else - - if ( interfaceClass.equals(ActionDeviceStates.class) ) { - return (ActionDeviceStates_impl_ari_1_6_0.class); - } else - - if ( interfaceClass.equals(ActionEndpoints.class) ) { - return (ActionEndpoints_impl_ari_1_6_0.class); - } else - - if ( interfaceClass.equals(ActionEvents.class) ) { - return (ActionEvents_impl_ari_1_6_0.class); - } else - - if ( interfaceClass.equals(ActionPlaybacks.class) ) { - return (ActionPlaybacks_impl_ari_1_6_0.class); - } else - - if ( interfaceClass.equals(ActionRecordings.class) ) { - return (ActionRecordings_impl_ari_1_6_0.class); - } else - - if ( interfaceClass.equals(ActionSounds.class) ) { - return (ActionSounds_impl_ari_1_6_0.class); - } else - - if ( interfaceClass.equals(Application.class) ) { - return (Application_impl_ari_1_6_0.class); - } else - - if ( interfaceClass.equals(ApplicationReplaced.class) ) { - return (ApplicationReplaced_impl_ari_1_6_0.class); - } else - - if ( interfaceClass.equals(AsteriskInfo.class) ) { - return (AsteriskInfo_impl_ari_1_6_0.class); - } else - - if ( interfaceClass.equals(Bridge.class) ) { - return (Bridge_impl_ari_1_6_0.class); - } else - - if ( interfaceClass.equals(BridgeAttendedTransfer.class) ) { - return (BridgeAttendedTransfer_impl_ari_1_6_0.class); - } else - - if ( interfaceClass.equals(BridgeBlindTransfer.class) ) { - return (BridgeBlindTransfer_impl_ari_1_6_0.class); - } else - - if ( interfaceClass.equals(BridgeCreated.class) ) { - return (BridgeCreated_impl_ari_1_6_0.class); - } else - - if ( interfaceClass.equals(BridgeDestroyed.class) ) { - return (BridgeDestroyed_impl_ari_1_6_0.class); - } else - - if ( interfaceClass.equals(BridgeMerged.class) ) { - return (BridgeMerged_impl_ari_1_6_0.class); - } else - - if ( interfaceClass.equals(BuildInfo.class) ) { - return (BuildInfo_impl_ari_1_6_0.class); - } else - - if ( interfaceClass.equals(CallerID.class) ) { - return (CallerID_impl_ari_1_6_0.class); - } else - - if ( interfaceClass.equals(Channel.class) ) { - return (Channel_impl_ari_1_6_0.class); - } else - - if ( interfaceClass.equals(ChannelCallerId.class) ) { - return (ChannelCallerId_impl_ari_1_6_0.class); - } else - - if ( interfaceClass.equals(ChannelConnectedLine.class) ) { - return (ChannelConnectedLine_impl_ari_1_6_0.class); - } else - - if ( interfaceClass.equals(ChannelCreated.class) ) { - return (ChannelCreated_impl_ari_1_6_0.class); - } else - - if ( interfaceClass.equals(ChannelDestroyed.class) ) { - return (ChannelDestroyed_impl_ari_1_6_0.class); - } else - - if ( interfaceClass.equals(ChannelDialplan.class) ) { - return (ChannelDialplan_impl_ari_1_6_0.class); - } else - - if ( interfaceClass.equals(ChannelDtmfReceived.class) ) { - return (ChannelDtmfReceived_impl_ari_1_6_0.class); - } else - - if ( interfaceClass.equals(ChannelEnteredBridge.class) ) { - return (ChannelEnteredBridge_impl_ari_1_6_0.class); - } else - - if ( interfaceClass.equals(ChannelHangupRequest.class) ) { - return (ChannelHangupRequest_impl_ari_1_6_0.class); - } else - - if ( interfaceClass.equals(ChannelLeftBridge.class) ) { - return (ChannelLeftBridge_impl_ari_1_6_0.class); - } else - - if ( interfaceClass.equals(ChannelStateChange.class) ) { - return (ChannelStateChange_impl_ari_1_6_0.class); - } else - - if ( interfaceClass.equals(ChannelTalkingFinished.class) ) { - return (ChannelTalkingFinished_impl_ari_1_6_0.class); - } else - - if ( interfaceClass.equals(ChannelTalkingStarted.class) ) { - return (ChannelTalkingStarted_impl_ari_1_6_0.class); - } else - - if ( interfaceClass.equals(ChannelUserevent.class) ) { - return (ChannelUserevent_impl_ari_1_6_0.class); - } else - - if ( interfaceClass.equals(ChannelVarset.class) ) { - return (ChannelVarset_impl_ari_1_6_0.class); - } else - - if ( interfaceClass.equals(ConfigInfo.class) ) { - return (ConfigInfo_impl_ari_1_6_0.class); - } else - - if ( interfaceClass.equals(DeviceState.class) ) { - return (DeviceState_impl_ari_1_6_0.class); - } else - - if ( interfaceClass.equals(DeviceStateChanged.class) ) { - return (DeviceStateChanged_impl_ari_1_6_0.class); - } else - - if ( interfaceClass.equals(Dial.class) ) { - return (Dial_impl_ari_1_6_0.class); - } else - - if ( interfaceClass.equals(Dialed.class) ) { - return (Dialed_impl_ari_1_6_0.class); - } else - - if ( interfaceClass.equals(DialplanCEP.class) ) { - return (DialplanCEP_impl_ari_1_6_0.class); - } else - - if ( interfaceClass.equals(Endpoint.class) ) { - return (Endpoint_impl_ari_1_6_0.class); - } else - - if ( interfaceClass.equals(EndpointStateChange.class) ) { - return (EndpointStateChange_impl_ari_1_6_0.class); - } else - - if ( interfaceClass.equals(Event.class) ) { - return (Event_impl_ari_1_6_0.class); - } else - - if ( interfaceClass.equals(FormatLangPair.class) ) { - return (FormatLangPair_impl_ari_1_6_0.class); - } else - - if ( interfaceClass.equals(LiveRecording.class) ) { - return (LiveRecording_impl_ari_1_6_0.class); - } else - - if ( interfaceClass.equals(Message.class) ) { - return (Message_impl_ari_1_6_0.class); - } else - - if ( interfaceClass.equals(MissingParams.class) ) { - return (MissingParams_impl_ari_1_6_0.class); - } else - - if ( interfaceClass.equals(Playback.class) ) { - return (Playback_impl_ari_1_6_0.class); - } else - - if ( interfaceClass.equals(PlaybackFinished.class) ) { - return (PlaybackFinished_impl_ari_1_6_0.class); - } else - - if ( interfaceClass.equals(PlaybackStarted.class) ) { - return (PlaybackStarted_impl_ari_1_6_0.class); - } else - - if ( interfaceClass.equals(RecordingFailed.class) ) { - return (RecordingFailed_impl_ari_1_6_0.class); - } else - - if ( interfaceClass.equals(RecordingFinished.class) ) { - return (RecordingFinished_impl_ari_1_6_0.class); - } else - - if ( interfaceClass.equals(RecordingStarted.class) ) { - return (RecordingStarted_impl_ari_1_6_0.class); - } else - - if ( interfaceClass.equals(SetId.class) ) { - return (SetId_impl_ari_1_6_0.class); - } else - - if ( interfaceClass.equals(Sound.class) ) { - return (Sound_impl_ari_1_6_0.class); - } else - - if ( interfaceClass.equals(StasisEnd.class) ) { - return (StasisEnd_impl_ari_1_6_0.class); - } else - - if ( interfaceClass.equals(StasisStart.class) ) { - return (StasisStart_impl_ari_1_6_0.class); - } else - - if ( interfaceClass.equals(StatusInfo.class) ) { - return (StatusInfo_impl_ari_1_6_0.class); - } else - - if ( interfaceClass.equals(StoredRecording.class) ) { - return (StoredRecording_impl_ari_1_6_0.class); - } else - - if ( interfaceClass.equals(SystemInfo.class) ) { - return (SystemInfo_impl_ari_1_6_0.class); - } else - - if ( interfaceClass.equals(TextMessage.class) ) { - return (TextMessage_impl_ari_1_6_0.class); - } else - - if ( interfaceClass.equals(TextMessageReceived.class) ) { - return (TextMessageReceived_impl_ari_1_6_0.class); - } else - - if ( interfaceClass.equals(TextMessageVariable.class) ) { - return (TextMessageVariable_impl_ari_1_6_0.class); - } else - - if ( interfaceClass.equals(Variable.class) ) { - return (Variable_impl_ari_1_6_0.class); - } else - { - return null; - } - } -} - - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/actions/ActionApplications_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/actions/ActionApplications_impl_ari_1_6_0.java deleted file mode 100644 index 4472d7a9..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/actions/ActionApplications_impl_ari_1_6_0.java +++ /dev/null @@ -1,140 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_6_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionApplications_impl_ari_1_6_0 extends BaseAriAction implements ActionApplications { -/********************************************************** - * Stasis applications - * - * List all applications. - *********************************************************/ -private void buildList() { -reset(); -url = "/applications"; -method = "GET"; -} - -@Override -public List list() throws RestException { -buildList(); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void list(AriCallback> callback) { -buildList(); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Stasis application - * - * Get details of an application. - *********************************************************/ -private void buildGet(String applicationName) { -reset(); -url = "/applications/" + applicationName + ""; -method = "GET"; -lE.add( HttpResponse.build( 404, "Application does not exist.") ); -} - -@Override -public Application get(String applicationName) throws RestException { -buildGet(applicationName); -String json = httpActionSync(); -return deserializeJson( json, Application_impl_ari_1_6_0.class ); -} - -@Override -public void get(String applicationName, AriCallback callback) { -buildGet(applicationName); -httpActionAsync(callback, Application_impl_ari_1_6_0.class); -} - -/********************************************************** - * Stasis application - * - * Subscribe an application to a event source. - * Returns the state of the application after the subscriptions have changed - *********************************************************/ -private void buildSubscribe(String applicationName, String eventSource) { -reset(); -url = "/applications/" + applicationName + "/subscription"; -method = "POST"; -lParamQuery.add( HttpParam.build( "eventSource", eventSource) ); -lE.add( HttpResponse.build( 400, "Missing parameter.") ); -lE.add( HttpResponse.build( 404, "Application does not exist.") ); -lE.add( HttpResponse.build( 422, "Event source does not exist.") ); -} - -@Override -public Application subscribe(String applicationName, String eventSource) throws RestException { -buildSubscribe(applicationName, eventSource); -String json = httpActionSync(); -return deserializeJson( json, Application_impl_ari_1_6_0.class ); -} - -@Override -public void subscribe(String applicationName, String eventSource, AriCallback callback) { -buildSubscribe(applicationName, eventSource); -httpActionAsync(callback, Application_impl_ari_1_6_0.class); -} - -/********************************************************** - * Stasis application - * - * Unsubscribe an application from an event source. - * Returns the state of the application after the subscriptions have changed - *********************************************************/ -private void buildUnsubscribe(String applicationName, String eventSource) { -reset(); -url = "/applications/" + applicationName + "/subscription"; -method = "DELETE"; -lParamQuery.add( HttpParam.build( "eventSource", eventSource) ); -lE.add( HttpResponse.build( 400, "Missing parameter; event source scheme not recognized.") ); -lE.add( HttpResponse.build( 404, "Application does not exist.") ); -lE.add( HttpResponse.build( 409, "Application not subscribed to event source.") ); -lE.add( HttpResponse.build( 422, "Event source does not exist.") ); -} - -@Override -public Application unsubscribe(String applicationName, String eventSource) throws RestException { -buildUnsubscribe(applicationName, eventSource); -String json = httpActionSync(); -return deserializeJson( json, Application_impl_ari_1_6_0.class ); -} - -@Override -public void unsubscribe(String applicationName, String eventSource, AriCallback callback) { -buildUnsubscribe(applicationName, eventSource); -httpActionAsync(callback, Application_impl_ari_1_6_0.class); -} - -/** No missing signatures from interface */ -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/actions/ActionAsterisk_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/actions/ActionAsterisk_impl_ari_1_6_0.java deleted file mode 100644 index dc8c8cb5..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/actions/ActionAsterisk_impl_ari_1_6_0.java +++ /dev/null @@ -1,335 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_6_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionAsterisk_impl_ari_1_6_0 extends BaseAriAction implements ActionAsterisk { -/********************************************************** - * Asterisk system information (similar to core show settings) - * - * Gets Asterisk system information. - *********************************************************/ -private void buildGetInfo(String only) { -reset(); -url = "/asterisk/info"; -method = "GET"; -lParamQuery.add( HttpParam.build( "only", only) ); -} - -@Override -public AsteriskInfo getInfo(String only) throws RestException { -buildGetInfo(only); -String json = httpActionSync(); -return deserializeJson( json, AsteriskInfo_impl_ari_1_6_0.class ); -} - -@Override -public void getInfo(String only, AriCallback callback) { -buildGetInfo(only); -httpActionAsync(callback, AsteriskInfo_impl_ari_1_6_0.class); -} - -/********************************************************** - * Global variables - * - * Get the value of a global variable. - *********************************************************/ -private void buildGetGlobalVar(String variable) { -reset(); -url = "/asterisk/variable"; -method = "GET"; -lParamQuery.add( HttpParam.build( "variable", variable) ); -lE.add( HttpResponse.build( 400, "Missing variable parameter.") ); -} - -@Override -public Variable getGlobalVar(String variable) throws RestException { -buildGetGlobalVar(variable); -String json = httpActionSync(); -return deserializeJson( json, Variable_impl_ari_1_6_0.class ); -} - -@Override -public void getGlobalVar(String variable, AriCallback callback) { -buildGetGlobalVar(variable); -httpActionAsync(callback, Variable_impl_ari_1_6_0.class); -} - -/********************************************************** - * Global variables - * - * Set the value of a global variable. - *********************************************************/ -private void buildSetGlobalVar(String variable, String value) { -reset(); -url = "/asterisk/variable"; -method = "POST"; -lParamQuery.add( HttpParam.build( "variable", variable) ); -lParamQuery.add( HttpParam.build( "value", value) ); -lE.add( HttpResponse.build( 400, "Missing variable parameter.") ); -} - -@Override -public void setGlobalVar(String variable, String value) throws RestException { -buildSetGlobalVar(variable, value); -String json = httpActionSync(); -} - -@Override -public void setGlobalVar(String variable, String value, AriCallback callback) { -buildSetGlobalVar(variable, value); -httpActionAsync(callback); -} - -/********************************************************** - * Reload an Asterisk module. - * - * - * @since ari_1_8_0 - *********************************************************/ -public void reloadModule(String moduleName) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create or update a dynamic configuration object. - * - * - * @since ari_1_8_0 - *********************************************************/ -public List updateObject(String configClass, String objectType, String id, Map fields) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_8_0 - *********************************************************/ -public void deleteObject(String configClass, String objectType, String id, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_8_0 - *********************************************************/ -public void reloadModule(String moduleName, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_9_0 - *********************************************************/ -public void addLog(String logChannelName, String configuration, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_8_0 - *********************************************************/ -public void unloadModule(String moduleName, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * List Asterisk modules. - * - * - * @since ari_1_8_0 - *********************************************************/ -public List listModules() throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Gets Asterisk log channel information. - * - * - * @since ari_1_9_0 - *********************************************************/ -public List listLogChannels() throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Get Asterisk module information. - * - * - * @since ari_1_8_0 - *********************************************************/ -public Module getModule(String moduleName) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_9_0 - *********************************************************/ -public void rotateLog(String logChannelName, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Retrieve a dynamic configuration object. - * - * - * @since ari_1_8_0 - *********************************************************/ -public List getObject(String configClass, String objectType, String id) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Load an Asterisk module. - * - * - * @since ari_1_8_0 - *********************************************************/ -public void loadModule(String moduleName) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Unload an Asterisk module. - * - * - * @since ari_1_8_0 - *********************************************************/ -public void unloadModule(String moduleName) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_8_0 - *********************************************************/ -public void getModule(String moduleName, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_8_0 - *********************************************************/ -public void updateObject(String configClass, String objectType, String id, Map fields, AriCallback> callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Delete a dynamic configuration object. - * - * - * @since ari_1_8_0 - *********************************************************/ -public void deleteObject(String configClass, String objectType, String id) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Rotates a log channel. - * - * - * @since ari_1_9_0 - *********************************************************/ -public void rotateLog(String logChannelName) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_9_0 - *********************************************************/ -public void listLogChannels(AriCallback> callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Adds a log channel. - * - * - * @since ari_1_9_0 - *********************************************************/ -public void addLog(String logChannelName, String configuration) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_8_0 - *********************************************************/ -public void listModules(AriCallback> callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Deletes a log channel. - * - * - * @since ari_1_9_0 - *********************************************************/ -public void deleteLog(String logChannelName) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_9_0 - *********************************************************/ -public void deleteLog(String logChannelName, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_8_0 - *********************************************************/ -public void loadModule(String moduleName, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_8_0 - *********************************************************/ -public void getObject(String configClass, String objectType, String id, AriCallback> callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/actions/ActionBridges_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/actions/ActionBridges_impl_ari_1_6_0.java deleted file mode 100644 index 1a6be924..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/actions/ActionBridges_impl_ari_1_6_0.java +++ /dev/null @@ -1,444 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_6_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionBridges_impl_ari_1_6_0 extends BaseAriAction implements ActionBridges { -/********************************************************** - * Active bridges - * - * List all active bridges in Asterisk. - *********************************************************/ -private void buildList() { -reset(); -url = "/bridges"; -method = "GET"; -} - -@Override -public List list() throws RestException { -buildList(); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void list(AriCallback> callback) { -buildList(); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Active bridges - * - * Create a new bridge. - * This bridge persists until it has been shut down, or Asterisk has been shut down. - *********************************************************/ -private void buildCreate(String type, String bridgeId, String name) { -reset(); -url = "/bridges"; -method = "POST"; -lParamQuery.add( HttpParam.build( "type", type) ); -lParamQuery.add( HttpParam.build( "bridgeId", bridgeId) ); -lParamQuery.add( HttpParam.build( "name", name) ); -} - -@Override -public Bridge create(String type, String bridgeId, String name) throws RestException { -buildCreate(type, bridgeId, name); -String json = httpActionSync(); -return deserializeJson( json, Bridge_impl_ari_1_6_0.class ); -} - -@Override -public void create(String type, String bridgeId, String name, AriCallback callback) { -buildCreate(type, bridgeId, name); -httpActionAsync(callback, Bridge_impl_ari_1_6_0.class); -} - -/********************************************************** - * Individual bridge - * - * Create a new bridge or updates an existing one. - * This bridge persists until it has been shut down, or Asterisk has been shut down. - *********************************************************/ -private void buildCreate_or_update_with_id(String type, String bridgeId, String name) { -reset(); -url = "/bridges/" + bridgeId + ""; -method = "POST"; -lParamQuery.add( HttpParam.build( "type", type) ); -lParamQuery.add( HttpParam.build( "name", name) ); -} - -@Override -public Bridge create_or_update_with_id(String type, String bridgeId, String name) throws RestException { -buildCreate_or_update_with_id(type, bridgeId, name); -String json = httpActionSync(); -return deserializeJson( json, Bridge_impl_ari_1_6_0.class ); -} - -@Override -public void create_or_update_with_id(String type, String bridgeId, String name, AriCallback callback) { -buildCreate_or_update_with_id(type, bridgeId, name); -httpActionAsync(callback, Bridge_impl_ari_1_6_0.class); -} - -/********************************************************** - * Individual bridge - * - * Get bridge details. - *********************************************************/ -private void buildGet(String bridgeId) { -reset(); -url = "/bridges/" + bridgeId + ""; -method = "GET"; -lE.add( HttpResponse.build( 404, "Bridge not found") ); -} - -@Override -public Bridge get(String bridgeId) throws RestException { -buildGet(bridgeId); -String json = httpActionSync(); -return deserializeJson( json, Bridge_impl_ari_1_6_0.class ); -} - -@Override -public void get(String bridgeId, AriCallback callback) { -buildGet(bridgeId); -httpActionAsync(callback, Bridge_impl_ari_1_6_0.class); -} - -/********************************************************** - * Individual bridge - * - * Shut down a bridge. - * If any channels are in this bridge, they will be removed and resume whatever they were doing beforehand. - *********************************************************/ -private void buildDestroy(String bridgeId) { -reset(); -url = "/bridges/" + bridgeId + ""; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Bridge not found") ); -} - -@Override -public void destroy(String bridgeId) throws RestException { -buildDestroy(bridgeId); -String json = httpActionSync(); -} - -@Override -public void destroy(String bridgeId, AriCallback callback) { -buildDestroy(bridgeId); -httpActionAsync(callback); -} - -/********************************************************** - * Add a channel to a bridge - * - * Add a channel to a bridge. - *********************************************************/ -private void buildAddChannel(String bridgeId, String channel, String role) { -reset(); -url = "/bridges/" + bridgeId + "/addChannel"; -method = "POST"; -lParamQuery.add( HttpParam.build( "channel", channel) ); -lParamQuery.add( HttpParam.build( "role", role) ); -lE.add( HttpResponse.build( 400, "Channel not found") ); -lE.add( HttpResponse.build( 404, "Bridge not found") ); -lE.add( HttpResponse.build( 409, "Bridge not in Stasis application; Channel currently recording") ); -lE.add( HttpResponse.build( 422, "Channel not in Stasis application") ); -} - -@Override -public void addChannel(String bridgeId, String channel, String role) throws RestException { -buildAddChannel(bridgeId, channel, role); -String json = httpActionSync(); -} - -@Override -public void addChannel(String bridgeId, String channel, String role, AriCallback callback) { -buildAddChannel(bridgeId, channel, role); -httpActionAsync(callback); -} - -/********************************************************** - * Play music on hold to a bridge - * - * Play music on hold to a bridge or change the MOH class that is playing. - *********************************************************/ -private void buildStartMoh(String bridgeId, String mohClass) { -reset(); -url = "/bridges/" + bridgeId + "/moh"; -method = "POST"; -lParamQuery.add( HttpParam.build( "mohClass", mohClass) ); -lE.add( HttpResponse.build( 404, "Bridge not found") ); -lE.add( HttpResponse.build( 409, "Bridge not in Stasis application") ); -} - -@Override -public void startMoh(String bridgeId, String mohClass) throws RestException { -buildStartMoh(bridgeId, mohClass); -String json = httpActionSync(); -} - -@Override -public void startMoh(String bridgeId, String mohClass, AriCallback callback) { -buildStartMoh(bridgeId, mohClass); -httpActionAsync(callback); -} - -/********************************************************** - * Play music on hold to a bridge - * - * Stop playing music on hold to a bridge. - * This will only stop music on hold being played via POST bridges/{bridgeId}/moh. - *********************************************************/ -private void buildStopMoh(String bridgeId) { -reset(); -url = "/bridges/" + bridgeId + "/moh"; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Bridge not found") ); -lE.add( HttpResponse.build( 409, "Bridge not in Stasis application") ); -} - -@Override -public void stopMoh(String bridgeId) throws RestException { -buildStopMoh(bridgeId); -String json = httpActionSync(); -} - -@Override -public void stopMoh(String bridgeId, AriCallback callback) { -buildStopMoh(bridgeId); -httpActionAsync(callback); -} - -/********************************************************** - * Play media to the participants of a bridge - * - * Start playback of media on a bridge. - * The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.) - *********************************************************/ -private void buildPlay(String bridgeId, String media, String lang, int offsetms, int skipms, String playbackId) { -reset(); -url = "/bridges/" + bridgeId + "/play"; -method = "POST"; -lParamQuery.add( HttpParam.build( "media", media) ); -lParamQuery.add( HttpParam.build( "lang", lang) ); -lParamQuery.add( HttpParam.build( "offsetms", offsetms) ); -lParamQuery.add( HttpParam.build( "skipms", skipms) ); -lParamQuery.add( HttpParam.build( "playbackId", playbackId) ); -lE.add( HttpResponse.build( 404, "Bridge not found") ); -lE.add( HttpResponse.build( 409, "Bridge not in a Stasis application") ); -} - -@Override -public Playback play(String bridgeId, String media, String lang, int offsetms, int skipms, String playbackId) throws RestException { -buildPlay(bridgeId, media, lang, offsetms, skipms, playbackId); -String json = httpActionSync(); -return deserializeJson( json, Playback_impl_ari_1_6_0.class ); -} - -@Override -public void play(String bridgeId, String media, String lang, int offsetms, int skipms, String playbackId, AriCallback callback) { -buildPlay(bridgeId, media, lang, offsetms, skipms, playbackId); -httpActionAsync(callback, Playback_impl_ari_1_6_0.class); -} - -/********************************************************** - * Play media to a bridge - * - * Start playback of media on a bridge. - * 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.) - *********************************************************/ -private void buildPlayWithId(String bridgeId, String playbackId, String media, String lang, int offsetms, int skipms) { -reset(); -url = "/bridges/" + bridgeId + "/play/" + playbackId + ""; -method = "POST"; -lParamQuery.add( HttpParam.build( "media", media) ); -lParamQuery.add( HttpParam.build( "lang", lang) ); -lParamQuery.add( HttpParam.build( "offsetms", offsetms) ); -lParamQuery.add( HttpParam.build( "skipms", skipms) ); -lE.add( HttpResponse.build( 404, "Bridge not found") ); -lE.add( HttpResponse.build( 409, "Bridge not in a Stasis application") ); -} - -@Override -public Playback playWithId(String bridgeId, String playbackId, String media, String lang, int offsetms, int skipms) throws RestException { -buildPlayWithId(bridgeId, playbackId, media, lang, offsetms, skipms); -String json = httpActionSync(); -return deserializeJson( json, Playback_impl_ari_1_6_0.class ); -} - -@Override -public void playWithId(String bridgeId, String playbackId, String media, String lang, int offsetms, int skipms, AriCallback callback) { -buildPlayWithId(bridgeId, playbackId, media, lang, offsetms, skipms); -httpActionAsync(callback, Playback_impl_ari_1_6_0.class); -} - -/********************************************************** - * Record audio on a bridge - * - * Start a recording. - * This records the mixed audio from all channels participating in this bridge. - *********************************************************/ -private void buildRecord(String bridgeId, String name, String format, int maxDurationSeconds, int maxSilenceSeconds, String ifExists, boolean beep, String terminateOn) { -reset(); -url = "/bridges/" + bridgeId + "/record"; -method = "POST"; -lParamQuery.add( HttpParam.build( "name", name) ); -lParamQuery.add( HttpParam.build( "format", format) ); -lParamQuery.add( HttpParam.build( "maxDurationSeconds", maxDurationSeconds) ); -lParamQuery.add( HttpParam.build( "maxSilenceSeconds", maxSilenceSeconds) ); -lParamQuery.add( HttpParam.build( "ifExists", ifExists) ); -lParamQuery.add( HttpParam.build( "beep", beep) ); -lParamQuery.add( HttpParam.build( "terminateOn", terminateOn) ); -lE.add( HttpResponse.build( 400, "Invalid parameters") ); -lE.add( HttpResponse.build( 404, "Bridge not found") ); -lE.add( HttpResponse.build( 409, "Bridge is not in a Stasis application; A recording with the same name already exists on the system and can not be overwritten because it is in progress or ifExists=fail") ); -lE.add( HttpResponse.build( 422, "The format specified is unknown on this system") ); -} - -@Override -public LiveRecording record(String bridgeId, String name, String format, int maxDurationSeconds, int maxSilenceSeconds, String ifExists, boolean beep, String terminateOn) throws RestException { -buildRecord(bridgeId, name, format, maxDurationSeconds, maxSilenceSeconds, ifExists, beep, terminateOn); -String json = httpActionSync(); -return deserializeJson( json, LiveRecording_impl_ari_1_6_0.class ); -} - -@Override -public void record(String bridgeId, String name, String format, int maxDurationSeconds, int maxSilenceSeconds, String ifExists, boolean beep, String terminateOn, AriCallback callback) { -buildRecord(bridgeId, name, format, maxDurationSeconds, maxSilenceSeconds, ifExists, beep, terminateOn); -httpActionAsync(callback, LiveRecording_impl_ari_1_6_0.class); -} - -/********************************************************** - * Remove a channel from a bridge - * - * Remove a channel from a bridge. - *********************************************************/ -private void buildRemoveChannel(String bridgeId, String channel) { -reset(); -url = "/bridges/" + bridgeId + "/removeChannel"; -method = "POST"; -lParamQuery.add( HttpParam.build( "channel", channel) ); -lE.add( HttpResponse.build( 400, "Channel not found") ); -lE.add( HttpResponse.build( 404, "Bridge not found") ); -lE.add( HttpResponse.build( 409, "Bridge not in Stasis application") ); -lE.add( HttpResponse.build( 422, "Channel not in this bridge") ); -} - -@Override -public void removeChannel(String bridgeId, String channel) throws RestException { -buildRemoveChannel(bridgeId, channel); -String json = httpActionSync(); -} - -@Override -public void removeChannel(String bridgeId, String channel, AriCallback callback) { -buildRemoveChannel(bridgeId, channel); -httpActionAsync(callback); -} - -/********************************************************** - * - * - * @since ari_1_7_0 - *********************************************************/ -public void createWithId(String type, String bridgeId, String name, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void create(String type, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new bridge or updates an existing one. - * This bridge persists until it has been shut down, or Asterisk has been shut down. - * - * @since ari_1_7_0 - *********************************************************/ -public Bridge createWithId(String type, String bridgeId, String name) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new bridge. - * This bridge persists until it has been shut down, or Asterisk has been shut down. - * - * @since ari_1_0_0 - *********************************************************/ -public Bridge create(String type, String name) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new bridge. - * This bridge persists until it has been shut down, or Asterisk has been shut down. - * - * @since ari_0_0_1 - *********************************************************/ -public Bridge create(String type) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void play(String bridgeId, String media, String lang, int offsetms, int skipms, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Start playback of media on a bridge. - * 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.) - * - * @since ari_0_0_1 - *********************************************************/ -public Playback play(String bridgeId, String media, String lang, int offsetms, int skipms) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_0_0 - *********************************************************/ -public void create(String type, String name, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/actions/ActionChannels_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/actions/ActionChannels_impl_ari_1_6_0.java deleted file mode 100644 index 9e50db32..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/actions/ActionChannels_impl_ari_1_6_0.java +++ /dev/null @@ -1,947 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_6_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionChannels_impl_ari_1_6_0 extends BaseAriAction implements ActionChannels { -/********************************************************** - * Active channels - * - * List all active channels in Asterisk. - *********************************************************/ -private void buildList() { -reset(); -url = "/channels"; -method = "GET"; -} - -@Override -public List list() throws RestException { -buildList(); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void list(AriCallback> callback) { -buildList(); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Active channels - * - * Create a new channel (originate). - * 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. - *********************************************************/ -private void buildOriginate(String endpoint, String extension, String context, long priority, String app, String appArgs, String callerId, int timeout, Map variables, String channelId, String otherChannelId) { -reset(); -url = "/channels"; -method = "POST"; -lParamQuery.add( HttpParam.build( "endpoint", endpoint) ); -lParamQuery.add( HttpParam.build( "extension", extension) ); -lParamQuery.add( HttpParam.build( "context", context) ); -lParamQuery.add( HttpParam.build( "priority", priority) ); -lParamQuery.add( HttpParam.build( "app", app) ); -lParamQuery.add( HttpParam.build( "appArgs", appArgs) ); -lParamQuery.add( HttpParam.build( "callerId", callerId) ); -lParamQuery.add( HttpParam.build( "timeout", timeout) ); -lParamBody.addAll( HttpParam.build( "variables", variables) ); -lParamQuery.add( HttpParam.build( "channelId", channelId) ); -lParamQuery.add( HttpParam.build( "otherChannelId", otherChannelId) ); -lE.add( HttpResponse.build( 400, "Invalid parameters for originating a channel.") ); -} - -@Override -public Channel originate(String endpoint, String extension, String context, long priority, String app, String appArgs, String callerId, int timeout, Map variables, String channelId, String otherChannelId) throws RestException { -buildOriginate(endpoint, extension, context, priority, app, appArgs, callerId, timeout, variables, channelId, otherChannelId); -String json = httpActionSync(); -return deserializeJson( json, Channel_impl_ari_1_6_0.class ); -} - -@Override -public void originate(String endpoint, String extension, String context, long priority, String app, String appArgs, String callerId, int timeout, Map variables, String channelId, String otherChannelId, AriCallback callback) { -buildOriginate(endpoint, extension, context, priority, app, appArgs, callerId, timeout, variables, channelId, otherChannelId); -httpActionAsync(callback, Channel_impl_ari_1_6_0.class); -} - -/********************************************************** - * Active channel - * - * Channel details. - *********************************************************/ -private void buildGet(String channelId) { -reset(); -url = "/channels/" + channelId + ""; -method = "GET"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -} - -@Override -public Channel get(String channelId) throws RestException { -buildGet(channelId); -String json = httpActionSync(); -return deserializeJson( json, Channel_impl_ari_1_6_0.class ); -} - -@Override -public void get(String channelId, AriCallback callback) { -buildGet(channelId); -httpActionAsync(callback, Channel_impl_ari_1_6_0.class); -} - -/********************************************************** - * Active channel - * - * Create a new channel (originate with id). - * 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. - *********************************************************/ -private void buildOriginateWithId(String channelId, String endpoint, String extension, String context, long priority, String app, String appArgs, String callerId, int timeout, Map variables, String otherChannelId) { -reset(); -url = "/channels/" + channelId + ""; -method = "POST"; -lParamQuery.add( HttpParam.build( "endpoint", endpoint) ); -lParamQuery.add( HttpParam.build( "extension", extension) ); -lParamQuery.add( HttpParam.build( "context", context) ); -lParamQuery.add( HttpParam.build( "priority", priority) ); -lParamQuery.add( HttpParam.build( "app", app) ); -lParamQuery.add( HttpParam.build( "appArgs", appArgs) ); -lParamQuery.add( HttpParam.build( "callerId", callerId) ); -lParamQuery.add( HttpParam.build( "timeout", timeout) ); -lParamBody.addAll( HttpParam.build( "variables", variables) ); -lParamQuery.add( HttpParam.build( "otherChannelId", otherChannelId) ); -lE.add( HttpResponse.build( 400, "Invalid parameters for originating a channel.") ); -} - -@Override -public Channel originateWithId(String channelId, String endpoint, String extension, String context, long priority, String app, String appArgs, String callerId, int timeout, Map variables, String otherChannelId) throws RestException { -buildOriginateWithId(channelId, endpoint, extension, context, priority, app, appArgs, callerId, timeout, variables, otherChannelId); -String json = httpActionSync(); -return deserializeJson( json, Channel_impl_ari_1_6_0.class ); -} - -@Override -public void originateWithId(String channelId, String endpoint, String extension, String context, long priority, String app, String appArgs, String callerId, int timeout, Map variables, String otherChannelId, AriCallback callback) { -buildOriginateWithId(channelId, endpoint, extension, context, priority, app, appArgs, callerId, timeout, variables, otherChannelId); -httpActionAsync(callback, Channel_impl_ari_1_6_0.class); -} - -/********************************************************** - * Active channel - * - * Delete (i.e. hangup) a channel. - *********************************************************/ -private void buildHangup(String channelId, String reason) { -reset(); -url = "/channels/" + channelId + ""; -method = "DELETE"; -lParamQuery.add( HttpParam.build( "reason", reason) ); -lE.add( HttpResponse.build( 400, "Invalid reason for hangup provided") ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -} - -@Override -public void hangup(String channelId, String reason) throws RestException { -buildHangup(channelId, reason); -String json = httpActionSync(); -} - -@Override -public void hangup(String channelId, String reason, AriCallback callback) { -buildHangup(channelId, reason); -httpActionAsync(callback); -} - -/********************************************************** - * Answer a channel - * - * Answer a channel. - *********************************************************/ -private void buildAnswer(String channelId) { -reset(); -url = "/channels/" + channelId + "/answer"; -method = "POST"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void answer(String channelId) throws RestException { -buildAnswer(channelId); -String json = httpActionSync(); -} - -@Override -public void answer(String channelId, AriCallback callback) { -buildAnswer(channelId); -httpActionAsync(callback); -} - -/********************************************************** - * Exit application; continue execution in the dialplan - * - * Exit application; continue execution in the dialplan. - *********************************************************/ -private void buildContinueInDialplan(String channelId, String context, String extension, int priority) { -reset(); -url = "/channels/" + channelId + "/continue"; -method = "POST"; -lParamQuery.add( HttpParam.build( "context", context) ); -lParamQuery.add( HttpParam.build( "extension", extension) ); -lParamQuery.add( HttpParam.build( "priority", priority) ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void continueInDialplan(String channelId, String context, String extension, int priority) throws RestException { -buildContinueInDialplan(channelId, context, extension, priority); -String json = httpActionSync(); -} - -@Override -public void continueInDialplan(String channelId, String context, String extension, int priority, AriCallback callback) { -buildContinueInDialplan(channelId, context, extension, priority); -httpActionAsync(callback); -} - -/********************************************************** - * Send DTMF to a channel - * - * Send provided DTMF to a given channel. - *********************************************************/ -private void buildSendDTMF(String channelId, String dtmf, int before, int between, int duration, int after) { -reset(); -url = "/channels/" + channelId + "/dtmf"; -method = "POST"; -lParamQuery.add( HttpParam.build( "dtmf", dtmf) ); -lParamQuery.add( HttpParam.build( "before", before) ); -lParamQuery.add( HttpParam.build( "between", between) ); -lParamQuery.add( HttpParam.build( "duration", duration) ); -lParamQuery.add( HttpParam.build( "after", after) ); -lE.add( HttpResponse.build( 400, "DTMF is required") ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void sendDTMF(String channelId, String dtmf, int before, int between, int duration, int after) throws RestException { -buildSendDTMF(channelId, dtmf, before, between, duration, after); -String json = httpActionSync(); -} - -@Override -public void sendDTMF(String channelId, String dtmf, int before, int between, int duration, int after, AriCallback callback) { -buildSendDTMF(channelId, dtmf, before, between, duration, after); -httpActionAsync(callback); -} - -/********************************************************** - * Put a channel on hold - * - * Hold a channel. - *********************************************************/ -private void buildHold(String channelId) { -reset(); -url = "/channels/" + channelId + "/hold"; -method = "POST"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void hold(String channelId) throws RestException { -buildHold(channelId); -String json = httpActionSync(); -} - -@Override -public void hold(String channelId, AriCallback callback) { -buildHold(channelId); -httpActionAsync(callback); -} - -/********************************************************** - * Put a channel on hold - * - * Remove a channel from hold. - *********************************************************/ -private void buildUnhold(String channelId) { -reset(); -url = "/channels/" + channelId + "/hold"; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void unhold(String channelId) throws RestException { -buildUnhold(channelId); -String json = httpActionSync(); -} - -@Override -public void unhold(String channelId, AriCallback callback) { -buildUnhold(channelId); -httpActionAsync(callback); -} - -/********************************************************** - * Play music on hold to a channel - * - * Play music on hold to a channel. - * Using media operations such as /play on a channel playing MOH in this manner will suspend MOH without resuming automatically. If continuing music on hold is desired, the stasis application must reinitiate music on hold. - *********************************************************/ -private void buildStartMoh(String channelId, String mohClass) { -reset(); -url = "/channels/" + channelId + "/moh"; -method = "POST"; -lParamQuery.add( HttpParam.build( "mohClass", mohClass) ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void startMoh(String channelId, String mohClass) throws RestException { -buildStartMoh(channelId, mohClass); -String json = httpActionSync(); -} - -@Override -public void startMoh(String channelId, String mohClass, AriCallback callback) { -buildStartMoh(channelId, mohClass); -httpActionAsync(callback); -} - -/********************************************************** - * Play music on hold to a channel - * - * Stop playing music on hold to a channel. - *********************************************************/ -private void buildStopMoh(String channelId) { -reset(); -url = "/channels/" + channelId + "/moh"; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void stopMoh(String channelId) throws RestException { -buildStopMoh(channelId); -String json = httpActionSync(); -} - -@Override -public void stopMoh(String channelId, AriCallback callback) { -buildStopMoh(channelId); -httpActionAsync(callback); -} - -/********************************************************** - * Mute a channel - * - * Mute a channel. - *********************************************************/ -private void buildMute(String channelId, String direction) { -reset(); -url = "/channels/" + channelId + "/mute"; -method = "POST"; -lParamQuery.add( HttpParam.build( "direction", direction) ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void mute(String channelId, String direction) throws RestException { -buildMute(channelId, direction); -String json = httpActionSync(); -} - -@Override -public void mute(String channelId, String direction, AriCallback callback) { -buildMute(channelId, direction); -httpActionAsync(callback); -} - -/********************************************************** - * Mute a channel - * - * Unmute a channel. - *********************************************************/ -private void buildUnmute(String channelId, String direction) { -reset(); -url = "/channels/" + channelId + "/mute"; -method = "DELETE"; -lParamQuery.add( HttpParam.build( "direction", direction) ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void unmute(String channelId, String direction) throws RestException { -buildUnmute(channelId, direction); -String json = httpActionSync(); -} - -@Override -public void unmute(String channelId, String direction, AriCallback callback) { -buildUnmute(channelId, direction); -httpActionAsync(callback); -} - -/********************************************************** - * Play media to a channel - * - * Start playback of media. - * The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.) - *********************************************************/ -private void buildPlay(String channelId, String media, String lang, int offsetms, int skipms, String playbackId) { -reset(); -url = "/channels/" + channelId + "/play"; -method = "POST"; -lParamQuery.add( HttpParam.build( "media", media) ); -lParamQuery.add( HttpParam.build( "lang", lang) ); -lParamQuery.add( HttpParam.build( "offsetms", offsetms) ); -lParamQuery.add( HttpParam.build( "skipms", skipms) ); -lParamQuery.add( HttpParam.build( "playbackId", playbackId) ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public Playback play(String channelId, String media, String lang, int offsetms, int skipms, String playbackId) throws RestException { -buildPlay(channelId, media, lang, offsetms, skipms, playbackId); -String json = httpActionSync(); -return deserializeJson( json, Playback_impl_ari_1_6_0.class ); -} - -@Override -public void play(String channelId, String media, String lang, int offsetms, int skipms, String playbackId, AriCallback callback) { -buildPlay(channelId, media, lang, offsetms, skipms, playbackId); -httpActionAsync(callback, Playback_impl_ari_1_6_0.class); -} - -/********************************************************** - * Play media to a channel - * - * Start playback of media and specify the playbackId. - * 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.) - *********************************************************/ -private void buildPlayWithId(String channelId, String playbackId, String media, String lang, int offsetms, int skipms) { -reset(); -url = "/channels/" + channelId + "/play/" + playbackId + ""; -method = "POST"; -lParamQuery.add( HttpParam.build( "media", media) ); -lParamQuery.add( HttpParam.build( "lang", lang) ); -lParamQuery.add( HttpParam.build( "offsetms", offsetms) ); -lParamQuery.add( HttpParam.build( "skipms", skipms) ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public Playback playWithId(String channelId, String playbackId, String media, String lang, int offsetms, int skipms) throws RestException { -buildPlayWithId(channelId, playbackId, media, lang, offsetms, skipms); -String json = httpActionSync(); -return deserializeJson( json, Playback_impl_ari_1_6_0.class ); -} - -@Override -public void playWithId(String channelId, String playbackId, String media, String lang, int offsetms, int skipms, AriCallback callback) { -buildPlayWithId(channelId, playbackId, media, lang, offsetms, skipms); -httpActionAsync(callback, Playback_impl_ari_1_6_0.class); -} - -/********************************************************** - * Record audio from a channel - * - * Start a recording. - * 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. - *********************************************************/ -private void buildRecord(String channelId, String name, String format, int maxDurationSeconds, int maxSilenceSeconds, String ifExists, boolean beep, String terminateOn) { -reset(); -url = "/channels/" + channelId + "/record"; -method = "POST"; -lParamQuery.add( HttpParam.build( "name", name) ); -lParamQuery.add( HttpParam.build( "format", format) ); -lParamQuery.add( HttpParam.build( "maxDurationSeconds", maxDurationSeconds) ); -lParamQuery.add( HttpParam.build( "maxSilenceSeconds", maxSilenceSeconds) ); -lParamQuery.add( HttpParam.build( "ifExists", ifExists) ); -lParamQuery.add( HttpParam.build( "beep", beep) ); -lParamQuery.add( HttpParam.build( "terminateOn", terminateOn) ); -lE.add( HttpResponse.build( 400, "Invalid parameters") ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "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") ); -lE.add( HttpResponse.build( 422, "The format specified is unknown on this system") ); -} - -@Override -public LiveRecording record(String channelId, String name, String format, int maxDurationSeconds, int maxSilenceSeconds, String ifExists, boolean beep, String terminateOn) throws RestException { -buildRecord(channelId, name, format, maxDurationSeconds, maxSilenceSeconds, ifExists, beep, terminateOn); -String json = httpActionSync(); -return deserializeJson( json, LiveRecording_impl_ari_1_6_0.class ); -} - -@Override -public void record(String channelId, String name, String format, int maxDurationSeconds, int maxSilenceSeconds, String ifExists, boolean beep, String terminateOn, AriCallback callback) { -buildRecord(channelId, name, format, maxDurationSeconds, maxSilenceSeconds, ifExists, beep, terminateOn); -httpActionAsync(callback, LiveRecording_impl_ari_1_6_0.class); -} - -/********************************************************** - * Send a ringing indication to a channel - * - * Indicate ringing to a channel. - *********************************************************/ -private void buildRing(String channelId) { -reset(); -url = "/channels/" + channelId + "/ring"; -method = "POST"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void ring(String channelId) throws RestException { -buildRing(channelId); -String json = httpActionSync(); -} - -@Override -public void ring(String channelId, AriCallback callback) { -buildRing(channelId); -httpActionAsync(callback); -} - -/********************************************************** - * Send a ringing indication to a channel - * - * Stop ringing indication on a channel if locally generated. - *********************************************************/ -private void buildRingStop(String channelId) { -reset(); -url = "/channels/" + channelId + "/ring"; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void ringStop(String channelId) throws RestException { -buildRingStop(channelId); -String json = httpActionSync(); -} - -@Override -public void ringStop(String channelId, AriCallback callback) { -buildRingStop(channelId); -httpActionAsync(callback); -} - -/********************************************************** - * Play silence to a channel - * - * Play silence to a channel. - * Using media operations such as /play on a channel playing silence in this manner will suspend silence without resuming automatically. - *********************************************************/ -private void buildStartSilence(String channelId) { -reset(); -url = "/channels/" + channelId + "/silence"; -method = "POST"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void startSilence(String channelId) throws RestException { -buildStartSilence(channelId); -String json = httpActionSync(); -} - -@Override -public void startSilence(String channelId, AriCallback callback) { -buildStartSilence(channelId); -httpActionAsync(callback); -} - -/********************************************************** - * Play silence to a channel - * - * Stop playing silence to a channel. - *********************************************************/ -private void buildStopSilence(String channelId) { -reset(); -url = "/channels/" + channelId + "/silence"; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void stopSilence(String channelId) throws RestException { -buildStopSilence(channelId); -String json = httpActionSync(); -} - -@Override -public void stopSilence(String channelId, AriCallback callback) { -buildStopSilence(channelId); -httpActionAsync(callback); -} - -/********************************************************** - * Snoop (spy/whisper) on a channel - * - * Start snooping. - * Snoop (spy/whisper) on a specific channel. - *********************************************************/ -private void buildSnoopChannel(String channelId, String spy, String whisper, String app, String appArgs, String snoopId) { -reset(); -url = "/channels/" + channelId + "/snoop"; -method = "POST"; -lParamQuery.add( HttpParam.build( "spy", spy) ); -lParamQuery.add( HttpParam.build( "whisper", whisper) ); -lParamQuery.add( HttpParam.build( "app", app) ); -lParamQuery.add( HttpParam.build( "appArgs", appArgs) ); -lParamQuery.add( HttpParam.build( "snoopId", snoopId) ); -lE.add( HttpResponse.build( 400, "Invalid parameters") ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -} - -@Override -public Channel snoopChannel(String channelId, String spy, String whisper, String app, String appArgs, String snoopId) throws RestException { -buildSnoopChannel(channelId, spy, whisper, app, appArgs, snoopId); -String json = httpActionSync(); -return deserializeJson( json, Channel_impl_ari_1_6_0.class ); -} - -@Override -public void snoopChannel(String channelId, String spy, String whisper, String app, String appArgs, String snoopId, AriCallback callback) { -buildSnoopChannel(channelId, spy, whisper, app, appArgs, snoopId); -httpActionAsync(callback, Channel_impl_ari_1_6_0.class); -} - -/********************************************************** - * Snoop (spy/whisper) on a channel - * - * Start snooping. - * Snoop (spy/whisper) on a specific channel. - *********************************************************/ -private void buildSnoopChannelWithId(String channelId, String snoopId, String spy, String whisper, String app, String appArgs) { -reset(); -url = "/channels/" + channelId + "/snoop/" + snoopId + ""; -method = "POST"; -lParamQuery.add( HttpParam.build( "spy", spy) ); -lParamQuery.add( HttpParam.build( "whisper", whisper) ); -lParamQuery.add( HttpParam.build( "app", app) ); -lParamQuery.add( HttpParam.build( "appArgs", appArgs) ); -lE.add( HttpResponse.build( 400, "Invalid parameters") ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -} - -@Override -public Channel snoopChannelWithId(String channelId, String snoopId, String spy, String whisper, String app, String appArgs) throws RestException { -buildSnoopChannelWithId(channelId, snoopId, spy, whisper, app, appArgs); -String json = httpActionSync(); -return deserializeJson( json, Channel_impl_ari_1_6_0.class ); -} - -@Override -public void snoopChannelWithId(String channelId, String snoopId, String spy, String whisper, String app, String appArgs, AriCallback callback) { -buildSnoopChannelWithId(channelId, snoopId, spy, whisper, app, appArgs); -httpActionAsync(callback, Channel_impl_ari_1_6_0.class); -} - -/********************************************************** - * Variables on a channel - * - * Get the value of a channel variable or function. - *********************************************************/ -private void buildGetChannelVar(String channelId, String variable) { -reset(); -url = "/channels/" + channelId + "/variable"; -method = "GET"; -lParamQuery.add( HttpParam.build( "variable", variable) ); -lE.add( HttpResponse.build( 400, "Missing variable parameter.") ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public Variable getChannelVar(String channelId, String variable) throws RestException { -buildGetChannelVar(channelId, variable); -String json = httpActionSync(); -return deserializeJson( json, Variable_impl_ari_1_6_0.class ); -} - -@Override -public void getChannelVar(String channelId, String variable, AriCallback callback) { -buildGetChannelVar(channelId, variable); -httpActionAsync(callback, Variable_impl_ari_1_6_0.class); -} - -/********************************************************** - * Variables on a channel - * - * Set the value of a channel variable or function. - *********************************************************/ -private void buildSetChannelVar(String channelId, String variable, String value) { -reset(); -url = "/channels/" + channelId + "/variable"; -method = "POST"; -lParamQuery.add( HttpParam.build( "variable", variable) ); -lParamQuery.add( HttpParam.build( "value", value) ); -lE.add( HttpResponse.build( 400, "Missing variable parameter.") ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void setChannelVar(String channelId, String variable, String value) throws RestException { -buildSetChannelVar(channelId, variable, value); -String json = httpActionSync(); -} - -@Override -public void setChannelVar(String channelId, String variable, String value, AriCallback callback) { -buildSetChannelVar(channelId, variable, value); -httpActionAsync(callback); -} - -/********************************************************** - * - * - * @since ari_1_10_0 - *********************************************************/ -public void dial(String channelId, String caller, int timeout, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void snoopChannel(String channelId, String spy, String whisper, String app, String appArgs, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Dial a created channel. - * - * - * @since ari_1_10_0 - *********************************************************/ -public void dial(String channelId, String caller, int timeout) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_7_0 - *********************************************************/ -public void continueInDialplan(String channelId, String context, String extension, int priority, String label, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_10_0 - *********************************************************/ -public void originateWithId(String channelId, String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String otherChannelId, String originator, String formats, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Start playback of media. - * 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.) - * - * @since ari_0_0_1 - *********************************************************/ -public Playback play(String channelId, String media, String lang, int offsetms, int skipms) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new channel (originate). - * 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. - * - * @since ari_1_10_0 - *********************************************************/ -public Channel originate(String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String channelId, String otherChannelId, String originator, String formats) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void originate(String endpoint, String extension, String context, long priority, String app, String appArgs, String callerId, int timeout, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Redirect the channel to a different location. - * - * - * @since ari_1_8_0 - *********************************************************/ -public void redirect(String channelId, String endpoint) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_8_0 - *********************************************************/ -public void redirect(String channelId, String endpoint, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_7_0 - *********************************************************/ -public void originate(String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String channelId, String otherChannelId, String originator, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new channel (originate). - * 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. - * - * @since ari_1_7_0 - *********************************************************/ -public Channel originate(String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String channelId, String otherChannelId, String originator) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create channel. - * - * - * @since ari_1_10_0 - *********************************************************/ -public Channel create(String endpoint, String app, String appArgs, String channelId, String otherChannelId, String originator, String formats) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new channel (originate). - * 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. - * - * @since ari_0_0_1 - *********************************************************/ -public Channel originate(String endpoint, String extension, String context, long priority, String app, String appArgs, String callerId, int timeout) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new channel (originate with id). - * 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. - * - * @since ari_1_10_0 - *********************************************************/ -public Channel originateWithId(String channelId, String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String otherChannelId, String originator, String formats) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_7_0 - *********************************************************/ -public void originateWithId(String channelId, String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String otherChannelId, String originator, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_10_0 - *********************************************************/ -public void create(String endpoint, String app, String appArgs, String channelId, String otherChannelId, String originator, String formats, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void play(String channelId, String media, String lang, int offsetms, int skipms, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new channel (originate with id). - * 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. - * - * @since ari_1_7_0 - *********************************************************/ -public Channel originateWithId(String channelId, String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String otherChannelId, String originator) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Exit application{ - throw new UnsupportedOperationException("Method availble from ..."); -}; continue execution in the dialplan. - * - * - * @since ari_1_7_0 - *********************************************************/ -public void continueInDialplan(String channelId, String context, String extension, int priority, String label) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Start snooping. - * Snoop (spy/whisper) on a specific channel. - * - * @since ari_0_0_1 - *********************************************************/ -public Channel snoopChannel(String channelId, String spy, String whisper, String app, String appArgs) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_10_0 - *********************************************************/ -public void originate(String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String channelId, String otherChannelId, String originator, String formats, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/actions/ActionDeviceStates_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/actions/ActionDeviceStates_impl_ari_1_6_0.java deleted file mode 100644 index e1bea62b..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/actions/ActionDeviceStates_impl_ari_1_6_0.java +++ /dev/null @@ -1,131 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_6_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionDeviceStates_impl_ari_1_6_0 extends BaseAriAction implements ActionDeviceStates { -/********************************************************** - * Device states - * - * List all ARI controlled device states. - *********************************************************/ -private void buildList() { -reset(); -url = "/deviceStates"; -method = "GET"; -} - -@Override -public List list() throws RestException { -buildList(); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void list(AriCallback> callback) { -buildList(); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Device state - * - * Retrieve the current state of a device. - *********************************************************/ -private void buildGet(String deviceName) { -reset(); -url = "/deviceStates/" + deviceName + ""; -method = "GET"; -} - -@Override -public DeviceState get(String deviceName) throws RestException { -buildGet(deviceName); -String json = httpActionSync(); -return deserializeJson( json, DeviceState_impl_ari_1_6_0.class ); -} - -@Override -public void get(String deviceName, AriCallback callback) { -buildGet(deviceName); -httpActionAsync(callback, DeviceState_impl_ari_1_6_0.class); -} - -/********************************************************** - * Device state - * - * Change the state of a device controlled by ARI. (Note - implicitly creates the device state). - *********************************************************/ -private void buildUpdate(String deviceName, String deviceState) { -reset(); -url = "/deviceStates/" + deviceName + ""; -method = "PUT"; -lParamQuery.add( HttpParam.build( "deviceState", deviceState) ); -lE.add( HttpResponse.build( 404, "Device name is missing") ); -lE.add( HttpResponse.build( 409, "Uncontrolled device specified") ); -} - -@Override -public void update(String deviceName, String deviceState) throws RestException { -buildUpdate(deviceName, deviceState); -String json = httpActionSync(); -} - -@Override -public void update(String deviceName, String deviceState, AriCallback callback) { -buildUpdate(deviceName, deviceState); -httpActionAsync(callback); -} - -/********************************************************** - * Device state - * - * Destroy a device-state controlled by ARI. - *********************************************************/ -private void buildDelete(String deviceName) { -reset(); -url = "/deviceStates/" + deviceName + ""; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Device name is missing") ); -lE.add( HttpResponse.build( 409, "Uncontrolled device specified") ); -} - -@Override -public void delete(String deviceName) throws RestException { -buildDelete(deviceName); -String json = httpActionSync(); -} - -@Override -public void delete(String deviceName, AriCallback callback) { -buildDelete(deviceName); -httpActionAsync(callback); -} - -/** No missing signatures from interface */ -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/actions/ActionEndpoints_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/actions/ActionEndpoints_impl_ari_1_6_0.java deleted file mode 100644 index 5d41de94..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/actions/ActionEndpoints_impl_ari_1_6_0.java +++ /dev/null @@ -1,164 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_6_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionEndpoints_impl_ari_1_6_0 extends BaseAriAction implements ActionEndpoints { -/********************************************************** - * Asterisk endpoints - * - * List all endpoints. - *********************************************************/ -private void buildList() { -reset(); -url = "/endpoints"; -method = "GET"; -} - -@Override -public List list() throws RestException { -buildList(); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void list(AriCallback> callback) { -buildList(); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Send a message to some technology URI or endpoint. - * - * Send a message to some technology URI or endpoint. - *********************************************************/ -private void buildSendMessage(String to, String from, String body, Map variables) { -reset(); -url = "/endpoints/sendMessage"; -method = "PUT"; -lParamQuery.add( HttpParam.build( "to", to) ); -lParamQuery.add( HttpParam.build( "from", from) ); -lParamQuery.add( HttpParam.build( "body", body) ); -lParamBody.addAll( HttpParam.build( "variables", variables) ); -lE.add( HttpResponse.build( 404, "Endpoint not found") ); -} - -@Override -public void sendMessage(String to, String from, String body, Map variables) throws RestException { -buildSendMessage(to, from, body, variables); -String json = httpActionSync(); -} - -@Override -public void sendMessage(String to, String from, String body, Map variables, AriCallback callback) { -buildSendMessage(to, from, body, variables); -httpActionAsync(callback); -} - -/********************************************************** - * Asterisk endpoints - * - * List available endoints for a given endpoint technology. - *********************************************************/ -private void buildListByTech(String tech) { -reset(); -url = "/endpoints/" + tech + ""; -method = "GET"; -lE.add( HttpResponse.build( 404, "Endpoints not found") ); -} - -@Override -public List listByTech(String tech) throws RestException { -buildListByTech(tech); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void listByTech(String tech, AriCallback> callback) { -buildListByTech(tech); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Single endpoint - * - * Details for an endpoint. - *********************************************************/ -private void buildGet(String tech, String resource) { -reset(); -url = "/endpoints/" + tech + "/" + resource + ""; -method = "GET"; -lE.add( HttpResponse.build( 400, "Invalid parameters for sending a message.") ); -lE.add( HttpResponse.build( 404, "Endpoints not found") ); -} - -@Override -public Endpoint get(String tech, String resource) throws RestException { -buildGet(tech, resource); -String json = httpActionSync(); -return deserializeJson( json, Endpoint_impl_ari_1_6_0.class ); -} - -@Override -public void get(String tech, String resource, AriCallback callback) { -buildGet(tech, resource); -httpActionAsync(callback, Endpoint_impl_ari_1_6_0.class); -} - -/********************************************************** - * Send a message to some endpoint in a technology. - * - * Send a message to some endpoint in a technology. - *********************************************************/ -private void buildSendMessageToEndpoint(String tech, String resource, String from, String body, Map variables) { -reset(); -url = "/endpoints/" + tech + "/" + resource + "/sendMessage"; -method = "PUT"; -lParamQuery.add( HttpParam.build( "from", from) ); -lParamQuery.add( HttpParam.build( "body", body) ); -lParamBody.addAll( HttpParam.build( "variables", variables) ); -lE.add( HttpResponse.build( 400, "Invalid parameters for sending a message.") ); -lE.add( HttpResponse.build( 404, "Endpoint not found") ); -} - -@Override -public void sendMessageToEndpoint(String tech, String resource, String from, String body, Map variables) throws RestException { -buildSendMessageToEndpoint(tech, resource, from, body, variables); -String json = httpActionSync(); -} - -@Override -public void sendMessageToEndpoint(String tech, String resource, String from, String body, Map variables, AriCallback callback) { -buildSendMessageToEndpoint(tech, resource, from, body, variables); -httpActionAsync(callback); -} - -/** No missing signatures from interface */ -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/actions/ActionEvents_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/actions/ActionEvents_impl_ari_1_6_0.java deleted file mode 100644 index d3e06f1b..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/actions/ActionEvents_impl_ari_1_6_0.java +++ /dev/null @@ -1,102 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_6_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionEvents_impl_ari_1_6_0 extends BaseAriAction implements ActionEvents { -/********************************************************** - * Events from Asterisk to applications - * - * WebSocket connection for events. - *********************************************************/ -private void buildEventWebsocket(String app) { -reset(); -url = "/events"; -method = "GET"; -lParamQuery.add( HttpParam.build( "app", app) ); -wsUpgrade = true; -} - -@Override -public Message eventWebsocket(String app) throws RestException { -throw new RestException("No synchronous operation on WebSocket"); -} - -@Override -public void eventWebsocket(String app, AriCallback callback) { -buildEventWebsocket(app); -httpActionAsync(callback, Message_impl_ari_1_6_0.class); -} - -/********************************************************** - * Stasis application user events - * - * Generate a user event. - *********************************************************/ -private void buildUserEvent(String eventName, String application, String source, Map variables) { -reset(); -url = "/events/user/" + eventName + ""; -method = "POST"; -lParamQuery.add( HttpParam.build( "application", application) ); -lParamQuery.add( HttpParam.build( "source", source) ); -lParamBody.addAll( HttpParam.build( "variables", variables) ); -lE.add( HttpResponse.build( 404, "Application does not exist.") ); -lE.add( HttpResponse.build( 422, "Event source not found.") ); -lE.add( HttpResponse.build( 400, "Invalid even tsource URI or userevent data.") ); -} - -@Override -public void userEvent(String eventName, String application, String source, Map variables) throws RestException { -buildUserEvent(eventName, application, source, variables); -String json = httpActionSync(); -} - -@Override -public void userEvent(String eventName, String application, String source, Map variables, AriCallback callback) { -buildUserEvent(eventName, application, source, variables); -httpActionAsync(callback); -} - -/********************************************************** - * - * - * @since ari_1_9_0 - *********************************************************/ -public void eventWebsocket(String app, boolean subscribeAll, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * WebSocket connection for events. - * - * - * @since ari_1_9_0 - *********************************************************/ -public Message eventWebsocket(String app, boolean subscribeAll) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/actions/ActionPlaybacks_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/actions/ActionPlaybacks_impl_ari_1_6_0.java deleted file mode 100644 index cfea3844..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/actions/ActionPlaybacks_impl_ari_1_6_0.java +++ /dev/null @@ -1,107 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_6_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionPlaybacks_impl_ari_1_6_0 extends BaseAriAction implements ActionPlaybacks { -/********************************************************** - * Control object for a playback operation. - * - * Get a playback's details. - *********************************************************/ -private void buildGet(String playbackId) { -reset(); -url = "/playbacks/" + playbackId + ""; -method = "GET"; -lE.add( HttpResponse.build( 404, "The playback cannot be found") ); -} - -@Override -public Playback get(String playbackId) throws RestException { -buildGet(playbackId); -String json = httpActionSync(); -return deserializeJson( json, Playback_impl_ari_1_6_0.class ); -} - -@Override -public void get(String playbackId, AriCallback callback) { -buildGet(playbackId); -httpActionAsync(callback, Playback_impl_ari_1_6_0.class); -} - -/********************************************************** - * Control object for a playback operation. - * - * Stop a playback. - *********************************************************/ -private void buildStop(String playbackId) { -reset(); -url = "/playbacks/" + playbackId + ""; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "The playback cannot be found") ); -} - -@Override -public void stop(String playbackId) throws RestException { -buildStop(playbackId); -String json = httpActionSync(); -} - -@Override -public void stop(String playbackId, AriCallback callback) { -buildStop(playbackId); -httpActionAsync(callback); -} - -/********************************************************** - * Control object for a playback operation. - * - * Control a playback. - *********************************************************/ -private void buildControl(String playbackId, String operation) { -reset(); -url = "/playbacks/" + playbackId + "/control"; -method = "POST"; -lParamQuery.add( HttpParam.build( "operation", operation) ); -lE.add( HttpResponse.build( 400, "The provided operation parameter was invalid") ); -lE.add( HttpResponse.build( 404, "The playback cannot be found") ); -lE.add( HttpResponse.build( 409, "The operation cannot be performed in the playback's current state") ); -} - -@Override -public void control(String playbackId, String operation) throws RestException { -buildControl(playbackId, operation); -String json = httpActionSync(); -} - -@Override -public void control(String playbackId, String operation, AriCallback callback) { -buildControl(playbackId, operation); -httpActionAsync(callback); -} - -/** No missing signatures from interface */ -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/actions/ActionRecordings_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/actions/ActionRecordings_impl_ari_1_6_0.java deleted file mode 100644 index 98a71e60..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/actions/ActionRecordings_impl_ari_1_6_0.java +++ /dev/null @@ -1,325 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_6_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionRecordings_impl_ari_1_6_0 extends BaseAriAction implements ActionRecordings { -/********************************************************** - * A recording that is in progress - * - * List live recordings. - *********************************************************/ -private void buildGetLive(String recordingName) { -reset(); -url = "/recordings/live/" + recordingName + ""; -method = "GET"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -} - -@Override -public LiveRecording getLive(String recordingName) throws RestException { -buildGetLive(recordingName); -String json = httpActionSync(); -return deserializeJson( json, LiveRecording_impl_ari_1_6_0.class ); -} - -@Override -public void getLive(String recordingName, AriCallback callback) { -buildGetLive(recordingName); -httpActionAsync(callback, LiveRecording_impl_ari_1_6_0.class); -} - -/********************************************************** - * A recording that is in progress - * - * Stop a live recording and discard it. - *********************************************************/ -private void buildCancel(String recordingName) { -reset(); -url = "/recordings/live/" + recordingName + ""; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -} - -@Override -public void cancel(String recordingName) throws RestException { -buildCancel(recordingName); -String json = httpActionSync(); -} - -@Override -public void cancel(String recordingName, AriCallback callback) { -buildCancel(recordingName); -httpActionAsync(callback); -} - -/********************************************************** - * - * - * Mute a live recording. - * Muting a recording suspends silence detection, which will be restarted when the recording is unmuted. - *********************************************************/ -private void buildMute(String recordingName) { -reset(); -url = "/recordings/live/" + recordingName + "/mute"; -method = "POST"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -lE.add( HttpResponse.build( 409, "Recording not in session") ); -} - -@Override -public void mute(String recordingName) throws RestException { -buildMute(recordingName); -String json = httpActionSync(); -} - -@Override -public void mute(String recordingName, AriCallback callback) { -buildMute(recordingName); -httpActionAsync(callback); -} - -/********************************************************** - * - * - * Unmute a live recording. - *********************************************************/ -private void buildUnmute(String recordingName) { -reset(); -url = "/recordings/live/" + recordingName + "/mute"; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -lE.add( HttpResponse.build( 409, "Recording not in session") ); -} - -@Override -public void unmute(String recordingName) throws RestException { -buildUnmute(recordingName); -String json = httpActionSync(); -} - -@Override -public void unmute(String recordingName, AriCallback callback) { -buildUnmute(recordingName); -httpActionAsync(callback); -} - -/********************************************************** - * - * - * Pause a live recording. - * Pausing a recording suspends silence detection, which will be restarted when the recording is unpaused. Paused time is not included in the accounting for maxDurationSeconds. - *********************************************************/ -private void buildPause(String recordingName) { -reset(); -url = "/recordings/live/" + recordingName + "/pause"; -method = "POST"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -lE.add( HttpResponse.build( 409, "Recording not in session") ); -} - -@Override -public void pause(String recordingName) throws RestException { -buildPause(recordingName); -String json = httpActionSync(); -} - -@Override -public void pause(String recordingName, AriCallback callback) { -buildPause(recordingName); -httpActionAsync(callback); -} - -/********************************************************** - * - * - * Unpause a live recording. - *********************************************************/ -private void buildUnpause(String recordingName) { -reset(); -url = "/recordings/live/" + recordingName + "/pause"; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -lE.add( HttpResponse.build( 409, "Recording not in session") ); -} - -@Override -public void unpause(String recordingName) throws RestException { -buildUnpause(recordingName); -String json = httpActionSync(); -} - -@Override -public void unpause(String recordingName, AriCallback callback) { -buildUnpause(recordingName); -httpActionAsync(callback); -} - -/********************************************************** - * - * - * Stop a live recording and store it. - *********************************************************/ -private void buildStop(String recordingName) { -reset(); -url = "/recordings/live/" + recordingName + "/stop"; -method = "POST"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -} - -@Override -public void stop(String recordingName) throws RestException { -buildStop(recordingName); -String json = httpActionSync(); -} - -@Override -public void stop(String recordingName, AriCallback callback) { -buildStop(recordingName); -httpActionAsync(callback); -} - -/********************************************************** - * Recordings - * - * List recordings that are complete. - *********************************************************/ -private void buildListStored() { -reset(); -url = "/recordings/stored"; -method = "GET"; -} - -@Override -public List listStored() throws RestException { -buildListStored(); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void listStored(AriCallback> callback) { -buildListStored(); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Individual recording - * - * Get a stored recording's details. - *********************************************************/ -private void buildGetStored(String recordingName) { -reset(); -url = "/recordings/stored/" + recordingName + ""; -method = "GET"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -} - -@Override -public StoredRecording getStored(String recordingName) throws RestException { -buildGetStored(recordingName); -String json = httpActionSync(); -return deserializeJson( json, StoredRecording_impl_ari_1_6_0.class ); -} - -@Override -public void getStored(String recordingName, AriCallback callback) { -buildGetStored(recordingName); -httpActionAsync(callback, StoredRecording_impl_ari_1_6_0.class); -} - -/********************************************************** - * Individual recording - * - * Delete a stored recording. - *********************************************************/ -private void buildDeleteStored(String recordingName) { -reset(); -url = "/recordings/stored/" + recordingName + ""; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -} - -@Override -public void deleteStored(String recordingName) throws RestException { -buildDeleteStored(recordingName); -String json = httpActionSync(); -} - -@Override -public void deleteStored(String recordingName, AriCallback callback) { -buildDeleteStored(recordingName); -httpActionAsync(callback); -} - -/********************************************************** - * Copy an individual recording - * - * Copy a stored recording. - *********************************************************/ -private void buildCopyStored(String recordingName, String destinationRecordingName) { -reset(); -url = "/recordings/stored/" + recordingName + "/copy"; -method = "POST"; -lParamQuery.add( HttpParam.build( "destinationRecordingName", destinationRecordingName) ); -lE.add( HttpResponse.build( 404, "Recording not found") ); -lE.add( HttpResponse.build( 409, "A recording with the same name already exists on the system") ); -} - -@Override -public StoredRecording copyStored(String recordingName, String destinationRecordingName) throws RestException { -buildCopyStored(recordingName, destinationRecordingName); -String json = httpActionSync(); -return deserializeJson( json, StoredRecording_impl_ari_1_6_0.class ); -} - -@Override -public void copyStored(String recordingName, String destinationRecordingName, AriCallback callback) { -buildCopyStored(recordingName, destinationRecordingName); -httpActionAsync(callback, StoredRecording_impl_ari_1_6_0.class); -} - -/********************************************************** - * - * - * @since ari_1_10_0 - *********************************************************/ -public void getStoredFile(String recordingName, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Get the file associated with the stored recording. - * - * - * @since ari_1_10_0 - *********************************************************/ -public byte[] getStoredFile(String recordingName) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/actions/ActionSounds_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/actions/ActionSounds_impl_ari_1_6_0.java deleted file mode 100644 index adaf95b2..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/actions/ActionSounds_impl_ari_1_6_0.java +++ /dev/null @@ -1,82 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_6_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionSounds_impl_ari_1_6_0 extends BaseAriAction implements ActionSounds { -/********************************************************** - * Sounds - * - * List all sounds. - *********************************************************/ -private void buildList(String lang, String format) { -reset(); -url = "/sounds"; -method = "GET"; -lParamQuery.add( HttpParam.build( "lang", lang) ); -lParamQuery.add( HttpParam.build( "format", format) ); -} - -@Override -public List list(String lang, String format) throws RestException { -buildList(lang, format); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void list(String lang, String format, AriCallback> callback) { -buildList(lang, format); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Individual sound - * - * Get a sound's details. - *********************************************************/ -private void buildGet(String soundId) { -reset(); -url = "/sounds/" + soundId + ""; -method = "GET"; -} - -@Override -public Sound get(String soundId) throws RestException { -buildGet(soundId); -String json = httpActionSync(); -return deserializeJson( json, Sound_impl_ari_1_6_0.class ); -} - -@Override -public void get(String soundId, AriCallback callback) { -buildGet(soundId); -httpActionAsync(callback, Sound_impl_ari_1_6_0.class); -} - -/** No missing signatures from interface */ -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/ApplicationReplaced_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/ApplicationReplaced_impl_ari_1_6_0.java deleted file mode 100644 index 82b59183..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/ApplicationReplaced_impl_ari_1_6_0.java +++ /dev/null @@ -1,28 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that another WebSocket has taken over for an application. - * - * An 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. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ApplicationReplaced_impl_ari_1_6_0 extends Event_impl_ari_1_6_0 implements ApplicationReplaced, java.io.Serializable { -private static final long serialVersionUID = 1L; -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/Application_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/Application_impl_ari_1_6_0.java deleted file mode 100644 index 1a2963bc..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/Application_impl_ari_1_6_0.java +++ /dev/null @@ -1,81 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Details of a Stasis application - * - * Defined in file: applications.json - * Generated by: Model - *********************************************************/ - -public class Application_impl_ari_1_6_0 implements Application, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Id's for bridges subscribed to. */ - private List bridge_ids; - public List getBridge_ids() { - return bridge_ids; - } - - @JsonDeserialize( contentAs=String.class ) - public void setBridge_ids(List val ) { - bridge_ids = val; - } - - /** Id's for channels subscribed to. */ - private List channel_ids; - public List getChannel_ids() { - return channel_ids; - } - - @JsonDeserialize( contentAs=String.class ) - public void setChannel_ids(List val ) { - channel_ids = val; - } - - /** Names of the devices subscribed to. */ - private List device_names; - public List getDevice_names() { - return device_names; - } - - @JsonDeserialize( contentAs=String.class ) - public void setDevice_names(List val ) { - device_names = val; - } - - /** {tech}/{resource} for endpoints subscribed to. */ - private List endpoint_ids; - public List getEndpoint_ids() { - return endpoint_ids; - } - - @JsonDeserialize( contentAs=String.class ) - public void setEndpoint_ids(List val ) { - endpoint_ids = val; - } - - /** Name of this application */ - private String name; - public String getName() { - return name; - } - - @JsonDeserialize( as=String.class ) - public void setName(String val ) { - name = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/AsteriskInfo_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/AsteriskInfo_impl_ari_1_6_0.java deleted file mode 100644 index ba4befbb..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/AsteriskInfo_impl_ari_1_6_0.java +++ /dev/null @@ -1,70 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Asterisk system information - * - * Defined in file: asterisk.json - * Generated by: Model - *********************************************************/ - -public class AsteriskInfo_impl_ari_1_6_0 implements AsteriskInfo, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Info about how Asterisk was built */ - private BuildInfo build; - public BuildInfo getBuild() { - return build; - } - - @JsonDeserialize( as=BuildInfo_impl_ari_1_6_0.class ) - public void setBuild(BuildInfo val ) { - build = val; - } - - /** Info about Asterisk configuration */ - private ConfigInfo config; - public ConfigInfo getConfig() { - return config; - } - - @JsonDeserialize( as=ConfigInfo_impl_ari_1_6_0.class ) - public void setConfig(ConfigInfo val ) { - config = val; - } - - /** Info about Asterisk status */ - private StatusInfo status; - public StatusInfo getStatus() { - return status; - } - - @JsonDeserialize( as=StatusInfo_impl_ari_1_6_0.class ) - public void setStatus(StatusInfo val ) { - status = val; - } - - /** Info about the system running Asterisk */ - private SystemInfo system; - public SystemInfo getSystem() { - return system; - } - - @JsonDeserialize( as=SystemInfo_impl_ari_1_6_0.class ) - public void setSystem(SystemInfo val ) { - system = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/BridgeAttendedTransfer_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/BridgeAttendedTransfer_impl_ari_1_6_0.java deleted file mode 100644 index 6d6ac039..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/BridgeAttendedTransfer_impl_ari_1_6_0.java +++ /dev/null @@ -1,202 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that an attended transfer has occurred. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class BridgeAttendedTransfer_impl_ari_1_6_0 extends Event_impl_ari_1_6_0 implements BridgeAttendedTransfer, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Application that has been transferred into */ - private String destination_application; - public String getDestination_application() { - return destination_application; - } - - @JsonDeserialize( as=String.class ) - public void setDestination_application(String val ) { - destination_application = val; - } - - /** Bridge that survived the merge result */ - private String destination_bridge; - public String getDestination_bridge() { - return destination_bridge; - } - - @JsonDeserialize( as=String.class ) - public void setDestination_bridge(String val ) { - destination_bridge = val; - } - - /** First leg of a link transfer result */ - private Channel destination_link_first_leg; - public Channel getDestination_link_first_leg() { - return destination_link_first_leg; - } - - @JsonDeserialize( as=Channel_impl_ari_1_6_0.class ) - public void setDestination_link_first_leg(Channel val ) { - destination_link_first_leg = val; - } - - /** Second leg of a link transfer result */ - private Channel destination_link_second_leg; - public Channel getDestination_link_second_leg() { - return destination_link_second_leg; - } - - @JsonDeserialize( as=Channel_impl_ari_1_6_0.class ) - public void setDestination_link_second_leg(Channel val ) { - destination_link_second_leg = val; - } - - /** Bridge that survived the threeway result */ - private Bridge destination_threeway_bridge; - public Bridge getDestination_threeway_bridge() { - return destination_threeway_bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_6_0.class ) - public void setDestination_threeway_bridge(Bridge val ) { - destination_threeway_bridge = val; - } - - /** Transferer channel that survived the threeway result */ - private Channel destination_threeway_channel; - public Channel getDestination_threeway_channel() { - return destination_threeway_channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_6_0.class ) - public void setDestination_threeway_channel(Channel val ) { - destination_threeway_channel = val; - } - - /** How the transfer was accomplished */ - private String destination_type; - public String getDestination_type() { - return destination_type; - } - - @JsonDeserialize( as=String.class ) - public void setDestination_type(String val ) { - destination_type = val; - } - - /** Whether the transfer was externally initiated or not */ - private boolean is_external; - public boolean getIs_external() { - return is_external; - } - - @JsonDeserialize( as=boolean.class ) - public void setIs_external(boolean val ) { - is_external = val; - } - - /** The channel that is replacing transferer_first_leg in the swap */ - private Channel replace_channel; - public Channel getReplace_channel() { - return replace_channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_6_0.class ) - public void setReplace_channel(Channel val ) { - replace_channel = val; - } - - /** The result of the transfer attempt */ - private String result; - public String getResult() { - return result; - } - - @JsonDeserialize( as=String.class ) - public void setResult(String val ) { - result = val; - } - - /** The channel that is being transferred to */ - private Channel transfer_target; - public Channel getTransfer_target() { - return transfer_target; - } - - @JsonDeserialize( as=Channel_impl_ari_1_6_0.class ) - public void setTransfer_target(Channel val ) { - transfer_target = val; - } - - /** The channel that is being transferred */ - private Channel transferee; - public Channel getTransferee() { - return transferee; - } - - @JsonDeserialize( as=Channel_impl_ari_1_6_0.class ) - public void setTransferee(Channel val ) { - transferee = val; - } - - /** First leg of the transferer */ - private Channel transferer_first_leg; - public Channel getTransferer_first_leg() { - return transferer_first_leg; - } - - @JsonDeserialize( as=Channel_impl_ari_1_6_0.class ) - public void setTransferer_first_leg(Channel val ) { - transferer_first_leg = val; - } - - /** Bridge the transferer first leg is in */ - private Bridge transferer_first_leg_bridge; - public Bridge getTransferer_first_leg_bridge() { - return transferer_first_leg_bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_6_0.class ) - public void setTransferer_first_leg_bridge(Bridge val ) { - transferer_first_leg_bridge = val; - } - - /** Second leg of the transferer */ - private Channel transferer_second_leg; - public Channel getTransferer_second_leg() { - return transferer_second_leg; - } - - @JsonDeserialize( as=Channel_impl_ari_1_6_0.class ) - public void setTransferer_second_leg(Channel val ) { - transferer_second_leg = val; - } - - /** Bridge the transferer second leg is in */ - private Bridge transferer_second_leg_bridge; - public Bridge getTransferer_second_leg_bridge() { - return transferer_second_leg_bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_6_0.class ) - public void setTransferer_second_leg_bridge(Bridge val ) { - transferer_second_leg_bridge = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/BridgeBlindTransfer_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/BridgeBlindTransfer_impl_ari_1_6_0.java deleted file mode 100644 index 6afd08f6..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/BridgeBlindTransfer_impl_ari_1_6_0.java +++ /dev/null @@ -1,114 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a blind transfer has occurred. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class BridgeBlindTransfer_impl_ari_1_6_0 extends Event_impl_ari_1_6_0 implements BridgeBlindTransfer, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The bridge being transferred */ - private Bridge bridge; - public Bridge getBridge() { - return bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_6_0.class ) - public void setBridge(Bridge val ) { - bridge = val; - } - - /** The channel performing the blind transfer */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_6_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - - /** The context transferred to */ - private String context; - public String getContext() { - return context; - } - - @JsonDeserialize( as=String.class ) - public void setContext(String val ) { - context = val; - } - - /** The extension transferred to */ - private String exten; - public String getExten() { - return exten; - } - - @JsonDeserialize( as=String.class ) - public void setExten(String val ) { - exten = val; - } - - /** Whether the transfer was externally initiated or not */ - private boolean is_external; - public boolean getIs_external() { - return is_external; - } - - @JsonDeserialize( as=boolean.class ) - public void setIs_external(boolean val ) { - is_external = val; - } - - /** The channel that is replacing transferer when the transferee(s) can not be transferred directly */ - private Channel replace_channel; - public Channel getReplace_channel() { - return replace_channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_6_0.class ) - public void setReplace_channel(Channel val ) { - replace_channel = val; - } - - /** The result of the transfer attempt */ - private String result; - public String getResult() { - return result; - } - - @JsonDeserialize( as=String.class ) - public void setResult(String val ) { - result = val; - } - - /** The channel that is being transferred */ - private Channel transferee; - public Channel getTransferee() { - return transferee; - } - - @JsonDeserialize( as=Channel_impl_ari_1_6_0.class ) - public void setTransferee(Channel val ) { - transferee = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/BridgeCreated_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/BridgeCreated_impl_ari_1_6_0.java deleted file mode 100644 index 7be145e6..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/BridgeCreated_impl_ari_1_6_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a bridge has been created. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class BridgeCreated_impl_ari_1_6_0 extends Event_impl_ari_1_6_0 implements BridgeCreated, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Bridge bridge; - public Bridge getBridge() { - return bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_6_0.class ) - public void setBridge(Bridge val ) { - bridge = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/BridgeDestroyed_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/BridgeDestroyed_impl_ari_1_6_0.java deleted file mode 100644 index 0d075113..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/BridgeDestroyed_impl_ari_1_6_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a bridge has been destroyed. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class BridgeDestroyed_impl_ari_1_6_0 extends Event_impl_ari_1_6_0 implements BridgeDestroyed, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Bridge bridge; - public Bridge getBridge() { - return bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_6_0.class ) - public void setBridge(Bridge val ) { - bridge = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/BridgeMerged_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/BridgeMerged_impl_ari_1_6_0.java deleted file mode 100644 index 41d35647..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/BridgeMerged_impl_ari_1_6_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that one bridge has merged into another. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class BridgeMerged_impl_ari_1_6_0 extends Event_impl_ari_1_6_0 implements BridgeMerged, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Bridge bridge; - public Bridge getBridge() { - return bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_6_0.class ) - public void setBridge(Bridge val ) { - bridge = val; - } - - /** */ - private Bridge bridge_from; - public Bridge getBridge_from() { - return bridge_from; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_6_0.class ) - public void setBridge_from(Bridge val ) { - bridge_from = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/Bridge_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/Bridge_impl_ari_1_6_0.java deleted file mode 100644 index f014163a..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/Bridge_impl_ari_1_6_0.java +++ /dev/null @@ -1,105 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * The merging of media from one or more channels. - * - * Everyone on the bridge receives the same audio. - * - * Defined in file: bridges.json - * Generated by: Model - *********************************************************/ - -public class Bridge_impl_ari_1_6_0 implements Bridge, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Bridging class */ - private String bridge_class; - public String getBridge_class() { - return bridge_class; - } - - @JsonDeserialize( as=String.class ) - public void setBridge_class(String val ) { - bridge_class = val; - } - - /** Type of bridge technology */ - private String bridge_type; - public String getBridge_type() { - return bridge_type; - } - - @JsonDeserialize( as=String.class ) - public void setBridge_type(String val ) { - bridge_type = val; - } - - /** Ids of channels participating in this bridge */ - private List channels; - public List getChannels() { - return channels; - } - - @JsonDeserialize( contentAs=String.class ) - public void setChannels(List val ) { - channels = val; - } - - /** Entity that created the bridge */ - private String creator; - public String getCreator() { - return creator; - } - - @JsonDeserialize( as=String.class ) - public void setCreator(String val ) { - creator = val; - } - - /** Unique identifier for this bridge */ - private String id; - public String getId() { - return id; - } - - @JsonDeserialize( as=String.class ) - public void setId(String val ) { - id = val; - } - - /** Name the creator gave the bridge */ - private String name; - public String getName() { - return name; - } - - @JsonDeserialize( as=String.class ) - public void setName(String val ) { - name = val; - } - - /** Name of the current bridging technology */ - private String technology; - public String getTechnology() { - return technology; - } - - @JsonDeserialize( as=String.class ) - public void setTechnology(String val ) { - technology = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/BuildInfo_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/BuildInfo_impl_ari_1_6_0.java deleted file mode 100644 index 9d525c80..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/BuildInfo_impl_ari_1_6_0.java +++ /dev/null @@ -1,92 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Info about how Asterisk was built - * - * Defined in file: asterisk.json - * Generated by: Model - *********************************************************/ - -public class BuildInfo_impl_ari_1_6_0 implements BuildInfo, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Date and time when Asterisk was built. */ - private String date; - public String getDate() { - return date; - } - - @JsonDeserialize( as=String.class ) - public void setDate(String val ) { - date = val; - } - - /** Kernel version Asterisk was built on. */ - private String kernel; - public String getKernel() { - return kernel; - } - - @JsonDeserialize( as=String.class ) - public void setKernel(String val ) { - kernel = val; - } - - /** Machine architecture (x86_64, i686, ppc, etc.) */ - private String machine; - public String getMachine() { - return machine; - } - - @JsonDeserialize( as=String.class ) - public void setMachine(String val ) { - machine = val; - } - - /** Compile time options, or empty string if default. */ - private String options; - public String getOptions() { - return options; - } - - @JsonDeserialize( as=String.class ) - public void setOptions(String val ) { - options = val; - } - - /** OS Asterisk was built on. */ - private String os; - public String getOs() { - return os; - } - - @JsonDeserialize( as=String.class ) - public void setOs(String val ) { - os = val; - } - - /** Username that build Asterisk */ - private String user; - public String getUser() { - return user; - } - - @JsonDeserialize( as=String.class ) - public void setUser(String val ) { - user = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/CallerID_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/CallerID_impl_ari_1_6_0.java deleted file mode 100644 index f6ce53fb..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/CallerID_impl_ari_1_6_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Caller identification - * - * Defined in file: channels.json - * Generated by: Model - *********************************************************/ - -public class CallerID_impl_ari_1_6_0 implements CallerID, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private String name; - public String getName() { - return name; - } - - @JsonDeserialize( as=String.class ) - public void setName(String val ) { - name = val; - } - - /** */ - private String number; - public String getNumber() { - return number; - } - - @JsonDeserialize( as=String.class ) - public void setNumber(String val ) { - number = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/ChannelCallerId_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/ChannelCallerId_impl_ari_1_6_0.java deleted file mode 100644 index 3170422d..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/ChannelCallerId_impl_ari_1_6_0.java +++ /dev/null @@ -1,59 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Channel changed Caller ID. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelCallerId_impl_ari_1_6_0 extends Event_impl_ari_1_6_0 implements ChannelCallerId, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The integer representation of the Caller Presentation value. */ - private int caller_presentation; - public int getCaller_presentation() { - return caller_presentation; - } - - @JsonDeserialize( as=int.class ) - public void setCaller_presentation(int val ) { - caller_presentation = val; - } - - /** The text representation of the Caller Presentation value. */ - private String caller_presentation_txt; - public String getCaller_presentation_txt() { - return caller_presentation_txt; - } - - @JsonDeserialize( as=String.class ) - public void setCaller_presentation_txt(String val ) { - caller_presentation_txt = val; - } - - /** The channel that changed Caller ID. */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_6_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/ChannelConnectedLine_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/ChannelConnectedLine_impl_ari_1_6_0.java deleted file mode 100644 index cf56c945..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/ChannelConnectedLine_impl_ari_1_6_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Channel changed Connected Line. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelConnectedLine_impl_ari_1_6_0 extends Event_impl_ari_1_6_0 implements ChannelConnectedLine, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The channel whose connected line has changed. */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_6_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/ChannelCreated_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/ChannelCreated_impl_ari_1_6_0.java deleted file mode 100644 index 6e3013de..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/ChannelCreated_impl_ari_1_6_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a channel has been created. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelCreated_impl_ari_1_6_0 extends Event_impl_ari_1_6_0 implements ChannelCreated, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_6_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/ChannelDestroyed_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/ChannelDestroyed_impl_ari_1_6_0.java deleted file mode 100644 index 849a1751..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/ChannelDestroyed_impl_ari_1_6_0.java +++ /dev/null @@ -1,59 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a channel has been destroyed. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelDestroyed_impl_ari_1_6_0 extends Event_impl_ari_1_6_0 implements ChannelDestroyed, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Integer representation of the cause of the hangup */ - private int cause; - public int getCause() { - return cause; - } - - @JsonDeserialize( as=int.class ) - public void setCause(int val ) { - cause = val; - } - - /** Text representation of the cause of the hangup */ - private String cause_txt; - public String getCause_txt() { - return cause_txt; - } - - @JsonDeserialize( as=String.class ) - public void setCause_txt(String val ) { - cause_txt = val; - } - - /** */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_6_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/ChannelDialplan_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/ChannelDialplan_impl_ari_1_6_0.java deleted file mode 100644 index 6b8f312e..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/ChannelDialplan_impl_ari_1_6_0.java +++ /dev/null @@ -1,59 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Channel changed location in the dialplan. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelDialplan_impl_ari_1_6_0 extends Event_impl_ari_1_6_0 implements ChannelDialplan, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The channel that changed dialplan location. */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_6_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - - /** The application about to be executed. */ - private String dialplan_app; - public String getDialplan_app() { - return dialplan_app; - } - - @JsonDeserialize( as=String.class ) - public void setDialplan_app(String val ) { - dialplan_app = val; - } - - /** The data to be passed to the application. */ - private String dialplan_app_data; - public String getDialplan_app_data() { - return dialplan_app_data; - } - - @JsonDeserialize( as=String.class ) - public void setDialplan_app_data(String val ) { - dialplan_app_data = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/ChannelDtmfReceived_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/ChannelDtmfReceived_impl_ari_1_6_0.java deleted file mode 100644 index f64257c0..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/ChannelDtmfReceived_impl_ari_1_6_0.java +++ /dev/null @@ -1,61 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * DTMF received on a channel. - * - * This event is sent when the DTMF ends. There is no notification about the start of DTMF - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelDtmfReceived_impl_ari_1_6_0 extends Event_impl_ari_1_6_0 implements ChannelDtmfReceived, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The channel on which DTMF was received */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_6_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - - /** DTMF digit received (0-9, A-E, # or *) */ - private String digit; - public String getDigit() { - return digit; - } - - @JsonDeserialize( as=String.class ) - public void setDigit(String val ) { - digit = val; - } - - /** Number of milliseconds DTMF was received */ - private int duration_ms; - public int getDuration_ms() { - return duration_ms; - } - - @JsonDeserialize( as=int.class ) - public void setDuration_ms(int val ) { - duration_ms = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/ChannelEnteredBridge_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/ChannelEnteredBridge_impl_ari_1_6_0.java deleted file mode 100644 index 729592e7..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/ChannelEnteredBridge_impl_ari_1_6_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a channel has entered a bridge. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelEnteredBridge_impl_ari_1_6_0 extends Event_impl_ari_1_6_0 implements ChannelEnteredBridge, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Bridge bridge; - public Bridge getBridge() { - return bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_6_0.class ) - public void setBridge(Bridge val ) { - bridge = val; - } - - /** */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_6_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/ChannelHangupRequest_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/ChannelHangupRequest_impl_ari_1_6_0.java deleted file mode 100644 index ce0a2d43..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/ChannelHangupRequest_impl_ari_1_6_0.java +++ /dev/null @@ -1,59 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A hangup was requested on the channel. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelHangupRequest_impl_ari_1_6_0 extends Event_impl_ari_1_6_0 implements ChannelHangupRequest, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Integer representation of the cause of the hangup. */ - private int cause; - public int getCause() { - return cause; - } - - @JsonDeserialize( as=int.class ) - public void setCause(int val ) { - cause = val; - } - - /** The channel on which the hangup was requested. */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_6_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - - /** Whether the hangup request was a soft hangup request. */ - private boolean soft; - public boolean getSoft() { - return soft; - } - - @JsonDeserialize( as=boolean.class ) - public void setSoft(boolean val ) { - soft = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/ChannelLeftBridge_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/ChannelLeftBridge_impl_ari_1_6_0.java deleted file mode 100644 index d89a1219..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/ChannelLeftBridge_impl_ari_1_6_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a channel has left a bridge. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelLeftBridge_impl_ari_1_6_0 extends Event_impl_ari_1_6_0 implements ChannelLeftBridge, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Bridge bridge; - public Bridge getBridge() { - return bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_6_0.class ) - public void setBridge(Bridge val ) { - bridge = val; - } - - /** */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_6_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/ChannelStateChange_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/ChannelStateChange_impl_ari_1_6_0.java deleted file mode 100644 index 1b5a8d4b..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/ChannelStateChange_impl_ari_1_6_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification of a channel's state change. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelStateChange_impl_ari_1_6_0 extends Event_impl_ari_1_6_0 implements ChannelStateChange, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_6_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/ChannelTalkingFinished_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/ChannelTalkingFinished_impl_ari_1_6_0.java deleted file mode 100644 index d3f9974b..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/ChannelTalkingFinished_impl_ari_1_6_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Talking is no longer detected on the channel. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelTalkingFinished_impl_ari_1_6_0 extends Event_impl_ari_1_6_0 implements ChannelTalkingFinished, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The channel on which talking completed. */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_6_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - - /** The length of time, in milliseconds, that talking was detected on the channel */ - private int duration; - public int getDuration() { - return duration; - } - - @JsonDeserialize( as=int.class ) - public void setDuration(int val ) { - duration = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/ChannelTalkingStarted_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/ChannelTalkingStarted_impl_ari_1_6_0.java deleted file mode 100644 index d79c253b..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/ChannelTalkingStarted_impl_ari_1_6_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Talking was detected on the channel. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelTalkingStarted_impl_ari_1_6_0 extends Event_impl_ari_1_6_0 implements ChannelTalkingStarted, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The channel on which talking started. */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_6_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/ChannelUserevent_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/ChannelUserevent_impl_ari_1_6_0.java deleted file mode 100644 index ece8d954..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/ChannelUserevent_impl_ari_1_6_0.java +++ /dev/null @@ -1,81 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * User-generated event with additional user-defined fields in the object. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelUserevent_impl_ari_1_6_0 extends Event_impl_ari_1_6_0 implements ChannelUserevent, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** A bridge that is signaled with the user event. */ - private Bridge bridge; - public Bridge getBridge() { - return bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_6_0.class ) - public void setBridge(Bridge val ) { - bridge = val; - } - - /** A channel that is signaled with the user event. */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_6_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - - /** A endpoint that is signaled with the user event. */ - private Endpoint endpoint; - public Endpoint getEndpoint() { - return endpoint; - } - - @JsonDeserialize( as=Endpoint_impl_ari_1_6_0.class ) - public void setEndpoint(Endpoint val ) { - endpoint = val; - } - - /** The name of the user event. */ - private String eventname; - public String getEventname() { - return eventname; - } - - @JsonDeserialize( as=String.class ) - public void setEventname(String val ) { - eventname = val; - } - - /** Custom Userevent data */ - private String userevent; - public String getUserevent() { - return userevent; - } - - @JsonDeserialize( as=String.class ) - public void setUserevent(String val ) { - userevent = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/ChannelVarset_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/ChannelVarset_impl_ari_1_6_0.java deleted file mode 100644 index 81a04d13..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/ChannelVarset_impl_ari_1_6_0.java +++ /dev/null @@ -1,61 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Channel variable changed. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelVarset_impl_ari_1_6_0 extends Event_impl_ari_1_6_0 implements ChannelVarset, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The channel on which the variable was set. - -If missing, the variable is a global variable. */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_6_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - - /** The new value of the variable. */ - private String value; - public String getValue() { - return value; - } - - @JsonDeserialize( as=String.class ) - public void setValue(String val ) { - value = val; - } - - /** The variable that changed. */ - private String variable; - public String getVariable() { - return variable; - } - - @JsonDeserialize( as=String.class ) - public void setVariable(String val ) { - variable = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/Channel_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/Channel_impl_ari_1_6_0.java deleted file mode 100644 index 06536037..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/Channel_impl_ari_1_6_0.java +++ /dev/null @@ -1,133 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A specific communication connection between Asterisk and an Endpoint. - * - * Defined in file: channels.json - * Generated by: Model - *********************************************************/ - -public class Channel_impl_ari_1_6_0 implements Channel, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private String accountcode; - public String getAccountcode() { - return accountcode; - } - - @JsonDeserialize( as=String.class ) - public void setAccountcode(String val ) { - accountcode = val; - } - - /** */ - private CallerID caller; - public CallerID getCaller() { - return caller; - } - - @JsonDeserialize( as=CallerID_impl_ari_1_6_0.class ) - public void setCaller(CallerID val ) { - caller = val; - } - - /** */ - private CallerID connected; - public CallerID getConnected() { - return connected; - } - - @JsonDeserialize( as=CallerID_impl_ari_1_6_0.class ) - public void setConnected(CallerID val ) { - connected = val; - } - - /** Timestamp when channel was created */ - private Date creationtime; - public Date getCreationtime() { - return creationtime; - } - - @JsonDeserialize( as=Date.class ) - public void setCreationtime(Date val ) { - creationtime = val; - } - - /** Current location in the dialplan */ - private DialplanCEP dialplan; - public DialplanCEP getDialplan() { - return dialplan; - } - - @JsonDeserialize( as=DialplanCEP_impl_ari_1_6_0.class ) - public void setDialplan(DialplanCEP val ) { - dialplan = val; - } - - /** Unique identifier of the channel. - -This is the same as the Uniqueid field in AMI. */ - private String id; - public String getId() { - return id; - } - - @JsonDeserialize( as=String.class ) - public void setId(String val ) { - id = val; - } - - /** Name of the channel (i.e. SIP/foo-0000a7e3) */ - private String name; - public String getName() { - return name; - } - - @JsonDeserialize( as=String.class ) - public void setName(String val ) { - name = val; - } - - /** */ - private String state; - public String getState() { - return state; - } - - @JsonDeserialize( as=String.class ) - public void setState(String val ) { - state = val; - } - -/********************************************************** - * The default spoken language - * - * @since ari_1_7_0 - *********************************************************/ - public String getLanguage(){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * The default spoken language - * - * @since ari_1_7_0 - *********************************************************/ - public void setLanguage(String val ){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/ConfigInfo_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/ConfigInfo_impl_ari_1_6_0.java deleted file mode 100644 index 301c1e09..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/ConfigInfo_impl_ari_1_6_0.java +++ /dev/null @@ -1,92 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Info about Asterisk configuration - * - * Defined in file: asterisk.json - * Generated by: Model - *********************************************************/ - -public class ConfigInfo_impl_ari_1_6_0 implements ConfigInfo, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Default language for media playback. */ - private String default_language; - public String getDefault_language() { - return default_language; - } - - @JsonDeserialize( as=String.class ) - public void setDefault_language(String val ) { - default_language = val; - } - - /** Maximum number of simultaneous channels. */ - private int max_channels; - public int getMax_channels() { - return max_channels; - } - - @JsonDeserialize( as=int.class ) - public void setMax_channels(int val ) { - max_channels = val; - } - - /** Maximum load avg on system. */ - private double max_load; - public double getMax_load() { - return max_load; - } - - @JsonDeserialize( as=double.class ) - public void setMax_load(double val ) { - max_load = val; - } - - /** Maximum number of open file handles (files, sockets). */ - private int max_open_files; - public int getMax_open_files() { - return max_open_files; - } - - @JsonDeserialize( as=int.class ) - public void setMax_open_files(int val ) { - max_open_files = val; - } - - /** Asterisk system name. */ - private String name; - public String getName() { - return name; - } - - @JsonDeserialize( as=String.class ) - public void setName(String val ) { - name = val; - } - - /** Effective user/group id for running Asterisk. */ - private SetId setid; - public SetId getSetid() { - return setid; - } - - @JsonDeserialize( as=SetId_impl_ari_1_6_0.class ) - public void setSetid(SetId val ) { - setid = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/DeviceStateChanged_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/DeviceStateChanged_impl_ari_1_6_0.java deleted file mode 100644 index 64cc388c..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/DeviceStateChanged_impl_ari_1_6_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a device state has changed. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class DeviceStateChanged_impl_ari_1_6_0 extends Event_impl_ari_1_6_0 implements DeviceStateChanged, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Device state object */ - private DeviceState device_state; - public DeviceState getDevice_state() { - return device_state; - } - - @JsonDeserialize( as=DeviceState_impl_ari_1_6_0.class ) - public void setDevice_state(DeviceState val ) { - device_state = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/DeviceState_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/DeviceState_impl_ari_1_6_0.java deleted file mode 100644 index 82540e4a..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/DeviceState_impl_ari_1_6_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Represents the state of a device. - * - * Defined in file: deviceStates.json - * Generated by: Model - *********************************************************/ - -public class DeviceState_impl_ari_1_6_0 implements DeviceState, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Name of the device. */ - private String name; - public String getName() { - return name; - } - - @JsonDeserialize( as=String.class ) - public void setName(String val ) { - name = val; - } - - /** Device's state */ - private String state; - public String getState() { - return state; - } - - @JsonDeserialize( as=String.class ) - public void setState(String val ) { - state = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/Dial_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/Dial_impl_ari_1_6_0.java deleted file mode 100644 index 37ef32c4..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/Dial_impl_ari_1_6_0.java +++ /dev/null @@ -1,92 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Dialing state has changed. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class Dial_impl_ari_1_6_0 extends Event_impl_ari_1_6_0 implements Dial, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The calling channel. */ - private Channel caller; - public Channel getCaller() { - return caller; - } - - @JsonDeserialize( as=Channel_impl_ari_1_6_0.class ) - public void setCaller(Channel val ) { - caller = val; - } - - /** Current status of the dialing attempt to the peer. */ - private String dialstatus; - public String getDialstatus() { - return dialstatus; - } - - @JsonDeserialize( as=String.class ) - public void setDialstatus(String val ) { - dialstatus = val; - } - - /** The dial string for calling the peer channel. */ - private String dialstring; - public String getDialstring() { - return dialstring; - } - - @JsonDeserialize( as=String.class ) - public void setDialstring(String val ) { - dialstring = val; - } - - /** Forwarding target requested by the original dialed channel. */ - private String forward; - public String getForward() { - return forward; - } - - @JsonDeserialize( as=String.class ) - public void setForward(String val ) { - forward = val; - } - - /** Channel that the caller has been forwarded to. */ - private Channel forwarded; - public Channel getForwarded() { - return forwarded; - } - - @JsonDeserialize( as=Channel_impl_ari_1_6_0.class ) - public void setForwarded(Channel val ) { - forwarded = val; - } - - /** The dialed channel. */ - private Channel peer; - public Channel getPeer() { - return peer; - } - - @JsonDeserialize( as=Channel_impl_ari_1_6_0.class ) - public void setPeer(Channel val ) { - peer = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/Dialed_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/Dialed_impl_ari_1_6_0.java deleted file mode 100644 index c1afddf1..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/Dialed_impl_ari_1_6_0.java +++ /dev/null @@ -1,26 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Dialed channel information. - * - * Defined in file: channels.json - * Generated by: Model - *********************************************************/ - -public class Dialed_impl_ari_1_6_0 implements Dialed, java.io.Serializable { -private static final long serialVersionUID = 1L; -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/DialplanCEP_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/DialplanCEP_impl_ari_1_6_0.java deleted file mode 100644 index 1e399c13..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/DialplanCEP_impl_ari_1_6_0.java +++ /dev/null @@ -1,59 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Dialplan location (context/extension/priority) - * - * Defined in file: channels.json - * Generated by: Model - *********************************************************/ - -public class DialplanCEP_impl_ari_1_6_0 implements DialplanCEP, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Context in the dialplan */ - private String context; - public String getContext() { - return context; - } - - @JsonDeserialize( as=String.class ) - public void setContext(String val ) { - context = val; - } - - /** Extension in the dialplan */ - private String exten; - public String getExten() { - return exten; - } - - @JsonDeserialize( as=String.class ) - public void setExten(String val ) { - exten = val; - } - - /** Priority in the dialplan */ - private long priority; - public long getPriority() { - return priority; - } - - @JsonDeserialize( as=long.class ) - public void setPriority(long val ) { - priority = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/EndpointStateChange_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/EndpointStateChange_impl_ari_1_6_0.java deleted file mode 100644 index 20063bcd..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/EndpointStateChange_impl_ari_1_6_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Endpoint state changed. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class EndpointStateChange_impl_ari_1_6_0 extends Event_impl_ari_1_6_0 implements EndpointStateChange, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Endpoint endpoint; - public Endpoint getEndpoint() { - return endpoint; - } - - @JsonDeserialize( as=Endpoint_impl_ari_1_6_0.class ) - public void setEndpoint(Endpoint val ) { - endpoint = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/Endpoint_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/Endpoint_impl_ari_1_6_0.java deleted file mode 100644 index 63ea6cfd..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/Endpoint_impl_ari_1_6_0.java +++ /dev/null @@ -1,72 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * An external device that may offer/accept calls to/from Asterisk. - * - * Unlike most resources, which have a single unique identifier, an endpoint is uniquely identified by the technology/resource pair. - * - * Defined in file: endpoints.json - * Generated by: Model - *********************************************************/ - -public class Endpoint_impl_ari_1_6_0 implements Endpoint, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Id's of channels associated with this endpoint */ - private List channel_ids; - public List getChannel_ids() { - return channel_ids; - } - - @JsonDeserialize( contentAs=String.class ) - public void setChannel_ids(List val ) { - channel_ids = val; - } - - /** Identifier of the endpoint, specific to the given technology. */ - private String resource; - public String getResource() { - return resource; - } - - @JsonDeserialize( as=String.class ) - public void setResource(String val ) { - resource = val; - } - - /** Endpoint's state */ - private String state; - public String getState() { - return state; - } - - @JsonDeserialize( as=String.class ) - public void setState(String val ) { - state = val; - } - - /** Technology of the endpoint */ - private String technology; - public String getTechnology() { - return technology; - } - - @JsonDeserialize( as=String.class ) - public void setTechnology(String val ) { - technology = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/Event_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/Event_impl_ari_1_6_0.java deleted file mode 100644 index 2d0000df..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/Event_impl_ari_1_6_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Base type for asynchronous events from Asterisk. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class Event_impl_ari_1_6_0 extends Message_impl_ari_1_6_0 implements Event, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Name of the application receiving the event. */ - private String application; - public String getApplication() { - return application; - } - - @JsonDeserialize( as=String.class ) - public void setApplication(String val ) { - application = val; - } - - /** Time at which this event was created. */ - private Date timestamp; - public Date getTimestamp() { - return timestamp; - } - - @JsonDeserialize( as=Date.class ) - public void setTimestamp(Date val ) { - timestamp = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/FormatLangPair_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/FormatLangPair_impl_ari_1_6_0.java deleted file mode 100644 index b948ce01..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/FormatLangPair_impl_ari_1_6_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Identifies the format and language of a sound file - * - * Defined in file: sounds.json - * Generated by: Model - *********************************************************/ - -public class FormatLangPair_impl_ari_1_6_0 implements FormatLangPair, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private String format; - public String getFormat() { - return format; - } - - @JsonDeserialize( as=String.class ) - public void setFormat(String val ) { - format = val; - } - - /** */ - private String language; - public String getLanguage() { - return language; - } - - @JsonDeserialize( as=String.class ) - public void setLanguage(String val ) { - language = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/LiveRecording_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/LiveRecording_impl_ari_1_6_0.java deleted file mode 100644 index 61a5d14a..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/LiveRecording_impl_ari_1_6_0.java +++ /dev/null @@ -1,114 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A recording that is in progress - * - * Defined in file: recordings.json - * Generated by: Model - *********************************************************/ - -public class LiveRecording_impl_ari_1_6_0 implements LiveRecording, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Cause for recording failure if failed */ - private String cause; - public String getCause() { - return cause; - } - - @JsonDeserialize( as=String.class ) - public void setCause(String val ) { - cause = val; - } - - /** Duration in seconds of the recording */ - private int duration; - public int getDuration() { - return duration; - } - - @JsonDeserialize( as=int.class ) - public void setDuration(int val ) { - duration = val; - } - - /** Recording format (wav, gsm, etc.) */ - private String format; - public String getFormat() { - return format; - } - - @JsonDeserialize( as=String.class ) - public void setFormat(String val ) { - format = val; - } - - /** Base name for the recording */ - private String name; - public String getName() { - return name; - } - - @JsonDeserialize( as=String.class ) - public void setName(String val ) { - name = val; - } - - /** Duration of silence, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds. */ - private int silence_duration; - public int getSilence_duration() { - return silence_duration; - } - - @JsonDeserialize( as=int.class ) - public void setSilence_duration(int val ) { - silence_duration = val; - } - - /** */ - private String state; - public String getState() { - return state; - } - - @JsonDeserialize( as=String.class ) - public void setState(String val ) { - state = val; - } - - /** Duration of talking, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds. */ - private int talking_duration; - public int getTalking_duration() { - return talking_duration; - } - - @JsonDeserialize( as=int.class ) - public void setTalking_duration(int val ) { - talking_duration = val; - } - - /** URI for the channel or bridge being recorded */ - private String target_uri; - public String getTarget_uri() { - return target_uri; - } - - @JsonDeserialize( as=String.class ) - public void setTarget_uri(String val ) { - target_uri = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/Message_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/Message_impl_ari_1_6_0.java deleted file mode 100644 index 058adfb1..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/Message_impl_ari_1_6_0.java +++ /dev/null @@ -1,76 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonSubTypes.Type; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Base type for errors and events - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") - @JsonSubTypes({ @Type(value = MissingParams_impl_ari_1_6_0.class, name = "MissingParams") -, @Type(value = Event_impl_ari_1_6_0.class, name = "Event") -, @Type(value = DeviceStateChanged_impl_ari_1_6_0.class, name = "DeviceStateChanged") -, @Type(value = PlaybackStarted_impl_ari_1_6_0.class, name = "PlaybackStarted") -, @Type(value = PlaybackFinished_impl_ari_1_6_0.class, name = "PlaybackFinished") -, @Type(value = RecordingStarted_impl_ari_1_6_0.class, name = "RecordingStarted") -, @Type(value = RecordingFinished_impl_ari_1_6_0.class, name = "RecordingFinished") -, @Type(value = RecordingFailed_impl_ari_1_6_0.class, name = "RecordingFailed") -, @Type(value = ApplicationReplaced_impl_ari_1_6_0.class, name = "ApplicationReplaced") -, @Type(value = BridgeCreated_impl_ari_1_6_0.class, name = "BridgeCreated") -, @Type(value = BridgeDestroyed_impl_ari_1_6_0.class, name = "BridgeDestroyed") -, @Type(value = BridgeMerged_impl_ari_1_6_0.class, name = "BridgeMerged") -, @Type(value = BridgeBlindTransfer_impl_ari_1_6_0.class, name = "BridgeBlindTransfer") -, @Type(value = BridgeAttendedTransfer_impl_ari_1_6_0.class, name = "BridgeAttendedTransfer") -, @Type(value = ChannelCreated_impl_ari_1_6_0.class, name = "ChannelCreated") -, @Type(value = ChannelDestroyed_impl_ari_1_6_0.class, name = "ChannelDestroyed") -, @Type(value = ChannelEnteredBridge_impl_ari_1_6_0.class, name = "ChannelEnteredBridge") -, @Type(value = ChannelLeftBridge_impl_ari_1_6_0.class, name = "ChannelLeftBridge") -, @Type(value = ChannelStateChange_impl_ari_1_6_0.class, name = "ChannelStateChange") -, @Type(value = ChannelDtmfReceived_impl_ari_1_6_0.class, name = "ChannelDtmfReceived") -, @Type(value = ChannelDialplan_impl_ari_1_6_0.class, name = "ChannelDialplan") -, @Type(value = ChannelCallerId_impl_ari_1_6_0.class, name = "ChannelCallerId") -, @Type(value = ChannelUserevent_impl_ari_1_6_0.class, name = "ChannelUserevent") -, @Type(value = ChannelHangupRequest_impl_ari_1_6_0.class, name = "ChannelHangupRequest") -, @Type(value = ChannelVarset_impl_ari_1_6_0.class, name = "ChannelVarset") -, @Type(value = ChannelTalkingStarted_impl_ari_1_6_0.class, name = "ChannelTalkingStarted") -, @Type(value = ChannelTalkingFinished_impl_ari_1_6_0.class, name = "ChannelTalkingFinished") -, @Type(value = EndpointStateChange_impl_ari_1_6_0.class, name = "EndpointStateChange") -, @Type(value = Dial_impl_ari_1_6_0.class, name = "Dial") -, @Type(value = StasisEnd_impl_ari_1_6_0.class, name = "StasisEnd") -, @Type(value = StasisStart_impl_ari_1_6_0.class, name = "StasisStart") -, @Type(value = TextMessageReceived_impl_ari_1_6_0.class, name = "TextMessageReceived") -, @Type(value = ChannelConnectedLine_impl_ari_1_6_0.class, name = "ChannelConnectedLine") - }) - - -public class Message_impl_ari_1_6_0 implements Message, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Indicates the type of this message. */ - private String type; - public String getType() { - return type; - } - - @JsonDeserialize( as=String.class ) - public void setType(String val ) { - type = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/MissingParams_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/MissingParams_impl_ari_1_6_0.java deleted file mode 100644 index 6f2ced4f..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/MissingParams_impl_ari_1_6_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Error event sent when required params are missing. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class MissingParams_impl_ari_1_6_0 extends Message_impl_ari_1_6_0 implements MissingParams, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** A list of the missing parameters */ - private List params; - public List getParams() { - return params; - } - - @JsonDeserialize( contentAs=String.class ) - public void setParams(List val ) { - params = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/PlaybackFinished_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/PlaybackFinished_impl_ari_1_6_0.java deleted file mode 100644 index 6876a0ac..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/PlaybackFinished_impl_ari_1_6_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Event showing the completion of a media playback operation. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class PlaybackFinished_impl_ari_1_6_0 extends Event_impl_ari_1_6_0 implements PlaybackFinished, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Playback control object */ - private Playback playback; - public Playback getPlayback() { - return playback; - } - - @JsonDeserialize( as=Playback_impl_ari_1_6_0.class ) - public void setPlayback(Playback val ) { - playback = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/PlaybackStarted_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/PlaybackStarted_impl_ari_1_6_0.java deleted file mode 100644 index a0491bb8..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/PlaybackStarted_impl_ari_1_6_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Event showing the start of a media playback operation. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class PlaybackStarted_impl_ari_1_6_0 extends Event_impl_ari_1_6_0 implements PlaybackStarted, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Playback control object */ - private Playback playback; - public Playback getPlayback() { - return playback; - } - - @JsonDeserialize( as=Playback_impl_ari_1_6_0.class ) - public void setPlayback(Playback val ) { - playback = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/Playback_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/Playback_impl_ari_1_6_0.java deleted file mode 100644 index 0c29bd92..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/Playback_impl_ari_1_6_0.java +++ /dev/null @@ -1,98 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Object representing the playback of media to a channel - * - * Defined in file: playbacks.json - * Generated by: Model - *********************************************************/ - -public class Playback_impl_ari_1_6_0 implements Playback, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** ID for this playback operation */ - private String id; - public String getId() { - return id; - } - - @JsonDeserialize( as=String.class ) - public void setId(String val ) { - id = val; - } - - /** For media types that support multiple languages, the language requested for playback. */ - private String language; - public String getLanguage() { - return language; - } - - @JsonDeserialize( as=String.class ) - public void setLanguage(String val ) { - language = val; - } - - /** URI for the media to play back. */ - private String media_uri; - public String getMedia_uri() { - return media_uri; - } - - @JsonDeserialize( as=String.class ) - public void setMedia_uri(String val ) { - media_uri = val; - } - - /** Current state of the playback operation. */ - private String state; - public String getState() { - return state; - } - - @JsonDeserialize( as=String.class ) - public void setState(String val ) { - state = val; - } - - /** URI for the channel or bridge to play the media on */ - private String target_uri; - public String getTarget_uri() { - return target_uri; - } - - @JsonDeserialize( as=String.class ) - public void setTarget_uri(String val ) { - target_uri = val; - } - -/********************************************************** - * If a list of URIs is being played, the next media URI to be played back. - * - * @since ari_1_10_0 - *********************************************************/ - public void setNext_media_uri(String val ){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * If a list of URIs is being played, the next media URI to be played back. - * - * @since ari_1_10_0 - *********************************************************/ - public String getNext_media_uri(){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/RecordingFailed_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/RecordingFailed_impl_ari_1_6_0.java deleted file mode 100644 index 785db1e4..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/RecordingFailed_impl_ari_1_6_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Event showing failure of a recording operation. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class RecordingFailed_impl_ari_1_6_0 extends Event_impl_ari_1_6_0 implements RecordingFailed, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Recording control object */ - private LiveRecording recording; - public LiveRecording getRecording() { - return recording; - } - - @JsonDeserialize( as=LiveRecording_impl_ari_1_6_0.class ) - public void setRecording(LiveRecording val ) { - recording = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/RecordingFinished_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/RecordingFinished_impl_ari_1_6_0.java deleted file mode 100644 index fc3a4643..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/RecordingFinished_impl_ari_1_6_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Event showing the completion of a recording operation. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class RecordingFinished_impl_ari_1_6_0 extends Event_impl_ari_1_6_0 implements RecordingFinished, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Recording control object */ - private LiveRecording recording; - public LiveRecording getRecording() { - return recording; - } - - @JsonDeserialize( as=LiveRecording_impl_ari_1_6_0.class ) - public void setRecording(LiveRecording val ) { - recording = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/RecordingStarted_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/RecordingStarted_impl_ari_1_6_0.java deleted file mode 100644 index a98b513d..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/RecordingStarted_impl_ari_1_6_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Event showing the start of a recording operation. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class RecordingStarted_impl_ari_1_6_0 extends Event_impl_ari_1_6_0 implements RecordingStarted, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Recording control object */ - private LiveRecording recording; - public LiveRecording getRecording() { - return recording; - } - - @JsonDeserialize( as=LiveRecording_impl_ari_1_6_0.class ) - public void setRecording(LiveRecording val ) { - recording = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/SetId_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/SetId_impl_ari_1_6_0.java deleted file mode 100644 index 7c8ff5a2..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/SetId_impl_ari_1_6_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Effective user/group id - * - * Defined in file: asterisk.json - * Generated by: Model - *********************************************************/ - -public class SetId_impl_ari_1_6_0 implements SetId, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Effective group id. */ - private String group; - public String getGroup() { - return group; - } - - @JsonDeserialize( as=String.class ) - public void setGroup(String val ) { - group = val; - } - - /** Effective user id. */ - private String user; - public String getUser() { - return user; - } - - @JsonDeserialize( as=String.class ) - public void setUser(String val ) { - user = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/Sound_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/Sound_impl_ari_1_6_0.java deleted file mode 100644 index 9fde559b..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/Sound_impl_ari_1_6_0.java +++ /dev/null @@ -1,59 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A media file that may be played back. - * - * Defined in file: sounds.json - * Generated by: Model - *********************************************************/ - -public class Sound_impl_ari_1_6_0 implements Sound, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The formats and languages in which this sound is available. */ - private List formats; - public List getFormats() { - return formats; - } - - @JsonDeserialize( contentAs=FormatLangPair_impl_ari_1_6_0.class ) - public void setFormats(List val ) { - formats = val; - } - - /** Sound's identifier. */ - private String id; - public String getId() { - return id; - } - - @JsonDeserialize( as=String.class ) - public void setId(String val ) { - id = val; - } - - /** Text description of the sound, usually the words spoken. */ - private String text; - public String getText() { - return text; - } - - @JsonDeserialize( as=String.class ) - public void setText(String val ) { - text = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/StasisEnd_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/StasisEnd_impl_ari_1_6_0.java deleted file mode 100644 index ef6d6c86..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/StasisEnd_impl_ari_1_6_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a channel has left a Stasis application. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class StasisEnd_impl_ari_1_6_0 extends Event_impl_ari_1_6_0 implements StasisEnd, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_6_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/StasisStart_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/StasisStart_impl_ari_1_6_0.java deleted file mode 100644 index b147cb12..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/StasisStart_impl_ari_1_6_0.java +++ /dev/null @@ -1,59 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a channel has entered a Stasis application. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class StasisStart_impl_ari_1_6_0 extends Event_impl_ari_1_6_0 implements StasisStart, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Arguments to the application */ - private List args; - public List getArgs() { - return args; - } - - @JsonDeserialize( contentAs=String.class ) - public void setArgs(List val ) { - args = val; - } - - /** */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_6_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - - /** */ - private Channel replace_channel; - public Channel getReplace_channel() { - return replace_channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_6_0.class ) - public void setReplace_channel(Channel val ) { - replace_channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/StatusInfo_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/StatusInfo_impl_ari_1_6_0.java deleted file mode 100644 index 51ffc44f..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/StatusInfo_impl_ari_1_6_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Info about Asterisk status - * - * Defined in file: asterisk.json - * Generated by: Model - *********************************************************/ - -public class StatusInfo_impl_ari_1_6_0 implements StatusInfo, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Time when Asterisk was last reloaded. */ - private Date last_reload_time; - public Date getLast_reload_time() { - return last_reload_time; - } - - @JsonDeserialize( as=Date.class ) - public void setLast_reload_time(Date val ) { - last_reload_time = val; - } - - /** Time when Asterisk was started. */ - private Date startup_time; - public Date getStartup_time() { - return startup_time; - } - - @JsonDeserialize( as=Date.class ) - public void setStartup_time(Date val ) { - startup_time = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/StoredRecording_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/StoredRecording_impl_ari_1_6_0.java deleted file mode 100644 index 6e5e9a9a..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/StoredRecording_impl_ari_1_6_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A past recording that may be played back. - * - * Defined in file: recordings.json - * Generated by: Model - *********************************************************/ - -public class StoredRecording_impl_ari_1_6_0 implements StoredRecording, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private String format; - public String getFormat() { - return format; - } - - @JsonDeserialize( as=String.class ) - public void setFormat(String val ) { - format = val; - } - - /** */ - private String name; - public String getName() { - return name; - } - - @JsonDeserialize( as=String.class ) - public void setName(String val ) { - name = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/SystemInfo_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/SystemInfo_impl_ari_1_6_0.java deleted file mode 100644 index 841d5dac..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/SystemInfo_impl_ari_1_6_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Info about Asterisk - * - * Defined in file: asterisk.json - * Generated by: Model - *********************************************************/ - -public class SystemInfo_impl_ari_1_6_0 implements SystemInfo, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private String entity_id; - public String getEntity_id() { - return entity_id; - } - - @JsonDeserialize( as=String.class ) - public void setEntity_id(String val ) { - entity_id = val; - } - - /** Asterisk version. */ - private String version; - public String getVersion() { - return version; - } - - @JsonDeserialize( as=String.class ) - public void setVersion(String val ) { - version = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/TextMessageReceived_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/TextMessageReceived_impl_ari_1_6_0.java deleted file mode 100644 index bc2b4553..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/TextMessageReceived_impl_ari_1_6_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A text message was received from an endpoint. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class TextMessageReceived_impl_ari_1_6_0 extends Event_impl_ari_1_6_0 implements TextMessageReceived, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Endpoint endpoint; - public Endpoint getEndpoint() { - return endpoint; - } - - @JsonDeserialize( as=Endpoint_impl_ari_1_6_0.class ) - public void setEndpoint(Endpoint val ) { - endpoint = val; - } - - /** */ - private TextMessage message; - public TextMessage getMessage() { - return message; - } - - @JsonDeserialize( as=TextMessage_impl_ari_1_6_0.class ) - public void setMessage(TextMessage val ) { - message = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/TextMessageVariable_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/TextMessageVariable_impl_ari_1_6_0.java deleted file mode 100644 index 89f4cad4..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/TextMessageVariable_impl_ari_1_6_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A key/value pair variable in a text message. - * - * Defined in file: endpoints.json - * Generated by: Model - *********************************************************/ - -public class TextMessageVariable_impl_ari_1_6_0 implements TextMessageVariable, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** A unique key identifying the variable. */ - private String key; - public String getKey() { - return key; - } - - @JsonDeserialize( as=String.class ) - public void setKey(String val ) { - key = val; - } - - /** The value of the variable. */ - private String value; - public String getValue() { - return value; - } - - @JsonDeserialize( as=String.class ) - public void setValue(String val ) { - value = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/TextMessage_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/TextMessage_impl_ari_1_6_0.java deleted file mode 100644 index 57c51d4f..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/TextMessage_impl_ari_1_6_0.java +++ /dev/null @@ -1,70 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A text message. - * - * Defined in file: endpoints.json - * Generated by: Model - *********************************************************/ - -public class TextMessage_impl_ari_1_6_0 implements TextMessage, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The text of the message. */ - private String body; - public String getBody() { - return body; - } - - @JsonDeserialize( as=String.class ) - public void setBody(String val ) { - body = val; - } - - /** A technology specific URI specifying the source of the message. For sip and pjsip technologies, any SIP URI can be specified. For xmpp, the URI must correspond to the client connection being used to send the message. */ - private String from; - public String getFrom() { - return from; - } - - @JsonDeserialize( as=String.class ) - public void setFrom(String val ) { - from = val; - } - - /** A technology specific URI specifying the destination of the message. Valid technologies include sip, pjsip, and xmp. The destination of a message should be an endpoint. */ - private String to; - public String getTo() { - return to; - } - - @JsonDeserialize( as=String.class ) - public void setTo(String val ) { - to = val; - } - - /** Technology specific key/value pairs associated with the message. */ - private List variables; - public List getVariables() { - return variables; - } - - @JsonDeserialize( contentAs=TextMessageVariable_impl_ari_1_6_0.class ) - public void setVariables(List val ) { - variables = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/Variable_impl_ari_1_6_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/Variable_impl_ari_1_6_0.java deleted file mode 100644 index c9864955..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_6_0/models/Variable_impl_ari_1_6_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_6_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * The value of a channel variable - * - * Defined in file: asterisk.json - * Generated by: Model - *********************************************************/ - -public class Variable_impl_ari_1_6_0 implements Variable, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The value of the variable requested */ - private String value; - public String getValue() { - return value; - } - - @JsonDeserialize( as=String.class ) - public void setValue(String val ) { - value = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/AriBuilder_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/AriBuilder_impl_ari_1_7_0.java deleted file mode 100644 index 6517f704..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/AriBuilder_impl_ari_1_7_0.java +++ /dev/null @@ -1,324 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.ari_1_7_0.models.*; -import ch.loway.oss.ari4java.generated.ari_1_7_0.actions.*; -import ch.loway.oss.ari4java.generated.*; -import ch.loway.oss.ari4java.ARI; - -public class AriBuilder_impl_ari_1_7_0 implements AriBuilder { - -public ActionSounds actionSounds() { - return new ActionSounds_impl_ari_1_7_0(); - }; - -public ActionEvents actionEvents() { - return new ActionEvents_impl_ari_1_7_0(); - }; - -public ActionEndpoints actionEndpoints() { - return new ActionEndpoints_impl_ari_1_7_0(); - }; - -public ActionAsterisk actionAsterisk() { - return new ActionAsterisk_impl_ari_1_7_0(); - }; - -public ActionApplications actionApplications() { - return new ActionApplications_impl_ari_1_7_0(); - }; - -public ActionChannels actionChannels() { - return new ActionChannels_impl_ari_1_7_0(); - }; - -public ActionDeviceStates actionDeviceStates() { - return new ActionDeviceStates_impl_ari_1_7_0(); - }; - -public ActionRecordings actionRecordings() { - return new ActionRecordings_impl_ari_1_7_0(); - }; - -public ActionPlaybacks actionPlaybacks() { - return new ActionPlaybacks_impl_ari_1_7_0(); - }; - -public ActionBridges actionBridges() { - return new ActionBridges_impl_ari_1_7_0(); - }; - -public BridgeAttendedTransfer bridgeAttendedTransfer() { - return new BridgeAttendedTransfer_impl_ari_1_7_0(); - }; - -public ChannelEnteredBridge channelEnteredBridge() { - return new ChannelEnteredBridge_impl_ari_1_7_0(); - }; - -public ChannelDialplan channelDialplan() { - return new ChannelDialplan_impl_ari_1_7_0(); - }; - -public LiveRecording liveRecording() { - return new LiveRecording_impl_ari_1_7_0(); - }; - -public BridgeBlindTransfer bridgeBlindTransfer() { - return new BridgeBlindTransfer_impl_ari_1_7_0(); - }; - -public Channel channel() { - return new Channel_impl_ari_1_7_0(); - }; - -public ChannelConnectedLine channelConnectedLine() { - return new ChannelConnectedLine_impl_ari_1_7_0(); - }; - -public StasisStart stasisStart() { - return new StasisStart_impl_ari_1_7_0(); - }; - -public Dial dial() { - return new Dial_impl_ari_1_7_0(); - }; - -public Variable variable() { - return new Variable_impl_ari_1_7_0(); - }; - -public RecordingFinished recordingFinished() { - return new RecordingFinished_impl_ari_1_7_0(); - }; - -public ChannelLeftBridge channelLeftBridge() { - return new ChannelLeftBridge_impl_ari_1_7_0(); - }; - -public BridgeCreated bridgeCreated() { - return new BridgeCreated_impl_ari_1_7_0(); - }; - -public Event event() { - return new Event_impl_ari_1_7_0(); - }; - -public PlaybackStarted playbackStarted() { - return new PlaybackStarted_impl_ari_1_7_0(); - }; - -public ConfigInfo configInfo() { - return new ConfigInfo_impl_ari_1_7_0(); - }; - -public BridgeMerged bridgeMerged() { - return new BridgeMerged_impl_ari_1_7_0(); - }; - -public ChannelCreated channelCreated() { - return new ChannelCreated_impl_ari_1_7_0(); - }; - -public ChannelVarset channelVarset() { - return new ChannelVarset_impl_ari_1_7_0(); - }; - -public SetId setId() { - return new SetId_impl_ari_1_7_0(); - }; - -public RecordingStarted recordingStarted() { - return new RecordingStarted_impl_ari_1_7_0(); - }; - -public Endpoint endpoint() { - return new Endpoint_impl_ari_1_7_0(); - }; - -public ChannelTalkingStarted channelTalkingStarted() { - return new ChannelTalkingStarted_impl_ari_1_7_0(); - }; - -public CallerID callerID() { - return new CallerID_impl_ari_1_7_0(); - }; - -public Message message() { - return new Message_impl_ari_1_7_0(); - }; - -public BuildInfo buildInfo() { - return new BuildInfo_impl_ari_1_7_0(); - }; - -public EndpointStateChange endpointStateChange() { - return new EndpointStateChange_impl_ari_1_7_0(); - }; - -public ChannelStateChange channelStateChange() { - return new ChannelStateChange_impl_ari_1_7_0(); - }; - -public ChannelUserevent channelUserevent() { - return new ChannelUserevent_impl_ari_1_7_0(); - }; - -public RecordingFailed recordingFailed() { - return new RecordingFailed_impl_ari_1_7_0(); - }; - -public AsteriskInfo asteriskInfo() { - return new AsteriskInfo_impl_ari_1_7_0(); - }; - -public MissingParams missingParams() { - return new MissingParams_impl_ari_1_7_0(); - }; - -public Sound sound() { - return new Sound_impl_ari_1_7_0(); - }; - -public BridgeDestroyed bridgeDestroyed() { - return new BridgeDestroyed_impl_ari_1_7_0(); - }; - -public ChannelHangupRequest channelHangupRequest() { - return new ChannelHangupRequest_impl_ari_1_7_0(); - }; - -public StasisEnd stasisEnd() { - return new StasisEnd_impl_ari_1_7_0(); - }; - -public Application application() { - return new Application_impl_ari_1_7_0(); - }; - -public DialplanCEP dialplanCEP() { - return new DialplanCEP_impl_ari_1_7_0(); - }; - -public Dialed dialed() { - return new Dialed_impl_ari_1_7_0(); - }; - -public PlaybackFinished playbackFinished() { - return new PlaybackFinished_impl_ari_1_7_0(); - }; - -public ApplicationReplaced applicationReplaced() { - return new ApplicationReplaced_impl_ari_1_7_0(); - }; - -public ChannelDtmfReceived channelDtmfReceived() { - return new ChannelDtmfReceived_impl_ari_1_7_0(); - }; - -public StatusInfo statusInfo() { - return new StatusInfo_impl_ari_1_7_0(); - }; - -public ChannelDestroyed channelDestroyed() { - return new ChannelDestroyed_impl_ari_1_7_0(); - }; - -public DeviceStateChanged deviceStateChanged() { - return new DeviceStateChanged_impl_ari_1_7_0(); - }; - -public TextMessage textMessage() { - return new TextMessage_impl_ari_1_7_0(); - }; - -public FormatLangPair formatLangPair() { - return new FormatLangPair_impl_ari_1_7_0(); - }; - -public ChannelTalkingFinished channelTalkingFinished() { - return new ChannelTalkingFinished_impl_ari_1_7_0(); - }; - -public DeviceState deviceState() { - return new DeviceState_impl_ari_1_7_0(); - }; - -public StoredRecording storedRecording() { - return new StoredRecording_impl_ari_1_7_0(); - }; - -public ChannelCallerId channelCallerId() { - return new ChannelCallerId_impl_ari_1_7_0(); - }; - -public Bridge bridge() { - return new Bridge_impl_ari_1_7_0(); - }; - -public TextMessageVariable textMessageVariable() { - return new TextMessageVariable_impl_ari_1_7_0(); - }; - -public Playback playback() { - return new Playback_impl_ari_1_7_0(); - }; - -public SystemInfo systemInfo() { - return new SystemInfo_impl_ari_1_7_0(); - }; - -public TextMessageReceived textMessageReceived() { - return new TextMessageReceived_impl_ari_1_7_0(); - }; - -public ChannelHold channelHold() { - throw new UnsupportedOperationException(); - }; - -public ChannelUnhold channelUnhold() { - throw new UnsupportedOperationException(); - }; - -public ConfigTuple configTuple() { - throw new UnsupportedOperationException(); - }; - -public ContactInfo contactInfo() { - throw new UnsupportedOperationException(); - }; - -public ContactStatusChange contactStatusChange() { - throw new UnsupportedOperationException(); - }; - -public LogChannel logChannel() { - throw new UnsupportedOperationException(); - }; - -public Module module() { - throw new UnsupportedOperationException(); - }; - -public Peer peer() { - throw new UnsupportedOperationException(); - }; - -public PeerStatusChange peerStatusChange() { - throw new UnsupportedOperationException(); - }; - -public PlaybackContinuing playbackContinuing() { - throw new UnsupportedOperationException(); - }; - -public ARI.ClassFactory getClassFactory() { - return new ClassTranslator_impl_ari_1_7_0(); -}; - -}; diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/ClassTranslator_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/ClassTranslator_impl_ari_1_7_0.java deleted file mode 100644 index 182fd543..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/ClassTranslator_impl_ari_1_7_0.java +++ /dev/null @@ -1,291 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.ARI; -import ch.loway.oss.ari4java.generated.*; -import ch.loway.oss.ari4java.generated.ari_1_7_0.models.*; -import ch.loway.oss.ari4java.generated.ari_1_7_0.actions.*; - -/********************************************************** - * This is a class translator. - *********************************************************/ -public class ClassTranslator_impl_ari_1_7_0 implements ARI.ClassFactory { - - @Override - public Class getImplementationFor(Class interfaceClass) { - - if ( interfaceClass.equals(ActionApplications.class) ) { - return (ActionApplications_impl_ari_1_7_0.class); - } else - - if ( interfaceClass.equals(ActionAsterisk.class) ) { - return (ActionAsterisk_impl_ari_1_7_0.class); - } else - - if ( interfaceClass.equals(ActionBridges.class) ) { - return (ActionBridges_impl_ari_1_7_0.class); - } else - - if ( interfaceClass.equals(ActionChannels.class) ) { - return (ActionChannels_impl_ari_1_7_0.class); - } else - - if ( interfaceClass.equals(ActionDeviceStates.class) ) { - return (ActionDeviceStates_impl_ari_1_7_0.class); - } else - - if ( interfaceClass.equals(ActionEndpoints.class) ) { - return (ActionEndpoints_impl_ari_1_7_0.class); - } else - - if ( interfaceClass.equals(ActionEvents.class) ) { - return (ActionEvents_impl_ari_1_7_0.class); - } else - - if ( interfaceClass.equals(ActionPlaybacks.class) ) { - return (ActionPlaybacks_impl_ari_1_7_0.class); - } else - - if ( interfaceClass.equals(ActionRecordings.class) ) { - return (ActionRecordings_impl_ari_1_7_0.class); - } else - - if ( interfaceClass.equals(ActionSounds.class) ) { - return (ActionSounds_impl_ari_1_7_0.class); - } else - - if ( interfaceClass.equals(Application.class) ) { - return (Application_impl_ari_1_7_0.class); - } else - - if ( interfaceClass.equals(ApplicationReplaced.class) ) { - return (ApplicationReplaced_impl_ari_1_7_0.class); - } else - - if ( interfaceClass.equals(AsteriskInfo.class) ) { - return (AsteriskInfo_impl_ari_1_7_0.class); - } else - - if ( interfaceClass.equals(Bridge.class) ) { - return (Bridge_impl_ari_1_7_0.class); - } else - - if ( interfaceClass.equals(BridgeAttendedTransfer.class) ) { - return (BridgeAttendedTransfer_impl_ari_1_7_0.class); - } else - - if ( interfaceClass.equals(BridgeBlindTransfer.class) ) { - return (BridgeBlindTransfer_impl_ari_1_7_0.class); - } else - - if ( interfaceClass.equals(BridgeCreated.class) ) { - return (BridgeCreated_impl_ari_1_7_0.class); - } else - - if ( interfaceClass.equals(BridgeDestroyed.class) ) { - return (BridgeDestroyed_impl_ari_1_7_0.class); - } else - - if ( interfaceClass.equals(BridgeMerged.class) ) { - return (BridgeMerged_impl_ari_1_7_0.class); - } else - - if ( interfaceClass.equals(BuildInfo.class) ) { - return (BuildInfo_impl_ari_1_7_0.class); - } else - - if ( interfaceClass.equals(CallerID.class) ) { - return (CallerID_impl_ari_1_7_0.class); - } else - - if ( interfaceClass.equals(Channel.class) ) { - return (Channel_impl_ari_1_7_0.class); - } else - - if ( interfaceClass.equals(ChannelCallerId.class) ) { - return (ChannelCallerId_impl_ari_1_7_0.class); - } else - - if ( interfaceClass.equals(ChannelConnectedLine.class) ) { - return (ChannelConnectedLine_impl_ari_1_7_0.class); - } else - - if ( interfaceClass.equals(ChannelCreated.class) ) { - return (ChannelCreated_impl_ari_1_7_0.class); - } else - - if ( interfaceClass.equals(ChannelDestroyed.class) ) { - return (ChannelDestroyed_impl_ari_1_7_0.class); - } else - - if ( interfaceClass.equals(ChannelDialplan.class) ) { - return (ChannelDialplan_impl_ari_1_7_0.class); - } else - - if ( interfaceClass.equals(ChannelDtmfReceived.class) ) { - return (ChannelDtmfReceived_impl_ari_1_7_0.class); - } else - - if ( interfaceClass.equals(ChannelEnteredBridge.class) ) { - return (ChannelEnteredBridge_impl_ari_1_7_0.class); - } else - - if ( interfaceClass.equals(ChannelHangupRequest.class) ) { - return (ChannelHangupRequest_impl_ari_1_7_0.class); - } else - - if ( interfaceClass.equals(ChannelLeftBridge.class) ) { - return (ChannelLeftBridge_impl_ari_1_7_0.class); - } else - - if ( interfaceClass.equals(ChannelStateChange.class) ) { - return (ChannelStateChange_impl_ari_1_7_0.class); - } else - - if ( interfaceClass.equals(ChannelTalkingFinished.class) ) { - return (ChannelTalkingFinished_impl_ari_1_7_0.class); - } else - - if ( interfaceClass.equals(ChannelTalkingStarted.class) ) { - return (ChannelTalkingStarted_impl_ari_1_7_0.class); - } else - - if ( interfaceClass.equals(ChannelUserevent.class) ) { - return (ChannelUserevent_impl_ari_1_7_0.class); - } else - - if ( interfaceClass.equals(ChannelVarset.class) ) { - return (ChannelVarset_impl_ari_1_7_0.class); - } else - - if ( interfaceClass.equals(ConfigInfo.class) ) { - return (ConfigInfo_impl_ari_1_7_0.class); - } else - - if ( interfaceClass.equals(DeviceState.class) ) { - return (DeviceState_impl_ari_1_7_0.class); - } else - - if ( interfaceClass.equals(DeviceStateChanged.class) ) { - return (DeviceStateChanged_impl_ari_1_7_0.class); - } else - - if ( interfaceClass.equals(Dial.class) ) { - return (Dial_impl_ari_1_7_0.class); - } else - - if ( interfaceClass.equals(Dialed.class) ) { - return (Dialed_impl_ari_1_7_0.class); - } else - - if ( interfaceClass.equals(DialplanCEP.class) ) { - return (DialplanCEP_impl_ari_1_7_0.class); - } else - - if ( interfaceClass.equals(Endpoint.class) ) { - return (Endpoint_impl_ari_1_7_0.class); - } else - - if ( interfaceClass.equals(EndpointStateChange.class) ) { - return (EndpointStateChange_impl_ari_1_7_0.class); - } else - - if ( interfaceClass.equals(Event.class) ) { - return (Event_impl_ari_1_7_0.class); - } else - - if ( interfaceClass.equals(FormatLangPair.class) ) { - return (FormatLangPair_impl_ari_1_7_0.class); - } else - - if ( interfaceClass.equals(LiveRecording.class) ) { - return (LiveRecording_impl_ari_1_7_0.class); - } else - - if ( interfaceClass.equals(Message.class) ) { - return (Message_impl_ari_1_7_0.class); - } else - - if ( interfaceClass.equals(MissingParams.class) ) { - return (MissingParams_impl_ari_1_7_0.class); - } else - - if ( interfaceClass.equals(Playback.class) ) { - return (Playback_impl_ari_1_7_0.class); - } else - - if ( interfaceClass.equals(PlaybackFinished.class) ) { - return (PlaybackFinished_impl_ari_1_7_0.class); - } else - - if ( interfaceClass.equals(PlaybackStarted.class) ) { - return (PlaybackStarted_impl_ari_1_7_0.class); - } else - - if ( interfaceClass.equals(RecordingFailed.class) ) { - return (RecordingFailed_impl_ari_1_7_0.class); - } else - - if ( interfaceClass.equals(RecordingFinished.class) ) { - return (RecordingFinished_impl_ari_1_7_0.class); - } else - - if ( interfaceClass.equals(RecordingStarted.class) ) { - return (RecordingStarted_impl_ari_1_7_0.class); - } else - - if ( interfaceClass.equals(SetId.class) ) { - return (SetId_impl_ari_1_7_0.class); - } else - - if ( interfaceClass.equals(Sound.class) ) { - return (Sound_impl_ari_1_7_0.class); - } else - - if ( interfaceClass.equals(StasisEnd.class) ) { - return (StasisEnd_impl_ari_1_7_0.class); - } else - - if ( interfaceClass.equals(StasisStart.class) ) { - return (StasisStart_impl_ari_1_7_0.class); - } else - - if ( interfaceClass.equals(StatusInfo.class) ) { - return (StatusInfo_impl_ari_1_7_0.class); - } else - - if ( interfaceClass.equals(StoredRecording.class) ) { - return (StoredRecording_impl_ari_1_7_0.class); - } else - - if ( interfaceClass.equals(SystemInfo.class) ) { - return (SystemInfo_impl_ari_1_7_0.class); - } else - - if ( interfaceClass.equals(TextMessage.class) ) { - return (TextMessage_impl_ari_1_7_0.class); - } else - - if ( interfaceClass.equals(TextMessageReceived.class) ) { - return (TextMessageReceived_impl_ari_1_7_0.class); - } else - - if ( interfaceClass.equals(TextMessageVariable.class) ) { - return (TextMessageVariable_impl_ari_1_7_0.class); - } else - - if ( interfaceClass.equals(Variable.class) ) { - return (Variable_impl_ari_1_7_0.class); - } else - { - return null; - } - } -} - - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/actions/ActionApplications_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/actions/ActionApplications_impl_ari_1_7_0.java deleted file mode 100644 index 491f3d2a..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/actions/ActionApplications_impl_ari_1_7_0.java +++ /dev/null @@ -1,140 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_7_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionApplications_impl_ari_1_7_0 extends BaseAriAction implements ActionApplications { -/********************************************************** - * Stasis applications - * - * List all applications. - *********************************************************/ -private void buildList() { -reset(); -url = "/applications"; -method = "GET"; -} - -@Override -public List list() throws RestException { -buildList(); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void list(AriCallback> callback) { -buildList(); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Stasis application - * - * Get details of an application. - *********************************************************/ -private void buildGet(String applicationName) { -reset(); -url = "/applications/" + applicationName + ""; -method = "GET"; -lE.add( HttpResponse.build( 404, "Application does not exist.") ); -} - -@Override -public Application get(String applicationName) throws RestException { -buildGet(applicationName); -String json = httpActionSync(); -return deserializeJson( json, Application_impl_ari_1_7_0.class ); -} - -@Override -public void get(String applicationName, AriCallback callback) { -buildGet(applicationName); -httpActionAsync(callback, Application_impl_ari_1_7_0.class); -} - -/********************************************************** - * Stasis application - * - * Subscribe an application to a event source. - * Returns the state of the application after the subscriptions have changed - *********************************************************/ -private void buildSubscribe(String applicationName, String eventSource) { -reset(); -url = "/applications/" + applicationName + "/subscription"; -method = "POST"; -lParamQuery.add( HttpParam.build( "eventSource", eventSource) ); -lE.add( HttpResponse.build( 400, "Missing parameter.") ); -lE.add( HttpResponse.build( 404, "Application does not exist.") ); -lE.add( HttpResponse.build( 422, "Event source does not exist.") ); -} - -@Override -public Application subscribe(String applicationName, String eventSource) throws RestException { -buildSubscribe(applicationName, eventSource); -String json = httpActionSync(); -return deserializeJson( json, Application_impl_ari_1_7_0.class ); -} - -@Override -public void subscribe(String applicationName, String eventSource, AriCallback callback) { -buildSubscribe(applicationName, eventSource); -httpActionAsync(callback, Application_impl_ari_1_7_0.class); -} - -/********************************************************** - * Stasis application - * - * Unsubscribe an application from an event source. - * Returns the state of the application after the subscriptions have changed - *********************************************************/ -private void buildUnsubscribe(String applicationName, String eventSource) { -reset(); -url = "/applications/" + applicationName + "/subscription"; -method = "DELETE"; -lParamQuery.add( HttpParam.build( "eventSource", eventSource) ); -lE.add( HttpResponse.build( 400, "Missing parameter; event source scheme not recognized.") ); -lE.add( HttpResponse.build( 404, "Application does not exist.") ); -lE.add( HttpResponse.build( 409, "Application not subscribed to event source.") ); -lE.add( HttpResponse.build( 422, "Event source does not exist.") ); -} - -@Override -public Application unsubscribe(String applicationName, String eventSource) throws RestException { -buildUnsubscribe(applicationName, eventSource); -String json = httpActionSync(); -return deserializeJson( json, Application_impl_ari_1_7_0.class ); -} - -@Override -public void unsubscribe(String applicationName, String eventSource, AriCallback callback) { -buildUnsubscribe(applicationName, eventSource); -httpActionAsync(callback, Application_impl_ari_1_7_0.class); -} - -/** No missing signatures from interface */ -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/actions/ActionAsterisk_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/actions/ActionAsterisk_impl_ari_1_7_0.java deleted file mode 100644 index 17bee814..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/actions/ActionAsterisk_impl_ari_1_7_0.java +++ /dev/null @@ -1,335 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_7_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionAsterisk_impl_ari_1_7_0 extends BaseAriAction implements ActionAsterisk { -/********************************************************** - * Asterisk system information (similar to core show settings) - * - * Gets Asterisk system information. - *********************************************************/ -private void buildGetInfo(String only) { -reset(); -url = "/asterisk/info"; -method = "GET"; -lParamQuery.add( HttpParam.build( "only", only) ); -} - -@Override -public AsteriskInfo getInfo(String only) throws RestException { -buildGetInfo(only); -String json = httpActionSync(); -return deserializeJson( json, AsteriskInfo_impl_ari_1_7_0.class ); -} - -@Override -public void getInfo(String only, AriCallback callback) { -buildGetInfo(only); -httpActionAsync(callback, AsteriskInfo_impl_ari_1_7_0.class); -} - -/********************************************************** - * Global variables - * - * Get the value of a global variable. - *********************************************************/ -private void buildGetGlobalVar(String variable) { -reset(); -url = "/asterisk/variable"; -method = "GET"; -lParamQuery.add( HttpParam.build( "variable", variable) ); -lE.add( HttpResponse.build( 400, "Missing variable parameter.") ); -} - -@Override -public Variable getGlobalVar(String variable) throws RestException { -buildGetGlobalVar(variable); -String json = httpActionSync(); -return deserializeJson( json, Variable_impl_ari_1_7_0.class ); -} - -@Override -public void getGlobalVar(String variable, AriCallback callback) { -buildGetGlobalVar(variable); -httpActionAsync(callback, Variable_impl_ari_1_7_0.class); -} - -/********************************************************** - * Global variables - * - * Set the value of a global variable. - *********************************************************/ -private void buildSetGlobalVar(String variable, String value) { -reset(); -url = "/asterisk/variable"; -method = "POST"; -lParamQuery.add( HttpParam.build( "variable", variable) ); -lParamQuery.add( HttpParam.build( "value", value) ); -lE.add( HttpResponse.build( 400, "Missing variable parameter.") ); -} - -@Override -public void setGlobalVar(String variable, String value) throws RestException { -buildSetGlobalVar(variable, value); -String json = httpActionSync(); -} - -@Override -public void setGlobalVar(String variable, String value, AriCallback callback) { -buildSetGlobalVar(variable, value); -httpActionAsync(callback); -} - -/********************************************************** - * Reload an Asterisk module. - * - * - * @since ari_1_8_0 - *********************************************************/ -public void reloadModule(String moduleName) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create or update a dynamic configuration object. - * - * - * @since ari_1_8_0 - *********************************************************/ -public List updateObject(String configClass, String objectType, String id, Map fields) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_8_0 - *********************************************************/ -public void deleteObject(String configClass, String objectType, String id, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_8_0 - *********************************************************/ -public void reloadModule(String moduleName, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_9_0 - *********************************************************/ -public void addLog(String logChannelName, String configuration, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_8_0 - *********************************************************/ -public void unloadModule(String moduleName, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * List Asterisk modules. - * - * - * @since ari_1_8_0 - *********************************************************/ -public List listModules() throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Gets Asterisk log channel information. - * - * - * @since ari_1_9_0 - *********************************************************/ -public List listLogChannels() throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Get Asterisk module information. - * - * - * @since ari_1_8_0 - *********************************************************/ -public Module getModule(String moduleName) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_9_0 - *********************************************************/ -public void rotateLog(String logChannelName, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Retrieve a dynamic configuration object. - * - * - * @since ari_1_8_0 - *********************************************************/ -public List getObject(String configClass, String objectType, String id) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Load an Asterisk module. - * - * - * @since ari_1_8_0 - *********************************************************/ -public void loadModule(String moduleName) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Unload an Asterisk module. - * - * - * @since ari_1_8_0 - *********************************************************/ -public void unloadModule(String moduleName) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_8_0 - *********************************************************/ -public void getModule(String moduleName, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_8_0 - *********************************************************/ -public void updateObject(String configClass, String objectType, String id, Map fields, AriCallback> callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Delete a dynamic configuration object. - * - * - * @since ari_1_8_0 - *********************************************************/ -public void deleteObject(String configClass, String objectType, String id) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Rotates a log channel. - * - * - * @since ari_1_9_0 - *********************************************************/ -public void rotateLog(String logChannelName) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_9_0 - *********************************************************/ -public void listLogChannels(AriCallback> callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Adds a log channel. - * - * - * @since ari_1_9_0 - *********************************************************/ -public void addLog(String logChannelName, String configuration) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_8_0 - *********************************************************/ -public void listModules(AriCallback> callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Deletes a log channel. - * - * - * @since ari_1_9_0 - *********************************************************/ -public void deleteLog(String logChannelName) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_9_0 - *********************************************************/ -public void deleteLog(String logChannelName, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_8_0 - *********************************************************/ -public void loadModule(String moduleName, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_8_0 - *********************************************************/ -public void getObject(String configClass, String objectType, String id, AriCallback> callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/actions/ActionBridges_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/actions/ActionBridges_impl_ari_1_7_0.java deleted file mode 100644 index 81acf32e..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/actions/ActionBridges_impl_ari_1_7_0.java +++ /dev/null @@ -1,444 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_7_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionBridges_impl_ari_1_7_0 extends BaseAriAction implements ActionBridges { -/********************************************************** - * Active bridges - * - * List all active bridges in Asterisk. - *********************************************************/ -private void buildList() { -reset(); -url = "/bridges"; -method = "GET"; -} - -@Override -public List list() throws RestException { -buildList(); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void list(AriCallback> callback) { -buildList(); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Active bridges - * - * Create a new bridge. - * This bridge persists until it has been shut down, or Asterisk has been shut down. - *********************************************************/ -private void buildCreate(String type, String bridgeId, String name) { -reset(); -url = "/bridges"; -method = "POST"; -lParamQuery.add( HttpParam.build( "type", type) ); -lParamQuery.add( HttpParam.build( "bridgeId", bridgeId) ); -lParamQuery.add( HttpParam.build( "name", name) ); -} - -@Override -public Bridge create(String type, String bridgeId, String name) throws RestException { -buildCreate(type, bridgeId, name); -String json = httpActionSync(); -return deserializeJson( json, Bridge_impl_ari_1_7_0.class ); -} - -@Override -public void create(String type, String bridgeId, String name, AriCallback callback) { -buildCreate(type, bridgeId, name); -httpActionAsync(callback, Bridge_impl_ari_1_7_0.class); -} - -/********************************************************** - * Individual bridge - * - * Create a new bridge or updates an existing one. - * This bridge persists until it has been shut down, or Asterisk has been shut down. - *********************************************************/ -private void buildCreateWithId(String type, String bridgeId, String name) { -reset(); -url = "/bridges/" + bridgeId + ""; -method = "POST"; -lParamQuery.add( HttpParam.build( "type", type) ); -lParamQuery.add( HttpParam.build( "name", name) ); -} - -@Override -public Bridge createWithId(String type, String bridgeId, String name) throws RestException { -buildCreateWithId(type, bridgeId, name); -String json = httpActionSync(); -return deserializeJson( json, Bridge_impl_ari_1_7_0.class ); -} - -@Override -public void createWithId(String type, String bridgeId, String name, AriCallback callback) { -buildCreateWithId(type, bridgeId, name); -httpActionAsync(callback, Bridge_impl_ari_1_7_0.class); -} - -/********************************************************** - * Individual bridge - * - * Get bridge details. - *********************************************************/ -private void buildGet(String bridgeId) { -reset(); -url = "/bridges/" + bridgeId + ""; -method = "GET"; -lE.add( HttpResponse.build( 404, "Bridge not found") ); -} - -@Override -public Bridge get(String bridgeId) throws RestException { -buildGet(bridgeId); -String json = httpActionSync(); -return deserializeJson( json, Bridge_impl_ari_1_7_0.class ); -} - -@Override -public void get(String bridgeId, AriCallback callback) { -buildGet(bridgeId); -httpActionAsync(callback, Bridge_impl_ari_1_7_0.class); -} - -/********************************************************** - * Individual bridge - * - * Shut down a bridge. - * If any channels are in this bridge, they will be removed and resume whatever they were doing beforehand. - *********************************************************/ -private void buildDestroy(String bridgeId) { -reset(); -url = "/bridges/" + bridgeId + ""; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Bridge not found") ); -} - -@Override -public void destroy(String bridgeId) throws RestException { -buildDestroy(bridgeId); -String json = httpActionSync(); -} - -@Override -public void destroy(String bridgeId, AriCallback callback) { -buildDestroy(bridgeId); -httpActionAsync(callback); -} - -/********************************************************** - * Add a channel to a bridge - * - * Add a channel to a bridge. - *********************************************************/ -private void buildAddChannel(String bridgeId, String channel, String role) { -reset(); -url = "/bridges/" + bridgeId + "/addChannel"; -method = "POST"; -lParamQuery.add( HttpParam.build( "channel", channel) ); -lParamQuery.add( HttpParam.build( "role", role) ); -lE.add( HttpResponse.build( 400, "Channel not found") ); -lE.add( HttpResponse.build( 404, "Bridge not found") ); -lE.add( HttpResponse.build( 409, "Bridge not in Stasis application; Channel currently recording") ); -lE.add( HttpResponse.build( 422, "Channel not in Stasis application") ); -} - -@Override -public void addChannel(String bridgeId, String channel, String role) throws RestException { -buildAddChannel(bridgeId, channel, role); -String json = httpActionSync(); -} - -@Override -public void addChannel(String bridgeId, String channel, String role, AriCallback callback) { -buildAddChannel(bridgeId, channel, role); -httpActionAsync(callback); -} - -/********************************************************** - * Play music on hold to a bridge - * - * Play music on hold to a bridge or change the MOH class that is playing. - *********************************************************/ -private void buildStartMoh(String bridgeId, String mohClass) { -reset(); -url = "/bridges/" + bridgeId + "/moh"; -method = "POST"; -lParamQuery.add( HttpParam.build( "mohClass", mohClass) ); -lE.add( HttpResponse.build( 404, "Bridge not found") ); -lE.add( HttpResponse.build( 409, "Bridge not in Stasis application") ); -} - -@Override -public void startMoh(String bridgeId, String mohClass) throws RestException { -buildStartMoh(bridgeId, mohClass); -String json = httpActionSync(); -} - -@Override -public void startMoh(String bridgeId, String mohClass, AriCallback callback) { -buildStartMoh(bridgeId, mohClass); -httpActionAsync(callback); -} - -/********************************************************** - * Play music on hold to a bridge - * - * Stop playing music on hold to a bridge. - * This will only stop music on hold being played via POST bridges/{bridgeId}/moh. - *********************************************************/ -private void buildStopMoh(String bridgeId) { -reset(); -url = "/bridges/" + bridgeId + "/moh"; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Bridge not found") ); -lE.add( HttpResponse.build( 409, "Bridge not in Stasis application") ); -} - -@Override -public void stopMoh(String bridgeId) throws RestException { -buildStopMoh(bridgeId); -String json = httpActionSync(); -} - -@Override -public void stopMoh(String bridgeId, AriCallback callback) { -buildStopMoh(bridgeId); -httpActionAsync(callback); -} - -/********************************************************** - * Play media to the participants of a bridge - * - * Start playback of media on a bridge. - * The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.) - *********************************************************/ -private void buildPlay(String bridgeId, String media, String lang, int offsetms, int skipms, String playbackId) { -reset(); -url = "/bridges/" + bridgeId + "/play"; -method = "POST"; -lParamQuery.add( HttpParam.build( "media", media) ); -lParamQuery.add( HttpParam.build( "lang", lang) ); -lParamQuery.add( HttpParam.build( "offsetms", offsetms) ); -lParamQuery.add( HttpParam.build( "skipms", skipms) ); -lParamQuery.add( HttpParam.build( "playbackId", playbackId) ); -lE.add( HttpResponse.build( 404, "Bridge not found") ); -lE.add( HttpResponse.build( 409, "Bridge not in a Stasis application") ); -} - -@Override -public Playback play(String bridgeId, String media, String lang, int offsetms, int skipms, String playbackId) throws RestException { -buildPlay(bridgeId, media, lang, offsetms, skipms, playbackId); -String json = httpActionSync(); -return deserializeJson( json, Playback_impl_ari_1_7_0.class ); -} - -@Override -public void play(String bridgeId, String media, String lang, int offsetms, int skipms, String playbackId, AriCallback callback) { -buildPlay(bridgeId, media, lang, offsetms, skipms, playbackId); -httpActionAsync(callback, Playback_impl_ari_1_7_0.class); -} - -/********************************************************** - * Play media to a bridge - * - * Start playback of media on a bridge. - * The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.) - *********************************************************/ -private void buildPlayWithId(String bridgeId, String playbackId, String media, String lang, int offsetms, int skipms) { -reset(); -url = "/bridges/" + bridgeId + "/play/" + playbackId + ""; -method = "POST"; -lParamQuery.add( HttpParam.build( "media", media) ); -lParamQuery.add( HttpParam.build( "lang", lang) ); -lParamQuery.add( HttpParam.build( "offsetms", offsetms) ); -lParamQuery.add( HttpParam.build( "skipms", skipms) ); -lE.add( HttpResponse.build( 404, "Bridge not found") ); -lE.add( HttpResponse.build( 409, "Bridge not in a Stasis application") ); -} - -@Override -public Playback playWithId(String bridgeId, String playbackId, String media, String lang, int offsetms, int skipms) throws RestException { -buildPlayWithId(bridgeId, playbackId, media, lang, offsetms, skipms); -String json = httpActionSync(); -return deserializeJson( json, Playback_impl_ari_1_7_0.class ); -} - -@Override -public void playWithId(String bridgeId, String playbackId, String media, String lang, int offsetms, int skipms, AriCallback callback) { -buildPlayWithId(bridgeId, playbackId, media, lang, offsetms, skipms); -httpActionAsync(callback, Playback_impl_ari_1_7_0.class); -} - -/********************************************************** - * Record audio on a bridge - * - * Start a recording. - * This records the mixed audio from all channels participating in this bridge. - *********************************************************/ -private void buildRecord(String bridgeId, String name, String format, int maxDurationSeconds, int maxSilenceSeconds, String ifExists, boolean beep, String terminateOn) { -reset(); -url = "/bridges/" + bridgeId + "/record"; -method = "POST"; -lParamQuery.add( HttpParam.build( "name", name) ); -lParamQuery.add( HttpParam.build( "format", format) ); -lParamQuery.add( HttpParam.build( "maxDurationSeconds", maxDurationSeconds) ); -lParamQuery.add( HttpParam.build( "maxSilenceSeconds", maxSilenceSeconds) ); -lParamQuery.add( HttpParam.build( "ifExists", ifExists) ); -lParamQuery.add( HttpParam.build( "beep", beep) ); -lParamQuery.add( HttpParam.build( "terminateOn", terminateOn) ); -lE.add( HttpResponse.build( 400, "Invalid parameters") ); -lE.add( HttpResponse.build( 404, "Bridge not found") ); -lE.add( HttpResponse.build( 409, "Bridge is not in a Stasis application; A recording with the same name already exists on the system and can not be overwritten because it is in progress or ifExists=fail") ); -lE.add( HttpResponse.build( 422, "The format specified is unknown on this system") ); -} - -@Override -public LiveRecording record(String bridgeId, String name, String format, int maxDurationSeconds, int maxSilenceSeconds, String ifExists, boolean beep, String terminateOn) throws RestException { -buildRecord(bridgeId, name, format, maxDurationSeconds, maxSilenceSeconds, ifExists, beep, terminateOn); -String json = httpActionSync(); -return deserializeJson( json, LiveRecording_impl_ari_1_7_0.class ); -} - -@Override -public void record(String bridgeId, String name, String format, int maxDurationSeconds, int maxSilenceSeconds, String ifExists, boolean beep, String terminateOn, AriCallback callback) { -buildRecord(bridgeId, name, format, maxDurationSeconds, maxSilenceSeconds, ifExists, beep, terminateOn); -httpActionAsync(callback, LiveRecording_impl_ari_1_7_0.class); -} - -/********************************************************** - * Remove a channel from a bridge - * - * Remove a channel from a bridge. - *********************************************************/ -private void buildRemoveChannel(String bridgeId, String channel) { -reset(); -url = "/bridges/" + bridgeId + "/removeChannel"; -method = "POST"; -lParamQuery.add( HttpParam.build( "channel", channel) ); -lE.add( HttpResponse.build( 400, "Channel not found") ); -lE.add( HttpResponse.build( 404, "Bridge not found") ); -lE.add( HttpResponse.build( 409, "Bridge not in Stasis application") ); -lE.add( HttpResponse.build( 422, "Channel not in this bridge") ); -} - -@Override -public void removeChannel(String bridgeId, String channel) throws RestException { -buildRemoveChannel(bridgeId, channel); -String json = httpActionSync(); -} - -@Override -public void removeChannel(String bridgeId, String channel, AriCallback callback) { -buildRemoveChannel(bridgeId, channel); -httpActionAsync(callback); -} - -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void create(String type, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new bridge. - * This bridge persists until it has been shut down, or Asterisk has been shut down. - * - * @since ari_1_0_0 - *********************************************************/ -public Bridge create(String type, String name) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new bridge. - * This bridge persists until it has been shut down, or Asterisk has been shut down. - * - * @since ari_0_0_1 - *********************************************************/ -public Bridge create(String type) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void play(String bridgeId, String media, String lang, int offsetms, int skipms, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Start playback of media on a bridge. - * 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.) - * - * @since ari_0_0_1 - *********************************************************/ -public Playback play(String bridgeId, String media, String lang, int offsetms, int skipms) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_0_0 - *********************************************************/ -public void create(String type, String name, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_5_0 - *********************************************************/ -public void create_or_update_with_id(String type, String bridgeId, String name, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new bridge or updates an existing one. - * This bridge persists until it has been shut down, or Asterisk has been shut down. - * - * @since ari_1_5_0 - *********************************************************/ -public Bridge create_or_update_with_id(String type, String bridgeId, String name) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/actions/ActionChannels_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/actions/ActionChannels_impl_ari_1_7_0.java deleted file mode 100644 index 5b0a32d0..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/actions/ActionChannels_impl_ari_1_7_0.java +++ /dev/null @@ -1,952 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_7_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionChannels_impl_ari_1_7_0 extends BaseAriAction implements ActionChannels { -/********************************************************** - * Active channels - * - * List all active channels in Asterisk. - *********************************************************/ -private void buildList() { -reset(); -url = "/channels"; -method = "GET"; -} - -@Override -public List list() throws RestException { -buildList(); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void list(AriCallback> callback) { -buildList(); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Active channels - * - * Create a new channel (originate). - * 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. - *********************************************************/ -private void buildOriginate(String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String channelId, String otherChannelId, String originator) { -reset(); -url = "/channels"; -method = "POST"; -lParamQuery.add( HttpParam.build( "endpoint", endpoint) ); -lParamQuery.add( HttpParam.build( "extension", extension) ); -lParamQuery.add( HttpParam.build( "context", context) ); -lParamQuery.add( HttpParam.build( "priority", priority) ); -lParamQuery.add( HttpParam.build( "label", label) ); -lParamQuery.add( HttpParam.build( "app", app) ); -lParamQuery.add( HttpParam.build( "appArgs", appArgs) ); -lParamQuery.add( HttpParam.build( "callerId", callerId) ); -lParamQuery.add( HttpParam.build( "timeout", timeout) ); -lParamBody.addAll( HttpParam.build( "variables", variables) ); -lParamQuery.add( HttpParam.build( "channelId", channelId) ); -lParamQuery.add( HttpParam.build( "otherChannelId", otherChannelId) ); -lParamQuery.add( HttpParam.build( "originator", originator) ); -lE.add( HttpResponse.build( 400, "Invalid parameters for originating a channel.") ); -} - -@Override -public Channel originate(String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String channelId, String otherChannelId, String originator) throws RestException { -buildOriginate(endpoint, extension, context, priority, label, app, appArgs, callerId, timeout, variables, channelId, otherChannelId, originator); -String json = httpActionSync(); -return deserializeJson( json, Channel_impl_ari_1_7_0.class ); -} - -@Override -public void originate(String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String channelId, String otherChannelId, String originator, AriCallback callback) { -buildOriginate(endpoint, extension, context, priority, label, app, appArgs, callerId, timeout, variables, channelId, otherChannelId, originator); -httpActionAsync(callback, Channel_impl_ari_1_7_0.class); -} - -/********************************************************** - * Active channel - * - * Channel details. - *********************************************************/ -private void buildGet(String channelId) { -reset(); -url = "/channels/" + channelId + ""; -method = "GET"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -} - -@Override -public Channel get(String channelId) throws RestException { -buildGet(channelId); -String json = httpActionSync(); -return deserializeJson( json, Channel_impl_ari_1_7_0.class ); -} - -@Override -public void get(String channelId, AriCallback callback) { -buildGet(channelId); -httpActionAsync(callback, Channel_impl_ari_1_7_0.class); -} - -/********************************************************** - * Active channel - * - * Create a new channel (originate with id). - * 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. - *********************************************************/ -private void buildOriginateWithId(String channelId, String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String otherChannelId, String originator) { -reset(); -url = "/channels/" + channelId + ""; -method = "POST"; -lParamQuery.add( HttpParam.build( "endpoint", endpoint) ); -lParamQuery.add( HttpParam.build( "extension", extension) ); -lParamQuery.add( HttpParam.build( "context", context) ); -lParamQuery.add( HttpParam.build( "priority", priority) ); -lParamQuery.add( HttpParam.build( "label", label) ); -lParamQuery.add( HttpParam.build( "app", app) ); -lParamQuery.add( HttpParam.build( "appArgs", appArgs) ); -lParamQuery.add( HttpParam.build( "callerId", callerId) ); -lParamQuery.add( HttpParam.build( "timeout", timeout) ); -lParamBody.addAll( HttpParam.build( "variables", variables) ); -lParamQuery.add( HttpParam.build( "otherChannelId", otherChannelId) ); -lParamQuery.add( HttpParam.build( "originator", originator) ); -lE.add( HttpResponse.build( 400, "Invalid parameters for originating a channel.") ); -} - -@Override -public Channel originateWithId(String channelId, String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String otherChannelId, String originator) throws RestException { -buildOriginateWithId(channelId, endpoint, extension, context, priority, label, app, appArgs, callerId, timeout, variables, otherChannelId, originator); -String json = httpActionSync(); -return deserializeJson( json, Channel_impl_ari_1_7_0.class ); -} - -@Override -public void originateWithId(String channelId, String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String otherChannelId, String originator, AriCallback callback) { -buildOriginateWithId(channelId, endpoint, extension, context, priority, label, app, appArgs, callerId, timeout, variables, otherChannelId, originator); -httpActionAsync(callback, Channel_impl_ari_1_7_0.class); -} - -/********************************************************** - * Active channel - * - * Delete (i.e. hangup) a channel. - *********************************************************/ -private void buildHangup(String channelId, String reason) { -reset(); -url = "/channels/" + channelId + ""; -method = "DELETE"; -lParamQuery.add( HttpParam.build( "reason", reason) ); -lE.add( HttpResponse.build( 400, "Invalid reason for hangup provided") ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -} - -@Override -public void hangup(String channelId, String reason) throws RestException { -buildHangup(channelId, reason); -String json = httpActionSync(); -} - -@Override -public void hangup(String channelId, String reason, AriCallback callback) { -buildHangup(channelId, reason); -httpActionAsync(callback); -} - -/********************************************************** - * Answer a channel - * - * Answer a channel. - *********************************************************/ -private void buildAnswer(String channelId) { -reset(); -url = "/channels/" + channelId + "/answer"; -method = "POST"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void answer(String channelId) throws RestException { -buildAnswer(channelId); -String json = httpActionSync(); -} - -@Override -public void answer(String channelId, AriCallback callback) { -buildAnswer(channelId); -httpActionAsync(callback); -} - -/********************************************************** - * Exit application; continue execution in the dialplan - * - * Exit application; continue execution in the dialplan. - *********************************************************/ -private void buildContinueInDialplan(String channelId, String context, String extension, int priority, String label) { -reset(); -url = "/channels/" + channelId + "/continue"; -method = "POST"; -lParamQuery.add( HttpParam.build( "context", context) ); -lParamQuery.add( HttpParam.build( "extension", extension) ); -lParamQuery.add( HttpParam.build( "priority", priority) ); -lParamQuery.add( HttpParam.build( "label", label) ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void continueInDialplan(String channelId, String context, String extension, int priority, String label) throws RestException { -buildContinueInDialplan(channelId, context, extension, priority, label); -String json = httpActionSync(); -} - -@Override -public void continueInDialplan(String channelId, String context, String extension, int priority, String label, AriCallback callback) { -buildContinueInDialplan(channelId, context, extension, priority, label); -httpActionAsync(callback); -} - -/********************************************************** - * Send DTMF to a channel - * - * Send provided DTMF to a given channel. - *********************************************************/ -private void buildSendDTMF(String channelId, String dtmf, int before, int between, int duration, int after) { -reset(); -url = "/channels/" + channelId + "/dtmf"; -method = "POST"; -lParamQuery.add( HttpParam.build( "dtmf", dtmf) ); -lParamQuery.add( HttpParam.build( "before", before) ); -lParamQuery.add( HttpParam.build( "between", between) ); -lParamQuery.add( HttpParam.build( "duration", duration) ); -lParamQuery.add( HttpParam.build( "after", after) ); -lE.add( HttpResponse.build( 400, "DTMF is required") ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void sendDTMF(String channelId, String dtmf, int before, int between, int duration, int after) throws RestException { -buildSendDTMF(channelId, dtmf, before, between, duration, after); -String json = httpActionSync(); -} - -@Override -public void sendDTMF(String channelId, String dtmf, int before, int between, int duration, int after, AriCallback callback) { -buildSendDTMF(channelId, dtmf, before, between, duration, after); -httpActionAsync(callback); -} - -/********************************************************** - * Put a channel on hold - * - * Hold a channel. - *********************************************************/ -private void buildHold(String channelId) { -reset(); -url = "/channels/" + channelId + "/hold"; -method = "POST"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void hold(String channelId) throws RestException { -buildHold(channelId); -String json = httpActionSync(); -} - -@Override -public void hold(String channelId, AriCallback callback) { -buildHold(channelId); -httpActionAsync(callback); -} - -/********************************************************** - * Put a channel on hold - * - * Remove a channel from hold. - *********************************************************/ -private void buildUnhold(String channelId) { -reset(); -url = "/channels/" + channelId + "/hold"; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void unhold(String channelId) throws RestException { -buildUnhold(channelId); -String json = httpActionSync(); -} - -@Override -public void unhold(String channelId, AriCallback callback) { -buildUnhold(channelId); -httpActionAsync(callback); -} - -/********************************************************** - * Play music on hold to a channel - * - * Play music on hold to a channel. - * Using media operations such as /play on a channel playing MOH in this manner will suspend MOH without resuming automatically. If continuing music on hold is desired, the stasis application must reinitiate music on hold. - *********************************************************/ -private void buildStartMoh(String channelId, String mohClass) { -reset(); -url = "/channels/" + channelId + "/moh"; -method = "POST"; -lParamQuery.add( HttpParam.build( "mohClass", mohClass) ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void startMoh(String channelId, String mohClass) throws RestException { -buildStartMoh(channelId, mohClass); -String json = httpActionSync(); -} - -@Override -public void startMoh(String channelId, String mohClass, AriCallback callback) { -buildStartMoh(channelId, mohClass); -httpActionAsync(callback); -} - -/********************************************************** - * Play music on hold to a channel - * - * Stop playing music on hold to a channel. - *********************************************************/ -private void buildStopMoh(String channelId) { -reset(); -url = "/channels/" + channelId + "/moh"; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void stopMoh(String channelId) throws RestException { -buildStopMoh(channelId); -String json = httpActionSync(); -} - -@Override -public void stopMoh(String channelId, AriCallback callback) { -buildStopMoh(channelId); -httpActionAsync(callback); -} - -/********************************************************** - * Mute a channel - * - * Mute a channel. - *********************************************************/ -private void buildMute(String channelId, String direction) { -reset(); -url = "/channels/" + channelId + "/mute"; -method = "POST"; -lParamQuery.add( HttpParam.build( "direction", direction) ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void mute(String channelId, String direction) throws RestException { -buildMute(channelId, direction); -String json = httpActionSync(); -} - -@Override -public void mute(String channelId, String direction, AriCallback callback) { -buildMute(channelId, direction); -httpActionAsync(callback); -} - -/********************************************************** - * Mute a channel - * - * Unmute a channel. - *********************************************************/ -private void buildUnmute(String channelId, String direction) { -reset(); -url = "/channels/" + channelId + "/mute"; -method = "DELETE"; -lParamQuery.add( HttpParam.build( "direction", direction) ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void unmute(String channelId, String direction) throws RestException { -buildUnmute(channelId, direction); -String json = httpActionSync(); -} - -@Override -public void unmute(String channelId, String direction, AriCallback callback) { -buildUnmute(channelId, direction); -httpActionAsync(callback); -} - -/********************************************************** - * Play media to a channel - * - * Start playback of media. - * The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.) - *********************************************************/ -private void buildPlay(String channelId, String media, String lang, int offsetms, int skipms, String playbackId) { -reset(); -url = "/channels/" + channelId + "/play"; -method = "POST"; -lParamQuery.add( HttpParam.build( "media", media) ); -lParamQuery.add( HttpParam.build( "lang", lang) ); -lParamQuery.add( HttpParam.build( "offsetms", offsetms) ); -lParamQuery.add( HttpParam.build( "skipms", skipms) ); -lParamQuery.add( HttpParam.build( "playbackId", playbackId) ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public Playback play(String channelId, String media, String lang, int offsetms, int skipms, String playbackId) throws RestException { -buildPlay(channelId, media, lang, offsetms, skipms, playbackId); -String json = httpActionSync(); -return deserializeJson( json, Playback_impl_ari_1_7_0.class ); -} - -@Override -public void play(String channelId, String media, String lang, int offsetms, int skipms, String playbackId, AriCallback callback) { -buildPlay(channelId, media, lang, offsetms, skipms, playbackId); -httpActionAsync(callback, Playback_impl_ari_1_7_0.class); -} - -/********************************************************** - * Play media to a channel - * - * Start playback of media and specify the playbackId. - * The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.) - *********************************************************/ -private void buildPlayWithId(String channelId, String playbackId, String media, String lang, int offsetms, int skipms) { -reset(); -url = "/channels/" + channelId + "/play/" + playbackId + ""; -method = "POST"; -lParamQuery.add( HttpParam.build( "media", media) ); -lParamQuery.add( HttpParam.build( "lang", lang) ); -lParamQuery.add( HttpParam.build( "offsetms", offsetms) ); -lParamQuery.add( HttpParam.build( "skipms", skipms) ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public Playback playWithId(String channelId, String playbackId, String media, String lang, int offsetms, int skipms) throws RestException { -buildPlayWithId(channelId, playbackId, media, lang, offsetms, skipms); -String json = httpActionSync(); -return deserializeJson( json, Playback_impl_ari_1_7_0.class ); -} - -@Override -public void playWithId(String channelId, String playbackId, String media, String lang, int offsetms, int skipms, AriCallback callback) { -buildPlayWithId(channelId, playbackId, media, lang, offsetms, skipms); -httpActionAsync(callback, Playback_impl_ari_1_7_0.class); -} - -/********************************************************** - * Record audio from a channel - * - * Start a recording. - * 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. - *********************************************************/ -private void buildRecord(String channelId, String name, String format, int maxDurationSeconds, int maxSilenceSeconds, String ifExists, boolean beep, String terminateOn) { -reset(); -url = "/channels/" + channelId + "/record"; -method = "POST"; -lParamQuery.add( HttpParam.build( "name", name) ); -lParamQuery.add( HttpParam.build( "format", format) ); -lParamQuery.add( HttpParam.build( "maxDurationSeconds", maxDurationSeconds) ); -lParamQuery.add( HttpParam.build( "maxSilenceSeconds", maxSilenceSeconds) ); -lParamQuery.add( HttpParam.build( "ifExists", ifExists) ); -lParamQuery.add( HttpParam.build( "beep", beep) ); -lParamQuery.add( HttpParam.build( "terminateOn", terminateOn) ); -lE.add( HttpResponse.build( 400, "Invalid parameters") ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "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") ); -lE.add( HttpResponse.build( 422, "The format specified is unknown on this system") ); -} - -@Override -public LiveRecording record(String channelId, String name, String format, int maxDurationSeconds, int maxSilenceSeconds, String ifExists, boolean beep, String terminateOn) throws RestException { -buildRecord(channelId, name, format, maxDurationSeconds, maxSilenceSeconds, ifExists, beep, terminateOn); -String json = httpActionSync(); -return deserializeJson( json, LiveRecording_impl_ari_1_7_0.class ); -} - -@Override -public void record(String channelId, String name, String format, int maxDurationSeconds, int maxSilenceSeconds, String ifExists, boolean beep, String terminateOn, AriCallback callback) { -buildRecord(channelId, name, format, maxDurationSeconds, maxSilenceSeconds, ifExists, beep, terminateOn); -httpActionAsync(callback, LiveRecording_impl_ari_1_7_0.class); -} - -/********************************************************** - * Send a ringing indication to a channel - * - * Indicate ringing to a channel. - *********************************************************/ -private void buildRing(String channelId) { -reset(); -url = "/channels/" + channelId + "/ring"; -method = "POST"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void ring(String channelId) throws RestException { -buildRing(channelId); -String json = httpActionSync(); -} - -@Override -public void ring(String channelId, AriCallback callback) { -buildRing(channelId); -httpActionAsync(callback); -} - -/********************************************************** - * Send a ringing indication to a channel - * - * Stop ringing indication on a channel if locally generated. - *********************************************************/ -private void buildRingStop(String channelId) { -reset(); -url = "/channels/" + channelId + "/ring"; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void ringStop(String channelId) throws RestException { -buildRingStop(channelId); -String json = httpActionSync(); -} - -@Override -public void ringStop(String channelId, AriCallback callback) { -buildRingStop(channelId); -httpActionAsync(callback); -} - -/********************************************************** - * Play silence to a channel - * - * Play silence to a channel. - * Using media operations such as /play on a channel playing silence in this manner will suspend silence without resuming automatically. - *********************************************************/ -private void buildStartSilence(String channelId) { -reset(); -url = "/channels/" + channelId + "/silence"; -method = "POST"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void startSilence(String channelId) throws RestException { -buildStartSilence(channelId); -String json = httpActionSync(); -} - -@Override -public void startSilence(String channelId, AriCallback callback) { -buildStartSilence(channelId); -httpActionAsync(callback); -} - -/********************************************************** - * Play silence to a channel - * - * Stop playing silence to a channel. - *********************************************************/ -private void buildStopSilence(String channelId) { -reset(); -url = "/channels/" + channelId + "/silence"; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void stopSilence(String channelId) throws RestException { -buildStopSilence(channelId); -String json = httpActionSync(); -} - -@Override -public void stopSilence(String channelId, AriCallback callback) { -buildStopSilence(channelId); -httpActionAsync(callback); -} - -/********************************************************** - * Snoop (spy/whisper) on a channel - * - * Start snooping. - * Snoop (spy/whisper) on a specific channel. - *********************************************************/ -private void buildSnoopChannel(String channelId, String spy, String whisper, String app, String appArgs, String snoopId) { -reset(); -url = "/channels/" + channelId + "/snoop"; -method = "POST"; -lParamQuery.add( HttpParam.build( "spy", spy) ); -lParamQuery.add( HttpParam.build( "whisper", whisper) ); -lParamQuery.add( HttpParam.build( "app", app) ); -lParamQuery.add( HttpParam.build( "appArgs", appArgs) ); -lParamQuery.add( HttpParam.build( "snoopId", snoopId) ); -lE.add( HttpResponse.build( 400, "Invalid parameters") ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -} - -@Override -public Channel snoopChannel(String channelId, String spy, String whisper, String app, String appArgs, String snoopId) throws RestException { -buildSnoopChannel(channelId, spy, whisper, app, appArgs, snoopId); -String json = httpActionSync(); -return deserializeJson( json, Channel_impl_ari_1_7_0.class ); -} - -@Override -public void snoopChannel(String channelId, String spy, String whisper, String app, String appArgs, String snoopId, AriCallback callback) { -buildSnoopChannel(channelId, spy, whisper, app, appArgs, snoopId); -httpActionAsync(callback, Channel_impl_ari_1_7_0.class); -} - -/********************************************************** - * Snoop (spy/whisper) on a channel - * - * Start snooping. - * Snoop (spy/whisper) on a specific channel. - *********************************************************/ -private void buildSnoopChannelWithId(String channelId, String snoopId, String spy, String whisper, String app, String appArgs) { -reset(); -url = "/channels/" + channelId + "/snoop/" + snoopId + ""; -method = "POST"; -lParamQuery.add( HttpParam.build( "spy", spy) ); -lParamQuery.add( HttpParam.build( "whisper", whisper) ); -lParamQuery.add( HttpParam.build( "app", app) ); -lParamQuery.add( HttpParam.build( "appArgs", appArgs) ); -lE.add( HttpResponse.build( 400, "Invalid parameters") ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -} - -@Override -public Channel snoopChannelWithId(String channelId, String snoopId, String spy, String whisper, String app, String appArgs) throws RestException { -buildSnoopChannelWithId(channelId, snoopId, spy, whisper, app, appArgs); -String json = httpActionSync(); -return deserializeJson( json, Channel_impl_ari_1_7_0.class ); -} - -@Override -public void snoopChannelWithId(String channelId, String snoopId, String spy, String whisper, String app, String appArgs, AriCallback callback) { -buildSnoopChannelWithId(channelId, snoopId, spy, whisper, app, appArgs); -httpActionAsync(callback, Channel_impl_ari_1_7_0.class); -} - -/********************************************************** - * Variables on a channel - * - * Get the value of a channel variable or function. - *********************************************************/ -private void buildGetChannelVar(String channelId, String variable) { -reset(); -url = "/channels/" + channelId + "/variable"; -method = "GET"; -lParamQuery.add( HttpParam.build( "variable", variable) ); -lE.add( HttpResponse.build( 400, "Missing variable parameter.") ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public Variable getChannelVar(String channelId, String variable) throws RestException { -buildGetChannelVar(channelId, variable); -String json = httpActionSync(); -return deserializeJson( json, Variable_impl_ari_1_7_0.class ); -} - -@Override -public void getChannelVar(String channelId, String variable, AriCallback callback) { -buildGetChannelVar(channelId, variable); -httpActionAsync(callback, Variable_impl_ari_1_7_0.class); -} - -/********************************************************** - * Variables on a channel - * - * Set the value of a channel variable or function. - *********************************************************/ -private void buildSetChannelVar(String channelId, String variable, String value) { -reset(); -url = "/channels/" + channelId + "/variable"; -method = "POST"; -lParamQuery.add( HttpParam.build( "variable", variable) ); -lParamQuery.add( HttpParam.build( "value", value) ); -lE.add( HttpResponse.build( 400, "Missing variable parameter.") ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void setChannelVar(String channelId, String variable, String value) throws RestException { -buildSetChannelVar(channelId, variable, value); -String json = httpActionSync(); -} - -@Override -public void setChannelVar(String channelId, String variable, String value, AriCallback callback) { -buildSetChannelVar(channelId, variable, value); -httpActionAsync(callback); -} - -/********************************************************** - * - * - * @since ari_1_5_0 - *********************************************************/ -public void originateWithId(String channelId, String endpoint, String extension, String context, long priority, String app, String appArgs, String callerId, int timeout, Map variables, String otherChannelId, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_10_0 - *********************************************************/ -public void dial(String channelId, String caller, int timeout, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void snoopChannel(String channelId, String spy, String whisper, String app, String appArgs, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Dial a created channel. - * - * - * @since ari_1_10_0 - *********************************************************/ -public void dial(String channelId, String caller, int timeout) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void continueInDialplan(String channelId, String context, String extension, int priority, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_10_0 - *********************************************************/ -public void originateWithId(String channelId, String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String otherChannelId, String originator, String formats, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Start playback of media. - * 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.) - * - * @since ari_0_0_1 - *********************************************************/ -public Playback play(String channelId, String media, String lang, int offsetms, int skipms) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Exit application{ - throw new UnsupportedOperationException("Method availble from ..."); -}; continue execution in the dialplan. - * - * - * @since ari_0_0_1 - *********************************************************/ -public void continueInDialplan(String channelId, String context, String extension, int priority) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new channel (originate). - * 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. - * - * @since ari_1_10_0 - *********************************************************/ -public Channel originate(String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String channelId, String otherChannelId, String originator, String formats) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void originate(String endpoint, String extension, String context, long priority, String app, String appArgs, String callerId, int timeout, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Redirect the channel to a different location. - * - * - * @since ari_1_8_0 - *********************************************************/ -public void redirect(String channelId, String endpoint) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_8_0 - *********************************************************/ -public void redirect(String channelId, String endpoint, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create channel. - * - * - * @since ari_1_10_0 - *********************************************************/ -public Channel create(String endpoint, String app, String appArgs, String channelId, String otherChannelId, String originator, String formats) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_5_0 - *********************************************************/ -public void originate(String endpoint, String extension, String context, long priority, String app, String appArgs, String callerId, int timeout, Map variables, String channelId, String otherChannelId, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new channel (originate). - * 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. - * - * @since ari_0_0_1 - *********************************************************/ -public Channel originate(String endpoint, String extension, String context, long priority, String app, String appArgs, String callerId, int timeout) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new channel (originate with id). - * 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. - * - * @since ari_1_5_0 - *********************************************************/ -public Channel originateWithId(String channelId, String endpoint, String extension, String context, long priority, String app, String appArgs, String callerId, int timeout, Map variables, String otherChannelId) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new channel (originate with id). - * 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. - * - * @since ari_1_10_0 - *********************************************************/ -public Channel originateWithId(String channelId, String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String otherChannelId, String originator, String formats) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_10_0 - *********************************************************/ -public void create(String endpoint, String app, String appArgs, String channelId, String otherChannelId, String originator, String formats, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new channel (originate). - * 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. - * - * @since ari_1_5_0 - *********************************************************/ -public Channel originate(String endpoint, String extension, String context, long priority, String app, String appArgs, String callerId, int timeout, Map variables, String channelId, String otherChannelId) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void play(String channelId, String media, String lang, int offsetms, int skipms, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Start snooping. - * Snoop (spy/whisper) on a specific channel. - * - * @since ari_0_0_1 - *********************************************************/ -public Channel snoopChannel(String channelId, String spy, String whisper, String app, String appArgs) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_10_0 - *********************************************************/ -public void originate(String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String channelId, String otherChannelId, String originator, String formats, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/actions/ActionDeviceStates_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/actions/ActionDeviceStates_impl_ari_1_7_0.java deleted file mode 100644 index 03dbb2b9..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/actions/ActionDeviceStates_impl_ari_1_7_0.java +++ /dev/null @@ -1,131 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_7_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionDeviceStates_impl_ari_1_7_0 extends BaseAriAction implements ActionDeviceStates { -/********************************************************** - * Device states - * - * List all ARI controlled device states. - *********************************************************/ -private void buildList() { -reset(); -url = "/deviceStates"; -method = "GET"; -} - -@Override -public List list() throws RestException { -buildList(); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void list(AriCallback> callback) { -buildList(); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Device state - * - * Retrieve the current state of a device. - *********************************************************/ -private void buildGet(String deviceName) { -reset(); -url = "/deviceStates/" + deviceName + ""; -method = "GET"; -} - -@Override -public DeviceState get(String deviceName) throws RestException { -buildGet(deviceName); -String json = httpActionSync(); -return deserializeJson( json, DeviceState_impl_ari_1_7_0.class ); -} - -@Override -public void get(String deviceName, AriCallback callback) { -buildGet(deviceName); -httpActionAsync(callback, DeviceState_impl_ari_1_7_0.class); -} - -/********************************************************** - * Device state - * - * Change the state of a device controlled by ARI. (Note - implicitly creates the device state). - *********************************************************/ -private void buildUpdate(String deviceName, String deviceState) { -reset(); -url = "/deviceStates/" + deviceName + ""; -method = "PUT"; -lParamQuery.add( HttpParam.build( "deviceState", deviceState) ); -lE.add( HttpResponse.build( 404, "Device name is missing") ); -lE.add( HttpResponse.build( 409, "Uncontrolled device specified") ); -} - -@Override -public void update(String deviceName, String deviceState) throws RestException { -buildUpdate(deviceName, deviceState); -String json = httpActionSync(); -} - -@Override -public void update(String deviceName, String deviceState, AriCallback callback) { -buildUpdate(deviceName, deviceState); -httpActionAsync(callback); -} - -/********************************************************** - * Device state - * - * Destroy a device-state controlled by ARI. - *********************************************************/ -private void buildDelete(String deviceName) { -reset(); -url = "/deviceStates/" + deviceName + ""; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Device name is missing") ); -lE.add( HttpResponse.build( 409, "Uncontrolled device specified") ); -} - -@Override -public void delete(String deviceName) throws RestException { -buildDelete(deviceName); -String json = httpActionSync(); -} - -@Override -public void delete(String deviceName, AriCallback callback) { -buildDelete(deviceName); -httpActionAsync(callback); -} - -/** No missing signatures from interface */ -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/actions/ActionEndpoints_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/actions/ActionEndpoints_impl_ari_1_7_0.java deleted file mode 100644 index 3cb296ba..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/actions/ActionEndpoints_impl_ari_1_7_0.java +++ /dev/null @@ -1,164 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_7_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionEndpoints_impl_ari_1_7_0 extends BaseAriAction implements ActionEndpoints { -/********************************************************** - * Asterisk endpoints - * - * List all endpoints. - *********************************************************/ -private void buildList() { -reset(); -url = "/endpoints"; -method = "GET"; -} - -@Override -public List list() throws RestException { -buildList(); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void list(AriCallback> callback) { -buildList(); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Send a message to some technology URI or endpoint. - * - * Send a message to some technology URI or endpoint. - *********************************************************/ -private void buildSendMessage(String to, String from, String body, Map variables) { -reset(); -url = "/endpoints/sendMessage"; -method = "PUT"; -lParamQuery.add( HttpParam.build( "to", to) ); -lParamQuery.add( HttpParam.build( "from", from) ); -lParamQuery.add( HttpParam.build( "body", body) ); -lParamBody.addAll( HttpParam.build( "variables", variables) ); -lE.add( HttpResponse.build( 404, "Endpoint not found") ); -} - -@Override -public void sendMessage(String to, String from, String body, Map variables) throws RestException { -buildSendMessage(to, from, body, variables); -String json = httpActionSync(); -} - -@Override -public void sendMessage(String to, String from, String body, Map variables, AriCallback callback) { -buildSendMessage(to, from, body, variables); -httpActionAsync(callback); -} - -/********************************************************** - * Asterisk endpoints - * - * List available endoints for a given endpoint technology. - *********************************************************/ -private void buildListByTech(String tech) { -reset(); -url = "/endpoints/" + tech + ""; -method = "GET"; -lE.add( HttpResponse.build( 404, "Endpoints not found") ); -} - -@Override -public List listByTech(String tech) throws RestException { -buildListByTech(tech); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void listByTech(String tech, AriCallback> callback) { -buildListByTech(tech); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Single endpoint - * - * Details for an endpoint. - *********************************************************/ -private void buildGet(String tech, String resource) { -reset(); -url = "/endpoints/" + tech + "/" + resource + ""; -method = "GET"; -lE.add( HttpResponse.build( 400, "Invalid parameters for sending a message.") ); -lE.add( HttpResponse.build( 404, "Endpoints not found") ); -} - -@Override -public Endpoint get(String tech, String resource) throws RestException { -buildGet(tech, resource); -String json = httpActionSync(); -return deserializeJson( json, Endpoint_impl_ari_1_7_0.class ); -} - -@Override -public void get(String tech, String resource, AriCallback callback) { -buildGet(tech, resource); -httpActionAsync(callback, Endpoint_impl_ari_1_7_0.class); -} - -/********************************************************** - * Send a message to some endpoint in a technology. - * - * Send a message to some endpoint in a technology. - *********************************************************/ -private void buildSendMessageToEndpoint(String tech, String resource, String from, String body, Map variables) { -reset(); -url = "/endpoints/" + tech + "/" + resource + "/sendMessage"; -method = "PUT"; -lParamQuery.add( HttpParam.build( "from", from) ); -lParamQuery.add( HttpParam.build( "body", body) ); -lParamBody.addAll( HttpParam.build( "variables", variables) ); -lE.add( HttpResponse.build( 400, "Invalid parameters for sending a message.") ); -lE.add( HttpResponse.build( 404, "Endpoint not found") ); -} - -@Override -public void sendMessageToEndpoint(String tech, String resource, String from, String body, Map variables) throws RestException { -buildSendMessageToEndpoint(tech, resource, from, body, variables); -String json = httpActionSync(); -} - -@Override -public void sendMessageToEndpoint(String tech, String resource, String from, String body, Map variables, AriCallback callback) { -buildSendMessageToEndpoint(tech, resource, from, body, variables); -httpActionAsync(callback); -} - -/** No missing signatures from interface */ -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/actions/ActionEvents_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/actions/ActionEvents_impl_ari_1_7_0.java deleted file mode 100644 index 17c7516f..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/actions/ActionEvents_impl_ari_1_7_0.java +++ /dev/null @@ -1,102 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_7_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionEvents_impl_ari_1_7_0 extends BaseAriAction implements ActionEvents { -/********************************************************** - * Events from Asterisk to applications - * - * WebSocket connection for events. - *********************************************************/ -private void buildEventWebsocket(String app) { -reset(); -url = "/events"; -method = "GET"; -lParamQuery.add( HttpParam.build( "app", app) ); -wsUpgrade = true; -} - -@Override -public Message eventWebsocket(String app) throws RestException { -throw new RestException("No synchronous operation on WebSocket"); -} - -@Override -public void eventWebsocket(String app, AriCallback callback) { -buildEventWebsocket(app); -httpActionAsync(callback, Message_impl_ari_1_7_0.class); -} - -/********************************************************** - * Stasis application user events - * - * Generate a user event. - *********************************************************/ -private void buildUserEvent(String eventName, String application, String source, Map variables) { -reset(); -url = "/events/user/" + eventName + ""; -method = "POST"; -lParamQuery.add( HttpParam.build( "application", application) ); -lParamQuery.add( HttpParam.build( "source", source) ); -lParamBody.addAll( HttpParam.build( "variables", variables) ); -lE.add( HttpResponse.build( 404, "Application does not exist.") ); -lE.add( HttpResponse.build( 422, "Event source not found.") ); -lE.add( HttpResponse.build( 400, "Invalid even tsource URI or userevent data.") ); -} - -@Override -public void userEvent(String eventName, String application, String source, Map variables) throws RestException { -buildUserEvent(eventName, application, source, variables); -String json = httpActionSync(); -} - -@Override -public void userEvent(String eventName, String application, String source, Map variables, AriCallback callback) { -buildUserEvent(eventName, application, source, variables); -httpActionAsync(callback); -} - -/********************************************************** - * - * - * @since ari_1_9_0 - *********************************************************/ -public void eventWebsocket(String app, boolean subscribeAll, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * WebSocket connection for events. - * - * - * @since ari_1_9_0 - *********************************************************/ -public Message eventWebsocket(String app, boolean subscribeAll) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/actions/ActionPlaybacks_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/actions/ActionPlaybacks_impl_ari_1_7_0.java deleted file mode 100644 index bdf7ca39..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/actions/ActionPlaybacks_impl_ari_1_7_0.java +++ /dev/null @@ -1,107 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_7_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionPlaybacks_impl_ari_1_7_0 extends BaseAriAction implements ActionPlaybacks { -/********************************************************** - * Control object for a playback operation. - * - * Get a playback's details. - *********************************************************/ -private void buildGet(String playbackId) { -reset(); -url = "/playbacks/" + playbackId + ""; -method = "GET"; -lE.add( HttpResponse.build( 404, "The playback cannot be found") ); -} - -@Override -public Playback get(String playbackId) throws RestException { -buildGet(playbackId); -String json = httpActionSync(); -return deserializeJson( json, Playback_impl_ari_1_7_0.class ); -} - -@Override -public void get(String playbackId, AriCallback callback) { -buildGet(playbackId); -httpActionAsync(callback, Playback_impl_ari_1_7_0.class); -} - -/********************************************************** - * Control object for a playback operation. - * - * Stop a playback. - *********************************************************/ -private void buildStop(String playbackId) { -reset(); -url = "/playbacks/" + playbackId + ""; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "The playback cannot be found") ); -} - -@Override -public void stop(String playbackId) throws RestException { -buildStop(playbackId); -String json = httpActionSync(); -} - -@Override -public void stop(String playbackId, AriCallback callback) { -buildStop(playbackId); -httpActionAsync(callback); -} - -/********************************************************** - * Control object for a playback operation. - * - * Control a playback. - *********************************************************/ -private void buildControl(String playbackId, String operation) { -reset(); -url = "/playbacks/" + playbackId + "/control"; -method = "POST"; -lParamQuery.add( HttpParam.build( "operation", operation) ); -lE.add( HttpResponse.build( 400, "The provided operation parameter was invalid") ); -lE.add( HttpResponse.build( 404, "The playback cannot be found") ); -lE.add( HttpResponse.build( 409, "The operation cannot be performed in the playback's current state") ); -} - -@Override -public void control(String playbackId, String operation) throws RestException { -buildControl(playbackId, operation); -String json = httpActionSync(); -} - -@Override -public void control(String playbackId, String operation, AriCallback callback) { -buildControl(playbackId, operation); -httpActionAsync(callback); -} - -/** No missing signatures from interface */ -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/actions/ActionRecordings_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/actions/ActionRecordings_impl_ari_1_7_0.java deleted file mode 100644 index 64de0991..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/actions/ActionRecordings_impl_ari_1_7_0.java +++ /dev/null @@ -1,325 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_7_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionRecordings_impl_ari_1_7_0 extends BaseAriAction implements ActionRecordings { -/********************************************************** - * A recording that is in progress - * - * List live recordings. - *********************************************************/ -private void buildGetLive(String recordingName) { -reset(); -url = "/recordings/live/" + recordingName + ""; -method = "GET"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -} - -@Override -public LiveRecording getLive(String recordingName) throws RestException { -buildGetLive(recordingName); -String json = httpActionSync(); -return deserializeJson( json, LiveRecording_impl_ari_1_7_0.class ); -} - -@Override -public void getLive(String recordingName, AriCallback callback) { -buildGetLive(recordingName); -httpActionAsync(callback, LiveRecording_impl_ari_1_7_0.class); -} - -/********************************************************** - * A recording that is in progress - * - * Stop a live recording and discard it. - *********************************************************/ -private void buildCancel(String recordingName) { -reset(); -url = "/recordings/live/" + recordingName + ""; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -} - -@Override -public void cancel(String recordingName) throws RestException { -buildCancel(recordingName); -String json = httpActionSync(); -} - -@Override -public void cancel(String recordingName, AriCallback callback) { -buildCancel(recordingName); -httpActionAsync(callback); -} - -/********************************************************** - * - * - * Mute a live recording. - * Muting a recording suspends silence detection, which will be restarted when the recording is unmuted. - *********************************************************/ -private void buildMute(String recordingName) { -reset(); -url = "/recordings/live/" + recordingName + "/mute"; -method = "POST"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -lE.add( HttpResponse.build( 409, "Recording not in session") ); -} - -@Override -public void mute(String recordingName) throws RestException { -buildMute(recordingName); -String json = httpActionSync(); -} - -@Override -public void mute(String recordingName, AriCallback callback) { -buildMute(recordingName); -httpActionAsync(callback); -} - -/********************************************************** - * - * - * Unmute a live recording. - *********************************************************/ -private void buildUnmute(String recordingName) { -reset(); -url = "/recordings/live/" + recordingName + "/mute"; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -lE.add( HttpResponse.build( 409, "Recording not in session") ); -} - -@Override -public void unmute(String recordingName) throws RestException { -buildUnmute(recordingName); -String json = httpActionSync(); -} - -@Override -public void unmute(String recordingName, AriCallback callback) { -buildUnmute(recordingName); -httpActionAsync(callback); -} - -/********************************************************** - * - * - * Pause a live recording. - * Pausing a recording suspends silence detection, which will be restarted when the recording is unpaused. Paused time is not included in the accounting for maxDurationSeconds. - *********************************************************/ -private void buildPause(String recordingName) { -reset(); -url = "/recordings/live/" + recordingName + "/pause"; -method = "POST"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -lE.add( HttpResponse.build( 409, "Recording not in session") ); -} - -@Override -public void pause(String recordingName) throws RestException { -buildPause(recordingName); -String json = httpActionSync(); -} - -@Override -public void pause(String recordingName, AriCallback callback) { -buildPause(recordingName); -httpActionAsync(callback); -} - -/********************************************************** - * - * - * Unpause a live recording. - *********************************************************/ -private void buildUnpause(String recordingName) { -reset(); -url = "/recordings/live/" + recordingName + "/pause"; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -lE.add( HttpResponse.build( 409, "Recording not in session") ); -} - -@Override -public void unpause(String recordingName) throws RestException { -buildUnpause(recordingName); -String json = httpActionSync(); -} - -@Override -public void unpause(String recordingName, AriCallback callback) { -buildUnpause(recordingName); -httpActionAsync(callback); -} - -/********************************************************** - * - * - * Stop a live recording and store it. - *********************************************************/ -private void buildStop(String recordingName) { -reset(); -url = "/recordings/live/" + recordingName + "/stop"; -method = "POST"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -} - -@Override -public void stop(String recordingName) throws RestException { -buildStop(recordingName); -String json = httpActionSync(); -} - -@Override -public void stop(String recordingName, AriCallback callback) { -buildStop(recordingName); -httpActionAsync(callback); -} - -/********************************************************** - * Recordings - * - * List recordings that are complete. - *********************************************************/ -private void buildListStored() { -reset(); -url = "/recordings/stored"; -method = "GET"; -} - -@Override -public List listStored() throws RestException { -buildListStored(); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void listStored(AriCallback> callback) { -buildListStored(); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Individual recording - * - * Get a stored recording's details. - *********************************************************/ -private void buildGetStored(String recordingName) { -reset(); -url = "/recordings/stored/" + recordingName + ""; -method = "GET"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -} - -@Override -public StoredRecording getStored(String recordingName) throws RestException { -buildGetStored(recordingName); -String json = httpActionSync(); -return deserializeJson( json, StoredRecording_impl_ari_1_7_0.class ); -} - -@Override -public void getStored(String recordingName, AriCallback callback) { -buildGetStored(recordingName); -httpActionAsync(callback, StoredRecording_impl_ari_1_7_0.class); -} - -/********************************************************** - * Individual recording - * - * Delete a stored recording. - *********************************************************/ -private void buildDeleteStored(String recordingName) { -reset(); -url = "/recordings/stored/" + recordingName + ""; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -} - -@Override -public void deleteStored(String recordingName) throws RestException { -buildDeleteStored(recordingName); -String json = httpActionSync(); -} - -@Override -public void deleteStored(String recordingName, AriCallback callback) { -buildDeleteStored(recordingName); -httpActionAsync(callback); -} - -/********************************************************** - * Copy an individual recording - * - * Copy a stored recording. - *********************************************************/ -private void buildCopyStored(String recordingName, String destinationRecordingName) { -reset(); -url = "/recordings/stored/" + recordingName + "/copy"; -method = "POST"; -lParamQuery.add( HttpParam.build( "destinationRecordingName", destinationRecordingName) ); -lE.add( HttpResponse.build( 404, "Recording not found") ); -lE.add( HttpResponse.build( 409, "A recording with the same name already exists on the system") ); -} - -@Override -public StoredRecording copyStored(String recordingName, String destinationRecordingName) throws RestException { -buildCopyStored(recordingName, destinationRecordingName); -String json = httpActionSync(); -return deserializeJson( json, StoredRecording_impl_ari_1_7_0.class ); -} - -@Override -public void copyStored(String recordingName, String destinationRecordingName, AriCallback callback) { -buildCopyStored(recordingName, destinationRecordingName); -httpActionAsync(callback, StoredRecording_impl_ari_1_7_0.class); -} - -/********************************************************** - * - * - * @since ari_1_10_0 - *********************************************************/ -public void getStoredFile(String recordingName, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Get the file associated with the stored recording. - * - * - * @since ari_1_10_0 - *********************************************************/ -public byte[] getStoredFile(String recordingName) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/actions/ActionSounds_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/actions/ActionSounds_impl_ari_1_7_0.java deleted file mode 100644 index a118bc66..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/actions/ActionSounds_impl_ari_1_7_0.java +++ /dev/null @@ -1,82 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_7_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionSounds_impl_ari_1_7_0 extends BaseAriAction implements ActionSounds { -/********************************************************** - * Sounds - * - * List all sounds. - *********************************************************/ -private void buildList(String lang, String format) { -reset(); -url = "/sounds"; -method = "GET"; -lParamQuery.add( HttpParam.build( "lang", lang) ); -lParamQuery.add( HttpParam.build( "format", format) ); -} - -@Override -public List list(String lang, String format) throws RestException { -buildList(lang, format); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void list(String lang, String format, AriCallback> callback) { -buildList(lang, format); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Individual sound - * - * Get a sound's details. - *********************************************************/ -private void buildGet(String soundId) { -reset(); -url = "/sounds/" + soundId + ""; -method = "GET"; -} - -@Override -public Sound get(String soundId) throws RestException { -buildGet(soundId); -String json = httpActionSync(); -return deserializeJson( json, Sound_impl_ari_1_7_0.class ); -} - -@Override -public void get(String soundId, AriCallback callback) { -buildGet(soundId); -httpActionAsync(callback, Sound_impl_ari_1_7_0.class); -} - -/** No missing signatures from interface */ -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/ApplicationReplaced_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/ApplicationReplaced_impl_ari_1_7_0.java deleted file mode 100644 index e6e58a3a..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/ApplicationReplaced_impl_ari_1_7_0.java +++ /dev/null @@ -1,28 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that another WebSocket has taken over for an application. - * - * An 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. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ApplicationReplaced_impl_ari_1_7_0 extends Event_impl_ari_1_7_0 implements ApplicationReplaced, java.io.Serializable { -private static final long serialVersionUID = 1L; -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/Application_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/Application_impl_ari_1_7_0.java deleted file mode 100644 index dc21d6f5..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/Application_impl_ari_1_7_0.java +++ /dev/null @@ -1,81 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Details of a Stasis application - * - * Defined in file: applications.json - * Generated by: Model - *********************************************************/ - -public class Application_impl_ari_1_7_0 implements Application, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Id's for bridges subscribed to. */ - private List bridge_ids; - public List getBridge_ids() { - return bridge_ids; - } - - @JsonDeserialize( contentAs=String.class ) - public void setBridge_ids(List val ) { - bridge_ids = val; - } - - /** Id's for channels subscribed to. */ - private List channel_ids; - public List getChannel_ids() { - return channel_ids; - } - - @JsonDeserialize( contentAs=String.class ) - public void setChannel_ids(List val ) { - channel_ids = val; - } - - /** Names of the devices subscribed to. */ - private List device_names; - public List getDevice_names() { - return device_names; - } - - @JsonDeserialize( contentAs=String.class ) - public void setDevice_names(List val ) { - device_names = val; - } - - /** {tech}/{resource} for endpoints subscribed to. */ - private List endpoint_ids; - public List getEndpoint_ids() { - return endpoint_ids; - } - - @JsonDeserialize( contentAs=String.class ) - public void setEndpoint_ids(List val ) { - endpoint_ids = val; - } - - /** Name of this application */ - private String name; - public String getName() { - return name; - } - - @JsonDeserialize( as=String.class ) - public void setName(String val ) { - name = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/AsteriskInfo_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/AsteriskInfo_impl_ari_1_7_0.java deleted file mode 100644 index 029b1a8f..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/AsteriskInfo_impl_ari_1_7_0.java +++ /dev/null @@ -1,70 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Asterisk system information - * - * Defined in file: asterisk.json - * Generated by: Model - *********************************************************/ - -public class AsteriskInfo_impl_ari_1_7_0 implements AsteriskInfo, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Info about how Asterisk was built */ - private BuildInfo build; - public BuildInfo getBuild() { - return build; - } - - @JsonDeserialize( as=BuildInfo_impl_ari_1_7_0.class ) - public void setBuild(BuildInfo val ) { - build = val; - } - - /** Info about Asterisk configuration */ - private ConfigInfo config; - public ConfigInfo getConfig() { - return config; - } - - @JsonDeserialize( as=ConfigInfo_impl_ari_1_7_0.class ) - public void setConfig(ConfigInfo val ) { - config = val; - } - - /** Info about Asterisk status */ - private StatusInfo status; - public StatusInfo getStatus() { - return status; - } - - @JsonDeserialize( as=StatusInfo_impl_ari_1_7_0.class ) - public void setStatus(StatusInfo val ) { - status = val; - } - - /** Info about the system running Asterisk */ - private SystemInfo system; - public SystemInfo getSystem() { - return system; - } - - @JsonDeserialize( as=SystemInfo_impl_ari_1_7_0.class ) - public void setSystem(SystemInfo val ) { - system = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/BridgeAttendedTransfer_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/BridgeAttendedTransfer_impl_ari_1_7_0.java deleted file mode 100644 index 81a57565..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/BridgeAttendedTransfer_impl_ari_1_7_0.java +++ /dev/null @@ -1,202 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that an attended transfer has occurred. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class BridgeAttendedTransfer_impl_ari_1_7_0 extends Event_impl_ari_1_7_0 implements BridgeAttendedTransfer, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Application that has been transferred into */ - private String destination_application; - public String getDestination_application() { - return destination_application; - } - - @JsonDeserialize( as=String.class ) - public void setDestination_application(String val ) { - destination_application = val; - } - - /** Bridge that survived the merge result */ - private String destination_bridge; - public String getDestination_bridge() { - return destination_bridge; - } - - @JsonDeserialize( as=String.class ) - public void setDestination_bridge(String val ) { - destination_bridge = val; - } - - /** First leg of a link transfer result */ - private Channel destination_link_first_leg; - public Channel getDestination_link_first_leg() { - return destination_link_first_leg; - } - - @JsonDeserialize( as=Channel_impl_ari_1_7_0.class ) - public void setDestination_link_first_leg(Channel val ) { - destination_link_first_leg = val; - } - - /** Second leg of a link transfer result */ - private Channel destination_link_second_leg; - public Channel getDestination_link_second_leg() { - return destination_link_second_leg; - } - - @JsonDeserialize( as=Channel_impl_ari_1_7_0.class ) - public void setDestination_link_second_leg(Channel val ) { - destination_link_second_leg = val; - } - - /** Bridge that survived the threeway result */ - private Bridge destination_threeway_bridge; - public Bridge getDestination_threeway_bridge() { - return destination_threeway_bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_7_0.class ) - public void setDestination_threeway_bridge(Bridge val ) { - destination_threeway_bridge = val; - } - - /** Transferer channel that survived the threeway result */ - private Channel destination_threeway_channel; - public Channel getDestination_threeway_channel() { - return destination_threeway_channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_7_0.class ) - public void setDestination_threeway_channel(Channel val ) { - destination_threeway_channel = val; - } - - /** How the transfer was accomplished */ - private String destination_type; - public String getDestination_type() { - return destination_type; - } - - @JsonDeserialize( as=String.class ) - public void setDestination_type(String val ) { - destination_type = val; - } - - /** Whether the transfer was externally initiated or not */ - private boolean is_external; - public boolean getIs_external() { - return is_external; - } - - @JsonDeserialize( as=boolean.class ) - public void setIs_external(boolean val ) { - is_external = val; - } - - /** The channel that is replacing transferer_first_leg in the swap */ - private Channel replace_channel; - public Channel getReplace_channel() { - return replace_channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_7_0.class ) - public void setReplace_channel(Channel val ) { - replace_channel = val; - } - - /** The result of the transfer attempt */ - private String result; - public String getResult() { - return result; - } - - @JsonDeserialize( as=String.class ) - public void setResult(String val ) { - result = val; - } - - /** The channel that is being transferred to */ - private Channel transfer_target; - public Channel getTransfer_target() { - return transfer_target; - } - - @JsonDeserialize( as=Channel_impl_ari_1_7_0.class ) - public void setTransfer_target(Channel val ) { - transfer_target = val; - } - - /** The channel that is being transferred */ - private Channel transferee; - public Channel getTransferee() { - return transferee; - } - - @JsonDeserialize( as=Channel_impl_ari_1_7_0.class ) - public void setTransferee(Channel val ) { - transferee = val; - } - - /** First leg of the transferer */ - private Channel transferer_first_leg; - public Channel getTransferer_first_leg() { - return transferer_first_leg; - } - - @JsonDeserialize( as=Channel_impl_ari_1_7_0.class ) - public void setTransferer_first_leg(Channel val ) { - transferer_first_leg = val; - } - - /** Bridge the transferer first leg is in */ - private Bridge transferer_first_leg_bridge; - public Bridge getTransferer_first_leg_bridge() { - return transferer_first_leg_bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_7_0.class ) - public void setTransferer_first_leg_bridge(Bridge val ) { - transferer_first_leg_bridge = val; - } - - /** Second leg of the transferer */ - private Channel transferer_second_leg; - public Channel getTransferer_second_leg() { - return transferer_second_leg; - } - - @JsonDeserialize( as=Channel_impl_ari_1_7_0.class ) - public void setTransferer_second_leg(Channel val ) { - transferer_second_leg = val; - } - - /** Bridge the transferer second leg is in */ - private Bridge transferer_second_leg_bridge; - public Bridge getTransferer_second_leg_bridge() { - return transferer_second_leg_bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_7_0.class ) - public void setTransferer_second_leg_bridge(Bridge val ) { - transferer_second_leg_bridge = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/BridgeBlindTransfer_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/BridgeBlindTransfer_impl_ari_1_7_0.java deleted file mode 100644 index f24c0da3..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/BridgeBlindTransfer_impl_ari_1_7_0.java +++ /dev/null @@ -1,114 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a blind transfer has occurred. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class BridgeBlindTransfer_impl_ari_1_7_0 extends Event_impl_ari_1_7_0 implements BridgeBlindTransfer, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The bridge being transferred */ - private Bridge bridge; - public Bridge getBridge() { - return bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_7_0.class ) - public void setBridge(Bridge val ) { - bridge = val; - } - - /** The channel performing the blind transfer */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_7_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - - /** The context transferred to */ - private String context; - public String getContext() { - return context; - } - - @JsonDeserialize( as=String.class ) - public void setContext(String val ) { - context = val; - } - - /** The extension transferred to */ - private String exten; - public String getExten() { - return exten; - } - - @JsonDeserialize( as=String.class ) - public void setExten(String val ) { - exten = val; - } - - /** Whether the transfer was externally initiated or not */ - private boolean is_external; - public boolean getIs_external() { - return is_external; - } - - @JsonDeserialize( as=boolean.class ) - public void setIs_external(boolean val ) { - is_external = val; - } - - /** The channel that is replacing transferer when the transferee(s) can not be transferred directly */ - private Channel replace_channel; - public Channel getReplace_channel() { - return replace_channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_7_0.class ) - public void setReplace_channel(Channel val ) { - replace_channel = val; - } - - /** The result of the transfer attempt */ - private String result; - public String getResult() { - return result; - } - - @JsonDeserialize( as=String.class ) - public void setResult(String val ) { - result = val; - } - - /** The channel that is being transferred */ - private Channel transferee; - public Channel getTransferee() { - return transferee; - } - - @JsonDeserialize( as=Channel_impl_ari_1_7_0.class ) - public void setTransferee(Channel val ) { - transferee = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/BridgeCreated_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/BridgeCreated_impl_ari_1_7_0.java deleted file mode 100644 index 2a7cb2a3..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/BridgeCreated_impl_ari_1_7_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a bridge has been created. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class BridgeCreated_impl_ari_1_7_0 extends Event_impl_ari_1_7_0 implements BridgeCreated, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Bridge bridge; - public Bridge getBridge() { - return bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_7_0.class ) - public void setBridge(Bridge val ) { - bridge = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/BridgeDestroyed_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/BridgeDestroyed_impl_ari_1_7_0.java deleted file mode 100644 index d3c2e42a..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/BridgeDestroyed_impl_ari_1_7_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a bridge has been destroyed. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class BridgeDestroyed_impl_ari_1_7_0 extends Event_impl_ari_1_7_0 implements BridgeDestroyed, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Bridge bridge; - public Bridge getBridge() { - return bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_7_0.class ) - public void setBridge(Bridge val ) { - bridge = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/BridgeMerged_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/BridgeMerged_impl_ari_1_7_0.java deleted file mode 100644 index 737df25f..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/BridgeMerged_impl_ari_1_7_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that one bridge has merged into another. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class BridgeMerged_impl_ari_1_7_0 extends Event_impl_ari_1_7_0 implements BridgeMerged, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Bridge bridge; - public Bridge getBridge() { - return bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_7_0.class ) - public void setBridge(Bridge val ) { - bridge = val; - } - - /** */ - private Bridge bridge_from; - public Bridge getBridge_from() { - return bridge_from; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_7_0.class ) - public void setBridge_from(Bridge val ) { - bridge_from = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/Bridge_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/Bridge_impl_ari_1_7_0.java deleted file mode 100644 index 37710232..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/Bridge_impl_ari_1_7_0.java +++ /dev/null @@ -1,105 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * The merging of media from one or more channels. - * - * Everyone on the bridge receives the same audio. - * - * Defined in file: bridges.json - * Generated by: Model - *********************************************************/ - -public class Bridge_impl_ari_1_7_0 implements Bridge, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Bridging class */ - private String bridge_class; - public String getBridge_class() { - return bridge_class; - } - - @JsonDeserialize( as=String.class ) - public void setBridge_class(String val ) { - bridge_class = val; - } - - /** Type of bridge technology */ - private String bridge_type; - public String getBridge_type() { - return bridge_type; - } - - @JsonDeserialize( as=String.class ) - public void setBridge_type(String val ) { - bridge_type = val; - } - - /** Ids of channels participating in this bridge */ - private List channels; - public List getChannels() { - return channels; - } - - @JsonDeserialize( contentAs=String.class ) - public void setChannels(List val ) { - channels = val; - } - - /** Entity that created the bridge */ - private String creator; - public String getCreator() { - return creator; - } - - @JsonDeserialize( as=String.class ) - public void setCreator(String val ) { - creator = val; - } - - /** Unique identifier for this bridge */ - private String id; - public String getId() { - return id; - } - - @JsonDeserialize( as=String.class ) - public void setId(String val ) { - id = val; - } - - /** Name the creator gave the bridge */ - private String name; - public String getName() { - return name; - } - - @JsonDeserialize( as=String.class ) - public void setName(String val ) { - name = val; - } - - /** Name of the current bridging technology */ - private String technology; - public String getTechnology() { - return technology; - } - - @JsonDeserialize( as=String.class ) - public void setTechnology(String val ) { - technology = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/BuildInfo_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/BuildInfo_impl_ari_1_7_0.java deleted file mode 100644 index fd216629..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/BuildInfo_impl_ari_1_7_0.java +++ /dev/null @@ -1,92 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Info about how Asterisk was built - * - * Defined in file: asterisk.json - * Generated by: Model - *********************************************************/ - -public class BuildInfo_impl_ari_1_7_0 implements BuildInfo, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Date and time when Asterisk was built. */ - private String date; - public String getDate() { - return date; - } - - @JsonDeserialize( as=String.class ) - public void setDate(String val ) { - date = val; - } - - /** Kernel version Asterisk was built on. */ - private String kernel; - public String getKernel() { - return kernel; - } - - @JsonDeserialize( as=String.class ) - public void setKernel(String val ) { - kernel = val; - } - - /** Machine architecture (x86_64, i686, ppc, etc.) */ - private String machine; - public String getMachine() { - return machine; - } - - @JsonDeserialize( as=String.class ) - public void setMachine(String val ) { - machine = val; - } - - /** Compile time options, or empty string if default. */ - private String options; - public String getOptions() { - return options; - } - - @JsonDeserialize( as=String.class ) - public void setOptions(String val ) { - options = val; - } - - /** OS Asterisk was built on. */ - private String os; - public String getOs() { - return os; - } - - @JsonDeserialize( as=String.class ) - public void setOs(String val ) { - os = val; - } - - /** Username that build Asterisk */ - private String user; - public String getUser() { - return user; - } - - @JsonDeserialize( as=String.class ) - public void setUser(String val ) { - user = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/CallerID_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/CallerID_impl_ari_1_7_0.java deleted file mode 100644 index b3333fa3..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/CallerID_impl_ari_1_7_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Caller identification - * - * Defined in file: channels.json - * Generated by: Model - *********************************************************/ - -public class CallerID_impl_ari_1_7_0 implements CallerID, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private String name; - public String getName() { - return name; - } - - @JsonDeserialize( as=String.class ) - public void setName(String val ) { - name = val; - } - - /** */ - private String number; - public String getNumber() { - return number; - } - - @JsonDeserialize( as=String.class ) - public void setNumber(String val ) { - number = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/ChannelCallerId_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/ChannelCallerId_impl_ari_1_7_0.java deleted file mode 100644 index 04452601..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/ChannelCallerId_impl_ari_1_7_0.java +++ /dev/null @@ -1,59 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Channel changed Caller ID. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelCallerId_impl_ari_1_7_0 extends Event_impl_ari_1_7_0 implements ChannelCallerId, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The integer representation of the Caller Presentation value. */ - private int caller_presentation; - public int getCaller_presentation() { - return caller_presentation; - } - - @JsonDeserialize( as=int.class ) - public void setCaller_presentation(int val ) { - caller_presentation = val; - } - - /** The text representation of the Caller Presentation value. */ - private String caller_presentation_txt; - public String getCaller_presentation_txt() { - return caller_presentation_txt; - } - - @JsonDeserialize( as=String.class ) - public void setCaller_presentation_txt(String val ) { - caller_presentation_txt = val; - } - - /** The channel that changed Caller ID. */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_7_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/ChannelConnectedLine_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/ChannelConnectedLine_impl_ari_1_7_0.java deleted file mode 100644 index 8c5c1290..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/ChannelConnectedLine_impl_ari_1_7_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Channel changed Connected Line. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelConnectedLine_impl_ari_1_7_0 extends Event_impl_ari_1_7_0 implements ChannelConnectedLine, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The channel whose connected line has changed. */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_7_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/ChannelCreated_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/ChannelCreated_impl_ari_1_7_0.java deleted file mode 100644 index 78a2eb9c..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/ChannelCreated_impl_ari_1_7_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a channel has been created. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelCreated_impl_ari_1_7_0 extends Event_impl_ari_1_7_0 implements ChannelCreated, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_7_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/ChannelDestroyed_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/ChannelDestroyed_impl_ari_1_7_0.java deleted file mode 100644 index 8cf2fc7b..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/ChannelDestroyed_impl_ari_1_7_0.java +++ /dev/null @@ -1,59 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a channel has been destroyed. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelDestroyed_impl_ari_1_7_0 extends Event_impl_ari_1_7_0 implements ChannelDestroyed, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Integer representation of the cause of the hangup */ - private int cause; - public int getCause() { - return cause; - } - - @JsonDeserialize( as=int.class ) - public void setCause(int val ) { - cause = val; - } - - /** Text representation of the cause of the hangup */ - private String cause_txt; - public String getCause_txt() { - return cause_txt; - } - - @JsonDeserialize( as=String.class ) - public void setCause_txt(String val ) { - cause_txt = val; - } - - /** */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_7_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/ChannelDialplan_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/ChannelDialplan_impl_ari_1_7_0.java deleted file mode 100644 index 02d6b22d..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/ChannelDialplan_impl_ari_1_7_0.java +++ /dev/null @@ -1,59 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Channel changed location in the dialplan. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelDialplan_impl_ari_1_7_0 extends Event_impl_ari_1_7_0 implements ChannelDialplan, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The channel that changed dialplan location. */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_7_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - - /** The application about to be executed. */ - private String dialplan_app; - public String getDialplan_app() { - return dialplan_app; - } - - @JsonDeserialize( as=String.class ) - public void setDialplan_app(String val ) { - dialplan_app = val; - } - - /** The data to be passed to the application. */ - private String dialplan_app_data; - public String getDialplan_app_data() { - return dialplan_app_data; - } - - @JsonDeserialize( as=String.class ) - public void setDialplan_app_data(String val ) { - dialplan_app_data = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/ChannelDtmfReceived_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/ChannelDtmfReceived_impl_ari_1_7_0.java deleted file mode 100644 index cb323120..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/ChannelDtmfReceived_impl_ari_1_7_0.java +++ /dev/null @@ -1,61 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * DTMF received on a channel. - * - * This event is sent when the DTMF ends. There is no notification about the start of DTMF - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelDtmfReceived_impl_ari_1_7_0 extends Event_impl_ari_1_7_0 implements ChannelDtmfReceived, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The channel on which DTMF was received */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_7_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - - /** DTMF digit received (0-9, A-E, # or *) */ - private String digit; - public String getDigit() { - return digit; - } - - @JsonDeserialize( as=String.class ) - public void setDigit(String val ) { - digit = val; - } - - /** Number of milliseconds DTMF was received */ - private int duration_ms; - public int getDuration_ms() { - return duration_ms; - } - - @JsonDeserialize( as=int.class ) - public void setDuration_ms(int val ) { - duration_ms = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/ChannelEnteredBridge_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/ChannelEnteredBridge_impl_ari_1_7_0.java deleted file mode 100644 index 47ac6c05..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/ChannelEnteredBridge_impl_ari_1_7_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a channel has entered a bridge. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelEnteredBridge_impl_ari_1_7_0 extends Event_impl_ari_1_7_0 implements ChannelEnteredBridge, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Bridge bridge; - public Bridge getBridge() { - return bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_7_0.class ) - public void setBridge(Bridge val ) { - bridge = val; - } - - /** */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_7_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/ChannelHangupRequest_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/ChannelHangupRequest_impl_ari_1_7_0.java deleted file mode 100644 index 262b5512..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/ChannelHangupRequest_impl_ari_1_7_0.java +++ /dev/null @@ -1,59 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A hangup was requested on the channel. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelHangupRequest_impl_ari_1_7_0 extends Event_impl_ari_1_7_0 implements ChannelHangupRequest, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Integer representation of the cause of the hangup. */ - private int cause; - public int getCause() { - return cause; - } - - @JsonDeserialize( as=int.class ) - public void setCause(int val ) { - cause = val; - } - - /** The channel on which the hangup was requested. */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_7_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - - /** Whether the hangup request was a soft hangup request. */ - private boolean soft; - public boolean getSoft() { - return soft; - } - - @JsonDeserialize( as=boolean.class ) - public void setSoft(boolean val ) { - soft = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/ChannelLeftBridge_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/ChannelLeftBridge_impl_ari_1_7_0.java deleted file mode 100644 index 48976e08..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/ChannelLeftBridge_impl_ari_1_7_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a channel has left a bridge. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelLeftBridge_impl_ari_1_7_0 extends Event_impl_ari_1_7_0 implements ChannelLeftBridge, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Bridge bridge; - public Bridge getBridge() { - return bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_7_0.class ) - public void setBridge(Bridge val ) { - bridge = val; - } - - /** */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_7_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/ChannelStateChange_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/ChannelStateChange_impl_ari_1_7_0.java deleted file mode 100644 index 59facace..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/ChannelStateChange_impl_ari_1_7_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification of a channel's state change. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelStateChange_impl_ari_1_7_0 extends Event_impl_ari_1_7_0 implements ChannelStateChange, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_7_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/ChannelTalkingFinished_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/ChannelTalkingFinished_impl_ari_1_7_0.java deleted file mode 100644 index 704c9cc4..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/ChannelTalkingFinished_impl_ari_1_7_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Talking is no longer detected on the channel. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelTalkingFinished_impl_ari_1_7_0 extends Event_impl_ari_1_7_0 implements ChannelTalkingFinished, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The channel on which talking completed. */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_7_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - - /** The length of time, in milliseconds, that talking was detected on the channel */ - private int duration; - public int getDuration() { - return duration; - } - - @JsonDeserialize( as=int.class ) - public void setDuration(int val ) { - duration = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/ChannelTalkingStarted_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/ChannelTalkingStarted_impl_ari_1_7_0.java deleted file mode 100644 index 67cc085a..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/ChannelTalkingStarted_impl_ari_1_7_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Talking was detected on the channel. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelTalkingStarted_impl_ari_1_7_0 extends Event_impl_ari_1_7_0 implements ChannelTalkingStarted, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The channel on which talking started. */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_7_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/ChannelUserevent_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/ChannelUserevent_impl_ari_1_7_0.java deleted file mode 100644 index 6dbdb4b1..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/ChannelUserevent_impl_ari_1_7_0.java +++ /dev/null @@ -1,81 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * User-generated event with additional user-defined fields in the object. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelUserevent_impl_ari_1_7_0 extends Event_impl_ari_1_7_0 implements ChannelUserevent, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** A bridge that is signaled with the user event. */ - private Bridge bridge; - public Bridge getBridge() { - return bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_7_0.class ) - public void setBridge(Bridge val ) { - bridge = val; - } - - /** A channel that is signaled with the user event. */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_7_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - - /** A endpoint that is signaled with the user event. */ - private Endpoint endpoint; - public Endpoint getEndpoint() { - return endpoint; - } - - @JsonDeserialize( as=Endpoint_impl_ari_1_7_0.class ) - public void setEndpoint(Endpoint val ) { - endpoint = val; - } - - /** The name of the user event. */ - private String eventname; - public String getEventname() { - return eventname; - } - - @JsonDeserialize( as=String.class ) - public void setEventname(String val ) { - eventname = val; - } - - /** Custom Userevent data */ - private String userevent; - public String getUserevent() { - return userevent; - } - - @JsonDeserialize( as=String.class ) - public void setUserevent(String val ) { - userevent = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/ChannelVarset_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/ChannelVarset_impl_ari_1_7_0.java deleted file mode 100644 index ea6d1a2f..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/ChannelVarset_impl_ari_1_7_0.java +++ /dev/null @@ -1,61 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Channel variable changed. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelVarset_impl_ari_1_7_0 extends Event_impl_ari_1_7_0 implements ChannelVarset, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The channel on which the variable was set. - -If missing, the variable is a global variable. */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_7_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - - /** The new value of the variable. */ - private String value; - public String getValue() { - return value; - } - - @JsonDeserialize( as=String.class ) - public void setValue(String val ) { - value = val; - } - - /** The variable that changed. */ - private String variable; - public String getVariable() { - return variable; - } - - @JsonDeserialize( as=String.class ) - public void setVariable(String val ) { - variable = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/Channel_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/Channel_impl_ari_1_7_0.java deleted file mode 100644 index eb3cf5b9..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/Channel_impl_ari_1_7_0.java +++ /dev/null @@ -1,127 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A specific communication connection between Asterisk and an Endpoint. - * - * Defined in file: channels.json - * Generated by: Model - *********************************************************/ - -public class Channel_impl_ari_1_7_0 implements Channel, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private String accountcode; - public String getAccountcode() { - return accountcode; - } - - @JsonDeserialize( as=String.class ) - public void setAccountcode(String val ) { - accountcode = val; - } - - /** */ - private CallerID caller; - public CallerID getCaller() { - return caller; - } - - @JsonDeserialize( as=CallerID_impl_ari_1_7_0.class ) - public void setCaller(CallerID val ) { - caller = val; - } - - /** */ - private CallerID connected; - public CallerID getConnected() { - return connected; - } - - @JsonDeserialize( as=CallerID_impl_ari_1_7_0.class ) - public void setConnected(CallerID val ) { - connected = val; - } - - /** Timestamp when channel was created */ - private Date creationtime; - public Date getCreationtime() { - return creationtime; - } - - @JsonDeserialize( as=Date.class ) - public void setCreationtime(Date val ) { - creationtime = val; - } - - /** Current location in the dialplan */ - private DialplanCEP dialplan; - public DialplanCEP getDialplan() { - return dialplan; - } - - @JsonDeserialize( as=DialplanCEP_impl_ari_1_7_0.class ) - public void setDialplan(DialplanCEP val ) { - dialplan = val; - } - - /** Unique identifier of the channel. - -This is the same as the Uniqueid field in AMI. */ - private String id; - public String getId() { - return id; - } - - @JsonDeserialize( as=String.class ) - public void setId(String val ) { - id = val; - } - - /** The default spoken language */ - private String language; - public String getLanguage() { - return language; - } - - @JsonDeserialize( as=String.class ) - public void setLanguage(String val ) { - language = val; - } - - /** Name of the channel (i.e. SIP/foo-0000a7e3) */ - private String name; - public String getName() { - return name; - } - - @JsonDeserialize( as=String.class ) - public void setName(String val ) { - name = val; - } - - /** */ - private String state; - public String getState() { - return state; - } - - @JsonDeserialize( as=String.class ) - public void setState(String val ) { - state = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/ConfigInfo_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/ConfigInfo_impl_ari_1_7_0.java deleted file mode 100644 index b71aad27..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/ConfigInfo_impl_ari_1_7_0.java +++ /dev/null @@ -1,92 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Info about Asterisk configuration - * - * Defined in file: asterisk.json - * Generated by: Model - *********************************************************/ - -public class ConfigInfo_impl_ari_1_7_0 implements ConfigInfo, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Default language for media playback. */ - private String default_language; - public String getDefault_language() { - return default_language; - } - - @JsonDeserialize( as=String.class ) - public void setDefault_language(String val ) { - default_language = val; - } - - /** Maximum number of simultaneous channels. */ - private int max_channels; - public int getMax_channels() { - return max_channels; - } - - @JsonDeserialize( as=int.class ) - public void setMax_channels(int val ) { - max_channels = val; - } - - /** Maximum load avg on system. */ - private double max_load; - public double getMax_load() { - return max_load; - } - - @JsonDeserialize( as=double.class ) - public void setMax_load(double val ) { - max_load = val; - } - - /** Maximum number of open file handles (files, sockets). */ - private int max_open_files; - public int getMax_open_files() { - return max_open_files; - } - - @JsonDeserialize( as=int.class ) - public void setMax_open_files(int val ) { - max_open_files = val; - } - - /** Asterisk system name. */ - private String name; - public String getName() { - return name; - } - - @JsonDeserialize( as=String.class ) - public void setName(String val ) { - name = val; - } - - /** Effective user/group id for running Asterisk. */ - private SetId setid; - public SetId getSetid() { - return setid; - } - - @JsonDeserialize( as=SetId_impl_ari_1_7_0.class ) - public void setSetid(SetId val ) { - setid = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/DeviceStateChanged_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/DeviceStateChanged_impl_ari_1_7_0.java deleted file mode 100644 index db0bdf82..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/DeviceStateChanged_impl_ari_1_7_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a device state has changed. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class DeviceStateChanged_impl_ari_1_7_0 extends Event_impl_ari_1_7_0 implements DeviceStateChanged, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Device state object */ - private DeviceState device_state; - public DeviceState getDevice_state() { - return device_state; - } - - @JsonDeserialize( as=DeviceState_impl_ari_1_7_0.class ) - public void setDevice_state(DeviceState val ) { - device_state = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/DeviceState_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/DeviceState_impl_ari_1_7_0.java deleted file mode 100644 index 11acc1b9..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/DeviceState_impl_ari_1_7_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Represents the state of a device. - * - * Defined in file: deviceStates.json - * Generated by: Model - *********************************************************/ - -public class DeviceState_impl_ari_1_7_0 implements DeviceState, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Name of the device. */ - private String name; - public String getName() { - return name; - } - - @JsonDeserialize( as=String.class ) - public void setName(String val ) { - name = val; - } - - /** Device's state */ - private String state; - public String getState() { - return state; - } - - @JsonDeserialize( as=String.class ) - public void setState(String val ) { - state = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/Dial_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/Dial_impl_ari_1_7_0.java deleted file mode 100644 index 29b8d0dc..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/Dial_impl_ari_1_7_0.java +++ /dev/null @@ -1,92 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Dialing state has changed. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class Dial_impl_ari_1_7_0 extends Event_impl_ari_1_7_0 implements Dial, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The calling channel. */ - private Channel caller; - public Channel getCaller() { - return caller; - } - - @JsonDeserialize( as=Channel_impl_ari_1_7_0.class ) - public void setCaller(Channel val ) { - caller = val; - } - - /** Current status of the dialing attempt to the peer. */ - private String dialstatus; - public String getDialstatus() { - return dialstatus; - } - - @JsonDeserialize( as=String.class ) - public void setDialstatus(String val ) { - dialstatus = val; - } - - /** The dial string for calling the peer channel. */ - private String dialstring; - public String getDialstring() { - return dialstring; - } - - @JsonDeserialize( as=String.class ) - public void setDialstring(String val ) { - dialstring = val; - } - - /** Forwarding target requested by the original dialed channel. */ - private String forward; - public String getForward() { - return forward; - } - - @JsonDeserialize( as=String.class ) - public void setForward(String val ) { - forward = val; - } - - /** Channel that the caller has been forwarded to. */ - private Channel forwarded; - public Channel getForwarded() { - return forwarded; - } - - @JsonDeserialize( as=Channel_impl_ari_1_7_0.class ) - public void setForwarded(Channel val ) { - forwarded = val; - } - - /** The dialed channel. */ - private Channel peer; - public Channel getPeer() { - return peer; - } - - @JsonDeserialize( as=Channel_impl_ari_1_7_0.class ) - public void setPeer(Channel val ) { - peer = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/Dialed_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/Dialed_impl_ari_1_7_0.java deleted file mode 100644 index 2e02fa5d..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/Dialed_impl_ari_1_7_0.java +++ /dev/null @@ -1,26 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Dialed channel information. - * - * Defined in file: channels.json - * Generated by: Model - *********************************************************/ - -public class Dialed_impl_ari_1_7_0 implements Dialed, java.io.Serializable { -private static final long serialVersionUID = 1L; -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/DialplanCEP_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/DialplanCEP_impl_ari_1_7_0.java deleted file mode 100644 index 57df82b5..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/DialplanCEP_impl_ari_1_7_0.java +++ /dev/null @@ -1,59 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Dialplan location (context/extension/priority) - * - * Defined in file: channels.json - * Generated by: Model - *********************************************************/ - -public class DialplanCEP_impl_ari_1_7_0 implements DialplanCEP, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Context in the dialplan */ - private String context; - public String getContext() { - return context; - } - - @JsonDeserialize( as=String.class ) - public void setContext(String val ) { - context = val; - } - - /** Extension in the dialplan */ - private String exten; - public String getExten() { - return exten; - } - - @JsonDeserialize( as=String.class ) - public void setExten(String val ) { - exten = val; - } - - /** Priority in the dialplan */ - private long priority; - public long getPriority() { - return priority; - } - - @JsonDeserialize( as=long.class ) - public void setPriority(long val ) { - priority = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/EndpointStateChange_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/EndpointStateChange_impl_ari_1_7_0.java deleted file mode 100644 index 9cd09f26..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/EndpointStateChange_impl_ari_1_7_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Endpoint state changed. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class EndpointStateChange_impl_ari_1_7_0 extends Event_impl_ari_1_7_0 implements EndpointStateChange, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Endpoint endpoint; - public Endpoint getEndpoint() { - return endpoint; - } - - @JsonDeserialize( as=Endpoint_impl_ari_1_7_0.class ) - public void setEndpoint(Endpoint val ) { - endpoint = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/Endpoint_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/Endpoint_impl_ari_1_7_0.java deleted file mode 100644 index ba53cfcd..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/Endpoint_impl_ari_1_7_0.java +++ /dev/null @@ -1,72 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * An external device that may offer/accept calls to/from Asterisk. - * - * Unlike most resources, which have a single unique identifier, an endpoint is uniquely identified by the technology/resource pair. - * - * Defined in file: endpoints.json - * Generated by: Model - *********************************************************/ - -public class Endpoint_impl_ari_1_7_0 implements Endpoint, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Id's of channels associated with this endpoint */ - private List channel_ids; - public List getChannel_ids() { - return channel_ids; - } - - @JsonDeserialize( contentAs=String.class ) - public void setChannel_ids(List val ) { - channel_ids = val; - } - - /** Identifier of the endpoint, specific to the given technology. */ - private String resource; - public String getResource() { - return resource; - } - - @JsonDeserialize( as=String.class ) - public void setResource(String val ) { - resource = val; - } - - /** Endpoint's state */ - private String state; - public String getState() { - return state; - } - - @JsonDeserialize( as=String.class ) - public void setState(String val ) { - state = val; - } - - /** Technology of the endpoint */ - private String technology; - public String getTechnology() { - return technology; - } - - @JsonDeserialize( as=String.class ) - public void setTechnology(String val ) { - technology = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/Event_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/Event_impl_ari_1_7_0.java deleted file mode 100644 index b65cc2aa..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/Event_impl_ari_1_7_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Base type for asynchronous events from Asterisk. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class Event_impl_ari_1_7_0 extends Message_impl_ari_1_7_0 implements Event, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Name of the application receiving the event. */ - private String application; - public String getApplication() { - return application; - } - - @JsonDeserialize( as=String.class ) - public void setApplication(String val ) { - application = val; - } - - /** Time at which this event was created. */ - private Date timestamp; - public Date getTimestamp() { - return timestamp; - } - - @JsonDeserialize( as=Date.class ) - public void setTimestamp(Date val ) { - timestamp = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/FormatLangPair_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/FormatLangPair_impl_ari_1_7_0.java deleted file mode 100644 index bfedfa78..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/FormatLangPair_impl_ari_1_7_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Identifies the format and language of a sound file - * - * Defined in file: sounds.json - * Generated by: Model - *********************************************************/ - -public class FormatLangPair_impl_ari_1_7_0 implements FormatLangPair, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private String format; - public String getFormat() { - return format; - } - - @JsonDeserialize( as=String.class ) - public void setFormat(String val ) { - format = val; - } - - /** */ - private String language; - public String getLanguage() { - return language; - } - - @JsonDeserialize( as=String.class ) - public void setLanguage(String val ) { - language = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/LiveRecording_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/LiveRecording_impl_ari_1_7_0.java deleted file mode 100644 index 37273720..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/LiveRecording_impl_ari_1_7_0.java +++ /dev/null @@ -1,114 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A recording that is in progress - * - * Defined in file: recordings.json - * Generated by: Model - *********************************************************/ - -public class LiveRecording_impl_ari_1_7_0 implements LiveRecording, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Cause for recording failure if failed */ - private String cause; - public String getCause() { - return cause; - } - - @JsonDeserialize( as=String.class ) - public void setCause(String val ) { - cause = val; - } - - /** Duration in seconds of the recording */ - private int duration; - public int getDuration() { - return duration; - } - - @JsonDeserialize( as=int.class ) - public void setDuration(int val ) { - duration = val; - } - - /** Recording format (wav, gsm, etc.) */ - private String format; - public String getFormat() { - return format; - } - - @JsonDeserialize( as=String.class ) - public void setFormat(String val ) { - format = val; - } - - /** Base name for the recording */ - private String name; - public String getName() { - return name; - } - - @JsonDeserialize( as=String.class ) - public void setName(String val ) { - name = val; - } - - /** Duration of silence, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds. */ - private int silence_duration; - public int getSilence_duration() { - return silence_duration; - } - - @JsonDeserialize( as=int.class ) - public void setSilence_duration(int val ) { - silence_duration = val; - } - - /** */ - private String state; - public String getState() { - return state; - } - - @JsonDeserialize( as=String.class ) - public void setState(String val ) { - state = val; - } - - /** Duration of talking, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds. */ - private int talking_duration; - public int getTalking_duration() { - return talking_duration; - } - - @JsonDeserialize( as=int.class ) - public void setTalking_duration(int val ) { - talking_duration = val; - } - - /** URI for the channel or bridge being recorded */ - private String target_uri; - public String getTarget_uri() { - return target_uri; - } - - @JsonDeserialize( as=String.class ) - public void setTarget_uri(String val ) { - target_uri = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/Message_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/Message_impl_ari_1_7_0.java deleted file mode 100644 index 1ed4cf6a..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/Message_impl_ari_1_7_0.java +++ /dev/null @@ -1,76 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonSubTypes.Type; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Base type for errors and events - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") - @JsonSubTypes({ @Type(value = MissingParams_impl_ari_1_7_0.class, name = "MissingParams") -, @Type(value = Event_impl_ari_1_7_0.class, name = "Event") -, @Type(value = DeviceStateChanged_impl_ari_1_7_0.class, name = "DeviceStateChanged") -, @Type(value = PlaybackStarted_impl_ari_1_7_0.class, name = "PlaybackStarted") -, @Type(value = PlaybackFinished_impl_ari_1_7_0.class, name = "PlaybackFinished") -, @Type(value = RecordingStarted_impl_ari_1_7_0.class, name = "RecordingStarted") -, @Type(value = RecordingFinished_impl_ari_1_7_0.class, name = "RecordingFinished") -, @Type(value = RecordingFailed_impl_ari_1_7_0.class, name = "RecordingFailed") -, @Type(value = ApplicationReplaced_impl_ari_1_7_0.class, name = "ApplicationReplaced") -, @Type(value = BridgeCreated_impl_ari_1_7_0.class, name = "BridgeCreated") -, @Type(value = BridgeDestroyed_impl_ari_1_7_0.class, name = "BridgeDestroyed") -, @Type(value = BridgeMerged_impl_ari_1_7_0.class, name = "BridgeMerged") -, @Type(value = BridgeBlindTransfer_impl_ari_1_7_0.class, name = "BridgeBlindTransfer") -, @Type(value = BridgeAttendedTransfer_impl_ari_1_7_0.class, name = "BridgeAttendedTransfer") -, @Type(value = ChannelCreated_impl_ari_1_7_0.class, name = "ChannelCreated") -, @Type(value = ChannelDestroyed_impl_ari_1_7_0.class, name = "ChannelDestroyed") -, @Type(value = ChannelEnteredBridge_impl_ari_1_7_0.class, name = "ChannelEnteredBridge") -, @Type(value = ChannelLeftBridge_impl_ari_1_7_0.class, name = "ChannelLeftBridge") -, @Type(value = ChannelStateChange_impl_ari_1_7_0.class, name = "ChannelStateChange") -, @Type(value = ChannelDtmfReceived_impl_ari_1_7_0.class, name = "ChannelDtmfReceived") -, @Type(value = ChannelDialplan_impl_ari_1_7_0.class, name = "ChannelDialplan") -, @Type(value = ChannelCallerId_impl_ari_1_7_0.class, name = "ChannelCallerId") -, @Type(value = ChannelUserevent_impl_ari_1_7_0.class, name = "ChannelUserevent") -, @Type(value = ChannelHangupRequest_impl_ari_1_7_0.class, name = "ChannelHangupRequest") -, @Type(value = ChannelVarset_impl_ari_1_7_0.class, name = "ChannelVarset") -, @Type(value = ChannelTalkingStarted_impl_ari_1_7_0.class, name = "ChannelTalkingStarted") -, @Type(value = ChannelTalkingFinished_impl_ari_1_7_0.class, name = "ChannelTalkingFinished") -, @Type(value = EndpointStateChange_impl_ari_1_7_0.class, name = "EndpointStateChange") -, @Type(value = Dial_impl_ari_1_7_0.class, name = "Dial") -, @Type(value = StasisEnd_impl_ari_1_7_0.class, name = "StasisEnd") -, @Type(value = StasisStart_impl_ari_1_7_0.class, name = "StasisStart") -, @Type(value = TextMessageReceived_impl_ari_1_7_0.class, name = "TextMessageReceived") -, @Type(value = ChannelConnectedLine_impl_ari_1_7_0.class, name = "ChannelConnectedLine") - }) - - -public class Message_impl_ari_1_7_0 implements Message, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Indicates the type of this message. */ - private String type; - public String getType() { - return type; - } - - @JsonDeserialize( as=String.class ) - public void setType(String val ) { - type = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/MissingParams_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/MissingParams_impl_ari_1_7_0.java deleted file mode 100644 index d1888fe4..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/MissingParams_impl_ari_1_7_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Error event sent when required params are missing. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class MissingParams_impl_ari_1_7_0 extends Message_impl_ari_1_7_0 implements MissingParams, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** A list of the missing parameters */ - private List params; - public List getParams() { - return params; - } - - @JsonDeserialize( contentAs=String.class ) - public void setParams(List val ) { - params = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/PlaybackFinished_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/PlaybackFinished_impl_ari_1_7_0.java deleted file mode 100644 index a94ac1a8..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/PlaybackFinished_impl_ari_1_7_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Event showing the completion of a media playback operation. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class PlaybackFinished_impl_ari_1_7_0 extends Event_impl_ari_1_7_0 implements PlaybackFinished, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Playback control object */ - private Playback playback; - public Playback getPlayback() { - return playback; - } - - @JsonDeserialize( as=Playback_impl_ari_1_7_0.class ) - public void setPlayback(Playback val ) { - playback = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/PlaybackStarted_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/PlaybackStarted_impl_ari_1_7_0.java deleted file mode 100644 index bdca7044..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/PlaybackStarted_impl_ari_1_7_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Event showing the start of a media playback operation. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class PlaybackStarted_impl_ari_1_7_0 extends Event_impl_ari_1_7_0 implements PlaybackStarted, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Playback control object */ - private Playback playback; - public Playback getPlayback() { - return playback; - } - - @JsonDeserialize( as=Playback_impl_ari_1_7_0.class ) - public void setPlayback(Playback val ) { - playback = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/Playback_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/Playback_impl_ari_1_7_0.java deleted file mode 100644 index 3c1fac80..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/Playback_impl_ari_1_7_0.java +++ /dev/null @@ -1,98 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Object representing the playback of media to a channel - * - * Defined in file: playbacks.json - * Generated by: Model - *********************************************************/ - -public class Playback_impl_ari_1_7_0 implements Playback, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** ID for this playback operation */ - private String id; - public String getId() { - return id; - } - - @JsonDeserialize( as=String.class ) - public void setId(String val ) { - id = val; - } - - /** For media types that support multiple languages, the language requested for playback. */ - private String language; - public String getLanguage() { - return language; - } - - @JsonDeserialize( as=String.class ) - public void setLanguage(String val ) { - language = val; - } - - /** URI for the media to play back. */ - private String media_uri; - public String getMedia_uri() { - return media_uri; - } - - @JsonDeserialize( as=String.class ) - public void setMedia_uri(String val ) { - media_uri = val; - } - - /** Current state of the playback operation. */ - private String state; - public String getState() { - return state; - } - - @JsonDeserialize( as=String.class ) - public void setState(String val ) { - state = val; - } - - /** URI for the channel or bridge to play the media on */ - private String target_uri; - public String getTarget_uri() { - return target_uri; - } - - @JsonDeserialize( as=String.class ) - public void setTarget_uri(String val ) { - target_uri = val; - } - -/********************************************************** - * If a list of URIs is being played, the next media URI to be played back. - * - * @since ari_1_10_0 - *********************************************************/ - public void setNext_media_uri(String val ){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * If a list of URIs is being played, the next media URI to be played back. - * - * @since ari_1_10_0 - *********************************************************/ - public String getNext_media_uri(){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/RecordingFailed_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/RecordingFailed_impl_ari_1_7_0.java deleted file mode 100644 index 1861d7e1..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/RecordingFailed_impl_ari_1_7_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Event showing failure of a recording operation. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class RecordingFailed_impl_ari_1_7_0 extends Event_impl_ari_1_7_0 implements RecordingFailed, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Recording control object */ - private LiveRecording recording; - public LiveRecording getRecording() { - return recording; - } - - @JsonDeserialize( as=LiveRecording_impl_ari_1_7_0.class ) - public void setRecording(LiveRecording val ) { - recording = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/RecordingFinished_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/RecordingFinished_impl_ari_1_7_0.java deleted file mode 100644 index 70ab0bf4..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/RecordingFinished_impl_ari_1_7_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Event showing the completion of a recording operation. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class RecordingFinished_impl_ari_1_7_0 extends Event_impl_ari_1_7_0 implements RecordingFinished, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Recording control object */ - private LiveRecording recording; - public LiveRecording getRecording() { - return recording; - } - - @JsonDeserialize( as=LiveRecording_impl_ari_1_7_0.class ) - public void setRecording(LiveRecording val ) { - recording = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/RecordingStarted_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/RecordingStarted_impl_ari_1_7_0.java deleted file mode 100644 index 31d7db82..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/RecordingStarted_impl_ari_1_7_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Event showing the start of a recording operation. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class RecordingStarted_impl_ari_1_7_0 extends Event_impl_ari_1_7_0 implements RecordingStarted, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Recording control object */ - private LiveRecording recording; - public LiveRecording getRecording() { - return recording; - } - - @JsonDeserialize( as=LiveRecording_impl_ari_1_7_0.class ) - public void setRecording(LiveRecording val ) { - recording = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/SetId_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/SetId_impl_ari_1_7_0.java deleted file mode 100644 index 53577f84..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/SetId_impl_ari_1_7_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Effective user/group id - * - * Defined in file: asterisk.json - * Generated by: Model - *********************************************************/ - -public class SetId_impl_ari_1_7_0 implements SetId, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Effective group id. */ - private String group; - public String getGroup() { - return group; - } - - @JsonDeserialize( as=String.class ) - public void setGroup(String val ) { - group = val; - } - - /** Effective user id. */ - private String user; - public String getUser() { - return user; - } - - @JsonDeserialize( as=String.class ) - public void setUser(String val ) { - user = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/Sound_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/Sound_impl_ari_1_7_0.java deleted file mode 100644 index 955853aa..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/Sound_impl_ari_1_7_0.java +++ /dev/null @@ -1,59 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A media file that may be played back. - * - * Defined in file: sounds.json - * Generated by: Model - *********************************************************/ - -public class Sound_impl_ari_1_7_0 implements Sound, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The formats and languages in which this sound is available. */ - private List formats; - public List getFormats() { - return formats; - } - - @JsonDeserialize( contentAs=FormatLangPair_impl_ari_1_7_0.class ) - public void setFormats(List val ) { - formats = val; - } - - /** Sound's identifier. */ - private String id; - public String getId() { - return id; - } - - @JsonDeserialize( as=String.class ) - public void setId(String val ) { - id = val; - } - - /** Text description of the sound, usually the words spoken. */ - private String text; - public String getText() { - return text; - } - - @JsonDeserialize( as=String.class ) - public void setText(String val ) { - text = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/StasisEnd_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/StasisEnd_impl_ari_1_7_0.java deleted file mode 100644 index ddd31a45..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/StasisEnd_impl_ari_1_7_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a channel has left a Stasis application. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class StasisEnd_impl_ari_1_7_0 extends Event_impl_ari_1_7_0 implements StasisEnd, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_7_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/StasisStart_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/StasisStart_impl_ari_1_7_0.java deleted file mode 100644 index ef3037e7..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/StasisStart_impl_ari_1_7_0.java +++ /dev/null @@ -1,59 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a channel has entered a Stasis application. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class StasisStart_impl_ari_1_7_0 extends Event_impl_ari_1_7_0 implements StasisStart, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Arguments to the application */ - private List args; - public List getArgs() { - return args; - } - - @JsonDeserialize( contentAs=String.class ) - public void setArgs(List val ) { - args = val; - } - - /** */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_7_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - - /** */ - private Channel replace_channel; - public Channel getReplace_channel() { - return replace_channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_7_0.class ) - public void setReplace_channel(Channel val ) { - replace_channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/StatusInfo_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/StatusInfo_impl_ari_1_7_0.java deleted file mode 100644 index 37ebd7af..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/StatusInfo_impl_ari_1_7_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Info about Asterisk status - * - * Defined in file: asterisk.json - * Generated by: Model - *********************************************************/ - -public class StatusInfo_impl_ari_1_7_0 implements StatusInfo, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Time when Asterisk was last reloaded. */ - private Date last_reload_time; - public Date getLast_reload_time() { - return last_reload_time; - } - - @JsonDeserialize( as=Date.class ) - public void setLast_reload_time(Date val ) { - last_reload_time = val; - } - - /** Time when Asterisk was started. */ - private Date startup_time; - public Date getStartup_time() { - return startup_time; - } - - @JsonDeserialize( as=Date.class ) - public void setStartup_time(Date val ) { - startup_time = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/StoredRecording_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/StoredRecording_impl_ari_1_7_0.java deleted file mode 100644 index a60ab34c..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/StoredRecording_impl_ari_1_7_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A past recording that may be played back. - * - * Defined in file: recordings.json - * Generated by: Model - *********************************************************/ - -public class StoredRecording_impl_ari_1_7_0 implements StoredRecording, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private String format; - public String getFormat() { - return format; - } - - @JsonDeserialize( as=String.class ) - public void setFormat(String val ) { - format = val; - } - - /** */ - private String name; - public String getName() { - return name; - } - - @JsonDeserialize( as=String.class ) - public void setName(String val ) { - name = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/SystemInfo_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/SystemInfo_impl_ari_1_7_0.java deleted file mode 100644 index 03645f33..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/SystemInfo_impl_ari_1_7_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Info about Asterisk - * - * Defined in file: asterisk.json - * Generated by: Model - *********************************************************/ - -public class SystemInfo_impl_ari_1_7_0 implements SystemInfo, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private String entity_id; - public String getEntity_id() { - return entity_id; - } - - @JsonDeserialize( as=String.class ) - public void setEntity_id(String val ) { - entity_id = val; - } - - /** Asterisk version. */ - private String version; - public String getVersion() { - return version; - } - - @JsonDeserialize( as=String.class ) - public void setVersion(String val ) { - version = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/TextMessageReceived_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/TextMessageReceived_impl_ari_1_7_0.java deleted file mode 100644 index 8882b0f6..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/TextMessageReceived_impl_ari_1_7_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A text message was received from an endpoint. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class TextMessageReceived_impl_ari_1_7_0 extends Event_impl_ari_1_7_0 implements TextMessageReceived, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Endpoint endpoint; - public Endpoint getEndpoint() { - return endpoint; - } - - @JsonDeserialize( as=Endpoint_impl_ari_1_7_0.class ) - public void setEndpoint(Endpoint val ) { - endpoint = val; - } - - /** */ - private TextMessage message; - public TextMessage getMessage() { - return message; - } - - @JsonDeserialize( as=TextMessage_impl_ari_1_7_0.class ) - public void setMessage(TextMessage val ) { - message = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/TextMessageVariable_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/TextMessageVariable_impl_ari_1_7_0.java deleted file mode 100644 index 0249fa7c..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/TextMessageVariable_impl_ari_1_7_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A key/value pair variable in a text message. - * - * Defined in file: endpoints.json - * Generated by: Model - *********************************************************/ - -public class TextMessageVariable_impl_ari_1_7_0 implements TextMessageVariable, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** A unique key identifying the variable. */ - private String key; - public String getKey() { - return key; - } - - @JsonDeserialize( as=String.class ) - public void setKey(String val ) { - key = val; - } - - /** The value of the variable. */ - private String value; - public String getValue() { - return value; - } - - @JsonDeserialize( as=String.class ) - public void setValue(String val ) { - value = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/TextMessage_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/TextMessage_impl_ari_1_7_0.java deleted file mode 100644 index ce9850ee..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/TextMessage_impl_ari_1_7_0.java +++ /dev/null @@ -1,70 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A text message. - * - * Defined in file: endpoints.json - * Generated by: Model - *********************************************************/ - -public class TextMessage_impl_ari_1_7_0 implements TextMessage, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The text of the message. */ - private String body; - public String getBody() { - return body; - } - - @JsonDeserialize( as=String.class ) - public void setBody(String val ) { - body = val; - } - - /** A technology specific URI specifying the source of the message. For sip and pjsip technologies, any SIP URI can be specified. For xmpp, the URI must correspond to the client connection being used to send the message. */ - private String from; - public String getFrom() { - return from; - } - - @JsonDeserialize( as=String.class ) - public void setFrom(String val ) { - from = val; - } - - /** A technology specific URI specifying the destination of the message. Valid technologies include sip, pjsip, and xmp. The destination of a message should be an endpoint. */ - private String to; - public String getTo() { - return to; - } - - @JsonDeserialize( as=String.class ) - public void setTo(String val ) { - to = val; - } - - /** Technology specific key/value pairs associated with the message. */ - private List variables; - public List getVariables() { - return variables; - } - - @JsonDeserialize( contentAs=TextMessageVariable_impl_ari_1_7_0.class ) - public void setVariables(List val ) { - variables = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/Variable_impl_ari_1_7_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/Variable_impl_ari_1_7_0.java deleted file mode 100644 index a486405d..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_7_0/models/Variable_impl_ari_1_7_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_7_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * The value of a channel variable - * - * Defined in file: asterisk.json - * Generated by: Model - *********************************************************/ - -public class Variable_impl_ari_1_7_0 implements Variable, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The value of the variable requested */ - private String value; - public String getValue() { - return value; - } - - @JsonDeserialize( as=String.class ) - public void setValue(String val ) { - value = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/AriBuilder_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/AriBuilder_impl_ari_1_8_0.java deleted file mode 100644 index d01bc328..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/AriBuilder_impl_ari_1_8_0.java +++ /dev/null @@ -1,324 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.ari_1_8_0.models.*; -import ch.loway.oss.ari4java.generated.ari_1_8_0.actions.*; -import ch.loway.oss.ari4java.generated.*; -import ch.loway.oss.ari4java.ARI; - -public class AriBuilder_impl_ari_1_8_0 implements AriBuilder { - -public ActionPlaybacks actionPlaybacks() { - return new ActionPlaybacks_impl_ari_1_8_0(); - }; - -public ActionRecordings actionRecordings() { - return new ActionRecordings_impl_ari_1_8_0(); - }; - -public ActionAsterisk actionAsterisk() { - return new ActionAsterisk_impl_ari_1_8_0(); - }; - -public ActionApplications actionApplications() { - return new ActionApplications_impl_ari_1_8_0(); - }; - -public ActionEvents actionEvents() { - return new ActionEvents_impl_ari_1_8_0(); - }; - -public ActionEndpoints actionEndpoints() { - return new ActionEndpoints_impl_ari_1_8_0(); - }; - -public ActionChannels actionChannels() { - return new ActionChannels_impl_ari_1_8_0(); - }; - -public ActionDeviceStates actionDeviceStates() { - return new ActionDeviceStates_impl_ari_1_8_0(); - }; - -public ActionBridges actionBridges() { - return new ActionBridges_impl_ari_1_8_0(); - }; - -public ActionSounds actionSounds() { - return new ActionSounds_impl_ari_1_8_0(); - }; - -public StasisStart stasisStart() { - return new StasisStart_impl_ari_1_8_0(); - }; - -public BuildInfo buildInfo() { - return new BuildInfo_impl_ari_1_8_0(); - }; - -public BridgeBlindTransfer bridgeBlindTransfer() { - return new BridgeBlindTransfer_impl_ari_1_8_0(); - }; - -public TextMessageReceived textMessageReceived() { - return new TextMessageReceived_impl_ari_1_8_0(); - }; - -public ChannelHold channelHold() { - return new ChannelHold_impl_ari_1_8_0(); - }; - -public StoredRecording storedRecording() { - return new StoredRecording_impl_ari_1_8_0(); - }; - -public ChannelUserevent channelUserevent() { - return new ChannelUserevent_impl_ari_1_8_0(); - }; - -public DialplanCEP dialplanCEP() { - return new DialplanCEP_impl_ari_1_8_0(); - }; - -public Sound sound() { - return new Sound_impl_ari_1_8_0(); - }; - -public Module module() { - return new Module_impl_ari_1_8_0(); - }; - -public StatusInfo statusInfo() { - return new StatusInfo_impl_ari_1_8_0(); - }; - -public ChannelVarset channelVarset() { - return new ChannelVarset_impl_ari_1_8_0(); - }; - -public Playback playback() { - return new Playback_impl_ari_1_8_0(); - }; - -public EndpointStateChange endpointStateChange() { - return new EndpointStateChange_impl_ari_1_8_0(); - }; - -public DeviceStateChanged deviceStateChanged() { - return new DeviceStateChanged_impl_ari_1_8_0(); - }; - -public DeviceState deviceState() { - return new DeviceState_impl_ari_1_8_0(); - }; - -public CallerID callerID() { - return new CallerID_impl_ari_1_8_0(); - }; - -public ChannelDestroyed channelDestroyed() { - return new ChannelDestroyed_impl_ari_1_8_0(); - }; - -public Bridge bridge() { - return new Bridge_impl_ari_1_8_0(); - }; - -public Endpoint endpoint() { - return new Endpoint_impl_ari_1_8_0(); - }; - -public Channel channel() { - return new Channel_impl_ari_1_8_0(); - }; - -public StasisEnd stasisEnd() { - return new StasisEnd_impl_ari_1_8_0(); - }; - -public SetId setId() { - return new SetId_impl_ari_1_8_0(); - }; - -public ApplicationReplaced applicationReplaced() { - return new ApplicationReplaced_impl_ari_1_8_0(); - }; - -public Event event() { - return new Event_impl_ari_1_8_0(); - }; - -public SystemInfo systemInfo() { - return new SystemInfo_impl_ari_1_8_0(); - }; - -public BridgeCreated bridgeCreated() { - return new BridgeCreated_impl_ari_1_8_0(); - }; - -public ConfigTuple configTuple() { - return new ConfigTuple_impl_ari_1_8_0(); - }; - -public RecordingFailed recordingFailed() { - return new RecordingFailed_impl_ari_1_8_0(); - }; - -public ChannelDialplan channelDialplan() { - return new ChannelDialplan_impl_ari_1_8_0(); - }; - -public RecordingStarted recordingStarted() { - return new RecordingStarted_impl_ari_1_8_0(); - }; - -public ChannelDtmfReceived channelDtmfReceived() { - return new ChannelDtmfReceived_impl_ari_1_8_0(); - }; - -public ChannelHangupRequest channelHangupRequest() { - return new ChannelHangupRequest_impl_ari_1_8_0(); - }; - -public BridgeMerged bridgeMerged() { - return new BridgeMerged_impl_ari_1_8_0(); - }; - -public BridgeDestroyed bridgeDestroyed() { - return new BridgeDestroyed_impl_ari_1_8_0(); - }; - -public BridgeAttendedTransfer bridgeAttendedTransfer() { - return new BridgeAttendedTransfer_impl_ari_1_8_0(); - }; - -public Variable variable() { - return new Variable_impl_ari_1_8_0(); - }; - -public Message message() { - return new Message_impl_ari_1_8_0(); - }; - -public ChannelConnectedLine channelConnectedLine() { - return new ChannelConnectedLine_impl_ari_1_8_0(); - }; - -public Dial dial() { - return new Dial_impl_ari_1_8_0(); - }; - -public ChannelCallerId channelCallerId() { - return new ChannelCallerId_impl_ari_1_8_0(); - }; - -public Dialed dialed() { - return new Dialed_impl_ari_1_8_0(); - }; - -public ChannelStateChange channelStateChange() { - return new ChannelStateChange_impl_ari_1_8_0(); - }; - -public PlaybackStarted playbackStarted() { - return new PlaybackStarted_impl_ari_1_8_0(); - }; - -public PlaybackFinished playbackFinished() { - return new PlaybackFinished_impl_ari_1_8_0(); - }; - -public FormatLangPair formatLangPair() { - return new FormatLangPair_impl_ari_1_8_0(); - }; - -public MissingParams missingParams() { - return new MissingParams_impl_ari_1_8_0(); - }; - -public ChannelTalkingFinished channelTalkingFinished() { - return new ChannelTalkingFinished_impl_ari_1_8_0(); - }; - -public TextMessage textMessage() { - return new TextMessage_impl_ari_1_8_0(); - }; - -public TextMessageVariable textMessageVariable() { - return new TextMessageVariable_impl_ari_1_8_0(); - }; - -public ChannelCreated channelCreated() { - return new ChannelCreated_impl_ari_1_8_0(); - }; - -public RecordingFinished recordingFinished() { - return new RecordingFinished_impl_ari_1_8_0(); - }; - -public ChannelTalkingStarted channelTalkingStarted() { - return new ChannelTalkingStarted_impl_ari_1_8_0(); - }; - -public Application application() { - return new Application_impl_ari_1_8_0(); - }; - -public ChannelLeftBridge channelLeftBridge() { - return new ChannelLeftBridge_impl_ari_1_8_0(); - }; - -public ConfigInfo configInfo() { - return new ConfigInfo_impl_ari_1_8_0(); - }; - -public ChannelUnhold channelUnhold() { - return new ChannelUnhold_impl_ari_1_8_0(); - }; - -public ChannelEnteredBridge channelEnteredBridge() { - return new ChannelEnteredBridge_impl_ari_1_8_0(); - }; - -public AsteriskInfo asteriskInfo() { - return new AsteriskInfo_impl_ari_1_8_0(); - }; - -public LiveRecording liveRecording() { - return new LiveRecording_impl_ari_1_8_0(); - }; - -public ContactInfo contactInfo() { - throw new UnsupportedOperationException(); - }; - -public ContactStatusChange contactStatusChange() { - throw new UnsupportedOperationException(); - }; - -public LogChannel logChannel() { - throw new UnsupportedOperationException(); - }; - -public Peer peer() { - throw new UnsupportedOperationException(); - }; - -public PeerStatusChange peerStatusChange() { - throw new UnsupportedOperationException(); - }; - -public PlaybackContinuing playbackContinuing() { - throw new UnsupportedOperationException(); - }; - -public ARI.ClassFactory getClassFactory() { - return new ClassTranslator_impl_ari_1_8_0(); -}; - -}; diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/ClassTranslator_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/ClassTranslator_impl_ari_1_8_0.java deleted file mode 100644 index b3a60bce..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/ClassTranslator_impl_ari_1_8_0.java +++ /dev/null @@ -1,307 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.ARI; -import ch.loway.oss.ari4java.generated.*; -import ch.loway.oss.ari4java.generated.ari_1_8_0.models.*; -import ch.loway.oss.ari4java.generated.ari_1_8_0.actions.*; - -/********************************************************** - * This is a class translator. - *********************************************************/ -public class ClassTranslator_impl_ari_1_8_0 implements ARI.ClassFactory { - - @Override - public Class getImplementationFor(Class interfaceClass) { - - if ( interfaceClass.equals(ActionApplications.class) ) { - return (ActionApplications_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(ActionAsterisk.class) ) { - return (ActionAsterisk_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(ActionBridges.class) ) { - return (ActionBridges_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(ActionChannels.class) ) { - return (ActionChannels_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(ActionDeviceStates.class) ) { - return (ActionDeviceStates_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(ActionEndpoints.class) ) { - return (ActionEndpoints_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(ActionEvents.class) ) { - return (ActionEvents_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(ActionPlaybacks.class) ) { - return (ActionPlaybacks_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(ActionRecordings.class) ) { - return (ActionRecordings_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(ActionSounds.class) ) { - return (ActionSounds_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(Application.class) ) { - return (Application_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(ApplicationReplaced.class) ) { - return (ApplicationReplaced_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(AsteriskInfo.class) ) { - return (AsteriskInfo_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(Bridge.class) ) { - return (Bridge_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(BridgeAttendedTransfer.class) ) { - return (BridgeAttendedTransfer_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(BridgeBlindTransfer.class) ) { - return (BridgeBlindTransfer_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(BridgeCreated.class) ) { - return (BridgeCreated_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(BridgeDestroyed.class) ) { - return (BridgeDestroyed_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(BridgeMerged.class) ) { - return (BridgeMerged_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(BuildInfo.class) ) { - return (BuildInfo_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(CallerID.class) ) { - return (CallerID_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(Channel.class) ) { - return (Channel_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(ChannelCallerId.class) ) { - return (ChannelCallerId_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(ChannelConnectedLine.class) ) { - return (ChannelConnectedLine_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(ChannelCreated.class) ) { - return (ChannelCreated_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(ChannelDestroyed.class) ) { - return (ChannelDestroyed_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(ChannelDialplan.class) ) { - return (ChannelDialplan_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(ChannelDtmfReceived.class) ) { - return (ChannelDtmfReceived_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(ChannelEnteredBridge.class) ) { - return (ChannelEnteredBridge_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(ChannelHangupRequest.class) ) { - return (ChannelHangupRequest_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(ChannelHold.class) ) { - return (ChannelHold_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(ChannelLeftBridge.class) ) { - return (ChannelLeftBridge_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(ChannelStateChange.class) ) { - return (ChannelStateChange_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(ChannelTalkingFinished.class) ) { - return (ChannelTalkingFinished_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(ChannelTalkingStarted.class) ) { - return (ChannelTalkingStarted_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(ChannelUnhold.class) ) { - return (ChannelUnhold_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(ChannelUserevent.class) ) { - return (ChannelUserevent_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(ChannelVarset.class) ) { - return (ChannelVarset_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(ConfigInfo.class) ) { - return (ConfigInfo_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(ConfigTuple.class) ) { - return (ConfigTuple_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(DeviceState.class) ) { - return (DeviceState_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(DeviceStateChanged.class) ) { - return (DeviceStateChanged_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(Dial.class) ) { - return (Dial_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(Dialed.class) ) { - return (Dialed_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(DialplanCEP.class) ) { - return (DialplanCEP_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(Endpoint.class) ) { - return (Endpoint_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(EndpointStateChange.class) ) { - return (EndpointStateChange_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(Event.class) ) { - return (Event_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(FormatLangPair.class) ) { - return (FormatLangPair_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(LiveRecording.class) ) { - return (LiveRecording_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(Message.class) ) { - return (Message_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(MissingParams.class) ) { - return (MissingParams_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(Module.class) ) { - return (Module_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(Playback.class) ) { - return (Playback_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(PlaybackFinished.class) ) { - return (PlaybackFinished_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(PlaybackStarted.class) ) { - return (PlaybackStarted_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(RecordingFailed.class) ) { - return (RecordingFailed_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(RecordingFinished.class) ) { - return (RecordingFinished_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(RecordingStarted.class) ) { - return (RecordingStarted_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(SetId.class) ) { - return (SetId_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(Sound.class) ) { - return (Sound_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(StasisEnd.class) ) { - return (StasisEnd_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(StasisStart.class) ) { - return (StasisStart_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(StatusInfo.class) ) { - return (StatusInfo_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(StoredRecording.class) ) { - return (StoredRecording_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(SystemInfo.class) ) { - return (SystemInfo_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(TextMessage.class) ) { - return (TextMessage_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(TextMessageReceived.class) ) { - return (TextMessageReceived_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(TextMessageVariable.class) ) { - return (TextMessageVariable_impl_ari_1_8_0.class); - } else - - if ( interfaceClass.equals(Variable.class) ) { - return (Variable_impl_ari_1_8_0.class); - } else - { - return null; - } - } -} - - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/actions/ActionApplications_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/actions/ActionApplications_impl_ari_1_8_0.java deleted file mode 100644 index fbd3efba..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/actions/ActionApplications_impl_ari_1_8_0.java +++ /dev/null @@ -1,140 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_8_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionApplications_impl_ari_1_8_0 extends BaseAriAction implements ActionApplications { -/********************************************************** - * Stasis applications - * - * List all applications. - *********************************************************/ -private void buildList() { -reset(); -url = "/applications"; -method = "GET"; -} - -@Override -public List list() throws RestException { -buildList(); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void list(AriCallback> callback) { -buildList(); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Stasis application - * - * Get details of an application. - *********************************************************/ -private void buildGet(String applicationName) { -reset(); -url = "/applications/" + applicationName + ""; -method = "GET"; -lE.add( HttpResponse.build( 404, "Application does not exist.") ); -} - -@Override -public Application get(String applicationName) throws RestException { -buildGet(applicationName); -String json = httpActionSync(); -return deserializeJson( json, Application_impl_ari_1_8_0.class ); -} - -@Override -public void get(String applicationName, AriCallback callback) { -buildGet(applicationName); -httpActionAsync(callback, Application_impl_ari_1_8_0.class); -} - -/********************************************************** - * Stasis application - * - * Subscribe an application to a event source. - * Returns the state of the application after the subscriptions have changed - *********************************************************/ -private void buildSubscribe(String applicationName, String eventSource) { -reset(); -url = "/applications/" + applicationName + "/subscription"; -method = "POST"; -lParamQuery.add( HttpParam.build( "eventSource", eventSource) ); -lE.add( HttpResponse.build( 400, "Missing parameter.") ); -lE.add( HttpResponse.build( 404, "Application does not exist.") ); -lE.add( HttpResponse.build( 422, "Event source does not exist.") ); -} - -@Override -public Application subscribe(String applicationName, String eventSource) throws RestException { -buildSubscribe(applicationName, eventSource); -String json = httpActionSync(); -return deserializeJson( json, Application_impl_ari_1_8_0.class ); -} - -@Override -public void subscribe(String applicationName, String eventSource, AriCallback callback) { -buildSubscribe(applicationName, eventSource); -httpActionAsync(callback, Application_impl_ari_1_8_0.class); -} - -/********************************************************** - * Stasis application - * - * Unsubscribe an application from an event source. - * Returns the state of the application after the subscriptions have changed - *********************************************************/ -private void buildUnsubscribe(String applicationName, String eventSource) { -reset(); -url = "/applications/" + applicationName + "/subscription"; -method = "DELETE"; -lParamQuery.add( HttpParam.build( "eventSource", eventSource) ); -lE.add( HttpResponse.build( 400, "Missing parameter; event source scheme not recognized.") ); -lE.add( HttpResponse.build( 404, "Application does not exist.") ); -lE.add( HttpResponse.build( 409, "Application not subscribed to event source.") ); -lE.add( HttpResponse.build( 422, "Event source does not exist.") ); -} - -@Override -public Application unsubscribe(String applicationName, String eventSource) throws RestException { -buildUnsubscribe(applicationName, eventSource); -String json = httpActionSync(); -return deserializeJson( json, Application_impl_ari_1_8_0.class ); -} - -@Override -public void unsubscribe(String applicationName, String eventSource, AriCallback callback) { -buildUnsubscribe(applicationName, eventSource); -httpActionAsync(callback, Application_impl_ari_1_8_0.class); -} - -/** No missing signatures from interface */ -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/actions/ActionAsterisk_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/actions/ActionAsterisk_impl_ari_1_8_0.java deleted file mode 100644 index 11ad9eb0..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/actions/ActionAsterisk_impl_ari_1_8_0.java +++ /dev/null @@ -1,388 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_8_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionAsterisk_impl_ari_1_8_0 extends BaseAriAction implements ActionAsterisk { -/********************************************************** - * Asterisk dynamic configuration - * - * Retrieve a dynamic configuration object. - *********************************************************/ -private void buildGetObject(String configClass, String objectType, String id) { -reset(); -url = "/asterisk/config/dynamic/" + configClass + "/" + objectType + "/" + id + ""; -method = "GET"; -lE.add( HttpResponse.build( 404, "{configClass|objectType|id} not found") ); -} - -@Override -public List getObject(String configClass, String objectType, String id) throws RestException { -buildGetObject(configClass, objectType, id); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void getObject(String configClass, String objectType, String id, AriCallback> callback) { -buildGetObject(configClass, objectType, id); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Asterisk dynamic configuration - * - * Create or update a dynamic configuration object. - *********************************************************/ -private void buildUpdateObject(String configClass, String objectType, String id, Map fields) { -reset(); -url = "/asterisk/config/dynamic/" + configClass + "/" + objectType + "/" + id + ""; -method = "PUT"; -lParamBody.addAll( HttpParam.build( "fields", fields) ); -lE.add( HttpResponse.build( 400, "Bad request body") ); -lE.add( HttpResponse.build( 403, "Could not create or update object") ); -lE.add( HttpResponse.build( 404, "{configClass|objectType} not found") ); -} - -@Override -public List updateObject(String configClass, String objectType, String id, Map fields) throws RestException { -buildUpdateObject(configClass, objectType, id, fields); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void updateObject(String configClass, String objectType, String id, Map fields, AriCallback> callback) { -buildUpdateObject(configClass, objectType, id, fields); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Asterisk dynamic configuration - * - * Delete a dynamic configuration object. - *********************************************************/ -private void buildDeleteObject(String configClass, String objectType, String id) { -reset(); -url = "/asterisk/config/dynamic/" + configClass + "/" + objectType + "/" + id + ""; -method = "DELETE"; -lE.add( HttpResponse.build( 403, "Could not delete object") ); -lE.add( HttpResponse.build( 404, "{configClass|objectType|id} not found") ); -} - -@Override -public void deleteObject(String configClass, String objectType, String id) throws RestException { -buildDeleteObject(configClass, objectType, id); -String json = httpActionSync(); -} - -@Override -public void deleteObject(String configClass, String objectType, String id, AriCallback callback) { -buildDeleteObject(configClass, objectType, id); -httpActionAsync(callback); -} - -/********************************************************** - * Asterisk system information (similar to core show settings) - * - * Gets Asterisk system information. - *********************************************************/ -private void buildGetInfo(String only) { -reset(); -url = "/asterisk/info"; -method = "GET"; -lParamQuery.add( HttpParam.build( "only", only) ); -} - -@Override -public AsteriskInfo getInfo(String only) throws RestException { -buildGetInfo(only); -String json = httpActionSync(); -return deserializeJson( json, AsteriskInfo_impl_ari_1_8_0.class ); -} - -@Override -public void getInfo(String only, AriCallback callback) { -buildGetInfo(only); -httpActionAsync(callback, AsteriskInfo_impl_ari_1_8_0.class); -} - -/********************************************************** - * Asterisk modules - * - * List Asterisk modules. - *********************************************************/ -private void buildListModules() { -reset(); -url = "/asterisk/modules"; -method = "GET"; -} - -@Override -public List listModules() throws RestException { -buildListModules(); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void listModules(AriCallback> callback) { -buildListModules(); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Asterisk module - * - * Get Asterisk module information. - *********************************************************/ -private void buildGetModule(String moduleName) { -reset(); -url = "/asterisk/modules/" + moduleName + ""; -method = "GET"; -lE.add( HttpResponse.build( 404, "Module could not be found in running modules.") ); -lE.add( HttpResponse.build( 409, "Module information could not be retrieved.") ); -} - -@Override -public Module getModule(String moduleName) throws RestException { -buildGetModule(moduleName); -String json = httpActionSync(); -return deserializeJson( json, Module_impl_ari_1_8_0.class ); -} - -@Override -public void getModule(String moduleName, AriCallback callback) { -buildGetModule(moduleName); -httpActionAsync(callback, Module_impl_ari_1_8_0.class); -} - -/********************************************************** - * Asterisk module - * - * Load an Asterisk module. - *********************************************************/ -private void buildLoadModule(String moduleName) { -reset(); -url = "/asterisk/modules/" + moduleName + ""; -method = "POST"; -lE.add( HttpResponse.build( 409, "Module could not be loaded.") ); -} - -@Override -public void loadModule(String moduleName) throws RestException { -buildLoadModule(moduleName); -String json = httpActionSync(); -} - -@Override -public void loadModule(String moduleName, AriCallback callback) { -buildLoadModule(moduleName); -httpActionAsync(callback); -} - -/********************************************************** - * Asterisk module - * - * Unload an Asterisk module. - *********************************************************/ -private void buildUnloadModule(String moduleName) { -reset(); -url = "/asterisk/modules/" + moduleName + ""; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Module not found in running modules.") ); -lE.add( HttpResponse.build( 409, "Module could not be unloaded.") ); -} - -@Override -public void unloadModule(String moduleName) throws RestException { -buildUnloadModule(moduleName); -String json = httpActionSync(); -} - -@Override -public void unloadModule(String moduleName, AriCallback callback) { -buildUnloadModule(moduleName); -httpActionAsync(callback); -} - -/********************************************************** - * Asterisk module - * - * Reload an Asterisk module. - *********************************************************/ -private void buildReloadModule(String moduleName) { -reset(); -url = "/asterisk/modules/" + moduleName + ""; -method = "PUT"; -lE.add( HttpResponse.build( 404, "Module not found in running modules.") ); -lE.add( HttpResponse.build( 409, "Module could not be reloaded.") ); -} - -@Override -public void reloadModule(String moduleName) throws RestException { -buildReloadModule(moduleName); -String json = httpActionSync(); -} - -@Override -public void reloadModule(String moduleName, AriCallback callback) { -buildReloadModule(moduleName); -httpActionAsync(callback); -} - -/********************************************************** - * Global variables - * - * Get the value of a global variable. - *********************************************************/ -private void buildGetGlobalVar(String variable) { -reset(); -url = "/asterisk/variable"; -method = "GET"; -lParamQuery.add( HttpParam.build( "variable", variable) ); -lE.add( HttpResponse.build( 400, "Missing variable parameter.") ); -} - -@Override -public Variable getGlobalVar(String variable) throws RestException { -buildGetGlobalVar(variable); -String json = httpActionSync(); -return deserializeJson( json, Variable_impl_ari_1_8_0.class ); -} - -@Override -public void getGlobalVar(String variable, AriCallback callback) { -buildGetGlobalVar(variable); -httpActionAsync(callback, Variable_impl_ari_1_8_0.class); -} - -/********************************************************** - * Global variables - * - * Set the value of a global variable. - *********************************************************/ -private void buildSetGlobalVar(String variable, String value) { -reset(); -url = "/asterisk/variable"; -method = "POST"; -lParamQuery.add( HttpParam.build( "variable", variable) ); -lParamQuery.add( HttpParam.build( "value", value) ); -lE.add( HttpResponse.build( 400, "Missing variable parameter.") ); -} - -@Override -public void setGlobalVar(String variable, String value) throws RestException { -buildSetGlobalVar(variable, value); -String json = httpActionSync(); -} - -@Override -public void setGlobalVar(String variable, String value, AriCallback callback) { -buildSetGlobalVar(variable, value); -httpActionAsync(callback); -} - -/********************************************************** - * - * - * @since ari_1_9_0 - *********************************************************/ -public void addLog(String logChannelName, String configuration, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Gets Asterisk log channel information. - * - * - * @since ari_1_9_0 - *********************************************************/ -public List listLogChannels() throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_9_0 - *********************************************************/ -public void rotateLog(String logChannelName, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Rotates a log channel. - * - * - * @since ari_1_9_0 - *********************************************************/ -public void rotateLog(String logChannelName) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_9_0 - *********************************************************/ -public void listLogChannels(AriCallback> callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Adds a log channel. - * - * - * @since ari_1_9_0 - *********************************************************/ -public void addLog(String logChannelName, String configuration) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Deletes a log channel. - * - * - * @since ari_1_9_0 - *********************************************************/ -public void deleteLog(String logChannelName) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_9_0 - *********************************************************/ -public void deleteLog(String logChannelName, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/actions/ActionBridges_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/actions/ActionBridges_impl_ari_1_8_0.java deleted file mode 100644 index da171958..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/actions/ActionBridges_impl_ari_1_8_0.java +++ /dev/null @@ -1,444 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_8_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionBridges_impl_ari_1_8_0 extends BaseAriAction implements ActionBridges { -/********************************************************** - * Active bridges - * - * List all active bridges in Asterisk. - *********************************************************/ -private void buildList() { -reset(); -url = "/bridges"; -method = "GET"; -} - -@Override -public List list() throws RestException { -buildList(); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void list(AriCallback> callback) { -buildList(); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Active bridges - * - * Create a new bridge. - * This bridge persists until it has been shut down, or Asterisk has been shut down. - *********************************************************/ -private void buildCreate(String type, String bridgeId, String name) { -reset(); -url = "/bridges"; -method = "POST"; -lParamQuery.add( HttpParam.build( "type", type) ); -lParamQuery.add( HttpParam.build( "bridgeId", bridgeId) ); -lParamQuery.add( HttpParam.build( "name", name) ); -} - -@Override -public Bridge create(String type, String bridgeId, String name) throws RestException { -buildCreate(type, bridgeId, name); -String json = httpActionSync(); -return deserializeJson( json, Bridge_impl_ari_1_8_0.class ); -} - -@Override -public void create(String type, String bridgeId, String name, AriCallback callback) { -buildCreate(type, bridgeId, name); -httpActionAsync(callback, Bridge_impl_ari_1_8_0.class); -} - -/********************************************************** - * Individual bridge - * - * Create a new bridge or updates an existing one. - * This bridge persists until it has been shut down, or Asterisk has been shut down. - *********************************************************/ -private void buildCreateWithId(String type, String bridgeId, String name) { -reset(); -url = "/bridges/" + bridgeId + ""; -method = "POST"; -lParamQuery.add( HttpParam.build( "type", type) ); -lParamQuery.add( HttpParam.build( "name", name) ); -} - -@Override -public Bridge createWithId(String type, String bridgeId, String name) throws RestException { -buildCreateWithId(type, bridgeId, name); -String json = httpActionSync(); -return deserializeJson( json, Bridge_impl_ari_1_8_0.class ); -} - -@Override -public void createWithId(String type, String bridgeId, String name, AriCallback callback) { -buildCreateWithId(type, bridgeId, name); -httpActionAsync(callback, Bridge_impl_ari_1_8_0.class); -} - -/********************************************************** - * Individual bridge - * - * Get bridge details. - *********************************************************/ -private void buildGet(String bridgeId) { -reset(); -url = "/bridges/" + bridgeId + ""; -method = "GET"; -lE.add( HttpResponse.build( 404, "Bridge not found") ); -} - -@Override -public Bridge get(String bridgeId) throws RestException { -buildGet(bridgeId); -String json = httpActionSync(); -return deserializeJson( json, Bridge_impl_ari_1_8_0.class ); -} - -@Override -public void get(String bridgeId, AriCallback callback) { -buildGet(bridgeId); -httpActionAsync(callback, Bridge_impl_ari_1_8_0.class); -} - -/********************************************************** - * Individual bridge - * - * Shut down a bridge. - * If any channels are in this bridge, they will be removed and resume whatever they were doing beforehand. - *********************************************************/ -private void buildDestroy(String bridgeId) { -reset(); -url = "/bridges/" + bridgeId + ""; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Bridge not found") ); -} - -@Override -public void destroy(String bridgeId) throws RestException { -buildDestroy(bridgeId); -String json = httpActionSync(); -} - -@Override -public void destroy(String bridgeId, AriCallback callback) { -buildDestroy(bridgeId); -httpActionAsync(callback); -} - -/********************************************************** - * Add a channel to a bridge - * - * Add a channel to a bridge. - *********************************************************/ -private void buildAddChannel(String bridgeId, String channel, String role) { -reset(); -url = "/bridges/" + bridgeId + "/addChannel"; -method = "POST"; -lParamQuery.add( HttpParam.build( "channel", channel) ); -lParamQuery.add( HttpParam.build( "role", role) ); -lE.add( HttpResponse.build( 400, "Channel not found") ); -lE.add( HttpResponse.build( 404, "Bridge not found") ); -lE.add( HttpResponse.build( 409, "Bridge not in Stasis application; Channel currently recording") ); -lE.add( HttpResponse.build( 422, "Channel not in Stasis application") ); -} - -@Override -public void addChannel(String bridgeId, String channel, String role) throws RestException { -buildAddChannel(bridgeId, channel, role); -String json = httpActionSync(); -} - -@Override -public void addChannel(String bridgeId, String channel, String role, AriCallback callback) { -buildAddChannel(bridgeId, channel, role); -httpActionAsync(callback); -} - -/********************************************************** - * Play music on hold to a bridge - * - * Play music on hold to a bridge or change the MOH class that is playing. - *********************************************************/ -private void buildStartMoh(String bridgeId, String mohClass) { -reset(); -url = "/bridges/" + bridgeId + "/moh"; -method = "POST"; -lParamQuery.add( HttpParam.build( "mohClass", mohClass) ); -lE.add( HttpResponse.build( 404, "Bridge not found") ); -lE.add( HttpResponse.build( 409, "Bridge not in Stasis application") ); -} - -@Override -public void startMoh(String bridgeId, String mohClass) throws RestException { -buildStartMoh(bridgeId, mohClass); -String json = httpActionSync(); -} - -@Override -public void startMoh(String bridgeId, String mohClass, AriCallback callback) { -buildStartMoh(bridgeId, mohClass); -httpActionAsync(callback); -} - -/********************************************************** - * Play music on hold to a bridge - * - * Stop playing music on hold to a bridge. - * This will only stop music on hold being played via POST bridges/{bridgeId}/moh. - *********************************************************/ -private void buildStopMoh(String bridgeId) { -reset(); -url = "/bridges/" + bridgeId + "/moh"; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Bridge not found") ); -lE.add( HttpResponse.build( 409, "Bridge not in Stasis application") ); -} - -@Override -public void stopMoh(String bridgeId) throws RestException { -buildStopMoh(bridgeId); -String json = httpActionSync(); -} - -@Override -public void stopMoh(String bridgeId, AriCallback callback) { -buildStopMoh(bridgeId); -httpActionAsync(callback); -} - -/********************************************************** - * Play media to the participants of a bridge - * - * Start playback of media on a bridge. - * The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.) - *********************************************************/ -private void buildPlay(String bridgeId, String media, String lang, int offsetms, int skipms, String playbackId) { -reset(); -url = "/bridges/" + bridgeId + "/play"; -method = "POST"; -lParamQuery.add( HttpParam.build( "media", media) ); -lParamQuery.add( HttpParam.build( "lang", lang) ); -lParamQuery.add( HttpParam.build( "offsetms", offsetms) ); -lParamQuery.add( HttpParam.build( "skipms", skipms) ); -lParamQuery.add( HttpParam.build( "playbackId", playbackId) ); -lE.add( HttpResponse.build( 404, "Bridge not found") ); -lE.add( HttpResponse.build( 409, "Bridge not in a Stasis application") ); -} - -@Override -public Playback play(String bridgeId, String media, String lang, int offsetms, int skipms, String playbackId) throws RestException { -buildPlay(bridgeId, media, lang, offsetms, skipms, playbackId); -String json = httpActionSync(); -return deserializeJson( json, Playback_impl_ari_1_8_0.class ); -} - -@Override -public void play(String bridgeId, String media, String lang, int offsetms, int skipms, String playbackId, AriCallback callback) { -buildPlay(bridgeId, media, lang, offsetms, skipms, playbackId); -httpActionAsync(callback, Playback_impl_ari_1_8_0.class); -} - -/********************************************************** - * Play media to a bridge - * - * Start playback of media on a bridge. - * The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.) - *********************************************************/ -private void buildPlayWithId(String bridgeId, String playbackId, String media, String lang, int offsetms, int skipms) { -reset(); -url = "/bridges/" + bridgeId + "/play/" + playbackId + ""; -method = "POST"; -lParamQuery.add( HttpParam.build( "media", media) ); -lParamQuery.add( HttpParam.build( "lang", lang) ); -lParamQuery.add( HttpParam.build( "offsetms", offsetms) ); -lParamQuery.add( HttpParam.build( "skipms", skipms) ); -lE.add( HttpResponse.build( 404, "Bridge not found") ); -lE.add( HttpResponse.build( 409, "Bridge not in a Stasis application") ); -} - -@Override -public Playback playWithId(String bridgeId, String playbackId, String media, String lang, int offsetms, int skipms) throws RestException { -buildPlayWithId(bridgeId, playbackId, media, lang, offsetms, skipms); -String json = httpActionSync(); -return deserializeJson( json, Playback_impl_ari_1_8_0.class ); -} - -@Override -public void playWithId(String bridgeId, String playbackId, String media, String lang, int offsetms, int skipms, AriCallback callback) { -buildPlayWithId(bridgeId, playbackId, media, lang, offsetms, skipms); -httpActionAsync(callback, Playback_impl_ari_1_8_0.class); -} - -/********************************************************** - * Record audio on a bridge - * - * Start a recording. - * This records the mixed audio from all channels participating in this bridge. - *********************************************************/ -private void buildRecord(String bridgeId, String name, String format, int maxDurationSeconds, int maxSilenceSeconds, String ifExists, boolean beep, String terminateOn) { -reset(); -url = "/bridges/" + bridgeId + "/record"; -method = "POST"; -lParamQuery.add( HttpParam.build( "name", name) ); -lParamQuery.add( HttpParam.build( "format", format) ); -lParamQuery.add( HttpParam.build( "maxDurationSeconds", maxDurationSeconds) ); -lParamQuery.add( HttpParam.build( "maxSilenceSeconds", maxSilenceSeconds) ); -lParamQuery.add( HttpParam.build( "ifExists", ifExists) ); -lParamQuery.add( HttpParam.build( "beep", beep) ); -lParamQuery.add( HttpParam.build( "terminateOn", terminateOn) ); -lE.add( HttpResponse.build( 400, "Invalid parameters") ); -lE.add( HttpResponse.build( 404, "Bridge not found") ); -lE.add( HttpResponse.build( 409, "Bridge is not in a Stasis application; A recording with the same name already exists on the system and can not be overwritten because it is in progress or ifExists=fail") ); -lE.add( HttpResponse.build( 422, "The format specified is unknown on this system") ); -} - -@Override -public LiveRecording record(String bridgeId, String name, String format, int maxDurationSeconds, int maxSilenceSeconds, String ifExists, boolean beep, String terminateOn) throws RestException { -buildRecord(bridgeId, name, format, maxDurationSeconds, maxSilenceSeconds, ifExists, beep, terminateOn); -String json = httpActionSync(); -return deserializeJson( json, LiveRecording_impl_ari_1_8_0.class ); -} - -@Override -public void record(String bridgeId, String name, String format, int maxDurationSeconds, int maxSilenceSeconds, String ifExists, boolean beep, String terminateOn, AriCallback callback) { -buildRecord(bridgeId, name, format, maxDurationSeconds, maxSilenceSeconds, ifExists, beep, terminateOn); -httpActionAsync(callback, LiveRecording_impl_ari_1_8_0.class); -} - -/********************************************************** - * Remove a channel from a bridge - * - * Remove a channel from a bridge. - *********************************************************/ -private void buildRemoveChannel(String bridgeId, String channel) { -reset(); -url = "/bridges/" + bridgeId + "/removeChannel"; -method = "POST"; -lParamQuery.add( HttpParam.build( "channel", channel) ); -lE.add( HttpResponse.build( 400, "Channel not found") ); -lE.add( HttpResponse.build( 404, "Bridge not found") ); -lE.add( HttpResponse.build( 409, "Bridge not in Stasis application") ); -lE.add( HttpResponse.build( 422, "Channel not in this bridge") ); -} - -@Override -public void removeChannel(String bridgeId, String channel) throws RestException { -buildRemoveChannel(bridgeId, channel); -String json = httpActionSync(); -} - -@Override -public void removeChannel(String bridgeId, String channel, AriCallback callback) { -buildRemoveChannel(bridgeId, channel); -httpActionAsync(callback); -} - -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void create(String type, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new bridge. - * This bridge persists until it has been shut down, or Asterisk has been shut down. - * - * @since ari_1_0_0 - *********************************************************/ -public Bridge create(String type, String name) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new bridge. - * This bridge persists until it has been shut down, or Asterisk has been shut down. - * - * @since ari_0_0_1 - *********************************************************/ -public Bridge create(String type) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void play(String bridgeId, String media, String lang, int offsetms, int skipms, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Start playback of media on a bridge. - * 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.) - * - * @since ari_0_0_1 - *********************************************************/ -public Playback play(String bridgeId, String media, String lang, int offsetms, int skipms) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_0_0 - *********************************************************/ -public void create(String type, String name, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_5_0 - *********************************************************/ -public void create_or_update_with_id(String type, String bridgeId, String name, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new bridge or updates an existing one. - * This bridge persists until it has been shut down, or Asterisk has been shut down. - * - * @since ari_1_5_0 - *********************************************************/ -public Bridge create_or_update_with_id(String type, String bridgeId, String name) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/actions/ActionChannels_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/actions/ActionChannels_impl_ari_1_8_0.java deleted file mode 100644 index 1fcf9a1a..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/actions/ActionChannels_impl_ari_1_8_0.java +++ /dev/null @@ -1,961 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_8_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionChannels_impl_ari_1_8_0 extends BaseAriAction implements ActionChannels { -/********************************************************** - * Active channels - * - * List all active channels in Asterisk. - *********************************************************/ -private void buildList() { -reset(); -url = "/channels"; -method = "GET"; -} - -@Override -public List list() throws RestException { -buildList(); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void list(AriCallback> callback) { -buildList(); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Active channels - * - * Create a new channel (originate). - * 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. - *********************************************************/ -private void buildOriginate(String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String channelId, String otherChannelId, String originator) { -reset(); -url = "/channels"; -method = "POST"; -lParamQuery.add( HttpParam.build( "endpoint", endpoint) ); -lParamQuery.add( HttpParam.build( "extension", extension) ); -lParamQuery.add( HttpParam.build( "context", context) ); -lParamQuery.add( HttpParam.build( "priority", priority) ); -lParamQuery.add( HttpParam.build( "label", label) ); -lParamQuery.add( HttpParam.build( "app", app) ); -lParamQuery.add( HttpParam.build( "appArgs", appArgs) ); -lParamQuery.add( HttpParam.build( "callerId", callerId) ); -lParamQuery.add( HttpParam.build( "timeout", timeout) ); -lParamBody.addAll( HttpParam.build( "variables", variables) ); -lParamQuery.add( HttpParam.build( "channelId", channelId) ); -lParamQuery.add( HttpParam.build( "otherChannelId", otherChannelId) ); -lParamQuery.add( HttpParam.build( "originator", originator) ); -lE.add( HttpResponse.build( 400, "Invalid parameters for originating a channel.") ); -} - -@Override -public Channel originate(String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String channelId, String otherChannelId, String originator) throws RestException { -buildOriginate(endpoint, extension, context, priority, label, app, appArgs, callerId, timeout, variables, channelId, otherChannelId, originator); -String json = httpActionSync(); -return deserializeJson( json, Channel_impl_ari_1_8_0.class ); -} - -@Override -public void originate(String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String channelId, String otherChannelId, String originator, AriCallback callback) { -buildOriginate(endpoint, extension, context, priority, label, app, appArgs, callerId, timeout, variables, channelId, otherChannelId, originator); -httpActionAsync(callback, Channel_impl_ari_1_8_0.class); -} - -/********************************************************** - * Active channel - * - * Channel details. - *********************************************************/ -private void buildGet(String channelId) { -reset(); -url = "/channels/" + channelId + ""; -method = "GET"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -} - -@Override -public Channel get(String channelId) throws RestException { -buildGet(channelId); -String json = httpActionSync(); -return deserializeJson( json, Channel_impl_ari_1_8_0.class ); -} - -@Override -public void get(String channelId, AriCallback callback) { -buildGet(channelId); -httpActionAsync(callback, Channel_impl_ari_1_8_0.class); -} - -/********************************************************** - * Active channel - * - * Create a new channel (originate with id). - * 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. - *********************************************************/ -private void buildOriginateWithId(String channelId, String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String otherChannelId, String originator) { -reset(); -url = "/channels/" + channelId + ""; -method = "POST"; -lParamQuery.add( HttpParam.build( "endpoint", endpoint) ); -lParamQuery.add( HttpParam.build( "extension", extension) ); -lParamQuery.add( HttpParam.build( "context", context) ); -lParamQuery.add( HttpParam.build( "priority", priority) ); -lParamQuery.add( HttpParam.build( "label", label) ); -lParamQuery.add( HttpParam.build( "app", app) ); -lParamQuery.add( HttpParam.build( "appArgs", appArgs) ); -lParamQuery.add( HttpParam.build( "callerId", callerId) ); -lParamQuery.add( HttpParam.build( "timeout", timeout) ); -lParamBody.addAll( HttpParam.build( "variables", variables) ); -lParamQuery.add( HttpParam.build( "otherChannelId", otherChannelId) ); -lParamQuery.add( HttpParam.build( "originator", originator) ); -lE.add( HttpResponse.build( 400, "Invalid parameters for originating a channel.") ); -} - -@Override -public Channel originateWithId(String channelId, String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String otherChannelId, String originator) throws RestException { -buildOriginateWithId(channelId, endpoint, extension, context, priority, label, app, appArgs, callerId, timeout, variables, otherChannelId, originator); -String json = httpActionSync(); -return deserializeJson( json, Channel_impl_ari_1_8_0.class ); -} - -@Override -public void originateWithId(String channelId, String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String otherChannelId, String originator, AriCallback callback) { -buildOriginateWithId(channelId, endpoint, extension, context, priority, label, app, appArgs, callerId, timeout, variables, otherChannelId, originator); -httpActionAsync(callback, Channel_impl_ari_1_8_0.class); -} - -/********************************************************** - * Active channel - * - * Delete (i.e. hangup) a channel. - *********************************************************/ -private void buildHangup(String channelId, String reason) { -reset(); -url = "/channels/" + channelId + ""; -method = "DELETE"; -lParamQuery.add( HttpParam.build( "reason", reason) ); -lE.add( HttpResponse.build( 400, "Invalid reason for hangup provided") ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -} - -@Override -public void hangup(String channelId, String reason) throws RestException { -buildHangup(channelId, reason); -String json = httpActionSync(); -} - -@Override -public void hangup(String channelId, String reason, AriCallback callback) { -buildHangup(channelId, reason); -httpActionAsync(callback); -} - -/********************************************************** - * Answer a channel - * - * Answer a channel. - *********************************************************/ -private void buildAnswer(String channelId) { -reset(); -url = "/channels/" + channelId + "/answer"; -method = "POST"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void answer(String channelId) throws RestException { -buildAnswer(channelId); -String json = httpActionSync(); -} - -@Override -public void answer(String channelId, AriCallback callback) { -buildAnswer(channelId); -httpActionAsync(callback); -} - -/********************************************************** - * Exit application; continue execution in the dialplan - * - * Exit application; continue execution in the dialplan. - *********************************************************/ -private void buildContinueInDialplan(String channelId, String context, String extension, int priority, String label) { -reset(); -url = "/channels/" + channelId + "/continue"; -method = "POST"; -lParamQuery.add( HttpParam.build( "context", context) ); -lParamQuery.add( HttpParam.build( "extension", extension) ); -lParamQuery.add( HttpParam.build( "priority", priority) ); -lParamQuery.add( HttpParam.build( "label", label) ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void continueInDialplan(String channelId, String context, String extension, int priority, String label) throws RestException { -buildContinueInDialplan(channelId, context, extension, priority, label); -String json = httpActionSync(); -} - -@Override -public void continueInDialplan(String channelId, String context, String extension, int priority, String label, AriCallback callback) { -buildContinueInDialplan(channelId, context, extension, priority, label); -httpActionAsync(callback); -} - -/********************************************************** - * Send DTMF to a channel - * - * Send provided DTMF to a given channel. - *********************************************************/ -private void buildSendDTMF(String channelId, String dtmf, int before, int between, int duration, int after) { -reset(); -url = "/channels/" + channelId + "/dtmf"; -method = "POST"; -lParamQuery.add( HttpParam.build( "dtmf", dtmf) ); -lParamQuery.add( HttpParam.build( "before", before) ); -lParamQuery.add( HttpParam.build( "between", between) ); -lParamQuery.add( HttpParam.build( "duration", duration) ); -lParamQuery.add( HttpParam.build( "after", after) ); -lE.add( HttpResponse.build( 400, "DTMF is required") ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void sendDTMF(String channelId, String dtmf, int before, int between, int duration, int after) throws RestException { -buildSendDTMF(channelId, dtmf, before, between, duration, after); -String json = httpActionSync(); -} - -@Override -public void sendDTMF(String channelId, String dtmf, int before, int between, int duration, int after, AriCallback callback) { -buildSendDTMF(channelId, dtmf, before, between, duration, after); -httpActionAsync(callback); -} - -/********************************************************** - * Put a channel on hold - * - * Hold a channel. - *********************************************************/ -private void buildHold(String channelId) { -reset(); -url = "/channels/" + channelId + "/hold"; -method = "POST"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void hold(String channelId) throws RestException { -buildHold(channelId); -String json = httpActionSync(); -} - -@Override -public void hold(String channelId, AriCallback callback) { -buildHold(channelId); -httpActionAsync(callback); -} - -/********************************************************** - * Put a channel on hold - * - * Remove a channel from hold. - *********************************************************/ -private void buildUnhold(String channelId) { -reset(); -url = "/channels/" + channelId + "/hold"; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void unhold(String channelId) throws RestException { -buildUnhold(channelId); -String json = httpActionSync(); -} - -@Override -public void unhold(String channelId, AriCallback callback) { -buildUnhold(channelId); -httpActionAsync(callback); -} - -/********************************************************** - * Play music on hold to a channel - * - * Play music on hold to a channel. - * Using media operations such as /play on a channel playing MOH in this manner will suspend MOH without resuming automatically. If continuing music on hold is desired, the stasis application must reinitiate music on hold. - *********************************************************/ -private void buildStartMoh(String channelId, String mohClass) { -reset(); -url = "/channels/" + channelId + "/moh"; -method = "POST"; -lParamQuery.add( HttpParam.build( "mohClass", mohClass) ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void startMoh(String channelId, String mohClass) throws RestException { -buildStartMoh(channelId, mohClass); -String json = httpActionSync(); -} - -@Override -public void startMoh(String channelId, String mohClass, AriCallback callback) { -buildStartMoh(channelId, mohClass); -httpActionAsync(callback); -} - -/********************************************************** - * Play music on hold to a channel - * - * Stop playing music on hold to a channel. - *********************************************************/ -private void buildStopMoh(String channelId) { -reset(); -url = "/channels/" + channelId + "/moh"; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void stopMoh(String channelId) throws RestException { -buildStopMoh(channelId); -String json = httpActionSync(); -} - -@Override -public void stopMoh(String channelId, AriCallback callback) { -buildStopMoh(channelId); -httpActionAsync(callback); -} - -/********************************************************** - * Mute a channel - * - * Mute a channel. - *********************************************************/ -private void buildMute(String channelId, String direction) { -reset(); -url = "/channels/" + channelId + "/mute"; -method = "POST"; -lParamQuery.add( HttpParam.build( "direction", direction) ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void mute(String channelId, String direction) throws RestException { -buildMute(channelId, direction); -String json = httpActionSync(); -} - -@Override -public void mute(String channelId, String direction, AriCallback callback) { -buildMute(channelId, direction); -httpActionAsync(callback); -} - -/********************************************************** - * Mute a channel - * - * Unmute a channel. - *********************************************************/ -private void buildUnmute(String channelId, String direction) { -reset(); -url = "/channels/" + channelId + "/mute"; -method = "DELETE"; -lParamQuery.add( HttpParam.build( "direction", direction) ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void unmute(String channelId, String direction) throws RestException { -buildUnmute(channelId, direction); -String json = httpActionSync(); -} - -@Override -public void unmute(String channelId, String direction, AriCallback callback) { -buildUnmute(channelId, direction); -httpActionAsync(callback); -} - -/********************************************************** - * Play media to a channel - * - * Start playback of media. - * The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.) - *********************************************************/ -private void buildPlay(String channelId, String media, String lang, int offsetms, int skipms, String playbackId) { -reset(); -url = "/channels/" + channelId + "/play"; -method = "POST"; -lParamQuery.add( HttpParam.build( "media", media) ); -lParamQuery.add( HttpParam.build( "lang", lang) ); -lParamQuery.add( HttpParam.build( "offsetms", offsetms) ); -lParamQuery.add( HttpParam.build( "skipms", skipms) ); -lParamQuery.add( HttpParam.build( "playbackId", playbackId) ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public Playback play(String channelId, String media, String lang, int offsetms, int skipms, String playbackId) throws RestException { -buildPlay(channelId, media, lang, offsetms, skipms, playbackId); -String json = httpActionSync(); -return deserializeJson( json, Playback_impl_ari_1_8_0.class ); -} - -@Override -public void play(String channelId, String media, String lang, int offsetms, int skipms, String playbackId, AriCallback callback) { -buildPlay(channelId, media, lang, offsetms, skipms, playbackId); -httpActionAsync(callback, Playback_impl_ari_1_8_0.class); -} - -/********************************************************** - * Play media to a channel - * - * Start playback of media and specify the playbackId. - * The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.) - *********************************************************/ -private void buildPlayWithId(String channelId, String playbackId, String media, String lang, int offsetms, int skipms) { -reset(); -url = "/channels/" + channelId + "/play/" + playbackId + ""; -method = "POST"; -lParamQuery.add( HttpParam.build( "media", media) ); -lParamQuery.add( HttpParam.build( "lang", lang) ); -lParamQuery.add( HttpParam.build( "offsetms", offsetms) ); -lParamQuery.add( HttpParam.build( "skipms", skipms) ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public Playback playWithId(String channelId, String playbackId, String media, String lang, int offsetms, int skipms) throws RestException { -buildPlayWithId(channelId, playbackId, media, lang, offsetms, skipms); -String json = httpActionSync(); -return deserializeJson( json, Playback_impl_ari_1_8_0.class ); -} - -@Override -public void playWithId(String channelId, String playbackId, String media, String lang, int offsetms, int skipms, AriCallback callback) { -buildPlayWithId(channelId, playbackId, media, lang, offsetms, skipms); -httpActionAsync(callback, Playback_impl_ari_1_8_0.class); -} - -/********************************************************** - * Record audio from a channel - * - * Start a recording. - * 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. - *********************************************************/ -private void buildRecord(String channelId, String name, String format, int maxDurationSeconds, int maxSilenceSeconds, String ifExists, boolean beep, String terminateOn) { -reset(); -url = "/channels/" + channelId + "/record"; -method = "POST"; -lParamQuery.add( HttpParam.build( "name", name) ); -lParamQuery.add( HttpParam.build( "format", format) ); -lParamQuery.add( HttpParam.build( "maxDurationSeconds", maxDurationSeconds) ); -lParamQuery.add( HttpParam.build( "maxSilenceSeconds", maxSilenceSeconds) ); -lParamQuery.add( HttpParam.build( "ifExists", ifExists) ); -lParamQuery.add( HttpParam.build( "beep", beep) ); -lParamQuery.add( HttpParam.build( "terminateOn", terminateOn) ); -lE.add( HttpResponse.build( 400, "Invalid parameters") ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "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") ); -lE.add( HttpResponse.build( 422, "The format specified is unknown on this system") ); -} - -@Override -public LiveRecording record(String channelId, String name, String format, int maxDurationSeconds, int maxSilenceSeconds, String ifExists, boolean beep, String terminateOn) throws RestException { -buildRecord(channelId, name, format, maxDurationSeconds, maxSilenceSeconds, ifExists, beep, terminateOn); -String json = httpActionSync(); -return deserializeJson( json, LiveRecording_impl_ari_1_8_0.class ); -} - -@Override -public void record(String channelId, String name, String format, int maxDurationSeconds, int maxSilenceSeconds, String ifExists, boolean beep, String terminateOn, AriCallback callback) { -buildRecord(channelId, name, format, maxDurationSeconds, maxSilenceSeconds, ifExists, beep, terminateOn); -httpActionAsync(callback, LiveRecording_impl_ari_1_8_0.class); -} - -/********************************************************** - * Inform the channel that it should redirect itself to a different location. Note that this will almost certainly cause the channel to exit the application. - * - * Redirect the channel to a different location. - *********************************************************/ -private void buildRedirect(String channelId, String endpoint) { -reset(); -url = "/channels/" + channelId + "/redirect"; -method = "POST"; -lParamQuery.add( HttpParam.build( "endpoint", endpoint) ); -lE.add( HttpResponse.build( 400, "Endpoint parameter not provided") ); -lE.add( HttpResponse.build( 404, "Channel or endpoint not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -lE.add( HttpResponse.build( 422, "Endpoint is not the same type as the channel") ); -} - -@Override -public void redirect(String channelId, String endpoint) throws RestException { -buildRedirect(channelId, endpoint); -String json = httpActionSync(); -} - -@Override -public void redirect(String channelId, String endpoint, AriCallback callback) { -buildRedirect(channelId, endpoint); -httpActionAsync(callback); -} - -/********************************************************** - * Send a ringing indication to a channel - * - * Indicate ringing to a channel. - *********************************************************/ -private void buildRing(String channelId) { -reset(); -url = "/channels/" + channelId + "/ring"; -method = "POST"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void ring(String channelId) throws RestException { -buildRing(channelId); -String json = httpActionSync(); -} - -@Override -public void ring(String channelId, AriCallback callback) { -buildRing(channelId); -httpActionAsync(callback); -} - -/********************************************************** - * Send a ringing indication to a channel - * - * Stop ringing indication on a channel if locally generated. - *********************************************************/ -private void buildRingStop(String channelId) { -reset(); -url = "/channels/" + channelId + "/ring"; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void ringStop(String channelId) throws RestException { -buildRingStop(channelId); -String json = httpActionSync(); -} - -@Override -public void ringStop(String channelId, AriCallback callback) { -buildRingStop(channelId); -httpActionAsync(callback); -} - -/********************************************************** - * Play silence to a channel - * - * Play silence to a channel. - * Using media operations such as /play on a channel playing silence in this manner will suspend silence without resuming automatically. - *********************************************************/ -private void buildStartSilence(String channelId) { -reset(); -url = "/channels/" + channelId + "/silence"; -method = "POST"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void startSilence(String channelId) throws RestException { -buildStartSilence(channelId); -String json = httpActionSync(); -} - -@Override -public void startSilence(String channelId, AriCallback callback) { -buildStartSilence(channelId); -httpActionAsync(callback); -} - -/********************************************************** - * Play silence to a channel - * - * Stop playing silence to a channel. - *********************************************************/ -private void buildStopSilence(String channelId) { -reset(); -url = "/channels/" + channelId + "/silence"; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void stopSilence(String channelId) throws RestException { -buildStopSilence(channelId); -String json = httpActionSync(); -} - -@Override -public void stopSilence(String channelId, AriCallback callback) { -buildStopSilence(channelId); -httpActionAsync(callback); -} - -/********************************************************** - * Snoop (spy/whisper) on a channel - * - * Start snooping. - * Snoop (spy/whisper) on a specific channel. - *********************************************************/ -private void buildSnoopChannel(String channelId, String spy, String whisper, String app, String appArgs, String snoopId) { -reset(); -url = "/channels/" + channelId + "/snoop"; -method = "POST"; -lParamQuery.add( HttpParam.build( "spy", spy) ); -lParamQuery.add( HttpParam.build( "whisper", whisper) ); -lParamQuery.add( HttpParam.build( "app", app) ); -lParamQuery.add( HttpParam.build( "appArgs", appArgs) ); -lParamQuery.add( HttpParam.build( "snoopId", snoopId) ); -lE.add( HttpResponse.build( 400, "Invalid parameters") ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -} - -@Override -public Channel snoopChannel(String channelId, String spy, String whisper, String app, String appArgs, String snoopId) throws RestException { -buildSnoopChannel(channelId, spy, whisper, app, appArgs, snoopId); -String json = httpActionSync(); -return deserializeJson( json, Channel_impl_ari_1_8_0.class ); -} - -@Override -public void snoopChannel(String channelId, String spy, String whisper, String app, String appArgs, String snoopId, AriCallback callback) { -buildSnoopChannel(channelId, spy, whisper, app, appArgs, snoopId); -httpActionAsync(callback, Channel_impl_ari_1_8_0.class); -} - -/********************************************************** - * Snoop (spy/whisper) on a channel - * - * Start snooping. - * Snoop (spy/whisper) on a specific channel. - *********************************************************/ -private void buildSnoopChannelWithId(String channelId, String snoopId, String spy, String whisper, String app, String appArgs) { -reset(); -url = "/channels/" + channelId + "/snoop/" + snoopId + ""; -method = "POST"; -lParamQuery.add( HttpParam.build( "spy", spy) ); -lParamQuery.add( HttpParam.build( "whisper", whisper) ); -lParamQuery.add( HttpParam.build( "app", app) ); -lParamQuery.add( HttpParam.build( "appArgs", appArgs) ); -lE.add( HttpResponse.build( 400, "Invalid parameters") ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -} - -@Override -public Channel snoopChannelWithId(String channelId, String snoopId, String spy, String whisper, String app, String appArgs) throws RestException { -buildSnoopChannelWithId(channelId, snoopId, spy, whisper, app, appArgs); -String json = httpActionSync(); -return deserializeJson( json, Channel_impl_ari_1_8_0.class ); -} - -@Override -public void snoopChannelWithId(String channelId, String snoopId, String spy, String whisper, String app, String appArgs, AriCallback callback) { -buildSnoopChannelWithId(channelId, snoopId, spy, whisper, app, appArgs); -httpActionAsync(callback, Channel_impl_ari_1_8_0.class); -} - -/********************************************************** - * Variables on a channel - * - * Get the value of a channel variable or function. - *********************************************************/ -private void buildGetChannelVar(String channelId, String variable) { -reset(); -url = "/channels/" + channelId + "/variable"; -method = "GET"; -lParamQuery.add( HttpParam.build( "variable", variable) ); -lE.add( HttpResponse.build( 400, "Missing variable parameter.") ); -lE.add( HttpResponse.build( 404, "Channel or variable not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public Variable getChannelVar(String channelId, String variable) throws RestException { -buildGetChannelVar(channelId, variable); -String json = httpActionSync(); -return deserializeJson( json, Variable_impl_ari_1_8_0.class ); -} - -@Override -public void getChannelVar(String channelId, String variable, AriCallback callback) { -buildGetChannelVar(channelId, variable); -httpActionAsync(callback, Variable_impl_ari_1_8_0.class); -} - -/********************************************************** - * Variables on a channel - * - * Set the value of a channel variable or function. - *********************************************************/ -private void buildSetChannelVar(String channelId, String variable, String value) { -reset(); -url = "/channels/" + channelId + "/variable"; -method = "POST"; -lParamQuery.add( HttpParam.build( "variable", variable) ); -lParamQuery.add( HttpParam.build( "value", value) ); -lE.add( HttpResponse.build( 400, "Missing variable parameter.") ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void setChannelVar(String channelId, String variable, String value) throws RestException { -buildSetChannelVar(channelId, variable, value); -String json = httpActionSync(); -} - -@Override -public void setChannelVar(String channelId, String variable, String value, AriCallback callback) { -buildSetChannelVar(channelId, variable, value); -httpActionAsync(callback); -} - -/********************************************************** - * - * - * @since ari_1_5_0 - *********************************************************/ -public void originateWithId(String channelId, String endpoint, String extension, String context, long priority, String app, String appArgs, String callerId, int timeout, Map variables, String otherChannelId, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_10_0 - *********************************************************/ -public void dial(String channelId, String caller, int timeout, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void snoopChannel(String channelId, String spy, String whisper, String app, String appArgs, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Dial a created channel. - * - * - * @since ari_1_10_0 - *********************************************************/ -public void dial(String channelId, String caller, int timeout) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void continueInDialplan(String channelId, String context, String extension, int priority, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_10_0 - *********************************************************/ -public void originateWithId(String channelId, String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String otherChannelId, String originator, String formats, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Start playback of media. - * 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.) - * - * @since ari_0_0_1 - *********************************************************/ -public Playback play(String channelId, String media, String lang, int offsetms, int skipms) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Exit application{ - throw new UnsupportedOperationException("Method availble from ..."); -}; continue execution in the dialplan. - * - * - * @since ari_0_0_1 - *********************************************************/ -public void continueInDialplan(String channelId, String context, String extension, int priority) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new channel (originate). - * 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. - * - * @since ari_1_10_0 - *********************************************************/ -public Channel originate(String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String channelId, String otherChannelId, String originator, String formats) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void originate(String endpoint, String extension, String context, long priority, String app, String appArgs, String callerId, int timeout, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create channel. - * - * - * @since ari_1_10_0 - *********************************************************/ -public Channel create(String endpoint, String app, String appArgs, String channelId, String otherChannelId, String originator, String formats) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_5_0 - *********************************************************/ -public void originate(String endpoint, String extension, String context, long priority, String app, String appArgs, String callerId, int timeout, Map variables, String channelId, String otherChannelId, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new channel (originate). - * 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. - * - * @since ari_0_0_1 - *********************************************************/ -public Channel originate(String endpoint, String extension, String context, long priority, String app, String appArgs, String callerId, int timeout) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new channel (originate with id). - * 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. - * - * @since ari_1_5_0 - *********************************************************/ -public Channel originateWithId(String channelId, String endpoint, String extension, String context, long priority, String app, String appArgs, String callerId, int timeout, Map variables, String otherChannelId) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new channel (originate with id). - * 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. - * - * @since ari_1_10_0 - *********************************************************/ -public Channel originateWithId(String channelId, String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String otherChannelId, String originator, String formats) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_10_0 - *********************************************************/ -public void create(String endpoint, String app, String appArgs, String channelId, String otherChannelId, String originator, String formats, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new channel (originate). - * 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. - * - * @since ari_1_5_0 - *********************************************************/ -public Channel originate(String endpoint, String extension, String context, long priority, String app, String appArgs, String callerId, int timeout, Map variables, String channelId, String otherChannelId) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void play(String channelId, String media, String lang, int offsetms, int skipms, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Start snooping. - * Snoop (spy/whisper) on a specific channel. - * - * @since ari_0_0_1 - *********************************************************/ -public Channel snoopChannel(String channelId, String spy, String whisper, String app, String appArgs) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_10_0 - *********************************************************/ -public void originate(String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String channelId, String otherChannelId, String originator, String formats, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/actions/ActionDeviceStates_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/actions/ActionDeviceStates_impl_ari_1_8_0.java deleted file mode 100644 index ffc3c87d..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/actions/ActionDeviceStates_impl_ari_1_8_0.java +++ /dev/null @@ -1,131 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_8_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionDeviceStates_impl_ari_1_8_0 extends BaseAriAction implements ActionDeviceStates { -/********************************************************** - * Device states - * - * List all ARI controlled device states. - *********************************************************/ -private void buildList() { -reset(); -url = "/deviceStates"; -method = "GET"; -} - -@Override -public List list() throws RestException { -buildList(); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void list(AriCallback> callback) { -buildList(); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Device state - * - * Retrieve the current state of a device. - *********************************************************/ -private void buildGet(String deviceName) { -reset(); -url = "/deviceStates/" + deviceName + ""; -method = "GET"; -} - -@Override -public DeviceState get(String deviceName) throws RestException { -buildGet(deviceName); -String json = httpActionSync(); -return deserializeJson( json, DeviceState_impl_ari_1_8_0.class ); -} - -@Override -public void get(String deviceName, AriCallback callback) { -buildGet(deviceName); -httpActionAsync(callback, DeviceState_impl_ari_1_8_0.class); -} - -/********************************************************** - * Device state - * - * Change the state of a device controlled by ARI. (Note - implicitly creates the device state). - *********************************************************/ -private void buildUpdate(String deviceName, String deviceState) { -reset(); -url = "/deviceStates/" + deviceName + ""; -method = "PUT"; -lParamQuery.add( HttpParam.build( "deviceState", deviceState) ); -lE.add( HttpResponse.build( 404, "Device name is missing") ); -lE.add( HttpResponse.build( 409, "Uncontrolled device specified") ); -} - -@Override -public void update(String deviceName, String deviceState) throws RestException { -buildUpdate(deviceName, deviceState); -String json = httpActionSync(); -} - -@Override -public void update(String deviceName, String deviceState, AriCallback callback) { -buildUpdate(deviceName, deviceState); -httpActionAsync(callback); -} - -/********************************************************** - * Device state - * - * Destroy a device-state controlled by ARI. - *********************************************************/ -private void buildDelete(String deviceName) { -reset(); -url = "/deviceStates/" + deviceName + ""; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Device name is missing") ); -lE.add( HttpResponse.build( 409, "Uncontrolled device specified") ); -} - -@Override -public void delete(String deviceName) throws RestException { -buildDelete(deviceName); -String json = httpActionSync(); -} - -@Override -public void delete(String deviceName, AriCallback callback) { -buildDelete(deviceName); -httpActionAsync(callback); -} - -/** No missing signatures from interface */ -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/actions/ActionEndpoints_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/actions/ActionEndpoints_impl_ari_1_8_0.java deleted file mode 100644 index 9723e1ce..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/actions/ActionEndpoints_impl_ari_1_8_0.java +++ /dev/null @@ -1,165 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_8_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionEndpoints_impl_ari_1_8_0 extends BaseAriAction implements ActionEndpoints { -/********************************************************** - * Asterisk endpoints - * - * List all endpoints. - *********************************************************/ -private void buildList() { -reset(); -url = "/endpoints"; -method = "GET"; -} - -@Override -public List list() throws RestException { -buildList(); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void list(AriCallback> callback) { -buildList(); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Send a message to some technology URI or endpoint. - * - * Send a message to some technology URI or endpoint. - *********************************************************/ -private void buildSendMessage(String to, String from, String body, Map variables) { -reset(); -url = "/endpoints/sendMessage"; -method = "PUT"; -lParamQuery.add( HttpParam.build( "to", to) ); -lParamQuery.add( HttpParam.build( "from", from) ); -lParamQuery.add( HttpParam.build( "body", body) ); -lParamBody.addAll( HttpParam.build( "variables", variables) ); -lE.add( HttpResponse.build( 400, "Invalid parameters for sending a message.") ); -lE.add( HttpResponse.build( 404, "Endpoint not found") ); -} - -@Override -public void sendMessage(String to, String from, String body, Map variables) throws RestException { -buildSendMessage(to, from, body, variables); -String json = httpActionSync(); -} - -@Override -public void sendMessage(String to, String from, String body, Map variables, AriCallback callback) { -buildSendMessage(to, from, body, variables); -httpActionAsync(callback); -} - -/********************************************************** - * Asterisk endpoints - * - * List available endoints for a given endpoint technology. - *********************************************************/ -private void buildListByTech(String tech) { -reset(); -url = "/endpoints/" + tech + ""; -method = "GET"; -lE.add( HttpResponse.build( 404, "Endpoints not found") ); -} - -@Override -public List listByTech(String tech) throws RestException { -buildListByTech(tech); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void listByTech(String tech, AriCallback> callback) { -buildListByTech(tech); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Single endpoint - * - * Details for an endpoint. - *********************************************************/ -private void buildGet(String tech, String resource) { -reset(); -url = "/endpoints/" + tech + "/" + resource + ""; -method = "GET"; -lE.add( HttpResponse.build( 400, "Invalid parameters for sending a message.") ); -lE.add( HttpResponse.build( 404, "Endpoints not found") ); -} - -@Override -public Endpoint get(String tech, String resource) throws RestException { -buildGet(tech, resource); -String json = httpActionSync(); -return deserializeJson( json, Endpoint_impl_ari_1_8_0.class ); -} - -@Override -public void get(String tech, String resource, AriCallback callback) { -buildGet(tech, resource); -httpActionAsync(callback, Endpoint_impl_ari_1_8_0.class); -} - -/********************************************************** - * Send a message to some endpoint in a technology. - * - * Send a message to some endpoint in a technology. - *********************************************************/ -private void buildSendMessageToEndpoint(String tech, String resource, String from, String body, Map variables) { -reset(); -url = "/endpoints/" + tech + "/" + resource + "/sendMessage"; -method = "PUT"; -lParamQuery.add( HttpParam.build( "from", from) ); -lParamQuery.add( HttpParam.build( "body", body) ); -lParamBody.addAll( HttpParam.build( "variables", variables) ); -lE.add( HttpResponse.build( 400, "Invalid parameters for sending a message.") ); -lE.add( HttpResponse.build( 404, "Endpoint not found") ); -} - -@Override -public void sendMessageToEndpoint(String tech, String resource, String from, String body, Map variables) throws RestException { -buildSendMessageToEndpoint(tech, resource, from, body, variables); -String json = httpActionSync(); -} - -@Override -public void sendMessageToEndpoint(String tech, String resource, String from, String body, Map variables, AriCallback callback) { -buildSendMessageToEndpoint(tech, resource, from, body, variables); -httpActionAsync(callback); -} - -/** No missing signatures from interface */ -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/actions/ActionEvents_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/actions/ActionEvents_impl_ari_1_8_0.java deleted file mode 100644 index 107dde34..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/actions/ActionEvents_impl_ari_1_8_0.java +++ /dev/null @@ -1,102 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_8_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionEvents_impl_ari_1_8_0 extends BaseAriAction implements ActionEvents { -/********************************************************** - * Events from Asterisk to applications - * - * WebSocket connection for events. - *********************************************************/ -private void buildEventWebsocket(String app) { -reset(); -url = "/events"; -method = "GET"; -lParamQuery.add( HttpParam.build( "app", app) ); -wsUpgrade = true; -} - -@Override -public Message eventWebsocket(String app) throws RestException { -throw new RestException("No synchronous operation on WebSocket"); -} - -@Override -public void eventWebsocket(String app, AriCallback callback) { -buildEventWebsocket(app); -httpActionAsync(callback, Message_impl_ari_1_8_0.class); -} - -/********************************************************** - * Stasis application user events - * - * Generate a user event. - *********************************************************/ -private void buildUserEvent(String eventName, String application, String source, Map variables) { -reset(); -url = "/events/user/" + eventName + ""; -method = "POST"; -lParamQuery.add( HttpParam.build( "application", application) ); -lParamQuery.add( HttpParam.build( "source", source) ); -lParamBody.addAll( HttpParam.build( "variables", variables) ); -lE.add( HttpResponse.build( 404, "Application does not exist.") ); -lE.add( HttpResponse.build( 422, "Event source not found.") ); -lE.add( HttpResponse.build( 400, "Invalid even tsource URI or userevent data.") ); -} - -@Override -public void userEvent(String eventName, String application, String source, Map variables) throws RestException { -buildUserEvent(eventName, application, source, variables); -String json = httpActionSync(); -} - -@Override -public void userEvent(String eventName, String application, String source, Map variables, AriCallback callback) { -buildUserEvent(eventName, application, source, variables); -httpActionAsync(callback); -} - -/********************************************************** - * - * - * @since ari_1_9_0 - *********************************************************/ -public void eventWebsocket(String app, boolean subscribeAll, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * WebSocket connection for events. - * - * - * @since ari_1_9_0 - *********************************************************/ -public Message eventWebsocket(String app, boolean subscribeAll) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/actions/ActionPlaybacks_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/actions/ActionPlaybacks_impl_ari_1_8_0.java deleted file mode 100644 index 99f98a53..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/actions/ActionPlaybacks_impl_ari_1_8_0.java +++ /dev/null @@ -1,107 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_8_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionPlaybacks_impl_ari_1_8_0 extends BaseAriAction implements ActionPlaybacks { -/********************************************************** - * Control object for a playback operation. - * - * Get a playback's details. - *********************************************************/ -private void buildGet(String playbackId) { -reset(); -url = "/playbacks/" + playbackId + ""; -method = "GET"; -lE.add( HttpResponse.build( 404, "The playback cannot be found") ); -} - -@Override -public Playback get(String playbackId) throws RestException { -buildGet(playbackId); -String json = httpActionSync(); -return deserializeJson( json, Playback_impl_ari_1_8_0.class ); -} - -@Override -public void get(String playbackId, AriCallback callback) { -buildGet(playbackId); -httpActionAsync(callback, Playback_impl_ari_1_8_0.class); -} - -/********************************************************** - * Control object for a playback operation. - * - * Stop a playback. - *********************************************************/ -private void buildStop(String playbackId) { -reset(); -url = "/playbacks/" + playbackId + ""; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "The playback cannot be found") ); -} - -@Override -public void stop(String playbackId) throws RestException { -buildStop(playbackId); -String json = httpActionSync(); -} - -@Override -public void stop(String playbackId, AriCallback callback) { -buildStop(playbackId); -httpActionAsync(callback); -} - -/********************************************************** - * Control object for a playback operation. - * - * Control a playback. - *********************************************************/ -private void buildControl(String playbackId, String operation) { -reset(); -url = "/playbacks/" + playbackId + "/control"; -method = "POST"; -lParamQuery.add( HttpParam.build( "operation", operation) ); -lE.add( HttpResponse.build( 400, "The provided operation parameter was invalid") ); -lE.add( HttpResponse.build( 404, "The playback cannot be found") ); -lE.add( HttpResponse.build( 409, "The operation cannot be performed in the playback's current state") ); -} - -@Override -public void control(String playbackId, String operation) throws RestException { -buildControl(playbackId, operation); -String json = httpActionSync(); -} - -@Override -public void control(String playbackId, String operation, AriCallback callback) { -buildControl(playbackId, operation); -httpActionAsync(callback); -} - -/** No missing signatures from interface */ -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/actions/ActionRecordings_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/actions/ActionRecordings_impl_ari_1_8_0.java deleted file mode 100644 index 6dc142f2..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/actions/ActionRecordings_impl_ari_1_8_0.java +++ /dev/null @@ -1,325 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_8_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionRecordings_impl_ari_1_8_0 extends BaseAriAction implements ActionRecordings { -/********************************************************** - * A recording that is in progress - * - * List live recordings. - *********************************************************/ -private void buildGetLive(String recordingName) { -reset(); -url = "/recordings/live/" + recordingName + ""; -method = "GET"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -} - -@Override -public LiveRecording getLive(String recordingName) throws RestException { -buildGetLive(recordingName); -String json = httpActionSync(); -return deserializeJson( json, LiveRecording_impl_ari_1_8_0.class ); -} - -@Override -public void getLive(String recordingName, AriCallback callback) { -buildGetLive(recordingName); -httpActionAsync(callback, LiveRecording_impl_ari_1_8_0.class); -} - -/********************************************************** - * A recording that is in progress - * - * Stop a live recording and discard it. - *********************************************************/ -private void buildCancel(String recordingName) { -reset(); -url = "/recordings/live/" + recordingName + ""; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -} - -@Override -public void cancel(String recordingName) throws RestException { -buildCancel(recordingName); -String json = httpActionSync(); -} - -@Override -public void cancel(String recordingName, AriCallback callback) { -buildCancel(recordingName); -httpActionAsync(callback); -} - -/********************************************************** - * - * - * Mute a live recording. - * Muting a recording suspends silence detection, which will be restarted when the recording is unmuted. - *********************************************************/ -private void buildMute(String recordingName) { -reset(); -url = "/recordings/live/" + recordingName + "/mute"; -method = "POST"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -lE.add( HttpResponse.build( 409, "Recording not in session") ); -} - -@Override -public void mute(String recordingName) throws RestException { -buildMute(recordingName); -String json = httpActionSync(); -} - -@Override -public void mute(String recordingName, AriCallback callback) { -buildMute(recordingName); -httpActionAsync(callback); -} - -/********************************************************** - * - * - * Unmute a live recording. - *********************************************************/ -private void buildUnmute(String recordingName) { -reset(); -url = "/recordings/live/" + recordingName + "/mute"; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -lE.add( HttpResponse.build( 409, "Recording not in session") ); -} - -@Override -public void unmute(String recordingName) throws RestException { -buildUnmute(recordingName); -String json = httpActionSync(); -} - -@Override -public void unmute(String recordingName, AriCallback callback) { -buildUnmute(recordingName); -httpActionAsync(callback); -} - -/********************************************************** - * - * - * Pause a live recording. - * Pausing a recording suspends silence detection, which will be restarted when the recording is unpaused. Paused time is not included in the accounting for maxDurationSeconds. - *********************************************************/ -private void buildPause(String recordingName) { -reset(); -url = "/recordings/live/" + recordingName + "/pause"; -method = "POST"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -lE.add( HttpResponse.build( 409, "Recording not in session") ); -} - -@Override -public void pause(String recordingName) throws RestException { -buildPause(recordingName); -String json = httpActionSync(); -} - -@Override -public void pause(String recordingName, AriCallback callback) { -buildPause(recordingName); -httpActionAsync(callback); -} - -/********************************************************** - * - * - * Unpause a live recording. - *********************************************************/ -private void buildUnpause(String recordingName) { -reset(); -url = "/recordings/live/" + recordingName + "/pause"; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -lE.add( HttpResponse.build( 409, "Recording not in session") ); -} - -@Override -public void unpause(String recordingName) throws RestException { -buildUnpause(recordingName); -String json = httpActionSync(); -} - -@Override -public void unpause(String recordingName, AriCallback callback) { -buildUnpause(recordingName); -httpActionAsync(callback); -} - -/********************************************************** - * - * - * Stop a live recording and store it. - *********************************************************/ -private void buildStop(String recordingName) { -reset(); -url = "/recordings/live/" + recordingName + "/stop"; -method = "POST"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -} - -@Override -public void stop(String recordingName) throws RestException { -buildStop(recordingName); -String json = httpActionSync(); -} - -@Override -public void stop(String recordingName, AriCallback callback) { -buildStop(recordingName); -httpActionAsync(callback); -} - -/********************************************************** - * Recordings - * - * List recordings that are complete. - *********************************************************/ -private void buildListStored() { -reset(); -url = "/recordings/stored"; -method = "GET"; -} - -@Override -public List listStored() throws RestException { -buildListStored(); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void listStored(AriCallback> callback) { -buildListStored(); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Individual recording - * - * Get a stored recording's details. - *********************************************************/ -private void buildGetStored(String recordingName) { -reset(); -url = "/recordings/stored/" + recordingName + ""; -method = "GET"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -} - -@Override -public StoredRecording getStored(String recordingName) throws RestException { -buildGetStored(recordingName); -String json = httpActionSync(); -return deserializeJson( json, StoredRecording_impl_ari_1_8_0.class ); -} - -@Override -public void getStored(String recordingName, AriCallback callback) { -buildGetStored(recordingName); -httpActionAsync(callback, StoredRecording_impl_ari_1_8_0.class); -} - -/********************************************************** - * Individual recording - * - * Delete a stored recording. - *********************************************************/ -private void buildDeleteStored(String recordingName) { -reset(); -url = "/recordings/stored/" + recordingName + ""; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -} - -@Override -public void deleteStored(String recordingName) throws RestException { -buildDeleteStored(recordingName); -String json = httpActionSync(); -} - -@Override -public void deleteStored(String recordingName, AriCallback callback) { -buildDeleteStored(recordingName); -httpActionAsync(callback); -} - -/********************************************************** - * Copy an individual recording - * - * Copy a stored recording. - *********************************************************/ -private void buildCopyStored(String recordingName, String destinationRecordingName) { -reset(); -url = "/recordings/stored/" + recordingName + "/copy"; -method = "POST"; -lParamQuery.add( HttpParam.build( "destinationRecordingName", destinationRecordingName) ); -lE.add( HttpResponse.build( 404, "Recording not found") ); -lE.add( HttpResponse.build( 409, "A recording with the same name already exists on the system") ); -} - -@Override -public StoredRecording copyStored(String recordingName, String destinationRecordingName) throws RestException { -buildCopyStored(recordingName, destinationRecordingName); -String json = httpActionSync(); -return deserializeJson( json, StoredRecording_impl_ari_1_8_0.class ); -} - -@Override -public void copyStored(String recordingName, String destinationRecordingName, AriCallback callback) { -buildCopyStored(recordingName, destinationRecordingName); -httpActionAsync(callback, StoredRecording_impl_ari_1_8_0.class); -} - -/********************************************************** - * - * - * @since ari_1_10_0 - *********************************************************/ -public void getStoredFile(String recordingName, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Get the file associated with the stored recording. - * - * - * @since ari_1_10_0 - *********************************************************/ -public byte[] getStoredFile(String recordingName) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/actions/ActionSounds_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/actions/ActionSounds_impl_ari_1_8_0.java deleted file mode 100644 index 8d9cd06c..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/actions/ActionSounds_impl_ari_1_8_0.java +++ /dev/null @@ -1,82 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_8_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionSounds_impl_ari_1_8_0 extends BaseAriAction implements ActionSounds { -/********************************************************** - * Sounds - * - * List all sounds. - *********************************************************/ -private void buildList(String lang, String format) { -reset(); -url = "/sounds"; -method = "GET"; -lParamQuery.add( HttpParam.build( "lang", lang) ); -lParamQuery.add( HttpParam.build( "format", format) ); -} - -@Override -public List list(String lang, String format) throws RestException { -buildList(lang, format); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void list(String lang, String format, AriCallback> callback) { -buildList(lang, format); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Individual sound - * - * Get a sound's details. - *********************************************************/ -private void buildGet(String soundId) { -reset(); -url = "/sounds/" + soundId + ""; -method = "GET"; -} - -@Override -public Sound get(String soundId) throws RestException { -buildGet(soundId); -String json = httpActionSync(); -return deserializeJson( json, Sound_impl_ari_1_8_0.class ); -} - -@Override -public void get(String soundId, AriCallback callback) { -buildGet(soundId); -httpActionAsync(callback, Sound_impl_ari_1_8_0.class); -} - -/** No missing signatures from interface */ -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/ApplicationReplaced_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/ApplicationReplaced_impl_ari_1_8_0.java deleted file mode 100644 index 54401a8d..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/ApplicationReplaced_impl_ari_1_8_0.java +++ /dev/null @@ -1,28 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that another WebSocket has taken over for an application. - * - * An 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. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ApplicationReplaced_impl_ari_1_8_0 extends Event_impl_ari_1_8_0 implements ApplicationReplaced, java.io.Serializable { -private static final long serialVersionUID = 1L; -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/Application_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/Application_impl_ari_1_8_0.java deleted file mode 100644 index b5c9464d..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/Application_impl_ari_1_8_0.java +++ /dev/null @@ -1,81 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Details of a Stasis application - * - * Defined in file: applications.json - * Generated by: Model - *********************************************************/ - -public class Application_impl_ari_1_8_0 implements Application, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Id's for bridges subscribed to. */ - private List bridge_ids; - public List getBridge_ids() { - return bridge_ids; - } - - @JsonDeserialize( contentAs=String.class ) - public void setBridge_ids(List val ) { - bridge_ids = val; - } - - /** Id's for channels subscribed to. */ - private List channel_ids; - public List getChannel_ids() { - return channel_ids; - } - - @JsonDeserialize( contentAs=String.class ) - public void setChannel_ids(List val ) { - channel_ids = val; - } - - /** Names of the devices subscribed to. */ - private List device_names; - public List getDevice_names() { - return device_names; - } - - @JsonDeserialize( contentAs=String.class ) - public void setDevice_names(List val ) { - device_names = val; - } - - /** {tech}/{resource} for endpoints subscribed to. */ - private List endpoint_ids; - public List getEndpoint_ids() { - return endpoint_ids; - } - - @JsonDeserialize( contentAs=String.class ) - public void setEndpoint_ids(List val ) { - endpoint_ids = val; - } - - /** Name of this application */ - private String name; - public String getName() { - return name; - } - - @JsonDeserialize( as=String.class ) - public void setName(String val ) { - name = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/AsteriskInfo_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/AsteriskInfo_impl_ari_1_8_0.java deleted file mode 100644 index bb3e7087..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/AsteriskInfo_impl_ari_1_8_0.java +++ /dev/null @@ -1,70 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Asterisk system information - * - * Defined in file: asterisk.json - * Generated by: Model - *********************************************************/ - -public class AsteriskInfo_impl_ari_1_8_0 implements AsteriskInfo, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Info about how Asterisk was built */ - private BuildInfo build; - public BuildInfo getBuild() { - return build; - } - - @JsonDeserialize( as=BuildInfo_impl_ari_1_8_0.class ) - public void setBuild(BuildInfo val ) { - build = val; - } - - /** Info about Asterisk configuration */ - private ConfigInfo config; - public ConfigInfo getConfig() { - return config; - } - - @JsonDeserialize( as=ConfigInfo_impl_ari_1_8_0.class ) - public void setConfig(ConfigInfo val ) { - config = val; - } - - /** Info about Asterisk status */ - private StatusInfo status; - public StatusInfo getStatus() { - return status; - } - - @JsonDeserialize( as=StatusInfo_impl_ari_1_8_0.class ) - public void setStatus(StatusInfo val ) { - status = val; - } - - /** Info about the system running Asterisk */ - private SystemInfo system; - public SystemInfo getSystem() { - return system; - } - - @JsonDeserialize( as=SystemInfo_impl_ari_1_8_0.class ) - public void setSystem(SystemInfo val ) { - system = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/BridgeAttendedTransfer_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/BridgeAttendedTransfer_impl_ari_1_8_0.java deleted file mode 100644 index dbba50db..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/BridgeAttendedTransfer_impl_ari_1_8_0.java +++ /dev/null @@ -1,202 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that an attended transfer has occurred. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class BridgeAttendedTransfer_impl_ari_1_8_0 extends Event_impl_ari_1_8_0 implements BridgeAttendedTransfer, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Application that has been transferred into */ - private String destination_application; - public String getDestination_application() { - return destination_application; - } - - @JsonDeserialize( as=String.class ) - public void setDestination_application(String val ) { - destination_application = val; - } - - /** Bridge that survived the merge result */ - private String destination_bridge; - public String getDestination_bridge() { - return destination_bridge; - } - - @JsonDeserialize( as=String.class ) - public void setDestination_bridge(String val ) { - destination_bridge = val; - } - - /** First leg of a link transfer result */ - private Channel destination_link_first_leg; - public Channel getDestination_link_first_leg() { - return destination_link_first_leg; - } - - @JsonDeserialize( as=Channel_impl_ari_1_8_0.class ) - public void setDestination_link_first_leg(Channel val ) { - destination_link_first_leg = val; - } - - /** Second leg of a link transfer result */ - private Channel destination_link_second_leg; - public Channel getDestination_link_second_leg() { - return destination_link_second_leg; - } - - @JsonDeserialize( as=Channel_impl_ari_1_8_0.class ) - public void setDestination_link_second_leg(Channel val ) { - destination_link_second_leg = val; - } - - /** Bridge that survived the threeway result */ - private Bridge destination_threeway_bridge; - public Bridge getDestination_threeway_bridge() { - return destination_threeway_bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_8_0.class ) - public void setDestination_threeway_bridge(Bridge val ) { - destination_threeway_bridge = val; - } - - /** Transferer channel that survived the threeway result */ - private Channel destination_threeway_channel; - public Channel getDestination_threeway_channel() { - return destination_threeway_channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_8_0.class ) - public void setDestination_threeway_channel(Channel val ) { - destination_threeway_channel = val; - } - - /** How the transfer was accomplished */ - private String destination_type; - public String getDestination_type() { - return destination_type; - } - - @JsonDeserialize( as=String.class ) - public void setDestination_type(String val ) { - destination_type = val; - } - - /** Whether the transfer was externally initiated or not */ - private boolean is_external; - public boolean getIs_external() { - return is_external; - } - - @JsonDeserialize( as=boolean.class ) - public void setIs_external(boolean val ) { - is_external = val; - } - - /** The channel that is replacing transferer_first_leg in the swap */ - private Channel replace_channel; - public Channel getReplace_channel() { - return replace_channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_8_0.class ) - public void setReplace_channel(Channel val ) { - replace_channel = val; - } - - /** The result of the transfer attempt */ - private String result; - public String getResult() { - return result; - } - - @JsonDeserialize( as=String.class ) - public void setResult(String val ) { - result = val; - } - - /** The channel that is being transferred to */ - private Channel transfer_target; - public Channel getTransfer_target() { - return transfer_target; - } - - @JsonDeserialize( as=Channel_impl_ari_1_8_0.class ) - public void setTransfer_target(Channel val ) { - transfer_target = val; - } - - /** The channel that is being transferred */ - private Channel transferee; - public Channel getTransferee() { - return transferee; - } - - @JsonDeserialize( as=Channel_impl_ari_1_8_0.class ) - public void setTransferee(Channel val ) { - transferee = val; - } - - /** First leg of the transferer */ - private Channel transferer_first_leg; - public Channel getTransferer_first_leg() { - return transferer_first_leg; - } - - @JsonDeserialize( as=Channel_impl_ari_1_8_0.class ) - public void setTransferer_first_leg(Channel val ) { - transferer_first_leg = val; - } - - /** Bridge the transferer first leg is in */ - private Bridge transferer_first_leg_bridge; - public Bridge getTransferer_first_leg_bridge() { - return transferer_first_leg_bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_8_0.class ) - public void setTransferer_first_leg_bridge(Bridge val ) { - transferer_first_leg_bridge = val; - } - - /** Second leg of the transferer */ - private Channel transferer_second_leg; - public Channel getTransferer_second_leg() { - return transferer_second_leg; - } - - @JsonDeserialize( as=Channel_impl_ari_1_8_0.class ) - public void setTransferer_second_leg(Channel val ) { - transferer_second_leg = val; - } - - /** Bridge the transferer second leg is in */ - private Bridge transferer_second_leg_bridge; - public Bridge getTransferer_second_leg_bridge() { - return transferer_second_leg_bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_8_0.class ) - public void setTransferer_second_leg_bridge(Bridge val ) { - transferer_second_leg_bridge = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/BridgeBlindTransfer_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/BridgeBlindTransfer_impl_ari_1_8_0.java deleted file mode 100644 index f5c9a2fe..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/BridgeBlindTransfer_impl_ari_1_8_0.java +++ /dev/null @@ -1,114 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a blind transfer has occurred. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class BridgeBlindTransfer_impl_ari_1_8_0 extends Event_impl_ari_1_8_0 implements BridgeBlindTransfer, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The bridge being transferred */ - private Bridge bridge; - public Bridge getBridge() { - return bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_8_0.class ) - public void setBridge(Bridge val ) { - bridge = val; - } - - /** The channel performing the blind transfer */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_8_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - - /** The context transferred to */ - private String context; - public String getContext() { - return context; - } - - @JsonDeserialize( as=String.class ) - public void setContext(String val ) { - context = val; - } - - /** The extension transferred to */ - private String exten; - public String getExten() { - return exten; - } - - @JsonDeserialize( as=String.class ) - public void setExten(String val ) { - exten = val; - } - - /** Whether the transfer was externally initiated or not */ - private boolean is_external; - public boolean getIs_external() { - return is_external; - } - - @JsonDeserialize( as=boolean.class ) - public void setIs_external(boolean val ) { - is_external = val; - } - - /** The channel that is replacing transferer when the transferee(s) can not be transferred directly */ - private Channel replace_channel; - public Channel getReplace_channel() { - return replace_channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_8_0.class ) - public void setReplace_channel(Channel val ) { - replace_channel = val; - } - - /** The result of the transfer attempt */ - private String result; - public String getResult() { - return result; - } - - @JsonDeserialize( as=String.class ) - public void setResult(String val ) { - result = val; - } - - /** The channel that is being transferred */ - private Channel transferee; - public Channel getTransferee() { - return transferee; - } - - @JsonDeserialize( as=Channel_impl_ari_1_8_0.class ) - public void setTransferee(Channel val ) { - transferee = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/BridgeCreated_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/BridgeCreated_impl_ari_1_8_0.java deleted file mode 100644 index 082d5169..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/BridgeCreated_impl_ari_1_8_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a bridge has been created. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class BridgeCreated_impl_ari_1_8_0 extends Event_impl_ari_1_8_0 implements BridgeCreated, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Bridge bridge; - public Bridge getBridge() { - return bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_8_0.class ) - public void setBridge(Bridge val ) { - bridge = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/BridgeDestroyed_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/BridgeDestroyed_impl_ari_1_8_0.java deleted file mode 100644 index b2473867..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/BridgeDestroyed_impl_ari_1_8_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a bridge has been destroyed. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class BridgeDestroyed_impl_ari_1_8_0 extends Event_impl_ari_1_8_0 implements BridgeDestroyed, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Bridge bridge; - public Bridge getBridge() { - return bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_8_0.class ) - public void setBridge(Bridge val ) { - bridge = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/BridgeMerged_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/BridgeMerged_impl_ari_1_8_0.java deleted file mode 100644 index cb396b71..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/BridgeMerged_impl_ari_1_8_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that one bridge has merged into another. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class BridgeMerged_impl_ari_1_8_0 extends Event_impl_ari_1_8_0 implements BridgeMerged, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Bridge bridge; - public Bridge getBridge() { - return bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_8_0.class ) - public void setBridge(Bridge val ) { - bridge = val; - } - - /** */ - private Bridge bridge_from; - public Bridge getBridge_from() { - return bridge_from; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_8_0.class ) - public void setBridge_from(Bridge val ) { - bridge_from = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/Bridge_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/Bridge_impl_ari_1_8_0.java deleted file mode 100644 index 28c05ed4..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/Bridge_impl_ari_1_8_0.java +++ /dev/null @@ -1,105 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * The merging of media from one or more channels. - * - * Everyone on the bridge receives the same audio. - * - * Defined in file: bridges.json - * Generated by: Model - *********************************************************/ - -public class Bridge_impl_ari_1_8_0 implements Bridge, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Bridging class */ - private String bridge_class; - public String getBridge_class() { - return bridge_class; - } - - @JsonDeserialize( as=String.class ) - public void setBridge_class(String val ) { - bridge_class = val; - } - - /** Type of bridge technology */ - private String bridge_type; - public String getBridge_type() { - return bridge_type; - } - - @JsonDeserialize( as=String.class ) - public void setBridge_type(String val ) { - bridge_type = val; - } - - /** Ids of channels participating in this bridge */ - private List channels; - public List getChannels() { - return channels; - } - - @JsonDeserialize( contentAs=String.class ) - public void setChannels(List val ) { - channels = val; - } - - /** Entity that created the bridge */ - private String creator; - public String getCreator() { - return creator; - } - - @JsonDeserialize( as=String.class ) - public void setCreator(String val ) { - creator = val; - } - - /** Unique identifier for this bridge */ - private String id; - public String getId() { - return id; - } - - @JsonDeserialize( as=String.class ) - public void setId(String val ) { - id = val; - } - - /** Name the creator gave the bridge */ - private String name; - public String getName() { - return name; - } - - @JsonDeserialize( as=String.class ) - public void setName(String val ) { - name = val; - } - - /** Name of the current bridging technology */ - private String technology; - public String getTechnology() { - return technology; - } - - @JsonDeserialize( as=String.class ) - public void setTechnology(String val ) { - technology = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/BuildInfo_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/BuildInfo_impl_ari_1_8_0.java deleted file mode 100644 index 91916b40..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/BuildInfo_impl_ari_1_8_0.java +++ /dev/null @@ -1,92 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Info about how Asterisk was built - * - * Defined in file: asterisk.json - * Generated by: Model - *********************************************************/ - -public class BuildInfo_impl_ari_1_8_0 implements BuildInfo, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Date and time when Asterisk was built. */ - private String date; - public String getDate() { - return date; - } - - @JsonDeserialize( as=String.class ) - public void setDate(String val ) { - date = val; - } - - /** Kernel version Asterisk was built on. */ - private String kernel; - public String getKernel() { - return kernel; - } - - @JsonDeserialize( as=String.class ) - public void setKernel(String val ) { - kernel = val; - } - - /** Machine architecture (x86_64, i686, ppc, etc.) */ - private String machine; - public String getMachine() { - return machine; - } - - @JsonDeserialize( as=String.class ) - public void setMachine(String val ) { - machine = val; - } - - /** Compile time options, or empty string if default. */ - private String options; - public String getOptions() { - return options; - } - - @JsonDeserialize( as=String.class ) - public void setOptions(String val ) { - options = val; - } - - /** OS Asterisk was built on. */ - private String os; - public String getOs() { - return os; - } - - @JsonDeserialize( as=String.class ) - public void setOs(String val ) { - os = val; - } - - /** Username that build Asterisk */ - private String user; - public String getUser() { - return user; - } - - @JsonDeserialize( as=String.class ) - public void setUser(String val ) { - user = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/CallerID_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/CallerID_impl_ari_1_8_0.java deleted file mode 100644 index 4f8f27ef..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/CallerID_impl_ari_1_8_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Caller identification - * - * Defined in file: channels.json - * Generated by: Model - *********************************************************/ - -public class CallerID_impl_ari_1_8_0 implements CallerID, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private String name; - public String getName() { - return name; - } - - @JsonDeserialize( as=String.class ) - public void setName(String val ) { - name = val; - } - - /** */ - private String number; - public String getNumber() { - return number; - } - - @JsonDeserialize( as=String.class ) - public void setNumber(String val ) { - number = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/ChannelCallerId_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/ChannelCallerId_impl_ari_1_8_0.java deleted file mode 100644 index ec82d98a..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/ChannelCallerId_impl_ari_1_8_0.java +++ /dev/null @@ -1,59 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Channel changed Caller ID. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelCallerId_impl_ari_1_8_0 extends Event_impl_ari_1_8_0 implements ChannelCallerId, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The integer representation of the Caller Presentation value. */ - private int caller_presentation; - public int getCaller_presentation() { - return caller_presentation; - } - - @JsonDeserialize( as=int.class ) - public void setCaller_presentation(int val ) { - caller_presentation = val; - } - - /** The text representation of the Caller Presentation value. */ - private String caller_presentation_txt; - public String getCaller_presentation_txt() { - return caller_presentation_txt; - } - - @JsonDeserialize( as=String.class ) - public void setCaller_presentation_txt(String val ) { - caller_presentation_txt = val; - } - - /** The channel that changed Caller ID. */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_8_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/ChannelConnectedLine_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/ChannelConnectedLine_impl_ari_1_8_0.java deleted file mode 100644 index c0107eae..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/ChannelConnectedLine_impl_ari_1_8_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Channel changed Connected Line. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelConnectedLine_impl_ari_1_8_0 extends Event_impl_ari_1_8_0 implements ChannelConnectedLine, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The channel whose connected line has changed. */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_8_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/ChannelCreated_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/ChannelCreated_impl_ari_1_8_0.java deleted file mode 100644 index 79675a82..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/ChannelCreated_impl_ari_1_8_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a channel has been created. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelCreated_impl_ari_1_8_0 extends Event_impl_ari_1_8_0 implements ChannelCreated, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_8_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/ChannelDestroyed_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/ChannelDestroyed_impl_ari_1_8_0.java deleted file mode 100644 index 7e4d5f51..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/ChannelDestroyed_impl_ari_1_8_0.java +++ /dev/null @@ -1,59 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a channel has been destroyed. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelDestroyed_impl_ari_1_8_0 extends Event_impl_ari_1_8_0 implements ChannelDestroyed, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Integer representation of the cause of the hangup */ - private int cause; - public int getCause() { - return cause; - } - - @JsonDeserialize( as=int.class ) - public void setCause(int val ) { - cause = val; - } - - /** Text representation of the cause of the hangup */ - private String cause_txt; - public String getCause_txt() { - return cause_txt; - } - - @JsonDeserialize( as=String.class ) - public void setCause_txt(String val ) { - cause_txt = val; - } - - /** */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_8_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/ChannelDialplan_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/ChannelDialplan_impl_ari_1_8_0.java deleted file mode 100644 index 2d611aab..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/ChannelDialplan_impl_ari_1_8_0.java +++ /dev/null @@ -1,59 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Channel changed location in the dialplan. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelDialplan_impl_ari_1_8_0 extends Event_impl_ari_1_8_0 implements ChannelDialplan, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The channel that changed dialplan location. */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_8_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - - /** The application about to be executed. */ - private String dialplan_app; - public String getDialplan_app() { - return dialplan_app; - } - - @JsonDeserialize( as=String.class ) - public void setDialplan_app(String val ) { - dialplan_app = val; - } - - /** The data to be passed to the application. */ - private String dialplan_app_data; - public String getDialplan_app_data() { - return dialplan_app_data; - } - - @JsonDeserialize( as=String.class ) - public void setDialplan_app_data(String val ) { - dialplan_app_data = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/ChannelDtmfReceived_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/ChannelDtmfReceived_impl_ari_1_8_0.java deleted file mode 100644 index 940a3616..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/ChannelDtmfReceived_impl_ari_1_8_0.java +++ /dev/null @@ -1,61 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * DTMF received on a channel. - * - * This event is sent when the DTMF ends. There is no notification about the start of DTMF - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelDtmfReceived_impl_ari_1_8_0 extends Event_impl_ari_1_8_0 implements ChannelDtmfReceived, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The channel on which DTMF was received */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_8_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - - /** DTMF digit received (0-9, A-E, # or *) */ - private String digit; - public String getDigit() { - return digit; - } - - @JsonDeserialize( as=String.class ) - public void setDigit(String val ) { - digit = val; - } - - /** Number of milliseconds DTMF was received */ - private int duration_ms; - public int getDuration_ms() { - return duration_ms; - } - - @JsonDeserialize( as=int.class ) - public void setDuration_ms(int val ) { - duration_ms = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/ChannelEnteredBridge_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/ChannelEnteredBridge_impl_ari_1_8_0.java deleted file mode 100644 index dbdd9184..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/ChannelEnteredBridge_impl_ari_1_8_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a channel has entered a bridge. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelEnteredBridge_impl_ari_1_8_0 extends Event_impl_ari_1_8_0 implements ChannelEnteredBridge, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Bridge bridge; - public Bridge getBridge() { - return bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_8_0.class ) - public void setBridge(Bridge val ) { - bridge = val; - } - - /** */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_8_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/ChannelHangupRequest_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/ChannelHangupRequest_impl_ari_1_8_0.java deleted file mode 100644 index 399e1e06..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/ChannelHangupRequest_impl_ari_1_8_0.java +++ /dev/null @@ -1,59 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A hangup was requested on the channel. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelHangupRequest_impl_ari_1_8_0 extends Event_impl_ari_1_8_0 implements ChannelHangupRequest, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Integer representation of the cause of the hangup. */ - private int cause; - public int getCause() { - return cause; - } - - @JsonDeserialize( as=int.class ) - public void setCause(int val ) { - cause = val; - } - - /** The channel on which the hangup was requested. */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_8_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - - /** Whether the hangup request was a soft hangup request. */ - private boolean soft; - public boolean getSoft() { - return soft; - } - - @JsonDeserialize( as=boolean.class ) - public void setSoft(boolean val ) { - soft = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/ChannelHold_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/ChannelHold_impl_ari_1_8_0.java deleted file mode 100644 index 04e64a47..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/ChannelHold_impl_ari_1_8_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A channel initiated a media hold. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelHold_impl_ari_1_8_0 extends Event_impl_ari_1_8_0 implements ChannelHold, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The channel that initiated the hold event. */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_8_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - - /** The music on hold class that the initiator requested. */ - private String musicclass; - public String getMusicclass() { - return musicclass; - } - - @JsonDeserialize( as=String.class ) - public void setMusicclass(String val ) { - musicclass = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/ChannelLeftBridge_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/ChannelLeftBridge_impl_ari_1_8_0.java deleted file mode 100644 index 5eb22a9e..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/ChannelLeftBridge_impl_ari_1_8_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a channel has left a bridge. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelLeftBridge_impl_ari_1_8_0 extends Event_impl_ari_1_8_0 implements ChannelLeftBridge, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Bridge bridge; - public Bridge getBridge() { - return bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_8_0.class ) - public void setBridge(Bridge val ) { - bridge = val; - } - - /** */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_8_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/ChannelStateChange_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/ChannelStateChange_impl_ari_1_8_0.java deleted file mode 100644 index 291672ef..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/ChannelStateChange_impl_ari_1_8_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification of a channel's state change. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelStateChange_impl_ari_1_8_0 extends Event_impl_ari_1_8_0 implements ChannelStateChange, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_8_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/ChannelTalkingFinished_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/ChannelTalkingFinished_impl_ari_1_8_0.java deleted file mode 100644 index 20f329aa..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/ChannelTalkingFinished_impl_ari_1_8_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Talking is no longer detected on the channel. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelTalkingFinished_impl_ari_1_8_0 extends Event_impl_ari_1_8_0 implements ChannelTalkingFinished, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The channel on which talking completed. */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_8_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - - /** The length of time, in milliseconds, that talking was detected on the channel */ - private int duration; - public int getDuration() { - return duration; - } - - @JsonDeserialize( as=int.class ) - public void setDuration(int val ) { - duration = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/ChannelTalkingStarted_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/ChannelTalkingStarted_impl_ari_1_8_0.java deleted file mode 100644 index d8974bbb..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/ChannelTalkingStarted_impl_ari_1_8_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Talking was detected on the channel. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelTalkingStarted_impl_ari_1_8_0 extends Event_impl_ari_1_8_0 implements ChannelTalkingStarted, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The channel on which talking started. */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_8_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/ChannelUnhold_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/ChannelUnhold_impl_ari_1_8_0.java deleted file mode 100644 index c9233884..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/ChannelUnhold_impl_ari_1_8_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A channel initiated a media unhold. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelUnhold_impl_ari_1_8_0 extends Event_impl_ari_1_8_0 implements ChannelUnhold, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The channel that initiated the unhold event. */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_8_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/ChannelUserevent_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/ChannelUserevent_impl_ari_1_8_0.java deleted file mode 100644 index 4ed0b4ed..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/ChannelUserevent_impl_ari_1_8_0.java +++ /dev/null @@ -1,81 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * User-generated event with additional user-defined fields in the object. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelUserevent_impl_ari_1_8_0 extends Event_impl_ari_1_8_0 implements ChannelUserevent, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** A bridge that is signaled with the user event. */ - private Bridge bridge; - public Bridge getBridge() { - return bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_8_0.class ) - public void setBridge(Bridge val ) { - bridge = val; - } - - /** A channel that is signaled with the user event. */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_8_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - - /** A endpoint that is signaled with the user event. */ - private Endpoint endpoint; - public Endpoint getEndpoint() { - return endpoint; - } - - @JsonDeserialize( as=Endpoint_impl_ari_1_8_0.class ) - public void setEndpoint(Endpoint val ) { - endpoint = val; - } - - /** The name of the user event. */ - private String eventname; - public String getEventname() { - return eventname; - } - - @JsonDeserialize( as=String.class ) - public void setEventname(String val ) { - eventname = val; - } - - /** Custom Userevent data */ - private String userevent; - public String getUserevent() { - return userevent; - } - - @JsonDeserialize( as=String.class ) - public void setUserevent(String val ) { - userevent = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/ChannelVarset_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/ChannelVarset_impl_ari_1_8_0.java deleted file mode 100644 index 63251eb9..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/ChannelVarset_impl_ari_1_8_0.java +++ /dev/null @@ -1,61 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Channel variable changed. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelVarset_impl_ari_1_8_0 extends Event_impl_ari_1_8_0 implements ChannelVarset, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The channel on which the variable was set. - -If missing, the variable is a global variable. */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_8_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - - /** The new value of the variable. */ - private String value; - public String getValue() { - return value; - } - - @JsonDeserialize( as=String.class ) - public void setValue(String val ) { - value = val; - } - - /** The variable that changed. */ - private String variable; - public String getVariable() { - return variable; - } - - @JsonDeserialize( as=String.class ) - public void setVariable(String val ) { - variable = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/Channel_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/Channel_impl_ari_1_8_0.java deleted file mode 100644 index 24366085..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/Channel_impl_ari_1_8_0.java +++ /dev/null @@ -1,127 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A specific communication connection between Asterisk and an Endpoint. - * - * Defined in file: channels.json - * Generated by: Model - *********************************************************/ - -public class Channel_impl_ari_1_8_0 implements Channel, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private String accountcode; - public String getAccountcode() { - return accountcode; - } - - @JsonDeserialize( as=String.class ) - public void setAccountcode(String val ) { - accountcode = val; - } - - /** */ - private CallerID caller; - public CallerID getCaller() { - return caller; - } - - @JsonDeserialize( as=CallerID_impl_ari_1_8_0.class ) - public void setCaller(CallerID val ) { - caller = val; - } - - /** */ - private CallerID connected; - public CallerID getConnected() { - return connected; - } - - @JsonDeserialize( as=CallerID_impl_ari_1_8_0.class ) - public void setConnected(CallerID val ) { - connected = val; - } - - /** Timestamp when channel was created */ - private Date creationtime; - public Date getCreationtime() { - return creationtime; - } - - @JsonDeserialize( as=Date.class ) - public void setCreationtime(Date val ) { - creationtime = val; - } - - /** Current location in the dialplan */ - private DialplanCEP dialplan; - public DialplanCEP getDialplan() { - return dialplan; - } - - @JsonDeserialize( as=DialplanCEP_impl_ari_1_8_0.class ) - public void setDialplan(DialplanCEP val ) { - dialplan = val; - } - - /** Unique identifier of the channel. - -This is the same as the Uniqueid field in AMI. */ - private String id; - public String getId() { - return id; - } - - @JsonDeserialize( as=String.class ) - public void setId(String val ) { - id = val; - } - - /** The default spoken language */ - private String language; - public String getLanguage() { - return language; - } - - @JsonDeserialize( as=String.class ) - public void setLanguage(String val ) { - language = val; - } - - /** Name of the channel (i.e. SIP/foo-0000a7e3) */ - private String name; - public String getName() { - return name; - } - - @JsonDeserialize( as=String.class ) - public void setName(String val ) { - name = val; - } - - /** */ - private String state; - public String getState() { - return state; - } - - @JsonDeserialize( as=String.class ) - public void setState(String val ) { - state = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/ConfigInfo_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/ConfigInfo_impl_ari_1_8_0.java deleted file mode 100644 index e0163bc4..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/ConfigInfo_impl_ari_1_8_0.java +++ /dev/null @@ -1,92 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Info about Asterisk configuration - * - * Defined in file: asterisk.json - * Generated by: Model - *********************************************************/ - -public class ConfigInfo_impl_ari_1_8_0 implements ConfigInfo, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Default language for media playback. */ - private String default_language; - public String getDefault_language() { - return default_language; - } - - @JsonDeserialize( as=String.class ) - public void setDefault_language(String val ) { - default_language = val; - } - - /** Maximum number of simultaneous channels. */ - private int max_channels; - public int getMax_channels() { - return max_channels; - } - - @JsonDeserialize( as=int.class ) - public void setMax_channels(int val ) { - max_channels = val; - } - - /** Maximum load avg on system. */ - private double max_load; - public double getMax_load() { - return max_load; - } - - @JsonDeserialize( as=double.class ) - public void setMax_load(double val ) { - max_load = val; - } - - /** Maximum number of open file handles (files, sockets). */ - private int max_open_files; - public int getMax_open_files() { - return max_open_files; - } - - @JsonDeserialize( as=int.class ) - public void setMax_open_files(int val ) { - max_open_files = val; - } - - /** Asterisk system name. */ - private String name; - public String getName() { - return name; - } - - @JsonDeserialize( as=String.class ) - public void setName(String val ) { - name = val; - } - - /** Effective user/group id for running Asterisk. */ - private SetId setid; - public SetId getSetid() { - return setid; - } - - @JsonDeserialize( as=SetId_impl_ari_1_8_0.class ) - public void setSetid(SetId val ) { - setid = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/ConfigTuple_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/ConfigTuple_impl_ari_1_8_0.java deleted file mode 100644 index 85ece380..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/ConfigTuple_impl_ari_1_8_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A key/value pair that makes up part of a configuration object. - * - * Defined in file: asterisk.json - * Generated by: Model - *********************************************************/ - -public class ConfigTuple_impl_ari_1_8_0 implements ConfigTuple, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** A configuration object attribute. */ - private String attribute; - public String getAttribute() { - return attribute; - } - - @JsonDeserialize( as=String.class ) - public void setAttribute(String val ) { - attribute = val; - } - - /** The value for the attribute. */ - private String value; - public String getValue() { - return value; - } - - @JsonDeserialize( as=String.class ) - public void setValue(String val ) { - value = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/DeviceStateChanged_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/DeviceStateChanged_impl_ari_1_8_0.java deleted file mode 100644 index ad471cd4..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/DeviceStateChanged_impl_ari_1_8_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a device state has changed. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class DeviceStateChanged_impl_ari_1_8_0 extends Event_impl_ari_1_8_0 implements DeviceStateChanged, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Device state object */ - private DeviceState device_state; - public DeviceState getDevice_state() { - return device_state; - } - - @JsonDeserialize( as=DeviceState_impl_ari_1_8_0.class ) - public void setDevice_state(DeviceState val ) { - device_state = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/DeviceState_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/DeviceState_impl_ari_1_8_0.java deleted file mode 100644 index ece24a6b..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/DeviceState_impl_ari_1_8_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Represents the state of a device. - * - * Defined in file: deviceStates.json - * Generated by: Model - *********************************************************/ - -public class DeviceState_impl_ari_1_8_0 implements DeviceState, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Name of the device. */ - private String name; - public String getName() { - return name; - } - - @JsonDeserialize( as=String.class ) - public void setName(String val ) { - name = val; - } - - /** Device's state */ - private String state; - public String getState() { - return state; - } - - @JsonDeserialize( as=String.class ) - public void setState(String val ) { - state = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/Dial_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/Dial_impl_ari_1_8_0.java deleted file mode 100644 index a5109085..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/Dial_impl_ari_1_8_0.java +++ /dev/null @@ -1,92 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Dialing state has changed. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class Dial_impl_ari_1_8_0 extends Event_impl_ari_1_8_0 implements Dial, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The calling channel. */ - private Channel caller; - public Channel getCaller() { - return caller; - } - - @JsonDeserialize( as=Channel_impl_ari_1_8_0.class ) - public void setCaller(Channel val ) { - caller = val; - } - - /** Current status of the dialing attempt to the peer. */ - private String dialstatus; - public String getDialstatus() { - return dialstatus; - } - - @JsonDeserialize( as=String.class ) - public void setDialstatus(String val ) { - dialstatus = val; - } - - /** The dial string for calling the peer channel. */ - private String dialstring; - public String getDialstring() { - return dialstring; - } - - @JsonDeserialize( as=String.class ) - public void setDialstring(String val ) { - dialstring = val; - } - - /** Forwarding target requested by the original dialed channel. */ - private String forward; - public String getForward() { - return forward; - } - - @JsonDeserialize( as=String.class ) - public void setForward(String val ) { - forward = val; - } - - /** Channel that the caller has been forwarded to. */ - private Channel forwarded; - public Channel getForwarded() { - return forwarded; - } - - @JsonDeserialize( as=Channel_impl_ari_1_8_0.class ) - public void setForwarded(Channel val ) { - forwarded = val; - } - - /** The dialed channel. */ - private Channel peer; - public Channel getPeer() { - return peer; - } - - @JsonDeserialize( as=Channel_impl_ari_1_8_0.class ) - public void setPeer(Channel val ) { - peer = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/Dialed_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/Dialed_impl_ari_1_8_0.java deleted file mode 100644 index 24827008..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/Dialed_impl_ari_1_8_0.java +++ /dev/null @@ -1,26 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Dialed channel information. - * - * Defined in file: channels.json - * Generated by: Model - *********************************************************/ - -public class Dialed_impl_ari_1_8_0 implements Dialed, java.io.Serializable { -private static final long serialVersionUID = 1L; -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/DialplanCEP_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/DialplanCEP_impl_ari_1_8_0.java deleted file mode 100644 index 0d606e4c..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/DialplanCEP_impl_ari_1_8_0.java +++ /dev/null @@ -1,59 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Dialplan location (context/extension/priority) - * - * Defined in file: channels.json - * Generated by: Model - *********************************************************/ - -public class DialplanCEP_impl_ari_1_8_0 implements DialplanCEP, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Context in the dialplan */ - private String context; - public String getContext() { - return context; - } - - @JsonDeserialize( as=String.class ) - public void setContext(String val ) { - context = val; - } - - /** Extension in the dialplan */ - private String exten; - public String getExten() { - return exten; - } - - @JsonDeserialize( as=String.class ) - public void setExten(String val ) { - exten = val; - } - - /** Priority in the dialplan */ - private long priority; - public long getPriority() { - return priority; - } - - @JsonDeserialize( as=long.class ) - public void setPriority(long val ) { - priority = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/EndpointStateChange_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/EndpointStateChange_impl_ari_1_8_0.java deleted file mode 100644 index 5bced2f9..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/EndpointStateChange_impl_ari_1_8_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Endpoint state changed. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class EndpointStateChange_impl_ari_1_8_0 extends Event_impl_ari_1_8_0 implements EndpointStateChange, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Endpoint endpoint; - public Endpoint getEndpoint() { - return endpoint; - } - - @JsonDeserialize( as=Endpoint_impl_ari_1_8_0.class ) - public void setEndpoint(Endpoint val ) { - endpoint = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/Endpoint_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/Endpoint_impl_ari_1_8_0.java deleted file mode 100644 index d5bfad5f..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/Endpoint_impl_ari_1_8_0.java +++ /dev/null @@ -1,72 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * An external device that may offer/accept calls to/from Asterisk. - * - * Unlike most resources, which have a single unique identifier, an endpoint is uniquely identified by the technology/resource pair. - * - * Defined in file: endpoints.json - * Generated by: Model - *********************************************************/ - -public class Endpoint_impl_ari_1_8_0 implements Endpoint, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Id's of channels associated with this endpoint */ - private List channel_ids; - public List getChannel_ids() { - return channel_ids; - } - - @JsonDeserialize( contentAs=String.class ) - public void setChannel_ids(List val ) { - channel_ids = val; - } - - /** Identifier of the endpoint, specific to the given technology. */ - private String resource; - public String getResource() { - return resource; - } - - @JsonDeserialize( as=String.class ) - public void setResource(String val ) { - resource = val; - } - - /** Endpoint's state */ - private String state; - public String getState() { - return state; - } - - @JsonDeserialize( as=String.class ) - public void setState(String val ) { - state = val; - } - - /** Technology of the endpoint */ - private String technology; - public String getTechnology() { - return technology; - } - - @JsonDeserialize( as=String.class ) - public void setTechnology(String val ) { - technology = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/Event_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/Event_impl_ari_1_8_0.java deleted file mode 100644 index 11ad2aa7..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/Event_impl_ari_1_8_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Base type for asynchronous events from Asterisk. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class Event_impl_ari_1_8_0 extends Message_impl_ari_1_8_0 implements Event, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Name of the application receiving the event. */ - private String application; - public String getApplication() { - return application; - } - - @JsonDeserialize( as=String.class ) - public void setApplication(String val ) { - application = val; - } - - /** Time at which this event was created. */ - private Date timestamp; - public Date getTimestamp() { - return timestamp; - } - - @JsonDeserialize( as=Date.class ) - public void setTimestamp(Date val ) { - timestamp = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/FormatLangPair_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/FormatLangPair_impl_ari_1_8_0.java deleted file mode 100644 index bc1da462..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/FormatLangPair_impl_ari_1_8_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Identifies the format and language of a sound file - * - * Defined in file: sounds.json - * Generated by: Model - *********************************************************/ - -public class FormatLangPair_impl_ari_1_8_0 implements FormatLangPair, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private String format; - public String getFormat() { - return format; - } - - @JsonDeserialize( as=String.class ) - public void setFormat(String val ) { - format = val; - } - - /** */ - private String language; - public String getLanguage() { - return language; - } - - @JsonDeserialize( as=String.class ) - public void setLanguage(String val ) { - language = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/LiveRecording_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/LiveRecording_impl_ari_1_8_0.java deleted file mode 100644 index 7aa1c73d..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/LiveRecording_impl_ari_1_8_0.java +++ /dev/null @@ -1,114 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A recording that is in progress - * - * Defined in file: recordings.json - * Generated by: Model - *********************************************************/ - -public class LiveRecording_impl_ari_1_8_0 implements LiveRecording, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Cause for recording failure if failed */ - private String cause; - public String getCause() { - return cause; - } - - @JsonDeserialize( as=String.class ) - public void setCause(String val ) { - cause = val; - } - - /** Duration in seconds of the recording */ - private int duration; - public int getDuration() { - return duration; - } - - @JsonDeserialize( as=int.class ) - public void setDuration(int val ) { - duration = val; - } - - /** Recording format (wav, gsm, etc.) */ - private String format; - public String getFormat() { - return format; - } - - @JsonDeserialize( as=String.class ) - public void setFormat(String val ) { - format = val; - } - - /** Base name for the recording */ - private String name; - public String getName() { - return name; - } - - @JsonDeserialize( as=String.class ) - public void setName(String val ) { - name = val; - } - - /** Duration of silence, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds. */ - private int silence_duration; - public int getSilence_duration() { - return silence_duration; - } - - @JsonDeserialize( as=int.class ) - public void setSilence_duration(int val ) { - silence_duration = val; - } - - /** */ - private String state; - public String getState() { - return state; - } - - @JsonDeserialize( as=String.class ) - public void setState(String val ) { - state = val; - } - - /** Duration of talking, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds. */ - private int talking_duration; - public int getTalking_duration() { - return talking_duration; - } - - @JsonDeserialize( as=int.class ) - public void setTalking_duration(int val ) { - talking_duration = val; - } - - /** URI for the channel or bridge being recorded */ - private String target_uri; - public String getTarget_uri() { - return target_uri; - } - - @JsonDeserialize( as=String.class ) - public void setTarget_uri(String val ) { - target_uri = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/Message_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/Message_impl_ari_1_8_0.java deleted file mode 100644 index dfc82edb..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/Message_impl_ari_1_8_0.java +++ /dev/null @@ -1,78 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonSubTypes.Type; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Base type for errors and events - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") - @JsonSubTypes({ @Type(value = MissingParams_impl_ari_1_8_0.class, name = "MissingParams") -, @Type(value = Event_impl_ari_1_8_0.class, name = "Event") -, @Type(value = DeviceStateChanged_impl_ari_1_8_0.class, name = "DeviceStateChanged") -, @Type(value = PlaybackStarted_impl_ari_1_8_0.class, name = "PlaybackStarted") -, @Type(value = PlaybackFinished_impl_ari_1_8_0.class, name = "PlaybackFinished") -, @Type(value = RecordingStarted_impl_ari_1_8_0.class, name = "RecordingStarted") -, @Type(value = RecordingFinished_impl_ari_1_8_0.class, name = "RecordingFinished") -, @Type(value = RecordingFailed_impl_ari_1_8_0.class, name = "RecordingFailed") -, @Type(value = ApplicationReplaced_impl_ari_1_8_0.class, name = "ApplicationReplaced") -, @Type(value = BridgeCreated_impl_ari_1_8_0.class, name = "BridgeCreated") -, @Type(value = BridgeDestroyed_impl_ari_1_8_0.class, name = "BridgeDestroyed") -, @Type(value = BridgeMerged_impl_ari_1_8_0.class, name = "BridgeMerged") -, @Type(value = BridgeBlindTransfer_impl_ari_1_8_0.class, name = "BridgeBlindTransfer") -, @Type(value = BridgeAttendedTransfer_impl_ari_1_8_0.class, name = "BridgeAttendedTransfer") -, @Type(value = ChannelCreated_impl_ari_1_8_0.class, name = "ChannelCreated") -, @Type(value = ChannelDestroyed_impl_ari_1_8_0.class, name = "ChannelDestroyed") -, @Type(value = ChannelEnteredBridge_impl_ari_1_8_0.class, name = "ChannelEnteredBridge") -, @Type(value = ChannelLeftBridge_impl_ari_1_8_0.class, name = "ChannelLeftBridge") -, @Type(value = ChannelStateChange_impl_ari_1_8_0.class, name = "ChannelStateChange") -, @Type(value = ChannelDtmfReceived_impl_ari_1_8_0.class, name = "ChannelDtmfReceived") -, @Type(value = ChannelDialplan_impl_ari_1_8_0.class, name = "ChannelDialplan") -, @Type(value = ChannelCallerId_impl_ari_1_8_0.class, name = "ChannelCallerId") -, @Type(value = ChannelUserevent_impl_ari_1_8_0.class, name = "ChannelUserevent") -, @Type(value = ChannelHangupRequest_impl_ari_1_8_0.class, name = "ChannelHangupRequest") -, @Type(value = ChannelVarset_impl_ari_1_8_0.class, name = "ChannelVarset") -, @Type(value = ChannelHold_impl_ari_1_8_0.class, name = "ChannelHold") -, @Type(value = ChannelUnhold_impl_ari_1_8_0.class, name = "ChannelUnhold") -, @Type(value = ChannelTalkingStarted_impl_ari_1_8_0.class, name = "ChannelTalkingStarted") -, @Type(value = ChannelTalkingFinished_impl_ari_1_8_0.class, name = "ChannelTalkingFinished") -, @Type(value = EndpointStateChange_impl_ari_1_8_0.class, name = "EndpointStateChange") -, @Type(value = Dial_impl_ari_1_8_0.class, name = "Dial") -, @Type(value = StasisEnd_impl_ari_1_8_0.class, name = "StasisEnd") -, @Type(value = StasisStart_impl_ari_1_8_0.class, name = "StasisStart") -, @Type(value = TextMessageReceived_impl_ari_1_8_0.class, name = "TextMessageReceived") -, @Type(value = ChannelConnectedLine_impl_ari_1_8_0.class, name = "ChannelConnectedLine") - }) - - -public class Message_impl_ari_1_8_0 implements Message, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Indicates the type of this message. */ - private String type; - public String getType() { - return type; - } - - @JsonDeserialize( as=String.class ) - public void setType(String val ) { - type = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/MissingParams_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/MissingParams_impl_ari_1_8_0.java deleted file mode 100644 index 7a44b9bc..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/MissingParams_impl_ari_1_8_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Error event sent when required params are missing. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class MissingParams_impl_ari_1_8_0 extends Message_impl_ari_1_8_0 implements MissingParams, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** A list of the missing parameters */ - private List params; - public List getParams() { - return params; - } - - @JsonDeserialize( contentAs=String.class ) - public void setParams(List val ) { - params = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/Module_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/Module_impl_ari_1_8_0.java deleted file mode 100644 index ebf54a52..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/Module_impl_ari_1_8_0.java +++ /dev/null @@ -1,81 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Details of an Asterisk module - * - * Defined in file: asterisk.json - * Generated by: Model - *********************************************************/ - -public class Module_impl_ari_1_8_0 implements Module, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The description of this module */ - private String description; - public String getDescription() { - return description; - } - - @JsonDeserialize( as=String.class ) - public void setDescription(String val ) { - description = val; - } - - /** The name of this module */ - private String name; - public String getName() { - return name; - } - - @JsonDeserialize( as=String.class ) - public void setName(String val ) { - name = val; - } - - /** The running status of this module */ - private String status; - public String getStatus() { - return status; - } - - @JsonDeserialize( as=String.class ) - public void setStatus(String val ) { - status = val; - } - - /** The support state of this module */ - private String support_level; - public String getSupport_level() { - return support_level; - } - - @JsonDeserialize( as=String.class ) - public void setSupport_level(String val ) { - support_level = val; - } - - /** The number of times this module is being used */ - private int use_count; - public int getUse_count() { - return use_count; - } - - @JsonDeserialize( as=int.class ) - public void setUse_count(int val ) { - use_count = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/PlaybackFinished_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/PlaybackFinished_impl_ari_1_8_0.java deleted file mode 100644 index 76cedc8b..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/PlaybackFinished_impl_ari_1_8_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Event showing the completion of a media playback operation. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class PlaybackFinished_impl_ari_1_8_0 extends Event_impl_ari_1_8_0 implements PlaybackFinished, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Playback control object */ - private Playback playback; - public Playback getPlayback() { - return playback; - } - - @JsonDeserialize( as=Playback_impl_ari_1_8_0.class ) - public void setPlayback(Playback val ) { - playback = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/PlaybackStarted_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/PlaybackStarted_impl_ari_1_8_0.java deleted file mode 100644 index ae8e87b0..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/PlaybackStarted_impl_ari_1_8_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Event showing the start of a media playback operation. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class PlaybackStarted_impl_ari_1_8_0 extends Event_impl_ari_1_8_0 implements PlaybackStarted, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Playback control object */ - private Playback playback; - public Playback getPlayback() { - return playback; - } - - @JsonDeserialize( as=Playback_impl_ari_1_8_0.class ) - public void setPlayback(Playback val ) { - playback = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/Playback_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/Playback_impl_ari_1_8_0.java deleted file mode 100644 index e77d5baf..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/Playback_impl_ari_1_8_0.java +++ /dev/null @@ -1,98 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Object representing the playback of media to a channel - * - * Defined in file: playbacks.json - * Generated by: Model - *********************************************************/ - -public class Playback_impl_ari_1_8_0 implements Playback, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** ID for this playback operation */ - private String id; - public String getId() { - return id; - } - - @JsonDeserialize( as=String.class ) - public void setId(String val ) { - id = val; - } - - /** For media types that support multiple languages, the language requested for playback. */ - private String language; - public String getLanguage() { - return language; - } - - @JsonDeserialize( as=String.class ) - public void setLanguage(String val ) { - language = val; - } - - /** URI for the media to play back. */ - private String media_uri; - public String getMedia_uri() { - return media_uri; - } - - @JsonDeserialize( as=String.class ) - public void setMedia_uri(String val ) { - media_uri = val; - } - - /** Current state of the playback operation. */ - private String state; - public String getState() { - return state; - } - - @JsonDeserialize( as=String.class ) - public void setState(String val ) { - state = val; - } - - /** URI for the channel or bridge to play the media on */ - private String target_uri; - public String getTarget_uri() { - return target_uri; - } - - @JsonDeserialize( as=String.class ) - public void setTarget_uri(String val ) { - target_uri = val; - } - -/********************************************************** - * If a list of URIs is being played, the next media URI to be played back. - * - * @since ari_1_10_0 - *********************************************************/ - public void setNext_media_uri(String val ){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * If a list of URIs is being played, the next media URI to be played back. - * - * @since ari_1_10_0 - *********************************************************/ - public String getNext_media_uri(){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/RecordingFailed_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/RecordingFailed_impl_ari_1_8_0.java deleted file mode 100644 index abc87ce8..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/RecordingFailed_impl_ari_1_8_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Event showing failure of a recording operation. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class RecordingFailed_impl_ari_1_8_0 extends Event_impl_ari_1_8_0 implements RecordingFailed, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Recording control object */ - private LiveRecording recording; - public LiveRecording getRecording() { - return recording; - } - - @JsonDeserialize( as=LiveRecording_impl_ari_1_8_0.class ) - public void setRecording(LiveRecording val ) { - recording = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/RecordingFinished_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/RecordingFinished_impl_ari_1_8_0.java deleted file mode 100644 index d992dbc1..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/RecordingFinished_impl_ari_1_8_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Event showing the completion of a recording operation. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class RecordingFinished_impl_ari_1_8_0 extends Event_impl_ari_1_8_0 implements RecordingFinished, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Recording control object */ - private LiveRecording recording; - public LiveRecording getRecording() { - return recording; - } - - @JsonDeserialize( as=LiveRecording_impl_ari_1_8_0.class ) - public void setRecording(LiveRecording val ) { - recording = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/RecordingStarted_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/RecordingStarted_impl_ari_1_8_0.java deleted file mode 100644 index 42e0729d..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/RecordingStarted_impl_ari_1_8_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Event showing the start of a recording operation. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class RecordingStarted_impl_ari_1_8_0 extends Event_impl_ari_1_8_0 implements RecordingStarted, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Recording control object */ - private LiveRecording recording; - public LiveRecording getRecording() { - return recording; - } - - @JsonDeserialize( as=LiveRecording_impl_ari_1_8_0.class ) - public void setRecording(LiveRecording val ) { - recording = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/SetId_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/SetId_impl_ari_1_8_0.java deleted file mode 100644 index a1e4439d..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/SetId_impl_ari_1_8_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Effective user/group id - * - * Defined in file: asterisk.json - * Generated by: Model - *********************************************************/ - -public class SetId_impl_ari_1_8_0 implements SetId, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Effective group id. */ - private String group; - public String getGroup() { - return group; - } - - @JsonDeserialize( as=String.class ) - public void setGroup(String val ) { - group = val; - } - - /** Effective user id. */ - private String user; - public String getUser() { - return user; - } - - @JsonDeserialize( as=String.class ) - public void setUser(String val ) { - user = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/Sound_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/Sound_impl_ari_1_8_0.java deleted file mode 100644 index b0f8bb7d..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/Sound_impl_ari_1_8_0.java +++ /dev/null @@ -1,59 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A media file that may be played back. - * - * Defined in file: sounds.json - * Generated by: Model - *********************************************************/ - -public class Sound_impl_ari_1_8_0 implements Sound, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The formats and languages in which this sound is available. */ - private List formats; - public List getFormats() { - return formats; - } - - @JsonDeserialize( contentAs=FormatLangPair_impl_ari_1_8_0.class ) - public void setFormats(List val ) { - formats = val; - } - - /** Sound's identifier. */ - private String id; - public String getId() { - return id; - } - - @JsonDeserialize( as=String.class ) - public void setId(String val ) { - id = val; - } - - /** Text description of the sound, usually the words spoken. */ - private String text; - public String getText() { - return text; - } - - @JsonDeserialize( as=String.class ) - public void setText(String val ) { - text = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/StasisEnd_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/StasisEnd_impl_ari_1_8_0.java deleted file mode 100644 index 7bbe23c5..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/StasisEnd_impl_ari_1_8_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a channel has left a Stasis application. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class StasisEnd_impl_ari_1_8_0 extends Event_impl_ari_1_8_0 implements StasisEnd, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_8_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/StasisStart_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/StasisStart_impl_ari_1_8_0.java deleted file mode 100644 index 88628dc4..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/StasisStart_impl_ari_1_8_0.java +++ /dev/null @@ -1,59 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a channel has entered a Stasis application. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class StasisStart_impl_ari_1_8_0 extends Event_impl_ari_1_8_0 implements StasisStart, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Arguments to the application */ - private List args; - public List getArgs() { - return args; - } - - @JsonDeserialize( contentAs=String.class ) - public void setArgs(List val ) { - args = val; - } - - /** */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_8_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - - /** */ - private Channel replace_channel; - public Channel getReplace_channel() { - return replace_channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_8_0.class ) - public void setReplace_channel(Channel val ) { - replace_channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/StatusInfo_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/StatusInfo_impl_ari_1_8_0.java deleted file mode 100644 index c8a593aa..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/StatusInfo_impl_ari_1_8_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Info about Asterisk status - * - * Defined in file: asterisk.json - * Generated by: Model - *********************************************************/ - -public class StatusInfo_impl_ari_1_8_0 implements StatusInfo, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Time when Asterisk was last reloaded. */ - private Date last_reload_time; - public Date getLast_reload_time() { - return last_reload_time; - } - - @JsonDeserialize( as=Date.class ) - public void setLast_reload_time(Date val ) { - last_reload_time = val; - } - - /** Time when Asterisk was started. */ - private Date startup_time; - public Date getStartup_time() { - return startup_time; - } - - @JsonDeserialize( as=Date.class ) - public void setStartup_time(Date val ) { - startup_time = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/StoredRecording_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/StoredRecording_impl_ari_1_8_0.java deleted file mode 100644 index 4103a212..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/StoredRecording_impl_ari_1_8_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A past recording that may be played back. - * - * Defined in file: recordings.json - * Generated by: Model - *********************************************************/ - -public class StoredRecording_impl_ari_1_8_0 implements StoredRecording, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private String format; - public String getFormat() { - return format; - } - - @JsonDeserialize( as=String.class ) - public void setFormat(String val ) { - format = val; - } - - /** */ - private String name; - public String getName() { - return name; - } - - @JsonDeserialize( as=String.class ) - public void setName(String val ) { - name = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/SystemInfo_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/SystemInfo_impl_ari_1_8_0.java deleted file mode 100644 index fdd840df..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/SystemInfo_impl_ari_1_8_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Info about Asterisk - * - * Defined in file: asterisk.json - * Generated by: Model - *********************************************************/ - -public class SystemInfo_impl_ari_1_8_0 implements SystemInfo, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private String entity_id; - public String getEntity_id() { - return entity_id; - } - - @JsonDeserialize( as=String.class ) - public void setEntity_id(String val ) { - entity_id = val; - } - - /** Asterisk version. */ - private String version; - public String getVersion() { - return version; - } - - @JsonDeserialize( as=String.class ) - public void setVersion(String val ) { - version = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/TextMessageReceived_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/TextMessageReceived_impl_ari_1_8_0.java deleted file mode 100644 index 14e720ab..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/TextMessageReceived_impl_ari_1_8_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A text message was received from an endpoint. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class TextMessageReceived_impl_ari_1_8_0 extends Event_impl_ari_1_8_0 implements TextMessageReceived, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Endpoint endpoint; - public Endpoint getEndpoint() { - return endpoint; - } - - @JsonDeserialize( as=Endpoint_impl_ari_1_8_0.class ) - public void setEndpoint(Endpoint val ) { - endpoint = val; - } - - /** */ - private TextMessage message; - public TextMessage getMessage() { - return message; - } - - @JsonDeserialize( as=TextMessage_impl_ari_1_8_0.class ) - public void setMessage(TextMessage val ) { - message = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/TextMessageVariable_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/TextMessageVariable_impl_ari_1_8_0.java deleted file mode 100644 index b6fa2b1c..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/TextMessageVariable_impl_ari_1_8_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A key/value pair variable in a text message. - * - * Defined in file: endpoints.json - * Generated by: Model - *********************************************************/ - -public class TextMessageVariable_impl_ari_1_8_0 implements TextMessageVariable, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** A unique key identifying the variable. */ - private String key; - public String getKey() { - return key; - } - - @JsonDeserialize( as=String.class ) - public void setKey(String val ) { - key = val; - } - - /** The value of the variable. */ - private String value; - public String getValue() { - return value; - } - - @JsonDeserialize( as=String.class ) - public void setValue(String val ) { - value = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/TextMessage_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/TextMessage_impl_ari_1_8_0.java deleted file mode 100644 index 13729a63..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/TextMessage_impl_ari_1_8_0.java +++ /dev/null @@ -1,70 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A text message. - * - * Defined in file: endpoints.json - * Generated by: Model - *********************************************************/ - -public class TextMessage_impl_ari_1_8_0 implements TextMessage, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The text of the message. */ - private String body; - public String getBody() { - return body; - } - - @JsonDeserialize( as=String.class ) - public void setBody(String val ) { - body = val; - } - - /** A technology specific URI specifying the source of the message. For sip and pjsip technologies, any SIP URI can be specified. For xmpp, the URI must correspond to the client connection being used to send the message. */ - private String from; - public String getFrom() { - return from; - } - - @JsonDeserialize( as=String.class ) - public void setFrom(String val ) { - from = val; - } - - /** A technology specific URI specifying the destination of the message. Valid technologies include sip, pjsip, and xmp. The destination of a message should be an endpoint. */ - private String to; - public String getTo() { - return to; - } - - @JsonDeserialize( as=String.class ) - public void setTo(String val ) { - to = val; - } - - /** Technology specific key/value pairs associated with the message. */ - private List variables; - public List getVariables() { - return variables; - } - - @JsonDeserialize( contentAs=TextMessageVariable_impl_ari_1_8_0.class ) - public void setVariables(List val ) { - variables = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/Variable_impl_ari_1_8_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/Variable_impl_ari_1_8_0.java deleted file mode 100644 index 279b43f4..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_8_0/models/Variable_impl_ari_1_8_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_8_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * The value of a channel variable - * - * Defined in file: asterisk.json - * Generated by: Model - *********************************************************/ - -public class Variable_impl_ari_1_8_0 implements Variable, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The value of the variable requested */ - private String value; - public String getValue() { - return value; - } - - @JsonDeserialize( as=String.class ) - public void setValue(String val ) { - value = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/AriBuilder_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/AriBuilder_impl_ari_1_9_0.java deleted file mode 100644 index 5bf192bd..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/AriBuilder_impl_ari_1_9_0.java +++ /dev/null @@ -1,324 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.ari_1_9_0.models.*; -import ch.loway.oss.ari4java.generated.ari_1_9_0.actions.*; -import ch.loway.oss.ari4java.generated.*; -import ch.loway.oss.ari4java.ARI; - -public class AriBuilder_impl_ari_1_9_0 implements AriBuilder { - -public ActionPlaybacks actionPlaybacks() { - return new ActionPlaybacks_impl_ari_1_9_0(); - }; - -public ActionEvents actionEvents() { - return new ActionEvents_impl_ari_1_9_0(); - }; - -public ActionSounds actionSounds() { - return new ActionSounds_impl_ari_1_9_0(); - }; - -public ActionChannels actionChannels() { - return new ActionChannels_impl_ari_1_9_0(); - }; - -public ActionRecordings actionRecordings() { - return new ActionRecordings_impl_ari_1_9_0(); - }; - -public ActionEndpoints actionEndpoints() { - return new ActionEndpoints_impl_ari_1_9_0(); - }; - -public ActionBridges actionBridges() { - return new ActionBridges_impl_ari_1_9_0(); - }; - -public ActionApplications actionApplications() { - return new ActionApplications_impl_ari_1_9_0(); - }; - -public ActionDeviceStates actionDeviceStates() { - return new ActionDeviceStates_impl_ari_1_9_0(); - }; - -public ActionAsterisk actionAsterisk() { - return new ActionAsterisk_impl_ari_1_9_0(); - }; - -public EndpointStateChange endpointStateChange() { - return new EndpointStateChange_impl_ari_1_9_0(); - }; - -public StasisEnd stasisEnd() { - return new StasisEnd_impl_ari_1_9_0(); - }; - -public CallerID callerID() { - return new CallerID_impl_ari_1_9_0(); - }; - -public ConfigInfo configInfo() { - return new ConfigInfo_impl_ari_1_9_0(); - }; - -public ChannelCreated channelCreated() { - return new ChannelCreated_impl_ari_1_9_0(); - }; - -public ChannelEnteredBridge channelEnteredBridge() { - return new ChannelEnteredBridge_impl_ari_1_9_0(); - }; - -public ChannelHangupRequest channelHangupRequest() { - return new ChannelHangupRequest_impl_ari_1_9_0(); - }; - -public Channel channel() { - return new Channel_impl_ari_1_9_0(); - }; - -public StatusInfo statusInfo() { - return new StatusInfo_impl_ari_1_9_0(); - }; - -public ChannelStateChange channelStateChange() { - return new ChannelStateChange_impl_ari_1_9_0(); - }; - -public ChannelUserevent channelUserevent() { - return new ChannelUserevent_impl_ari_1_9_0(); - }; - -public RecordingFailed recordingFailed() { - return new RecordingFailed_impl_ari_1_9_0(); - }; - -public ChannelDialplan channelDialplan() { - return new ChannelDialplan_impl_ari_1_9_0(); - }; - -public Dialed dialed() { - return new Dialed_impl_ari_1_9_0(); - }; - -public MissingParams missingParams() { - return new MissingParams_impl_ari_1_9_0(); - }; - -public FormatLangPair formatLangPair() { - return new FormatLangPair_impl_ari_1_9_0(); - }; - -public Event event() { - return new Event_impl_ari_1_9_0(); - }; - -public PlaybackStarted playbackStarted() { - return new PlaybackStarted_impl_ari_1_9_0(); - }; - -public BridgeAttendedTransfer bridgeAttendedTransfer() { - return new BridgeAttendedTransfer_impl_ari_1_9_0(); - }; - -public AsteriskInfo asteriskInfo() { - return new AsteriskInfo_impl_ari_1_9_0(); - }; - -public ChannelTalkingStarted channelTalkingStarted() { - return new ChannelTalkingStarted_impl_ari_1_9_0(); - }; - -public TextMessage textMessage() { - return new TextMessage_impl_ari_1_9_0(); - }; - -public Endpoint endpoint() { - return new Endpoint_impl_ari_1_9_0(); - }; - -public BridgeBlindTransfer bridgeBlindTransfer() { - return new BridgeBlindTransfer_impl_ari_1_9_0(); - }; - -public ChannelLeftBridge channelLeftBridge() { - return new ChannelLeftBridge_impl_ari_1_9_0(); - }; - -public ApplicationReplaced applicationReplaced() { - return new ApplicationReplaced_impl_ari_1_9_0(); - }; - -public TextMessageVariable textMessageVariable() { - return new TextMessageVariable_impl_ari_1_9_0(); - }; - -public Message message() { - return new Message_impl_ari_1_9_0(); - }; - -public TextMessageReceived textMessageReceived() { - return new TextMessageReceived_impl_ari_1_9_0(); - }; - -public Module module() { - return new Module_impl_ari_1_9_0(); - }; - -public RecordingFinished recordingFinished() { - return new RecordingFinished_impl_ari_1_9_0(); - }; - -public Dial dial() { - return new Dial_impl_ari_1_9_0(); - }; - -public DeviceStateChanged deviceStateChanged() { - return new DeviceStateChanged_impl_ari_1_9_0(); - }; - -public ChannelDestroyed channelDestroyed() { - return new ChannelDestroyed_impl_ari_1_9_0(); - }; - -public Bridge bridge() { - return new Bridge_impl_ari_1_9_0(); - }; - -public LiveRecording liveRecording() { - return new LiveRecording_impl_ari_1_9_0(); - }; - -public ChannelConnectedLine channelConnectedLine() { - return new ChannelConnectedLine_impl_ari_1_9_0(); - }; - -public Playback playback() { - return new Playback_impl_ari_1_9_0(); - }; - -public RecordingStarted recordingStarted() { - return new RecordingStarted_impl_ari_1_9_0(); - }; - -public PlaybackFinished playbackFinished() { - return new PlaybackFinished_impl_ari_1_9_0(); - }; - -public StasisStart stasisStart() { - return new StasisStart_impl_ari_1_9_0(); - }; - -public ChannelDtmfReceived channelDtmfReceived() { - return new ChannelDtmfReceived_impl_ari_1_9_0(); - }; - -public ContactStatusChange contactStatusChange() { - return new ContactStatusChange_impl_ari_1_9_0(); - }; - -public Application application() { - return new Application_impl_ari_1_9_0(); - }; - -public ChannelVarset channelVarset() { - return new ChannelVarset_impl_ari_1_9_0(); - }; - -public ContactInfo contactInfo() { - return new ContactInfo_impl_ari_1_9_0(); - }; - -public BridgeCreated bridgeCreated() { - return new BridgeCreated_impl_ari_1_9_0(); - }; - -public ChannelTalkingFinished channelTalkingFinished() { - return new ChannelTalkingFinished_impl_ari_1_9_0(); - }; - -public BuildInfo buildInfo() { - return new BuildInfo_impl_ari_1_9_0(); - }; - -public LogChannel logChannel() { - return new LogChannel_impl_ari_1_9_0(); - }; - -public BridgeDestroyed bridgeDestroyed() { - return new BridgeDestroyed_impl_ari_1_9_0(); - }; - -public Variable variable() { - return new Variable_impl_ari_1_9_0(); - }; - -public Peer peer() { - return new Peer_impl_ari_1_9_0(); - }; - -public Sound sound() { - return new Sound_impl_ari_1_9_0(); - }; - -public SystemInfo systemInfo() { - return new SystemInfo_impl_ari_1_9_0(); - }; - -public ChannelHold channelHold() { - return new ChannelHold_impl_ari_1_9_0(); - }; - -public DialplanCEP dialplanCEP() { - return new DialplanCEP_impl_ari_1_9_0(); - }; - -public SetId setId() { - return new SetId_impl_ari_1_9_0(); - }; - -public ChannelUnhold channelUnhold() { - return new ChannelUnhold_impl_ari_1_9_0(); - }; - -public ConfigTuple configTuple() { - return new ConfigTuple_impl_ari_1_9_0(); - }; - -public StoredRecording storedRecording() { - return new StoredRecording_impl_ari_1_9_0(); - }; - -public ChannelCallerId channelCallerId() { - return new ChannelCallerId_impl_ari_1_9_0(); - }; - -public DeviceState deviceState() { - return new DeviceState_impl_ari_1_9_0(); - }; - -public BridgeMerged bridgeMerged() { - return new BridgeMerged_impl_ari_1_9_0(); - }; - -public PeerStatusChange peerStatusChange() { - return new PeerStatusChange_impl_ari_1_9_0(); - }; - -public PlaybackContinuing playbackContinuing() { - throw new UnsupportedOperationException(); - }; - -public ARI.ClassFactory getClassFactory() { - return new ClassTranslator_impl_ari_1_9_0(); -}; - -}; diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/ClassTranslator_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/ClassTranslator_impl_ari_1_9_0.java deleted file mode 100644 index 8348b1a0..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/ClassTranslator_impl_ari_1_9_0.java +++ /dev/null @@ -1,327 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.ARI; -import ch.loway.oss.ari4java.generated.*; -import ch.loway.oss.ari4java.generated.ari_1_9_0.models.*; -import ch.loway.oss.ari4java.generated.ari_1_9_0.actions.*; - -/********************************************************** - * This is a class translator. - *********************************************************/ -public class ClassTranslator_impl_ari_1_9_0 implements ARI.ClassFactory { - - @Override - public Class getImplementationFor(Class interfaceClass) { - - if ( interfaceClass.equals(ActionApplications.class) ) { - return (ActionApplications_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(ActionAsterisk.class) ) { - return (ActionAsterisk_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(ActionBridges.class) ) { - return (ActionBridges_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(ActionChannels.class) ) { - return (ActionChannels_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(ActionDeviceStates.class) ) { - return (ActionDeviceStates_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(ActionEndpoints.class) ) { - return (ActionEndpoints_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(ActionEvents.class) ) { - return (ActionEvents_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(ActionPlaybacks.class) ) { - return (ActionPlaybacks_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(ActionRecordings.class) ) { - return (ActionRecordings_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(ActionSounds.class) ) { - return (ActionSounds_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(Application.class) ) { - return (Application_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(ApplicationReplaced.class) ) { - return (ApplicationReplaced_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(AsteriskInfo.class) ) { - return (AsteriskInfo_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(Bridge.class) ) { - return (Bridge_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(BridgeAttendedTransfer.class) ) { - return (BridgeAttendedTransfer_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(BridgeBlindTransfer.class) ) { - return (BridgeBlindTransfer_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(BridgeCreated.class) ) { - return (BridgeCreated_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(BridgeDestroyed.class) ) { - return (BridgeDestroyed_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(BridgeMerged.class) ) { - return (BridgeMerged_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(BuildInfo.class) ) { - return (BuildInfo_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(CallerID.class) ) { - return (CallerID_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(Channel.class) ) { - return (Channel_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(ChannelCallerId.class) ) { - return (ChannelCallerId_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(ChannelConnectedLine.class) ) { - return (ChannelConnectedLine_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(ChannelCreated.class) ) { - return (ChannelCreated_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(ChannelDestroyed.class) ) { - return (ChannelDestroyed_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(ChannelDialplan.class) ) { - return (ChannelDialplan_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(ChannelDtmfReceived.class) ) { - return (ChannelDtmfReceived_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(ChannelEnteredBridge.class) ) { - return (ChannelEnteredBridge_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(ChannelHangupRequest.class) ) { - return (ChannelHangupRequest_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(ChannelHold.class) ) { - return (ChannelHold_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(ChannelLeftBridge.class) ) { - return (ChannelLeftBridge_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(ChannelStateChange.class) ) { - return (ChannelStateChange_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(ChannelTalkingFinished.class) ) { - return (ChannelTalkingFinished_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(ChannelTalkingStarted.class) ) { - return (ChannelTalkingStarted_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(ChannelUnhold.class) ) { - return (ChannelUnhold_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(ChannelUserevent.class) ) { - return (ChannelUserevent_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(ChannelVarset.class) ) { - return (ChannelVarset_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(ConfigInfo.class) ) { - return (ConfigInfo_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(ConfigTuple.class) ) { - return (ConfigTuple_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(ContactInfo.class) ) { - return (ContactInfo_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(ContactStatusChange.class) ) { - return (ContactStatusChange_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(DeviceState.class) ) { - return (DeviceState_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(DeviceStateChanged.class) ) { - return (DeviceStateChanged_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(Dial.class) ) { - return (Dial_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(Dialed.class) ) { - return (Dialed_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(DialplanCEP.class) ) { - return (DialplanCEP_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(Endpoint.class) ) { - return (Endpoint_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(EndpointStateChange.class) ) { - return (EndpointStateChange_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(Event.class) ) { - return (Event_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(FormatLangPair.class) ) { - return (FormatLangPair_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(LiveRecording.class) ) { - return (LiveRecording_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(LogChannel.class) ) { - return (LogChannel_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(Message.class) ) { - return (Message_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(MissingParams.class) ) { - return (MissingParams_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(Module.class) ) { - return (Module_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(Peer.class) ) { - return (Peer_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(PeerStatusChange.class) ) { - return (PeerStatusChange_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(Playback.class) ) { - return (Playback_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(PlaybackFinished.class) ) { - return (PlaybackFinished_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(PlaybackStarted.class) ) { - return (PlaybackStarted_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(RecordingFailed.class) ) { - return (RecordingFailed_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(RecordingFinished.class) ) { - return (RecordingFinished_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(RecordingStarted.class) ) { - return (RecordingStarted_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(SetId.class) ) { - return (SetId_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(Sound.class) ) { - return (Sound_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(StasisEnd.class) ) { - return (StasisEnd_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(StasisStart.class) ) { - return (StasisStart_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(StatusInfo.class) ) { - return (StatusInfo_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(StoredRecording.class) ) { - return (StoredRecording_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(SystemInfo.class) ) { - return (SystemInfo_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(TextMessage.class) ) { - return (TextMessage_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(TextMessageReceived.class) ) { - return (TextMessageReceived_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(TextMessageVariable.class) ) { - return (TextMessageVariable_impl_ari_1_9_0.class); - } else - - if ( interfaceClass.equals(Variable.class) ) { - return (Variable_impl_ari_1_9_0.class); - } else - { - return null; - } - } -} - - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/actions/ActionApplications_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/actions/ActionApplications_impl_ari_1_9_0.java deleted file mode 100644 index 1866b0d7..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/actions/ActionApplications_impl_ari_1_9_0.java +++ /dev/null @@ -1,140 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_9_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionApplications_impl_ari_1_9_0 extends BaseAriAction implements ActionApplications { -/********************************************************** - * Stasis applications - * - * List all applications. - *********************************************************/ -private void buildList() { -reset(); -url = "/applications"; -method = "GET"; -} - -@Override -public List list() throws RestException { -buildList(); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void list(AriCallback> callback) { -buildList(); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Stasis application - * - * Get details of an application. - *********************************************************/ -private void buildGet(String applicationName) { -reset(); -url = "/applications/" + applicationName + ""; -method = "GET"; -lE.add( HttpResponse.build( 404, "Application does not exist.") ); -} - -@Override -public Application get(String applicationName) throws RestException { -buildGet(applicationName); -String json = httpActionSync(); -return deserializeJson( json, Application_impl_ari_1_9_0.class ); -} - -@Override -public void get(String applicationName, AriCallback callback) { -buildGet(applicationName); -httpActionAsync(callback, Application_impl_ari_1_9_0.class); -} - -/********************************************************** - * Stasis application - * - * Subscribe an application to a event source. - * Returns the state of the application after the subscriptions have changed - *********************************************************/ -private void buildSubscribe(String applicationName, String eventSource) { -reset(); -url = "/applications/" + applicationName + "/subscription"; -method = "POST"; -lParamQuery.add( HttpParam.build( "eventSource", eventSource) ); -lE.add( HttpResponse.build( 400, "Missing parameter.") ); -lE.add( HttpResponse.build( 404, "Application does not exist.") ); -lE.add( HttpResponse.build( 422, "Event source does not exist.") ); -} - -@Override -public Application subscribe(String applicationName, String eventSource) throws RestException { -buildSubscribe(applicationName, eventSource); -String json = httpActionSync(); -return deserializeJson( json, Application_impl_ari_1_9_0.class ); -} - -@Override -public void subscribe(String applicationName, String eventSource, AriCallback callback) { -buildSubscribe(applicationName, eventSource); -httpActionAsync(callback, Application_impl_ari_1_9_0.class); -} - -/********************************************************** - * Stasis application - * - * Unsubscribe an application from an event source. - * Returns the state of the application after the subscriptions have changed - *********************************************************/ -private void buildUnsubscribe(String applicationName, String eventSource) { -reset(); -url = "/applications/" + applicationName + "/subscription"; -method = "DELETE"; -lParamQuery.add( HttpParam.build( "eventSource", eventSource) ); -lE.add( HttpResponse.build( 400, "Missing parameter; event source scheme not recognized.") ); -lE.add( HttpResponse.build( 404, "Application does not exist.") ); -lE.add( HttpResponse.build( 409, "Application not subscribed to event source.") ); -lE.add( HttpResponse.build( 422, "Event source does not exist.") ); -} - -@Override -public Application unsubscribe(String applicationName, String eventSource) throws RestException { -buildUnsubscribe(applicationName, eventSource); -String json = httpActionSync(); -return deserializeJson( json, Application_impl_ari_1_9_0.class ); -} - -@Override -public void unsubscribe(String applicationName, String eventSource, AriCallback callback) { -buildUnsubscribe(applicationName, eventSource); -httpActionAsync(callback, Application_impl_ari_1_9_0.class); -} - -/** No missing signatures from interface */ -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/actions/ActionAsterisk_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/actions/ActionAsterisk_impl_ari_1_9_0.java deleted file mode 100644 index 8c3425cb..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/actions/ActionAsterisk_impl_ari_1_9_0.java +++ /dev/null @@ -1,412 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_9_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionAsterisk_impl_ari_1_9_0 extends BaseAriAction implements ActionAsterisk { -/********************************************************** - * Asterisk dynamic configuration - * - * Retrieve a dynamic configuration object. - *********************************************************/ -private void buildGetObject(String configClass, String objectType, String id) { -reset(); -url = "/asterisk/config/dynamic/" + configClass + "/" + objectType + "/" + id + ""; -method = "GET"; -lE.add( HttpResponse.build( 404, "{configClass|objectType|id} not found") ); -} - -@Override -public List getObject(String configClass, String objectType, String id) throws RestException { -buildGetObject(configClass, objectType, id); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void getObject(String configClass, String objectType, String id, AriCallback> callback) { -buildGetObject(configClass, objectType, id); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Asterisk dynamic configuration - * - * Create or update a dynamic configuration object. - *********************************************************/ -private void buildUpdateObject(String configClass, String objectType, String id, Map fields) { -reset(); -url = "/asterisk/config/dynamic/" + configClass + "/" + objectType + "/" + id + ""; -method = "PUT"; -lParamBody.addAll( HttpParam.build( "fields", fields) ); -lE.add( HttpResponse.build( 400, "Bad request body") ); -lE.add( HttpResponse.build( 403, "Could not create or update object") ); -lE.add( HttpResponse.build( 404, "{configClass|objectType} not found") ); -} - -@Override -public List updateObject(String configClass, String objectType, String id, Map fields) throws RestException { -buildUpdateObject(configClass, objectType, id, fields); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void updateObject(String configClass, String objectType, String id, Map fields, AriCallback> callback) { -buildUpdateObject(configClass, objectType, id, fields); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Asterisk dynamic configuration - * - * Delete a dynamic configuration object. - *********************************************************/ -private void buildDeleteObject(String configClass, String objectType, String id) { -reset(); -url = "/asterisk/config/dynamic/" + configClass + "/" + objectType + "/" + id + ""; -method = "DELETE"; -lE.add( HttpResponse.build( 403, "Could not delete object") ); -lE.add( HttpResponse.build( 404, "{configClass|objectType|id} not found") ); -} - -@Override -public void deleteObject(String configClass, String objectType, String id) throws RestException { -buildDeleteObject(configClass, objectType, id); -String json = httpActionSync(); -} - -@Override -public void deleteObject(String configClass, String objectType, String id, AriCallback callback) { -buildDeleteObject(configClass, objectType, id); -httpActionAsync(callback); -} - -/********************************************************** - * Asterisk system information (similar to core show settings) - * - * Gets Asterisk system information. - *********************************************************/ -private void buildGetInfo(String only) { -reset(); -url = "/asterisk/info"; -method = "GET"; -lParamQuery.add( HttpParam.build( "only", only) ); -} - -@Override -public AsteriskInfo getInfo(String only) throws RestException { -buildGetInfo(only); -String json = httpActionSync(); -return deserializeJson( json, AsteriskInfo_impl_ari_1_9_0.class ); -} - -@Override -public void getInfo(String only, AriCallback callback) { -buildGetInfo(only); -httpActionAsync(callback, AsteriskInfo_impl_ari_1_9_0.class); -} - -/********************************************************** - * Asterisk log channels - * - * Gets Asterisk log channel information. - *********************************************************/ -private void buildListLogChannels() { -reset(); -url = "/asterisk/logging"; -method = "GET"; -} - -@Override -public List listLogChannels() throws RestException { -buildListLogChannels(); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void listLogChannels(AriCallback> callback) { -buildListLogChannels(); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Asterisk log channel - * - * Adds a log channel. - *********************************************************/ -private void buildAddLog(String logChannelName, String configuration) { -reset(); -url = "/asterisk/logging/" + logChannelName + ""; -method = "POST"; -lParamQuery.add( HttpParam.build( "configuration", configuration) ); -lE.add( HttpResponse.build( 400, "Bad request body") ); -lE.add( HttpResponse.build( 409, "Log channel could not be created.") ); -} - -@Override -public void addLog(String logChannelName, String configuration) throws RestException { -buildAddLog(logChannelName, configuration); -String json = httpActionSync(); -} - -@Override -public void addLog(String logChannelName, String configuration, AriCallback callback) { -buildAddLog(logChannelName, configuration); -httpActionAsync(callback); -} - -/********************************************************** - * Asterisk log channel - * - * Deletes a log channel. - *********************************************************/ -private void buildDeleteLog(String logChannelName) { -reset(); -url = "/asterisk/logging/" + logChannelName + ""; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Log channel does not exist.") ); -} - -@Override -public void deleteLog(String logChannelName) throws RestException { -buildDeleteLog(logChannelName); -String json = httpActionSync(); -} - -@Override -public void deleteLog(String logChannelName, AriCallback callback) { -buildDeleteLog(logChannelName); -httpActionAsync(callback); -} - -/********************************************************** - * Asterisk log channel - * - * Rotates a log channel. - *********************************************************/ -private void buildRotateLog(String logChannelName) { -reset(); -url = "/asterisk/logging/" + logChannelName + "/rotate"; -method = "PUT"; -lE.add( HttpResponse.build( 404, "Log channel does not exist.") ); -} - -@Override -public void rotateLog(String logChannelName) throws RestException { -buildRotateLog(logChannelName); -String json = httpActionSync(); -} - -@Override -public void rotateLog(String logChannelName, AriCallback callback) { -buildRotateLog(logChannelName); -httpActionAsync(callback); -} - -/********************************************************** - * Asterisk modules - * - * List Asterisk modules. - *********************************************************/ -private void buildListModules() { -reset(); -url = "/asterisk/modules"; -method = "GET"; -} - -@Override -public List listModules() throws RestException { -buildListModules(); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void listModules(AriCallback> callback) { -buildListModules(); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Asterisk module - * - * Get Asterisk module information. - *********************************************************/ -private void buildGetModule(String moduleName) { -reset(); -url = "/asterisk/modules/" + moduleName + ""; -method = "GET"; -lE.add( HttpResponse.build( 404, "Module could not be found in running modules.") ); -lE.add( HttpResponse.build( 409, "Module information could not be retrieved.") ); -} - -@Override -public Module getModule(String moduleName) throws RestException { -buildGetModule(moduleName); -String json = httpActionSync(); -return deserializeJson( json, Module_impl_ari_1_9_0.class ); -} - -@Override -public void getModule(String moduleName, AriCallback callback) { -buildGetModule(moduleName); -httpActionAsync(callback, Module_impl_ari_1_9_0.class); -} - -/********************************************************** - * Asterisk module - * - * Load an Asterisk module. - *********************************************************/ -private void buildLoadModule(String moduleName) { -reset(); -url = "/asterisk/modules/" + moduleName + ""; -method = "POST"; -lE.add( HttpResponse.build( 409, "Module could not be loaded.") ); -} - -@Override -public void loadModule(String moduleName) throws RestException { -buildLoadModule(moduleName); -String json = httpActionSync(); -} - -@Override -public void loadModule(String moduleName, AriCallback callback) { -buildLoadModule(moduleName); -httpActionAsync(callback); -} - -/********************************************************** - * Asterisk module - * - * Unload an Asterisk module. - *********************************************************/ -private void buildUnloadModule(String moduleName) { -reset(); -url = "/asterisk/modules/" + moduleName + ""; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Module not found in running modules.") ); -lE.add( HttpResponse.build( 409, "Module could not be unloaded.") ); -} - -@Override -public void unloadModule(String moduleName) throws RestException { -buildUnloadModule(moduleName); -String json = httpActionSync(); -} - -@Override -public void unloadModule(String moduleName, AriCallback callback) { -buildUnloadModule(moduleName); -httpActionAsync(callback); -} - -/********************************************************** - * Asterisk module - * - * Reload an Asterisk module. - *********************************************************/ -private void buildReloadModule(String moduleName) { -reset(); -url = "/asterisk/modules/" + moduleName + ""; -method = "PUT"; -lE.add( HttpResponse.build( 404, "Module not found in running modules.") ); -lE.add( HttpResponse.build( 409, "Module could not be reloaded.") ); -} - -@Override -public void reloadModule(String moduleName) throws RestException { -buildReloadModule(moduleName); -String json = httpActionSync(); -} - -@Override -public void reloadModule(String moduleName, AriCallback callback) { -buildReloadModule(moduleName); -httpActionAsync(callback); -} - -/********************************************************** - * Global variables - * - * Get the value of a global variable. - *********************************************************/ -private void buildGetGlobalVar(String variable) { -reset(); -url = "/asterisk/variable"; -method = "GET"; -lParamQuery.add( HttpParam.build( "variable", variable) ); -lE.add( HttpResponse.build( 400, "Missing variable parameter.") ); -} - -@Override -public Variable getGlobalVar(String variable) throws RestException { -buildGetGlobalVar(variable); -String json = httpActionSync(); -return deserializeJson( json, Variable_impl_ari_1_9_0.class ); -} - -@Override -public void getGlobalVar(String variable, AriCallback callback) { -buildGetGlobalVar(variable); -httpActionAsync(callback, Variable_impl_ari_1_9_0.class); -} - -/********************************************************** - * Global variables - * - * Set the value of a global variable. - *********************************************************/ -private void buildSetGlobalVar(String variable, String value) { -reset(); -url = "/asterisk/variable"; -method = "POST"; -lParamQuery.add( HttpParam.build( "variable", variable) ); -lParamQuery.add( HttpParam.build( "value", value) ); -lE.add( HttpResponse.build( 400, "Missing variable parameter.") ); -} - -@Override -public void setGlobalVar(String variable, String value) throws RestException { -buildSetGlobalVar(variable, value); -String json = httpActionSync(); -} - -@Override -public void setGlobalVar(String variable, String value, AriCallback callback) { -buildSetGlobalVar(variable, value); -httpActionAsync(callback); -} - -/** No missing signatures from interface */ -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/actions/ActionBridges_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/actions/ActionBridges_impl_ari_1_9_0.java deleted file mode 100644 index 648b9671..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/actions/ActionBridges_impl_ari_1_9_0.java +++ /dev/null @@ -1,444 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_9_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionBridges_impl_ari_1_9_0 extends BaseAriAction implements ActionBridges { -/********************************************************** - * Active bridges - * - * List all active bridges in Asterisk. - *********************************************************/ -private void buildList() { -reset(); -url = "/bridges"; -method = "GET"; -} - -@Override -public List list() throws RestException { -buildList(); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void list(AriCallback> callback) { -buildList(); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Active bridges - * - * Create a new bridge. - * This bridge persists until it has been shut down, or Asterisk has been shut down. - *********************************************************/ -private void buildCreate(String type, String bridgeId, String name) { -reset(); -url = "/bridges"; -method = "POST"; -lParamQuery.add( HttpParam.build( "type", type) ); -lParamQuery.add( HttpParam.build( "bridgeId", bridgeId) ); -lParamQuery.add( HttpParam.build( "name", name) ); -} - -@Override -public Bridge create(String type, String bridgeId, String name) throws RestException { -buildCreate(type, bridgeId, name); -String json = httpActionSync(); -return deserializeJson( json, Bridge_impl_ari_1_9_0.class ); -} - -@Override -public void create(String type, String bridgeId, String name, AriCallback callback) { -buildCreate(type, bridgeId, name); -httpActionAsync(callback, Bridge_impl_ari_1_9_0.class); -} - -/********************************************************** - * Individual bridge - * - * Create a new bridge or updates an existing one. - * This bridge persists until it has been shut down, or Asterisk has been shut down. - *********************************************************/ -private void buildCreateWithId(String type, String bridgeId, String name) { -reset(); -url = "/bridges/" + bridgeId + ""; -method = "POST"; -lParamQuery.add( HttpParam.build( "type", type) ); -lParamQuery.add( HttpParam.build( "name", name) ); -} - -@Override -public Bridge createWithId(String type, String bridgeId, String name) throws RestException { -buildCreateWithId(type, bridgeId, name); -String json = httpActionSync(); -return deserializeJson( json, Bridge_impl_ari_1_9_0.class ); -} - -@Override -public void createWithId(String type, String bridgeId, String name, AriCallback callback) { -buildCreateWithId(type, bridgeId, name); -httpActionAsync(callback, Bridge_impl_ari_1_9_0.class); -} - -/********************************************************** - * Individual bridge - * - * Get bridge details. - *********************************************************/ -private void buildGet(String bridgeId) { -reset(); -url = "/bridges/" + bridgeId + ""; -method = "GET"; -lE.add( HttpResponse.build( 404, "Bridge not found") ); -} - -@Override -public Bridge get(String bridgeId) throws RestException { -buildGet(bridgeId); -String json = httpActionSync(); -return deserializeJson( json, Bridge_impl_ari_1_9_0.class ); -} - -@Override -public void get(String bridgeId, AriCallback callback) { -buildGet(bridgeId); -httpActionAsync(callback, Bridge_impl_ari_1_9_0.class); -} - -/********************************************************** - * Individual bridge - * - * Shut down a bridge. - * If any channels are in this bridge, they will be removed and resume whatever they were doing beforehand. - *********************************************************/ -private void buildDestroy(String bridgeId) { -reset(); -url = "/bridges/" + bridgeId + ""; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Bridge not found") ); -} - -@Override -public void destroy(String bridgeId) throws RestException { -buildDestroy(bridgeId); -String json = httpActionSync(); -} - -@Override -public void destroy(String bridgeId, AriCallback callback) { -buildDestroy(bridgeId); -httpActionAsync(callback); -} - -/********************************************************** - * Add a channel to a bridge - * - * Add a channel to a bridge. - *********************************************************/ -private void buildAddChannel(String bridgeId, String channel, String role) { -reset(); -url = "/bridges/" + bridgeId + "/addChannel"; -method = "POST"; -lParamQuery.add( HttpParam.build( "channel", channel) ); -lParamQuery.add( HttpParam.build( "role", role) ); -lE.add( HttpResponse.build( 400, "Channel not found") ); -lE.add( HttpResponse.build( 404, "Bridge not found") ); -lE.add( HttpResponse.build( 409, "Bridge not in Stasis application; Channel currently recording") ); -lE.add( HttpResponse.build( 422, "Channel not in Stasis application") ); -} - -@Override -public void addChannel(String bridgeId, String channel, String role) throws RestException { -buildAddChannel(bridgeId, channel, role); -String json = httpActionSync(); -} - -@Override -public void addChannel(String bridgeId, String channel, String role, AriCallback callback) { -buildAddChannel(bridgeId, channel, role); -httpActionAsync(callback); -} - -/********************************************************** - * Play music on hold to a bridge - * - * Play music on hold to a bridge or change the MOH class that is playing. - *********************************************************/ -private void buildStartMoh(String bridgeId, String mohClass) { -reset(); -url = "/bridges/" + bridgeId + "/moh"; -method = "POST"; -lParamQuery.add( HttpParam.build( "mohClass", mohClass) ); -lE.add( HttpResponse.build( 404, "Bridge not found") ); -lE.add( HttpResponse.build( 409, "Bridge not in Stasis application") ); -} - -@Override -public void startMoh(String bridgeId, String mohClass) throws RestException { -buildStartMoh(bridgeId, mohClass); -String json = httpActionSync(); -} - -@Override -public void startMoh(String bridgeId, String mohClass, AriCallback callback) { -buildStartMoh(bridgeId, mohClass); -httpActionAsync(callback); -} - -/********************************************************** - * Play music on hold to a bridge - * - * Stop playing music on hold to a bridge. - * This will only stop music on hold being played via POST bridges/{bridgeId}/moh. - *********************************************************/ -private void buildStopMoh(String bridgeId) { -reset(); -url = "/bridges/" + bridgeId + "/moh"; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Bridge not found") ); -lE.add( HttpResponse.build( 409, "Bridge not in Stasis application") ); -} - -@Override -public void stopMoh(String bridgeId) throws RestException { -buildStopMoh(bridgeId); -String json = httpActionSync(); -} - -@Override -public void stopMoh(String bridgeId, AriCallback callback) { -buildStopMoh(bridgeId); -httpActionAsync(callback); -} - -/********************************************************** - * Play media to the participants of a bridge - * - * Start playback of media on a bridge. - * The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.) - *********************************************************/ -private void buildPlay(String bridgeId, String media, String lang, int offsetms, int skipms, String playbackId) { -reset(); -url = "/bridges/" + bridgeId + "/play"; -method = "POST"; -lParamQuery.add( HttpParam.build( "media", media) ); -lParamQuery.add( HttpParam.build( "lang", lang) ); -lParamQuery.add( HttpParam.build( "offsetms", offsetms) ); -lParamQuery.add( HttpParam.build( "skipms", skipms) ); -lParamQuery.add( HttpParam.build( "playbackId", playbackId) ); -lE.add( HttpResponse.build( 404, "Bridge not found") ); -lE.add( HttpResponse.build( 409, "Bridge not in a Stasis application") ); -} - -@Override -public Playback play(String bridgeId, String media, String lang, int offsetms, int skipms, String playbackId) throws RestException { -buildPlay(bridgeId, media, lang, offsetms, skipms, playbackId); -String json = httpActionSync(); -return deserializeJson( json, Playback_impl_ari_1_9_0.class ); -} - -@Override -public void play(String bridgeId, String media, String lang, int offsetms, int skipms, String playbackId, AriCallback callback) { -buildPlay(bridgeId, media, lang, offsetms, skipms, playbackId); -httpActionAsync(callback, Playback_impl_ari_1_9_0.class); -} - -/********************************************************** - * Play media to a bridge - * - * Start playback of media on a bridge. - * The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.) - *********************************************************/ -private void buildPlayWithId(String bridgeId, String playbackId, String media, String lang, int offsetms, int skipms) { -reset(); -url = "/bridges/" + bridgeId + "/play/" + playbackId + ""; -method = "POST"; -lParamQuery.add( HttpParam.build( "media", media) ); -lParamQuery.add( HttpParam.build( "lang", lang) ); -lParamQuery.add( HttpParam.build( "offsetms", offsetms) ); -lParamQuery.add( HttpParam.build( "skipms", skipms) ); -lE.add( HttpResponse.build( 404, "Bridge not found") ); -lE.add( HttpResponse.build( 409, "Bridge not in a Stasis application") ); -} - -@Override -public Playback playWithId(String bridgeId, String playbackId, String media, String lang, int offsetms, int skipms) throws RestException { -buildPlayWithId(bridgeId, playbackId, media, lang, offsetms, skipms); -String json = httpActionSync(); -return deserializeJson( json, Playback_impl_ari_1_9_0.class ); -} - -@Override -public void playWithId(String bridgeId, String playbackId, String media, String lang, int offsetms, int skipms, AriCallback callback) { -buildPlayWithId(bridgeId, playbackId, media, lang, offsetms, skipms); -httpActionAsync(callback, Playback_impl_ari_1_9_0.class); -} - -/********************************************************** - * Record audio on a bridge - * - * Start a recording. - * This records the mixed audio from all channels participating in this bridge. - *********************************************************/ -private void buildRecord(String bridgeId, String name, String format, int maxDurationSeconds, int maxSilenceSeconds, String ifExists, boolean beep, String terminateOn) { -reset(); -url = "/bridges/" + bridgeId + "/record"; -method = "POST"; -lParamQuery.add( HttpParam.build( "name", name) ); -lParamQuery.add( HttpParam.build( "format", format) ); -lParamQuery.add( HttpParam.build( "maxDurationSeconds", maxDurationSeconds) ); -lParamQuery.add( HttpParam.build( "maxSilenceSeconds", maxSilenceSeconds) ); -lParamQuery.add( HttpParam.build( "ifExists", ifExists) ); -lParamQuery.add( HttpParam.build( "beep", beep) ); -lParamQuery.add( HttpParam.build( "terminateOn", terminateOn) ); -lE.add( HttpResponse.build( 400, "Invalid parameters") ); -lE.add( HttpResponse.build( 404, "Bridge not found") ); -lE.add( HttpResponse.build( 409, "Bridge is not in a Stasis application; A recording with the same name already exists on the system and can not be overwritten because it is in progress or ifExists=fail") ); -lE.add( HttpResponse.build( 422, "The format specified is unknown on this system") ); -} - -@Override -public LiveRecording record(String bridgeId, String name, String format, int maxDurationSeconds, int maxSilenceSeconds, String ifExists, boolean beep, String terminateOn) throws RestException { -buildRecord(bridgeId, name, format, maxDurationSeconds, maxSilenceSeconds, ifExists, beep, terminateOn); -String json = httpActionSync(); -return deserializeJson( json, LiveRecording_impl_ari_1_9_0.class ); -} - -@Override -public void record(String bridgeId, String name, String format, int maxDurationSeconds, int maxSilenceSeconds, String ifExists, boolean beep, String terminateOn, AriCallback callback) { -buildRecord(bridgeId, name, format, maxDurationSeconds, maxSilenceSeconds, ifExists, beep, terminateOn); -httpActionAsync(callback, LiveRecording_impl_ari_1_9_0.class); -} - -/********************************************************** - * Remove a channel from a bridge - * - * Remove a channel from a bridge. - *********************************************************/ -private void buildRemoveChannel(String bridgeId, String channel) { -reset(); -url = "/bridges/" + bridgeId + "/removeChannel"; -method = "POST"; -lParamQuery.add( HttpParam.build( "channel", channel) ); -lE.add( HttpResponse.build( 400, "Channel not found") ); -lE.add( HttpResponse.build( 404, "Bridge not found") ); -lE.add( HttpResponse.build( 409, "Bridge not in Stasis application") ); -lE.add( HttpResponse.build( 422, "Channel not in this bridge") ); -} - -@Override -public void removeChannel(String bridgeId, String channel) throws RestException { -buildRemoveChannel(bridgeId, channel); -String json = httpActionSync(); -} - -@Override -public void removeChannel(String bridgeId, String channel, AriCallback callback) { -buildRemoveChannel(bridgeId, channel); -httpActionAsync(callback); -} - -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void create(String type, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new bridge. - * This bridge persists until it has been shut down, or Asterisk has been shut down. - * - * @since ari_1_0_0 - *********************************************************/ -public Bridge create(String type, String name) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new bridge. - * This bridge persists until it has been shut down, or Asterisk has been shut down. - * - * @since ari_0_0_1 - *********************************************************/ -public Bridge create(String type) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void play(String bridgeId, String media, String lang, int offsetms, int skipms, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Start playback of media on a bridge. - * 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.) - * - * @since ari_0_0_1 - *********************************************************/ -public Playback play(String bridgeId, String media, String lang, int offsetms, int skipms) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_0_0 - *********************************************************/ -public void create(String type, String name, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_5_0 - *********************************************************/ -public void create_or_update_with_id(String type, String bridgeId, String name, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new bridge or updates an existing one. - * This bridge persists until it has been shut down, or Asterisk has been shut down. - * - * @since ari_1_5_0 - *********************************************************/ -public Bridge create_or_update_with_id(String type, String bridgeId, String name) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/actions/ActionChannels_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/actions/ActionChannels_impl_ari_1_9_0.java deleted file mode 100644 index 8138f39c..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/actions/ActionChannels_impl_ari_1_9_0.java +++ /dev/null @@ -1,961 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_9_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionChannels_impl_ari_1_9_0 extends BaseAriAction implements ActionChannels { -/********************************************************** - * Active channels - * - * List all active channels in Asterisk. - *********************************************************/ -private void buildList() { -reset(); -url = "/channels"; -method = "GET"; -} - -@Override -public List list() throws RestException { -buildList(); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void list(AriCallback> callback) { -buildList(); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Active channels - * - * Create a new channel (originate). - * 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. - *********************************************************/ -private void buildOriginate(String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String channelId, String otherChannelId, String originator) { -reset(); -url = "/channels"; -method = "POST"; -lParamQuery.add( HttpParam.build( "endpoint", endpoint) ); -lParamQuery.add( HttpParam.build( "extension", extension) ); -lParamQuery.add( HttpParam.build( "context", context) ); -lParamQuery.add( HttpParam.build( "priority", priority) ); -lParamQuery.add( HttpParam.build( "label", label) ); -lParamQuery.add( HttpParam.build( "app", app) ); -lParamQuery.add( HttpParam.build( "appArgs", appArgs) ); -lParamQuery.add( HttpParam.build( "callerId", callerId) ); -lParamQuery.add( HttpParam.build( "timeout", timeout) ); -lParamBody.addAll( HttpParam.build( "variables", variables) ); -lParamQuery.add( HttpParam.build( "channelId", channelId) ); -lParamQuery.add( HttpParam.build( "otherChannelId", otherChannelId) ); -lParamQuery.add( HttpParam.build( "originator", originator) ); -lE.add( HttpResponse.build( 400, "Invalid parameters for originating a channel.") ); -} - -@Override -public Channel originate(String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String channelId, String otherChannelId, String originator) throws RestException { -buildOriginate(endpoint, extension, context, priority, label, app, appArgs, callerId, timeout, variables, channelId, otherChannelId, originator); -String json = httpActionSync(); -return deserializeJson( json, Channel_impl_ari_1_9_0.class ); -} - -@Override -public void originate(String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String channelId, String otherChannelId, String originator, AriCallback callback) { -buildOriginate(endpoint, extension, context, priority, label, app, appArgs, callerId, timeout, variables, channelId, otherChannelId, originator); -httpActionAsync(callback, Channel_impl_ari_1_9_0.class); -} - -/********************************************************** - * Active channel - * - * Channel details. - *********************************************************/ -private void buildGet(String channelId) { -reset(); -url = "/channels/" + channelId + ""; -method = "GET"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -} - -@Override -public Channel get(String channelId) throws RestException { -buildGet(channelId); -String json = httpActionSync(); -return deserializeJson( json, Channel_impl_ari_1_9_0.class ); -} - -@Override -public void get(String channelId, AriCallback callback) { -buildGet(channelId); -httpActionAsync(callback, Channel_impl_ari_1_9_0.class); -} - -/********************************************************** - * Active channel - * - * Create a new channel (originate with id). - * 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. - *********************************************************/ -private void buildOriginateWithId(String channelId, String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String otherChannelId, String originator) { -reset(); -url = "/channels/" + channelId + ""; -method = "POST"; -lParamQuery.add( HttpParam.build( "endpoint", endpoint) ); -lParamQuery.add( HttpParam.build( "extension", extension) ); -lParamQuery.add( HttpParam.build( "context", context) ); -lParamQuery.add( HttpParam.build( "priority", priority) ); -lParamQuery.add( HttpParam.build( "label", label) ); -lParamQuery.add( HttpParam.build( "app", app) ); -lParamQuery.add( HttpParam.build( "appArgs", appArgs) ); -lParamQuery.add( HttpParam.build( "callerId", callerId) ); -lParamQuery.add( HttpParam.build( "timeout", timeout) ); -lParamBody.addAll( HttpParam.build( "variables", variables) ); -lParamQuery.add( HttpParam.build( "otherChannelId", otherChannelId) ); -lParamQuery.add( HttpParam.build( "originator", originator) ); -lE.add( HttpResponse.build( 400, "Invalid parameters for originating a channel.") ); -} - -@Override -public Channel originateWithId(String channelId, String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String otherChannelId, String originator) throws RestException { -buildOriginateWithId(channelId, endpoint, extension, context, priority, label, app, appArgs, callerId, timeout, variables, otherChannelId, originator); -String json = httpActionSync(); -return deserializeJson( json, Channel_impl_ari_1_9_0.class ); -} - -@Override -public void originateWithId(String channelId, String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String otherChannelId, String originator, AriCallback callback) { -buildOriginateWithId(channelId, endpoint, extension, context, priority, label, app, appArgs, callerId, timeout, variables, otherChannelId, originator); -httpActionAsync(callback, Channel_impl_ari_1_9_0.class); -} - -/********************************************************** - * Active channel - * - * Delete (i.e. hangup) a channel. - *********************************************************/ -private void buildHangup(String channelId, String reason) { -reset(); -url = "/channels/" + channelId + ""; -method = "DELETE"; -lParamQuery.add( HttpParam.build( "reason", reason) ); -lE.add( HttpResponse.build( 400, "Invalid reason for hangup provided") ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -} - -@Override -public void hangup(String channelId, String reason) throws RestException { -buildHangup(channelId, reason); -String json = httpActionSync(); -} - -@Override -public void hangup(String channelId, String reason, AriCallback callback) { -buildHangup(channelId, reason); -httpActionAsync(callback); -} - -/********************************************************** - * Answer a channel - * - * Answer a channel. - *********************************************************/ -private void buildAnswer(String channelId) { -reset(); -url = "/channels/" + channelId + "/answer"; -method = "POST"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void answer(String channelId) throws RestException { -buildAnswer(channelId); -String json = httpActionSync(); -} - -@Override -public void answer(String channelId, AriCallback callback) { -buildAnswer(channelId); -httpActionAsync(callback); -} - -/********************************************************** - * Exit application; continue execution in the dialplan - * - * Exit application; continue execution in the dialplan. - *********************************************************/ -private void buildContinueInDialplan(String channelId, String context, String extension, int priority, String label) { -reset(); -url = "/channels/" + channelId + "/continue"; -method = "POST"; -lParamQuery.add( HttpParam.build( "context", context) ); -lParamQuery.add( HttpParam.build( "extension", extension) ); -lParamQuery.add( HttpParam.build( "priority", priority) ); -lParamQuery.add( HttpParam.build( "label", label) ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void continueInDialplan(String channelId, String context, String extension, int priority, String label) throws RestException { -buildContinueInDialplan(channelId, context, extension, priority, label); -String json = httpActionSync(); -} - -@Override -public void continueInDialplan(String channelId, String context, String extension, int priority, String label, AriCallback callback) { -buildContinueInDialplan(channelId, context, extension, priority, label); -httpActionAsync(callback); -} - -/********************************************************** - * Send DTMF to a channel - * - * Send provided DTMF to a given channel. - *********************************************************/ -private void buildSendDTMF(String channelId, String dtmf, int before, int between, int duration, int after) { -reset(); -url = "/channels/" + channelId + "/dtmf"; -method = "POST"; -lParamQuery.add( HttpParam.build( "dtmf", dtmf) ); -lParamQuery.add( HttpParam.build( "before", before) ); -lParamQuery.add( HttpParam.build( "between", between) ); -lParamQuery.add( HttpParam.build( "duration", duration) ); -lParamQuery.add( HttpParam.build( "after", after) ); -lE.add( HttpResponse.build( 400, "DTMF is required") ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void sendDTMF(String channelId, String dtmf, int before, int between, int duration, int after) throws RestException { -buildSendDTMF(channelId, dtmf, before, between, duration, after); -String json = httpActionSync(); -} - -@Override -public void sendDTMF(String channelId, String dtmf, int before, int between, int duration, int after, AriCallback callback) { -buildSendDTMF(channelId, dtmf, before, between, duration, after); -httpActionAsync(callback); -} - -/********************************************************** - * Put a channel on hold - * - * Hold a channel. - *********************************************************/ -private void buildHold(String channelId) { -reset(); -url = "/channels/" + channelId + "/hold"; -method = "POST"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void hold(String channelId) throws RestException { -buildHold(channelId); -String json = httpActionSync(); -} - -@Override -public void hold(String channelId, AriCallback callback) { -buildHold(channelId); -httpActionAsync(callback); -} - -/********************************************************** - * Put a channel on hold - * - * Remove a channel from hold. - *********************************************************/ -private void buildUnhold(String channelId) { -reset(); -url = "/channels/" + channelId + "/hold"; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void unhold(String channelId) throws RestException { -buildUnhold(channelId); -String json = httpActionSync(); -} - -@Override -public void unhold(String channelId, AriCallback callback) { -buildUnhold(channelId); -httpActionAsync(callback); -} - -/********************************************************** - * Play music on hold to a channel - * - * Play music on hold to a channel. - * Using media operations such as /play on a channel playing MOH in this manner will suspend MOH without resuming automatically. If continuing music on hold is desired, the stasis application must reinitiate music on hold. - *********************************************************/ -private void buildStartMoh(String channelId, String mohClass) { -reset(); -url = "/channels/" + channelId + "/moh"; -method = "POST"; -lParamQuery.add( HttpParam.build( "mohClass", mohClass) ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void startMoh(String channelId, String mohClass) throws RestException { -buildStartMoh(channelId, mohClass); -String json = httpActionSync(); -} - -@Override -public void startMoh(String channelId, String mohClass, AriCallback callback) { -buildStartMoh(channelId, mohClass); -httpActionAsync(callback); -} - -/********************************************************** - * Play music on hold to a channel - * - * Stop playing music on hold to a channel. - *********************************************************/ -private void buildStopMoh(String channelId) { -reset(); -url = "/channels/" + channelId + "/moh"; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void stopMoh(String channelId) throws RestException { -buildStopMoh(channelId); -String json = httpActionSync(); -} - -@Override -public void stopMoh(String channelId, AriCallback callback) { -buildStopMoh(channelId); -httpActionAsync(callback); -} - -/********************************************************** - * Mute a channel - * - * Mute a channel. - *********************************************************/ -private void buildMute(String channelId, String direction) { -reset(); -url = "/channels/" + channelId + "/mute"; -method = "POST"; -lParamQuery.add( HttpParam.build( "direction", direction) ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void mute(String channelId, String direction) throws RestException { -buildMute(channelId, direction); -String json = httpActionSync(); -} - -@Override -public void mute(String channelId, String direction, AriCallback callback) { -buildMute(channelId, direction); -httpActionAsync(callback); -} - -/********************************************************** - * Mute a channel - * - * Unmute a channel. - *********************************************************/ -private void buildUnmute(String channelId, String direction) { -reset(); -url = "/channels/" + channelId + "/mute"; -method = "DELETE"; -lParamQuery.add( HttpParam.build( "direction", direction) ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void unmute(String channelId, String direction) throws RestException { -buildUnmute(channelId, direction); -String json = httpActionSync(); -} - -@Override -public void unmute(String channelId, String direction, AriCallback callback) { -buildUnmute(channelId, direction); -httpActionAsync(callback); -} - -/********************************************************** - * Play media to a channel - * - * Start playback of media. - * The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.) - *********************************************************/ -private void buildPlay(String channelId, String media, String lang, int offsetms, int skipms, String playbackId) { -reset(); -url = "/channels/" + channelId + "/play"; -method = "POST"; -lParamQuery.add( HttpParam.build( "media", media) ); -lParamQuery.add( HttpParam.build( "lang", lang) ); -lParamQuery.add( HttpParam.build( "offsetms", offsetms) ); -lParamQuery.add( HttpParam.build( "skipms", skipms) ); -lParamQuery.add( HttpParam.build( "playbackId", playbackId) ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public Playback play(String channelId, String media, String lang, int offsetms, int skipms, String playbackId) throws RestException { -buildPlay(channelId, media, lang, offsetms, skipms, playbackId); -String json = httpActionSync(); -return deserializeJson( json, Playback_impl_ari_1_9_0.class ); -} - -@Override -public void play(String channelId, String media, String lang, int offsetms, int skipms, String playbackId, AriCallback callback) { -buildPlay(channelId, media, lang, offsetms, skipms, playbackId); -httpActionAsync(callback, Playback_impl_ari_1_9_0.class); -} - -/********************************************************** - * Play media to a channel - * - * Start playback of media and specify the playbackId. - * The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.) - *********************************************************/ -private void buildPlayWithId(String channelId, String playbackId, String media, String lang, int offsetms, int skipms) { -reset(); -url = "/channels/" + channelId + "/play/" + playbackId + ""; -method = "POST"; -lParamQuery.add( HttpParam.build( "media", media) ); -lParamQuery.add( HttpParam.build( "lang", lang) ); -lParamQuery.add( HttpParam.build( "offsetms", offsetms) ); -lParamQuery.add( HttpParam.build( "skipms", skipms) ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public Playback playWithId(String channelId, String playbackId, String media, String lang, int offsetms, int skipms) throws RestException { -buildPlayWithId(channelId, playbackId, media, lang, offsetms, skipms); -String json = httpActionSync(); -return deserializeJson( json, Playback_impl_ari_1_9_0.class ); -} - -@Override -public void playWithId(String channelId, String playbackId, String media, String lang, int offsetms, int skipms, AriCallback callback) { -buildPlayWithId(channelId, playbackId, media, lang, offsetms, skipms); -httpActionAsync(callback, Playback_impl_ari_1_9_0.class); -} - -/********************************************************** - * Record audio from a channel - * - * Start a recording. - * 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. - *********************************************************/ -private void buildRecord(String channelId, String name, String format, int maxDurationSeconds, int maxSilenceSeconds, String ifExists, boolean beep, String terminateOn) { -reset(); -url = "/channels/" + channelId + "/record"; -method = "POST"; -lParamQuery.add( HttpParam.build( "name", name) ); -lParamQuery.add( HttpParam.build( "format", format) ); -lParamQuery.add( HttpParam.build( "maxDurationSeconds", maxDurationSeconds) ); -lParamQuery.add( HttpParam.build( "maxSilenceSeconds", maxSilenceSeconds) ); -lParamQuery.add( HttpParam.build( "ifExists", ifExists) ); -lParamQuery.add( HttpParam.build( "beep", beep) ); -lParamQuery.add( HttpParam.build( "terminateOn", terminateOn) ); -lE.add( HttpResponse.build( 400, "Invalid parameters") ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "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") ); -lE.add( HttpResponse.build( 422, "The format specified is unknown on this system") ); -} - -@Override -public LiveRecording record(String channelId, String name, String format, int maxDurationSeconds, int maxSilenceSeconds, String ifExists, boolean beep, String terminateOn) throws RestException { -buildRecord(channelId, name, format, maxDurationSeconds, maxSilenceSeconds, ifExists, beep, terminateOn); -String json = httpActionSync(); -return deserializeJson( json, LiveRecording_impl_ari_1_9_0.class ); -} - -@Override -public void record(String channelId, String name, String format, int maxDurationSeconds, int maxSilenceSeconds, String ifExists, boolean beep, String terminateOn, AriCallback callback) { -buildRecord(channelId, name, format, maxDurationSeconds, maxSilenceSeconds, ifExists, beep, terminateOn); -httpActionAsync(callback, LiveRecording_impl_ari_1_9_0.class); -} - -/********************************************************** - * Inform the channel that it should redirect itself to a different location. Note that this will almost certainly cause the channel to exit the application. - * - * Redirect the channel to a different location. - *********************************************************/ -private void buildRedirect(String channelId, String endpoint) { -reset(); -url = "/channels/" + channelId + "/redirect"; -method = "POST"; -lParamQuery.add( HttpParam.build( "endpoint", endpoint) ); -lE.add( HttpResponse.build( 400, "Endpoint parameter not provided") ); -lE.add( HttpResponse.build( 404, "Channel or endpoint not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -lE.add( HttpResponse.build( 422, "Endpoint is not the same type as the channel") ); -} - -@Override -public void redirect(String channelId, String endpoint) throws RestException { -buildRedirect(channelId, endpoint); -String json = httpActionSync(); -} - -@Override -public void redirect(String channelId, String endpoint, AriCallback callback) { -buildRedirect(channelId, endpoint); -httpActionAsync(callback); -} - -/********************************************************** - * Send a ringing indication to a channel - * - * Indicate ringing to a channel. - *********************************************************/ -private void buildRing(String channelId) { -reset(); -url = "/channels/" + channelId + "/ring"; -method = "POST"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void ring(String channelId) throws RestException { -buildRing(channelId); -String json = httpActionSync(); -} - -@Override -public void ring(String channelId, AriCallback callback) { -buildRing(channelId); -httpActionAsync(callback); -} - -/********************************************************** - * Send a ringing indication to a channel - * - * Stop ringing indication on a channel if locally generated. - *********************************************************/ -private void buildRingStop(String channelId) { -reset(); -url = "/channels/" + channelId + "/ring"; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void ringStop(String channelId) throws RestException { -buildRingStop(channelId); -String json = httpActionSync(); -} - -@Override -public void ringStop(String channelId, AriCallback callback) { -buildRingStop(channelId); -httpActionAsync(callback); -} - -/********************************************************** - * Play silence to a channel - * - * Play silence to a channel. - * Using media operations such as /play on a channel playing silence in this manner will suspend silence without resuming automatically. - *********************************************************/ -private void buildStartSilence(String channelId) { -reset(); -url = "/channels/" + channelId + "/silence"; -method = "POST"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void startSilence(String channelId) throws RestException { -buildStartSilence(channelId); -String json = httpActionSync(); -} - -@Override -public void startSilence(String channelId, AriCallback callback) { -buildStartSilence(channelId); -httpActionAsync(callback); -} - -/********************************************************** - * Play silence to a channel - * - * Stop playing silence to a channel. - *********************************************************/ -private void buildStopSilence(String channelId) { -reset(); -url = "/channels/" + channelId + "/silence"; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void stopSilence(String channelId) throws RestException { -buildStopSilence(channelId); -String json = httpActionSync(); -} - -@Override -public void stopSilence(String channelId, AriCallback callback) { -buildStopSilence(channelId); -httpActionAsync(callback); -} - -/********************************************************** - * Snoop (spy/whisper) on a channel - * - * Start snooping. - * Snoop (spy/whisper) on a specific channel. - *********************************************************/ -private void buildSnoopChannel(String channelId, String spy, String whisper, String app, String appArgs, String snoopId) { -reset(); -url = "/channels/" + channelId + "/snoop"; -method = "POST"; -lParamQuery.add( HttpParam.build( "spy", spy) ); -lParamQuery.add( HttpParam.build( "whisper", whisper) ); -lParamQuery.add( HttpParam.build( "app", app) ); -lParamQuery.add( HttpParam.build( "appArgs", appArgs) ); -lParamQuery.add( HttpParam.build( "snoopId", snoopId) ); -lE.add( HttpResponse.build( 400, "Invalid parameters") ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -} - -@Override -public Channel snoopChannel(String channelId, String spy, String whisper, String app, String appArgs, String snoopId) throws RestException { -buildSnoopChannel(channelId, spy, whisper, app, appArgs, snoopId); -String json = httpActionSync(); -return deserializeJson( json, Channel_impl_ari_1_9_0.class ); -} - -@Override -public void snoopChannel(String channelId, String spy, String whisper, String app, String appArgs, String snoopId, AriCallback callback) { -buildSnoopChannel(channelId, spy, whisper, app, appArgs, snoopId); -httpActionAsync(callback, Channel_impl_ari_1_9_0.class); -} - -/********************************************************** - * Snoop (spy/whisper) on a channel - * - * Start snooping. - * Snoop (spy/whisper) on a specific channel. - *********************************************************/ -private void buildSnoopChannelWithId(String channelId, String snoopId, String spy, String whisper, String app, String appArgs) { -reset(); -url = "/channels/" + channelId + "/snoop/" + snoopId + ""; -method = "POST"; -lParamQuery.add( HttpParam.build( "spy", spy) ); -lParamQuery.add( HttpParam.build( "whisper", whisper) ); -lParamQuery.add( HttpParam.build( "app", app) ); -lParamQuery.add( HttpParam.build( "appArgs", appArgs) ); -lE.add( HttpResponse.build( 400, "Invalid parameters") ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -} - -@Override -public Channel snoopChannelWithId(String channelId, String snoopId, String spy, String whisper, String app, String appArgs) throws RestException { -buildSnoopChannelWithId(channelId, snoopId, spy, whisper, app, appArgs); -String json = httpActionSync(); -return deserializeJson( json, Channel_impl_ari_1_9_0.class ); -} - -@Override -public void snoopChannelWithId(String channelId, String snoopId, String spy, String whisper, String app, String appArgs, AriCallback callback) { -buildSnoopChannelWithId(channelId, snoopId, spy, whisper, app, appArgs); -httpActionAsync(callback, Channel_impl_ari_1_9_0.class); -} - -/********************************************************** - * Variables on a channel - * - * Get the value of a channel variable or function. - *********************************************************/ -private void buildGetChannelVar(String channelId, String variable) { -reset(); -url = "/channels/" + channelId + "/variable"; -method = "GET"; -lParamQuery.add( HttpParam.build( "variable", variable) ); -lE.add( HttpResponse.build( 400, "Missing variable parameter.") ); -lE.add( HttpResponse.build( 404, "Channel or variable not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public Variable getChannelVar(String channelId, String variable) throws RestException { -buildGetChannelVar(channelId, variable); -String json = httpActionSync(); -return deserializeJson( json, Variable_impl_ari_1_9_0.class ); -} - -@Override -public void getChannelVar(String channelId, String variable, AriCallback callback) { -buildGetChannelVar(channelId, variable); -httpActionAsync(callback, Variable_impl_ari_1_9_0.class); -} - -/********************************************************** - * Variables on a channel - * - * Set the value of a channel variable or function. - *********************************************************/ -private void buildSetChannelVar(String channelId, String variable, String value) { -reset(); -url = "/channels/" + channelId + "/variable"; -method = "POST"; -lParamQuery.add( HttpParam.build( "variable", variable) ); -lParamQuery.add( HttpParam.build( "value", value) ); -lE.add( HttpResponse.build( 400, "Missing variable parameter.") ); -lE.add( HttpResponse.build( 404, "Channel not found") ); -lE.add( HttpResponse.build( 409, "Channel not in a Stasis application") ); -} - -@Override -public void setChannelVar(String channelId, String variable, String value) throws RestException { -buildSetChannelVar(channelId, variable, value); -String json = httpActionSync(); -} - -@Override -public void setChannelVar(String channelId, String variable, String value, AriCallback callback) { -buildSetChannelVar(channelId, variable, value); -httpActionAsync(callback); -} - -/********************************************************** - * - * - * @since ari_1_5_0 - *********************************************************/ -public void originateWithId(String channelId, String endpoint, String extension, String context, long priority, String app, String appArgs, String callerId, int timeout, Map variables, String otherChannelId, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_10_0 - *********************************************************/ -public void dial(String channelId, String caller, int timeout, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void snoopChannel(String channelId, String spy, String whisper, String app, String appArgs, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Dial a created channel. - * - * - * @since ari_1_10_0 - *********************************************************/ -public void dial(String channelId, String caller, int timeout) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void continueInDialplan(String channelId, String context, String extension, int priority, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_10_0 - *********************************************************/ -public void originateWithId(String channelId, String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String otherChannelId, String originator, String formats, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Start playback of media. - * 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.) - * - * @since ari_0_0_1 - *********************************************************/ -public Playback play(String channelId, String media, String lang, int offsetms, int skipms) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Exit application{ - throw new UnsupportedOperationException("Method availble from ..."); -}; continue execution in the dialplan. - * - * - * @since ari_0_0_1 - *********************************************************/ -public void continueInDialplan(String channelId, String context, String extension, int priority) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new channel (originate). - * 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. - * - * @since ari_1_10_0 - *********************************************************/ -public Channel originate(String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String channelId, String otherChannelId, String originator, String formats) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void originate(String endpoint, String extension, String context, long priority, String app, String appArgs, String callerId, int timeout, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create channel. - * - * - * @since ari_1_10_0 - *********************************************************/ -public Channel create(String endpoint, String app, String appArgs, String channelId, String otherChannelId, String originator, String formats) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_5_0 - *********************************************************/ -public void originate(String endpoint, String extension, String context, long priority, String app, String appArgs, String callerId, int timeout, Map variables, String channelId, String otherChannelId, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new channel (originate). - * 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. - * - * @since ari_0_0_1 - *********************************************************/ -public Channel originate(String endpoint, String extension, String context, long priority, String app, String appArgs, String callerId, int timeout) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new channel (originate with id). - * 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. - * - * @since ari_1_5_0 - *********************************************************/ -public Channel originateWithId(String channelId, String endpoint, String extension, String context, long priority, String app, String appArgs, String callerId, int timeout, Map variables, String otherChannelId) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new channel (originate with id). - * 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. - * - * @since ari_1_10_0 - *********************************************************/ -public Channel originateWithId(String channelId, String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String otherChannelId, String originator, String formats) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_10_0 - *********************************************************/ -public void create(String endpoint, String app, String appArgs, String channelId, String otherChannelId, String originator, String formats, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Create a new channel (originate). - * 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. - * - * @since ari_1_5_0 - *********************************************************/ -public Channel originate(String endpoint, String extension, String context, long priority, String app, String appArgs, String callerId, int timeout, Map variables, String channelId, String otherChannelId) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void play(String channelId, String media, String lang, int offsetms, int skipms, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Start snooping. - * Snoop (spy/whisper) on a specific channel. - * - * @since ari_0_0_1 - *********************************************************/ -public Channel snoopChannel(String channelId, String spy, String whisper, String app, String appArgs) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * - * - * @since ari_1_10_0 - *********************************************************/ -public void originate(String endpoint, String extension, String context, long priority, String label, String app, String appArgs, String callerId, int timeout, Map variables, String channelId, String otherChannelId, String originator, String formats, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/actions/ActionDeviceStates_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/actions/ActionDeviceStates_impl_ari_1_9_0.java deleted file mode 100644 index 97f725d5..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/actions/ActionDeviceStates_impl_ari_1_9_0.java +++ /dev/null @@ -1,131 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_9_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionDeviceStates_impl_ari_1_9_0 extends BaseAriAction implements ActionDeviceStates { -/********************************************************** - * Device states - * - * List all ARI controlled device states. - *********************************************************/ -private void buildList() { -reset(); -url = "/deviceStates"; -method = "GET"; -} - -@Override -public List list() throws RestException { -buildList(); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void list(AriCallback> callback) { -buildList(); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Device state - * - * Retrieve the current state of a device. - *********************************************************/ -private void buildGet(String deviceName) { -reset(); -url = "/deviceStates/" + deviceName + ""; -method = "GET"; -} - -@Override -public DeviceState get(String deviceName) throws RestException { -buildGet(deviceName); -String json = httpActionSync(); -return deserializeJson( json, DeviceState_impl_ari_1_9_0.class ); -} - -@Override -public void get(String deviceName, AriCallback callback) { -buildGet(deviceName); -httpActionAsync(callback, DeviceState_impl_ari_1_9_0.class); -} - -/********************************************************** - * Device state - * - * Change the state of a device controlled by ARI. (Note - implicitly creates the device state). - *********************************************************/ -private void buildUpdate(String deviceName, String deviceState) { -reset(); -url = "/deviceStates/" + deviceName + ""; -method = "PUT"; -lParamQuery.add( HttpParam.build( "deviceState", deviceState) ); -lE.add( HttpResponse.build( 404, "Device name is missing") ); -lE.add( HttpResponse.build( 409, "Uncontrolled device specified") ); -} - -@Override -public void update(String deviceName, String deviceState) throws RestException { -buildUpdate(deviceName, deviceState); -String json = httpActionSync(); -} - -@Override -public void update(String deviceName, String deviceState, AriCallback callback) { -buildUpdate(deviceName, deviceState); -httpActionAsync(callback); -} - -/********************************************************** - * Device state - * - * Destroy a device-state controlled by ARI. - *********************************************************/ -private void buildDelete(String deviceName) { -reset(); -url = "/deviceStates/" + deviceName + ""; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Device name is missing") ); -lE.add( HttpResponse.build( 409, "Uncontrolled device specified") ); -} - -@Override -public void delete(String deviceName) throws RestException { -buildDelete(deviceName); -String json = httpActionSync(); -} - -@Override -public void delete(String deviceName, AriCallback callback) { -buildDelete(deviceName); -httpActionAsync(callback); -} - -/** No missing signatures from interface */ -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/actions/ActionEndpoints_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/actions/ActionEndpoints_impl_ari_1_9_0.java deleted file mode 100644 index 004c7751..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/actions/ActionEndpoints_impl_ari_1_9_0.java +++ /dev/null @@ -1,165 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_9_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionEndpoints_impl_ari_1_9_0 extends BaseAriAction implements ActionEndpoints { -/********************************************************** - * Asterisk endpoints - * - * List all endpoints. - *********************************************************/ -private void buildList() { -reset(); -url = "/endpoints"; -method = "GET"; -} - -@Override -public List list() throws RestException { -buildList(); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void list(AriCallback> callback) { -buildList(); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Send a message to some technology URI or endpoint. - * - * Send a message to some technology URI or endpoint. - *********************************************************/ -private void buildSendMessage(String to, String from, String body, Map variables) { -reset(); -url = "/endpoints/sendMessage"; -method = "PUT"; -lParamQuery.add( HttpParam.build( "to", to) ); -lParamQuery.add( HttpParam.build( "from", from) ); -lParamQuery.add( HttpParam.build( "body", body) ); -lParamBody.addAll( HttpParam.build( "variables", variables) ); -lE.add( HttpResponse.build( 400, "Invalid parameters for sending a message.") ); -lE.add( HttpResponse.build( 404, "Endpoint not found") ); -} - -@Override -public void sendMessage(String to, String from, String body, Map variables) throws RestException { -buildSendMessage(to, from, body, variables); -String json = httpActionSync(); -} - -@Override -public void sendMessage(String to, String from, String body, Map variables, AriCallback callback) { -buildSendMessage(to, from, body, variables); -httpActionAsync(callback); -} - -/********************************************************** - * Asterisk endpoints - * - * List available endoints for a given endpoint technology. - *********************************************************/ -private void buildListByTech(String tech) { -reset(); -url = "/endpoints/" + tech + ""; -method = "GET"; -lE.add( HttpResponse.build( 404, "Endpoints not found") ); -} - -@Override -public List listByTech(String tech) throws RestException { -buildListByTech(tech); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void listByTech(String tech, AriCallback> callback) { -buildListByTech(tech); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Single endpoint - * - * Details for an endpoint. - *********************************************************/ -private void buildGet(String tech, String resource) { -reset(); -url = "/endpoints/" + tech + "/" + resource + ""; -method = "GET"; -lE.add( HttpResponse.build( 400, "Invalid parameters for sending a message.") ); -lE.add( HttpResponse.build( 404, "Endpoints not found") ); -} - -@Override -public Endpoint get(String tech, String resource) throws RestException { -buildGet(tech, resource); -String json = httpActionSync(); -return deserializeJson( json, Endpoint_impl_ari_1_9_0.class ); -} - -@Override -public void get(String tech, String resource, AriCallback callback) { -buildGet(tech, resource); -httpActionAsync(callback, Endpoint_impl_ari_1_9_0.class); -} - -/********************************************************** - * Send a message to some endpoint in a technology. - * - * Send a message to some endpoint in a technology. - *********************************************************/ -private void buildSendMessageToEndpoint(String tech, String resource, String from, String body, Map variables) { -reset(); -url = "/endpoints/" + tech + "/" + resource + "/sendMessage"; -method = "PUT"; -lParamQuery.add( HttpParam.build( "from", from) ); -lParamQuery.add( HttpParam.build( "body", body) ); -lParamBody.addAll( HttpParam.build( "variables", variables) ); -lE.add( HttpResponse.build( 400, "Invalid parameters for sending a message.") ); -lE.add( HttpResponse.build( 404, "Endpoint not found") ); -} - -@Override -public void sendMessageToEndpoint(String tech, String resource, String from, String body, Map variables) throws RestException { -buildSendMessageToEndpoint(tech, resource, from, body, variables); -String json = httpActionSync(); -} - -@Override -public void sendMessageToEndpoint(String tech, String resource, String from, String body, Map variables, AriCallback callback) { -buildSendMessageToEndpoint(tech, resource, from, body, variables); -httpActionAsync(callback); -} - -/** No missing signatures from interface */ -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/actions/ActionEvents_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/actions/ActionEvents_impl_ari_1_9_0.java deleted file mode 100644 index e9089b3a..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/actions/ActionEvents_impl_ari_1_9_0.java +++ /dev/null @@ -1,103 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_9_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionEvents_impl_ari_1_9_0 extends BaseAriAction implements ActionEvents { -/********************************************************** - * Events from Asterisk to applications - * - * WebSocket connection for events. - *********************************************************/ -private void buildEventWebsocket(String app, boolean subscribeAll) { -reset(); -url = "/events"; -method = "GET"; -lParamQuery.add( HttpParam.build( "app", app) ); -lParamQuery.add( HttpParam.build( "subscribeAll", subscribeAll) ); -wsUpgrade = true; -} - -@Override -public Message eventWebsocket(String app, boolean subscribeAll) throws RestException { -throw new RestException("No synchronous operation on WebSocket"); -} - -@Override -public void eventWebsocket(String app, boolean subscribeAll, AriCallback callback) { -buildEventWebsocket(app, subscribeAll); -httpActionAsync(callback, Message_impl_ari_1_9_0.class); -} - -/********************************************************** - * Stasis application user events - * - * Generate a user event. - *********************************************************/ -private void buildUserEvent(String eventName, String application, String source, Map variables) { -reset(); -url = "/events/user/" + eventName + ""; -method = "POST"; -lParamQuery.add( HttpParam.build( "application", application) ); -lParamQuery.add( HttpParam.build( "source", source) ); -lParamBody.addAll( HttpParam.build( "variables", variables) ); -lE.add( HttpResponse.build( 404, "Application does not exist.") ); -lE.add( HttpResponse.build( 422, "Event source not found.") ); -lE.add( HttpResponse.build( 400, "Invalid even tsource URI or userevent data.") ); -} - -@Override -public void userEvent(String eventName, String application, String source, Map variables) throws RestException { -buildUserEvent(eventName, application, source, variables); -String json = httpActionSync(); -} - -@Override -public void userEvent(String eventName, String application, String source, Map variables, AriCallback callback) { -buildUserEvent(eventName, application, source, variables); -httpActionAsync(callback); -} - -/********************************************************** - * - * - * @since ari_0_0_1 - *********************************************************/ -public void eventWebsocket(String app, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * WebSocket connection for events. - * - * - * @since ari_0_0_1 - *********************************************************/ -public Message eventWebsocket(String app) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/actions/ActionPlaybacks_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/actions/ActionPlaybacks_impl_ari_1_9_0.java deleted file mode 100644 index 6e89b60b..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/actions/ActionPlaybacks_impl_ari_1_9_0.java +++ /dev/null @@ -1,107 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_9_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionPlaybacks_impl_ari_1_9_0 extends BaseAriAction implements ActionPlaybacks { -/********************************************************** - * Control object for a playback operation. - * - * Get a playback's details. - *********************************************************/ -private void buildGet(String playbackId) { -reset(); -url = "/playbacks/" + playbackId + ""; -method = "GET"; -lE.add( HttpResponse.build( 404, "The playback cannot be found") ); -} - -@Override -public Playback get(String playbackId) throws RestException { -buildGet(playbackId); -String json = httpActionSync(); -return deserializeJson( json, Playback_impl_ari_1_9_0.class ); -} - -@Override -public void get(String playbackId, AriCallback callback) { -buildGet(playbackId); -httpActionAsync(callback, Playback_impl_ari_1_9_0.class); -} - -/********************************************************** - * Control object for a playback operation. - * - * Stop a playback. - *********************************************************/ -private void buildStop(String playbackId) { -reset(); -url = "/playbacks/" + playbackId + ""; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "The playback cannot be found") ); -} - -@Override -public void stop(String playbackId) throws RestException { -buildStop(playbackId); -String json = httpActionSync(); -} - -@Override -public void stop(String playbackId, AriCallback callback) { -buildStop(playbackId); -httpActionAsync(callback); -} - -/********************************************************** - * Control object for a playback operation. - * - * Control a playback. - *********************************************************/ -private void buildControl(String playbackId, String operation) { -reset(); -url = "/playbacks/" + playbackId + "/control"; -method = "POST"; -lParamQuery.add( HttpParam.build( "operation", operation) ); -lE.add( HttpResponse.build( 400, "The provided operation parameter was invalid") ); -lE.add( HttpResponse.build( 404, "The playback cannot be found") ); -lE.add( HttpResponse.build( 409, "The operation cannot be performed in the playback's current state") ); -} - -@Override -public void control(String playbackId, String operation) throws RestException { -buildControl(playbackId, operation); -String json = httpActionSync(); -} - -@Override -public void control(String playbackId, String operation, AriCallback callback) { -buildControl(playbackId, operation); -httpActionAsync(callback); -} - -/** No missing signatures from interface */ -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/actions/ActionRecordings_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/actions/ActionRecordings_impl_ari_1_9_0.java deleted file mode 100644 index 7ff898a1..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/actions/ActionRecordings_impl_ari_1_9_0.java +++ /dev/null @@ -1,325 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_9_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionRecordings_impl_ari_1_9_0 extends BaseAriAction implements ActionRecordings { -/********************************************************** - * A recording that is in progress - * - * List live recordings. - *********************************************************/ -private void buildGetLive(String recordingName) { -reset(); -url = "/recordings/live/" + recordingName + ""; -method = "GET"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -} - -@Override -public LiveRecording getLive(String recordingName) throws RestException { -buildGetLive(recordingName); -String json = httpActionSync(); -return deserializeJson( json, LiveRecording_impl_ari_1_9_0.class ); -} - -@Override -public void getLive(String recordingName, AriCallback callback) { -buildGetLive(recordingName); -httpActionAsync(callback, LiveRecording_impl_ari_1_9_0.class); -} - -/********************************************************** - * A recording that is in progress - * - * Stop a live recording and discard it. - *********************************************************/ -private void buildCancel(String recordingName) { -reset(); -url = "/recordings/live/" + recordingName + ""; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -} - -@Override -public void cancel(String recordingName) throws RestException { -buildCancel(recordingName); -String json = httpActionSync(); -} - -@Override -public void cancel(String recordingName, AriCallback callback) { -buildCancel(recordingName); -httpActionAsync(callback); -} - -/********************************************************** - * - * - * Mute a live recording. - * Muting a recording suspends silence detection, which will be restarted when the recording is unmuted. - *********************************************************/ -private void buildMute(String recordingName) { -reset(); -url = "/recordings/live/" + recordingName + "/mute"; -method = "POST"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -lE.add( HttpResponse.build( 409, "Recording not in session") ); -} - -@Override -public void mute(String recordingName) throws RestException { -buildMute(recordingName); -String json = httpActionSync(); -} - -@Override -public void mute(String recordingName, AriCallback callback) { -buildMute(recordingName); -httpActionAsync(callback); -} - -/********************************************************** - * - * - * Unmute a live recording. - *********************************************************/ -private void buildUnmute(String recordingName) { -reset(); -url = "/recordings/live/" + recordingName + "/mute"; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -lE.add( HttpResponse.build( 409, "Recording not in session") ); -} - -@Override -public void unmute(String recordingName) throws RestException { -buildUnmute(recordingName); -String json = httpActionSync(); -} - -@Override -public void unmute(String recordingName, AriCallback callback) { -buildUnmute(recordingName); -httpActionAsync(callback); -} - -/********************************************************** - * - * - * Pause a live recording. - * Pausing a recording suspends silence detection, which will be restarted when the recording is unpaused. Paused time is not included in the accounting for maxDurationSeconds. - *********************************************************/ -private void buildPause(String recordingName) { -reset(); -url = "/recordings/live/" + recordingName + "/pause"; -method = "POST"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -lE.add( HttpResponse.build( 409, "Recording not in session") ); -} - -@Override -public void pause(String recordingName) throws RestException { -buildPause(recordingName); -String json = httpActionSync(); -} - -@Override -public void pause(String recordingName, AriCallback callback) { -buildPause(recordingName); -httpActionAsync(callback); -} - -/********************************************************** - * - * - * Unpause a live recording. - *********************************************************/ -private void buildUnpause(String recordingName) { -reset(); -url = "/recordings/live/" + recordingName + "/pause"; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -lE.add( HttpResponse.build( 409, "Recording not in session") ); -} - -@Override -public void unpause(String recordingName) throws RestException { -buildUnpause(recordingName); -String json = httpActionSync(); -} - -@Override -public void unpause(String recordingName, AriCallback callback) { -buildUnpause(recordingName); -httpActionAsync(callback); -} - -/********************************************************** - * - * - * Stop a live recording and store it. - *********************************************************/ -private void buildStop(String recordingName) { -reset(); -url = "/recordings/live/" + recordingName + "/stop"; -method = "POST"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -} - -@Override -public void stop(String recordingName) throws RestException { -buildStop(recordingName); -String json = httpActionSync(); -} - -@Override -public void stop(String recordingName, AriCallback callback) { -buildStop(recordingName); -httpActionAsync(callback); -} - -/********************************************************** - * Recordings - * - * List recordings that are complete. - *********************************************************/ -private void buildListStored() { -reset(); -url = "/recordings/stored"; -method = "GET"; -} - -@Override -public List listStored() throws RestException { -buildListStored(); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void listStored(AriCallback> callback) { -buildListStored(); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Individual recording - * - * Get a stored recording's details. - *********************************************************/ -private void buildGetStored(String recordingName) { -reset(); -url = "/recordings/stored/" + recordingName + ""; -method = "GET"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -} - -@Override -public StoredRecording getStored(String recordingName) throws RestException { -buildGetStored(recordingName); -String json = httpActionSync(); -return deserializeJson( json, StoredRecording_impl_ari_1_9_0.class ); -} - -@Override -public void getStored(String recordingName, AriCallback callback) { -buildGetStored(recordingName); -httpActionAsync(callback, StoredRecording_impl_ari_1_9_0.class); -} - -/********************************************************** - * Individual recording - * - * Delete a stored recording. - *********************************************************/ -private void buildDeleteStored(String recordingName) { -reset(); -url = "/recordings/stored/" + recordingName + ""; -method = "DELETE"; -lE.add( HttpResponse.build( 404, "Recording not found") ); -} - -@Override -public void deleteStored(String recordingName) throws RestException { -buildDeleteStored(recordingName); -String json = httpActionSync(); -} - -@Override -public void deleteStored(String recordingName, AriCallback callback) { -buildDeleteStored(recordingName); -httpActionAsync(callback); -} - -/********************************************************** - * Copy an individual recording - * - * Copy a stored recording. - *********************************************************/ -private void buildCopyStored(String recordingName, String destinationRecordingName) { -reset(); -url = "/recordings/stored/" + recordingName + "/copy"; -method = "POST"; -lParamQuery.add( HttpParam.build( "destinationRecordingName", destinationRecordingName) ); -lE.add( HttpResponse.build( 404, "Recording not found") ); -lE.add( HttpResponse.build( 409, "A recording with the same name already exists on the system") ); -} - -@Override -public StoredRecording copyStored(String recordingName, String destinationRecordingName) throws RestException { -buildCopyStored(recordingName, destinationRecordingName); -String json = httpActionSync(); -return deserializeJson( json, StoredRecording_impl_ari_1_9_0.class ); -} - -@Override -public void copyStored(String recordingName, String destinationRecordingName, AriCallback callback) { -buildCopyStored(recordingName, destinationRecordingName); -httpActionAsync(callback, StoredRecording_impl_ari_1_9_0.class); -} - -/********************************************************** - * - * - * @since ari_1_10_0 - *********************************************************/ -public void getStoredFile(String recordingName, AriCallback callback){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * Get the file associated with the stored recording. - * - * - * @since ari_1_10_0 - *********************************************************/ -public byte[] getStoredFile(String recordingName) throws RestException{ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/actions/ActionSounds_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/actions/ActionSounds_impl_ari_1_9_0.java deleted file mode 100644 index 61a02b24..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/actions/ActionSounds_impl_ari_1_9_0.java +++ /dev/null @@ -1,82 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.actions; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:11 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.HttpParam; -import ch.loway.oss.ari4java.tools.HttpResponse; -import com.fasterxml.jackson.core.type.TypeReference; -import ch.loway.oss.ari4java.generated.ari_1_9_0.models.*; - -/********************************************************** - * - * Generated by: Apis - *********************************************************/ - - -public class ActionSounds_impl_ari_1_9_0 extends BaseAriAction implements ActionSounds { -/********************************************************** - * Sounds - * - * List all sounds. - *********************************************************/ -private void buildList(String lang, String format) { -reset(); -url = "/sounds"; -method = "GET"; -lParamQuery.add( HttpParam.build( "lang", lang) ); -lParamQuery.add( HttpParam.build( "format", format) ); -} - -@Override -public List list(String lang, String format) throws RestException { -buildList(lang, format); -String json = httpActionSync(); -return deserializeJsonAsAbstractList( json, - new TypeReference>() {} ); -} - -@Override -public void list(String lang, String format, AriCallback> callback) { -buildList(lang, format); -httpActionAsync(callback, new TypeReference>() {}); -} - -/********************************************************** - * Individual sound - * - * Get a sound's details. - *********************************************************/ -private void buildGet(String soundId) { -reset(); -url = "/sounds/" + soundId + ""; -method = "GET"; -} - -@Override -public Sound get(String soundId) throws RestException { -buildGet(soundId); -String json = httpActionSync(); -return deserializeJson( json, Sound_impl_ari_1_9_0.class ); -} - -@Override -public void get(String soundId, AriCallback callback) { -buildGet(soundId); -httpActionAsync(callback, Sound_impl_ari_1_9_0.class); -} - -/** No missing signatures from interface */ -}; - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/ApplicationReplaced_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/ApplicationReplaced_impl_ari_1_9_0.java deleted file mode 100644 index 4028f974..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/ApplicationReplaced_impl_ari_1_9_0.java +++ /dev/null @@ -1,28 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that another WebSocket has taken over for an application. - * - * An 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. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ApplicationReplaced_impl_ari_1_9_0 extends Event_impl_ari_1_9_0 implements ApplicationReplaced, java.io.Serializable { -private static final long serialVersionUID = 1L; -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/Application_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/Application_impl_ari_1_9_0.java deleted file mode 100644 index 5668a588..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/Application_impl_ari_1_9_0.java +++ /dev/null @@ -1,81 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Details of a Stasis application - * - * Defined in file: applications.json - * Generated by: Model - *********************************************************/ - -public class Application_impl_ari_1_9_0 implements Application, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Id's for bridges subscribed to. */ - private List bridge_ids; - public List getBridge_ids() { - return bridge_ids; - } - - @JsonDeserialize( contentAs=String.class ) - public void setBridge_ids(List val ) { - bridge_ids = val; - } - - /** Id's for channels subscribed to. */ - private List channel_ids; - public List getChannel_ids() { - return channel_ids; - } - - @JsonDeserialize( contentAs=String.class ) - public void setChannel_ids(List val ) { - channel_ids = val; - } - - /** Names of the devices subscribed to. */ - private List device_names; - public List getDevice_names() { - return device_names; - } - - @JsonDeserialize( contentAs=String.class ) - public void setDevice_names(List val ) { - device_names = val; - } - - /** {tech}/{resource} for endpoints subscribed to. */ - private List endpoint_ids; - public List getEndpoint_ids() { - return endpoint_ids; - } - - @JsonDeserialize( contentAs=String.class ) - public void setEndpoint_ids(List val ) { - endpoint_ids = val; - } - - /** Name of this application */ - private String name; - public String getName() { - return name; - } - - @JsonDeserialize( as=String.class ) - public void setName(String val ) { - name = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/AsteriskInfo_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/AsteriskInfo_impl_ari_1_9_0.java deleted file mode 100644 index e91ee6c7..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/AsteriskInfo_impl_ari_1_9_0.java +++ /dev/null @@ -1,70 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Asterisk system information - * - * Defined in file: asterisk.json - * Generated by: Model - *********************************************************/ - -public class AsteriskInfo_impl_ari_1_9_0 implements AsteriskInfo, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Info about how Asterisk was built */ - private BuildInfo build; - public BuildInfo getBuild() { - return build; - } - - @JsonDeserialize( as=BuildInfo_impl_ari_1_9_0.class ) - public void setBuild(BuildInfo val ) { - build = val; - } - - /** Info about Asterisk configuration */ - private ConfigInfo config; - public ConfigInfo getConfig() { - return config; - } - - @JsonDeserialize( as=ConfigInfo_impl_ari_1_9_0.class ) - public void setConfig(ConfigInfo val ) { - config = val; - } - - /** Info about Asterisk status */ - private StatusInfo status; - public StatusInfo getStatus() { - return status; - } - - @JsonDeserialize( as=StatusInfo_impl_ari_1_9_0.class ) - public void setStatus(StatusInfo val ) { - status = val; - } - - /** Info about the system running Asterisk */ - private SystemInfo system; - public SystemInfo getSystem() { - return system; - } - - @JsonDeserialize( as=SystemInfo_impl_ari_1_9_0.class ) - public void setSystem(SystemInfo val ) { - system = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/BridgeAttendedTransfer_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/BridgeAttendedTransfer_impl_ari_1_9_0.java deleted file mode 100644 index a16d30d5..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/BridgeAttendedTransfer_impl_ari_1_9_0.java +++ /dev/null @@ -1,202 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that an attended transfer has occurred. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class BridgeAttendedTransfer_impl_ari_1_9_0 extends Event_impl_ari_1_9_0 implements BridgeAttendedTransfer, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Application that has been transferred into */ - private String destination_application; - public String getDestination_application() { - return destination_application; - } - - @JsonDeserialize( as=String.class ) - public void setDestination_application(String val ) { - destination_application = val; - } - - /** Bridge that survived the merge result */ - private String destination_bridge; - public String getDestination_bridge() { - return destination_bridge; - } - - @JsonDeserialize( as=String.class ) - public void setDestination_bridge(String val ) { - destination_bridge = val; - } - - /** First leg of a link transfer result */ - private Channel destination_link_first_leg; - public Channel getDestination_link_first_leg() { - return destination_link_first_leg; - } - - @JsonDeserialize( as=Channel_impl_ari_1_9_0.class ) - public void setDestination_link_first_leg(Channel val ) { - destination_link_first_leg = val; - } - - /** Second leg of a link transfer result */ - private Channel destination_link_second_leg; - public Channel getDestination_link_second_leg() { - return destination_link_second_leg; - } - - @JsonDeserialize( as=Channel_impl_ari_1_9_0.class ) - public void setDestination_link_second_leg(Channel val ) { - destination_link_second_leg = val; - } - - /** Bridge that survived the threeway result */ - private Bridge destination_threeway_bridge; - public Bridge getDestination_threeway_bridge() { - return destination_threeway_bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_9_0.class ) - public void setDestination_threeway_bridge(Bridge val ) { - destination_threeway_bridge = val; - } - - /** Transferer channel that survived the threeway result */ - private Channel destination_threeway_channel; - public Channel getDestination_threeway_channel() { - return destination_threeway_channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_9_0.class ) - public void setDestination_threeway_channel(Channel val ) { - destination_threeway_channel = val; - } - - /** How the transfer was accomplished */ - private String destination_type; - public String getDestination_type() { - return destination_type; - } - - @JsonDeserialize( as=String.class ) - public void setDestination_type(String val ) { - destination_type = val; - } - - /** Whether the transfer was externally initiated or not */ - private boolean is_external; - public boolean getIs_external() { - return is_external; - } - - @JsonDeserialize( as=boolean.class ) - public void setIs_external(boolean val ) { - is_external = val; - } - - /** The channel that is replacing transferer_first_leg in the swap */ - private Channel replace_channel; - public Channel getReplace_channel() { - return replace_channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_9_0.class ) - public void setReplace_channel(Channel val ) { - replace_channel = val; - } - - /** The result of the transfer attempt */ - private String result; - public String getResult() { - return result; - } - - @JsonDeserialize( as=String.class ) - public void setResult(String val ) { - result = val; - } - - /** The channel that is being transferred to */ - private Channel transfer_target; - public Channel getTransfer_target() { - return transfer_target; - } - - @JsonDeserialize( as=Channel_impl_ari_1_9_0.class ) - public void setTransfer_target(Channel val ) { - transfer_target = val; - } - - /** The channel that is being transferred */ - private Channel transferee; - public Channel getTransferee() { - return transferee; - } - - @JsonDeserialize( as=Channel_impl_ari_1_9_0.class ) - public void setTransferee(Channel val ) { - transferee = val; - } - - /** First leg of the transferer */ - private Channel transferer_first_leg; - public Channel getTransferer_first_leg() { - return transferer_first_leg; - } - - @JsonDeserialize( as=Channel_impl_ari_1_9_0.class ) - public void setTransferer_first_leg(Channel val ) { - transferer_first_leg = val; - } - - /** Bridge the transferer first leg is in */ - private Bridge transferer_first_leg_bridge; - public Bridge getTransferer_first_leg_bridge() { - return transferer_first_leg_bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_9_0.class ) - public void setTransferer_first_leg_bridge(Bridge val ) { - transferer_first_leg_bridge = val; - } - - /** Second leg of the transferer */ - private Channel transferer_second_leg; - public Channel getTransferer_second_leg() { - return transferer_second_leg; - } - - @JsonDeserialize( as=Channel_impl_ari_1_9_0.class ) - public void setTransferer_second_leg(Channel val ) { - transferer_second_leg = val; - } - - /** Bridge the transferer second leg is in */ - private Bridge transferer_second_leg_bridge; - public Bridge getTransferer_second_leg_bridge() { - return transferer_second_leg_bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_9_0.class ) - public void setTransferer_second_leg_bridge(Bridge val ) { - transferer_second_leg_bridge = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/BridgeBlindTransfer_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/BridgeBlindTransfer_impl_ari_1_9_0.java deleted file mode 100644 index 187e99ae..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/BridgeBlindTransfer_impl_ari_1_9_0.java +++ /dev/null @@ -1,114 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a blind transfer has occurred. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class BridgeBlindTransfer_impl_ari_1_9_0 extends Event_impl_ari_1_9_0 implements BridgeBlindTransfer, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The bridge being transferred */ - private Bridge bridge; - public Bridge getBridge() { - return bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_9_0.class ) - public void setBridge(Bridge val ) { - bridge = val; - } - - /** The channel performing the blind transfer */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_9_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - - /** The context transferred to */ - private String context; - public String getContext() { - return context; - } - - @JsonDeserialize( as=String.class ) - public void setContext(String val ) { - context = val; - } - - /** The extension transferred to */ - private String exten; - public String getExten() { - return exten; - } - - @JsonDeserialize( as=String.class ) - public void setExten(String val ) { - exten = val; - } - - /** Whether the transfer was externally initiated or not */ - private boolean is_external; - public boolean getIs_external() { - return is_external; - } - - @JsonDeserialize( as=boolean.class ) - public void setIs_external(boolean val ) { - is_external = val; - } - - /** The channel that is replacing transferer when the transferee(s) can not be transferred directly */ - private Channel replace_channel; - public Channel getReplace_channel() { - return replace_channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_9_0.class ) - public void setReplace_channel(Channel val ) { - replace_channel = val; - } - - /** The result of the transfer attempt */ - private String result; - public String getResult() { - return result; - } - - @JsonDeserialize( as=String.class ) - public void setResult(String val ) { - result = val; - } - - /** The channel that is being transferred */ - private Channel transferee; - public Channel getTransferee() { - return transferee; - } - - @JsonDeserialize( as=Channel_impl_ari_1_9_0.class ) - public void setTransferee(Channel val ) { - transferee = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/BridgeCreated_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/BridgeCreated_impl_ari_1_9_0.java deleted file mode 100644 index 313307e6..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/BridgeCreated_impl_ari_1_9_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a bridge has been created. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class BridgeCreated_impl_ari_1_9_0 extends Event_impl_ari_1_9_0 implements BridgeCreated, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Bridge bridge; - public Bridge getBridge() { - return bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_9_0.class ) - public void setBridge(Bridge val ) { - bridge = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/BridgeDestroyed_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/BridgeDestroyed_impl_ari_1_9_0.java deleted file mode 100644 index 6841e253..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/BridgeDestroyed_impl_ari_1_9_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a bridge has been destroyed. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class BridgeDestroyed_impl_ari_1_9_0 extends Event_impl_ari_1_9_0 implements BridgeDestroyed, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Bridge bridge; - public Bridge getBridge() { - return bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_9_0.class ) - public void setBridge(Bridge val ) { - bridge = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/BridgeMerged_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/BridgeMerged_impl_ari_1_9_0.java deleted file mode 100644 index 7d347b9f..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/BridgeMerged_impl_ari_1_9_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that one bridge has merged into another. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class BridgeMerged_impl_ari_1_9_0 extends Event_impl_ari_1_9_0 implements BridgeMerged, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Bridge bridge; - public Bridge getBridge() { - return bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_9_0.class ) - public void setBridge(Bridge val ) { - bridge = val; - } - - /** */ - private Bridge bridge_from; - public Bridge getBridge_from() { - return bridge_from; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_9_0.class ) - public void setBridge_from(Bridge val ) { - bridge_from = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/Bridge_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/Bridge_impl_ari_1_9_0.java deleted file mode 100644 index 450f61bc..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/Bridge_impl_ari_1_9_0.java +++ /dev/null @@ -1,105 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * The merging of media from one or more channels. - * - * Everyone on the bridge receives the same audio. - * - * Defined in file: bridges.json - * Generated by: Model - *********************************************************/ - -public class Bridge_impl_ari_1_9_0 implements Bridge, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Bridging class */ - private String bridge_class; - public String getBridge_class() { - return bridge_class; - } - - @JsonDeserialize( as=String.class ) - public void setBridge_class(String val ) { - bridge_class = val; - } - - /** Type of bridge technology */ - private String bridge_type; - public String getBridge_type() { - return bridge_type; - } - - @JsonDeserialize( as=String.class ) - public void setBridge_type(String val ) { - bridge_type = val; - } - - /** Ids of channels participating in this bridge */ - private List channels; - public List getChannels() { - return channels; - } - - @JsonDeserialize( contentAs=String.class ) - public void setChannels(List val ) { - channels = val; - } - - /** Entity that created the bridge */ - private String creator; - public String getCreator() { - return creator; - } - - @JsonDeserialize( as=String.class ) - public void setCreator(String val ) { - creator = val; - } - - /** Unique identifier for this bridge */ - private String id; - public String getId() { - return id; - } - - @JsonDeserialize( as=String.class ) - public void setId(String val ) { - id = val; - } - - /** Name the creator gave the bridge */ - private String name; - public String getName() { - return name; - } - - @JsonDeserialize( as=String.class ) - public void setName(String val ) { - name = val; - } - - /** Name of the current bridging technology */ - private String technology; - public String getTechnology() { - return technology; - } - - @JsonDeserialize( as=String.class ) - public void setTechnology(String val ) { - technology = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/BuildInfo_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/BuildInfo_impl_ari_1_9_0.java deleted file mode 100644 index a0a99e8c..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/BuildInfo_impl_ari_1_9_0.java +++ /dev/null @@ -1,92 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Info about how Asterisk was built - * - * Defined in file: asterisk.json - * Generated by: Model - *********************************************************/ - -public class BuildInfo_impl_ari_1_9_0 implements BuildInfo, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Date and time when Asterisk was built. */ - private String date; - public String getDate() { - return date; - } - - @JsonDeserialize( as=String.class ) - public void setDate(String val ) { - date = val; - } - - /** Kernel version Asterisk was built on. */ - private String kernel; - public String getKernel() { - return kernel; - } - - @JsonDeserialize( as=String.class ) - public void setKernel(String val ) { - kernel = val; - } - - /** Machine architecture (x86_64, i686, ppc, etc.) */ - private String machine; - public String getMachine() { - return machine; - } - - @JsonDeserialize( as=String.class ) - public void setMachine(String val ) { - machine = val; - } - - /** Compile time options, or empty string if default. */ - private String options; - public String getOptions() { - return options; - } - - @JsonDeserialize( as=String.class ) - public void setOptions(String val ) { - options = val; - } - - /** OS Asterisk was built on. */ - private String os; - public String getOs() { - return os; - } - - @JsonDeserialize( as=String.class ) - public void setOs(String val ) { - os = val; - } - - /** Username that build Asterisk */ - private String user; - public String getUser() { - return user; - } - - @JsonDeserialize( as=String.class ) - public void setUser(String val ) { - user = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/CallerID_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/CallerID_impl_ari_1_9_0.java deleted file mode 100644 index e98f4b68..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/CallerID_impl_ari_1_9_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Caller identification - * - * Defined in file: channels.json - * Generated by: Model - *********************************************************/ - -public class CallerID_impl_ari_1_9_0 implements CallerID, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private String name; - public String getName() { - return name; - } - - @JsonDeserialize( as=String.class ) - public void setName(String val ) { - name = val; - } - - /** */ - private String number; - public String getNumber() { - return number; - } - - @JsonDeserialize( as=String.class ) - public void setNumber(String val ) { - number = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/ChannelCallerId_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/ChannelCallerId_impl_ari_1_9_0.java deleted file mode 100644 index 1da543a3..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/ChannelCallerId_impl_ari_1_9_0.java +++ /dev/null @@ -1,59 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Channel changed Caller ID. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelCallerId_impl_ari_1_9_0 extends Event_impl_ari_1_9_0 implements ChannelCallerId, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The integer representation of the Caller Presentation value. */ - private int caller_presentation; - public int getCaller_presentation() { - return caller_presentation; - } - - @JsonDeserialize( as=int.class ) - public void setCaller_presentation(int val ) { - caller_presentation = val; - } - - /** The text representation of the Caller Presentation value. */ - private String caller_presentation_txt; - public String getCaller_presentation_txt() { - return caller_presentation_txt; - } - - @JsonDeserialize( as=String.class ) - public void setCaller_presentation_txt(String val ) { - caller_presentation_txt = val; - } - - /** The channel that changed Caller ID. */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_9_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/ChannelConnectedLine_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/ChannelConnectedLine_impl_ari_1_9_0.java deleted file mode 100644 index 7184b328..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/ChannelConnectedLine_impl_ari_1_9_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Channel changed Connected Line. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelConnectedLine_impl_ari_1_9_0 extends Event_impl_ari_1_9_0 implements ChannelConnectedLine, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The channel whose connected line has changed. */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_9_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/ChannelCreated_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/ChannelCreated_impl_ari_1_9_0.java deleted file mode 100644 index 43bf8cd4..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/ChannelCreated_impl_ari_1_9_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a channel has been created. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelCreated_impl_ari_1_9_0 extends Event_impl_ari_1_9_0 implements ChannelCreated, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_9_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/ChannelDestroyed_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/ChannelDestroyed_impl_ari_1_9_0.java deleted file mode 100644 index d3da38eb..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/ChannelDestroyed_impl_ari_1_9_0.java +++ /dev/null @@ -1,59 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a channel has been destroyed. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelDestroyed_impl_ari_1_9_0 extends Event_impl_ari_1_9_0 implements ChannelDestroyed, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Integer representation of the cause of the hangup */ - private int cause; - public int getCause() { - return cause; - } - - @JsonDeserialize( as=int.class ) - public void setCause(int val ) { - cause = val; - } - - /** Text representation of the cause of the hangup */ - private String cause_txt; - public String getCause_txt() { - return cause_txt; - } - - @JsonDeserialize( as=String.class ) - public void setCause_txt(String val ) { - cause_txt = val; - } - - /** */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_9_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/ChannelDialplan_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/ChannelDialplan_impl_ari_1_9_0.java deleted file mode 100644 index 0f94c48e..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/ChannelDialplan_impl_ari_1_9_0.java +++ /dev/null @@ -1,59 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Channel changed location in the dialplan. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelDialplan_impl_ari_1_9_0 extends Event_impl_ari_1_9_0 implements ChannelDialplan, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The channel that changed dialplan location. */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_9_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - - /** The application about to be executed. */ - private String dialplan_app; - public String getDialplan_app() { - return dialplan_app; - } - - @JsonDeserialize( as=String.class ) - public void setDialplan_app(String val ) { - dialplan_app = val; - } - - /** The data to be passed to the application. */ - private String dialplan_app_data; - public String getDialplan_app_data() { - return dialplan_app_data; - } - - @JsonDeserialize( as=String.class ) - public void setDialplan_app_data(String val ) { - dialplan_app_data = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/ChannelDtmfReceived_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/ChannelDtmfReceived_impl_ari_1_9_0.java deleted file mode 100644 index 7e2082ef..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/ChannelDtmfReceived_impl_ari_1_9_0.java +++ /dev/null @@ -1,61 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * DTMF received on a channel. - * - * This event is sent when the DTMF ends. There is no notification about the start of DTMF - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelDtmfReceived_impl_ari_1_9_0 extends Event_impl_ari_1_9_0 implements ChannelDtmfReceived, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The channel on which DTMF was received */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_9_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - - /** DTMF digit received (0-9, A-E, # or *) */ - private String digit; - public String getDigit() { - return digit; - } - - @JsonDeserialize( as=String.class ) - public void setDigit(String val ) { - digit = val; - } - - /** Number of milliseconds DTMF was received */ - private int duration_ms; - public int getDuration_ms() { - return duration_ms; - } - - @JsonDeserialize( as=int.class ) - public void setDuration_ms(int val ) { - duration_ms = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/ChannelEnteredBridge_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/ChannelEnteredBridge_impl_ari_1_9_0.java deleted file mode 100644 index aad8c116..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/ChannelEnteredBridge_impl_ari_1_9_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a channel has entered a bridge. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelEnteredBridge_impl_ari_1_9_0 extends Event_impl_ari_1_9_0 implements ChannelEnteredBridge, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Bridge bridge; - public Bridge getBridge() { - return bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_9_0.class ) - public void setBridge(Bridge val ) { - bridge = val; - } - - /** */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_9_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/ChannelHangupRequest_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/ChannelHangupRequest_impl_ari_1_9_0.java deleted file mode 100644 index 9bc21ac4..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/ChannelHangupRequest_impl_ari_1_9_0.java +++ /dev/null @@ -1,59 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A hangup was requested on the channel. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelHangupRequest_impl_ari_1_9_0 extends Event_impl_ari_1_9_0 implements ChannelHangupRequest, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Integer representation of the cause of the hangup. */ - private int cause; - public int getCause() { - return cause; - } - - @JsonDeserialize( as=int.class ) - public void setCause(int val ) { - cause = val; - } - - /** The channel on which the hangup was requested. */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_9_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - - /** Whether the hangup request was a soft hangup request. */ - private boolean soft; - public boolean getSoft() { - return soft; - } - - @JsonDeserialize( as=boolean.class ) - public void setSoft(boolean val ) { - soft = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/ChannelHold_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/ChannelHold_impl_ari_1_9_0.java deleted file mode 100644 index 66c60ef6..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/ChannelHold_impl_ari_1_9_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A channel initiated a media hold. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelHold_impl_ari_1_9_0 extends Event_impl_ari_1_9_0 implements ChannelHold, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The channel that initiated the hold event. */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_9_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - - /** The music on hold class that the initiator requested. */ - private String musicclass; - public String getMusicclass() { - return musicclass; - } - - @JsonDeserialize( as=String.class ) - public void setMusicclass(String val ) { - musicclass = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/ChannelLeftBridge_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/ChannelLeftBridge_impl_ari_1_9_0.java deleted file mode 100644 index 877eeac5..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/ChannelLeftBridge_impl_ari_1_9_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a channel has left a bridge. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelLeftBridge_impl_ari_1_9_0 extends Event_impl_ari_1_9_0 implements ChannelLeftBridge, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Bridge bridge; - public Bridge getBridge() { - return bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_9_0.class ) - public void setBridge(Bridge val ) { - bridge = val; - } - - /** */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_9_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/ChannelStateChange_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/ChannelStateChange_impl_ari_1_9_0.java deleted file mode 100644 index 1921ab73..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/ChannelStateChange_impl_ari_1_9_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification of a channel's state change. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelStateChange_impl_ari_1_9_0 extends Event_impl_ari_1_9_0 implements ChannelStateChange, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_9_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/ChannelTalkingFinished_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/ChannelTalkingFinished_impl_ari_1_9_0.java deleted file mode 100644 index 3cbcc61f..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/ChannelTalkingFinished_impl_ari_1_9_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Talking is no longer detected on the channel. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelTalkingFinished_impl_ari_1_9_0 extends Event_impl_ari_1_9_0 implements ChannelTalkingFinished, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The channel on which talking completed. */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_9_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - - /** The length of time, in milliseconds, that talking was detected on the channel */ - private int duration; - public int getDuration() { - return duration; - } - - @JsonDeserialize( as=int.class ) - public void setDuration(int val ) { - duration = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/ChannelTalkingStarted_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/ChannelTalkingStarted_impl_ari_1_9_0.java deleted file mode 100644 index 2c350130..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/ChannelTalkingStarted_impl_ari_1_9_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Talking was detected on the channel. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelTalkingStarted_impl_ari_1_9_0 extends Event_impl_ari_1_9_0 implements ChannelTalkingStarted, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The channel on which talking started. */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_9_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/ChannelUnhold_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/ChannelUnhold_impl_ari_1_9_0.java deleted file mode 100644 index 34a9aa12..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/ChannelUnhold_impl_ari_1_9_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A channel initiated a media unhold. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelUnhold_impl_ari_1_9_0 extends Event_impl_ari_1_9_0 implements ChannelUnhold, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The channel that initiated the unhold event. */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_9_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/ChannelUserevent_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/ChannelUserevent_impl_ari_1_9_0.java deleted file mode 100644 index 0d15c93a..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/ChannelUserevent_impl_ari_1_9_0.java +++ /dev/null @@ -1,81 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * User-generated event with additional user-defined fields in the object. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelUserevent_impl_ari_1_9_0 extends Event_impl_ari_1_9_0 implements ChannelUserevent, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** A bridge that is signaled with the user event. */ - private Bridge bridge; - public Bridge getBridge() { - return bridge; - } - - @JsonDeserialize( as=Bridge_impl_ari_1_9_0.class ) - public void setBridge(Bridge val ) { - bridge = val; - } - - /** A channel that is signaled with the user event. */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_9_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - - /** A endpoint that is signaled with the user event. */ - private Endpoint endpoint; - public Endpoint getEndpoint() { - return endpoint; - } - - @JsonDeserialize( as=Endpoint_impl_ari_1_9_0.class ) - public void setEndpoint(Endpoint val ) { - endpoint = val; - } - - /** The name of the user event. */ - private String eventname; - public String getEventname() { - return eventname; - } - - @JsonDeserialize( as=String.class ) - public void setEventname(String val ) { - eventname = val; - } - - /** Custom Userevent data */ - private String userevent; - public String getUserevent() { - return userevent; - } - - @JsonDeserialize( as=String.class ) - public void setUserevent(String val ) { - userevent = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/ChannelVarset_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/ChannelVarset_impl_ari_1_9_0.java deleted file mode 100644 index 42f73487..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/ChannelVarset_impl_ari_1_9_0.java +++ /dev/null @@ -1,61 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Channel variable changed. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ChannelVarset_impl_ari_1_9_0 extends Event_impl_ari_1_9_0 implements ChannelVarset, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The channel on which the variable was set. - -If missing, the variable is a global variable. */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_9_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - - /** The new value of the variable. */ - private String value; - public String getValue() { - return value; - } - - @JsonDeserialize( as=String.class ) - public void setValue(String val ) { - value = val; - } - - /** The variable that changed. */ - private String variable; - public String getVariable() { - return variable; - } - - @JsonDeserialize( as=String.class ) - public void setVariable(String val ) { - variable = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/Channel_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/Channel_impl_ari_1_9_0.java deleted file mode 100644 index 63177a5e..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/Channel_impl_ari_1_9_0.java +++ /dev/null @@ -1,127 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A specific communication connection between Asterisk and an Endpoint. - * - * Defined in file: channels.json - * Generated by: Model - *********************************************************/ - -public class Channel_impl_ari_1_9_0 implements Channel, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private String accountcode; - public String getAccountcode() { - return accountcode; - } - - @JsonDeserialize( as=String.class ) - public void setAccountcode(String val ) { - accountcode = val; - } - - /** */ - private CallerID caller; - public CallerID getCaller() { - return caller; - } - - @JsonDeserialize( as=CallerID_impl_ari_1_9_0.class ) - public void setCaller(CallerID val ) { - caller = val; - } - - /** */ - private CallerID connected; - public CallerID getConnected() { - return connected; - } - - @JsonDeserialize( as=CallerID_impl_ari_1_9_0.class ) - public void setConnected(CallerID val ) { - connected = val; - } - - /** Timestamp when channel was created */ - private Date creationtime; - public Date getCreationtime() { - return creationtime; - } - - @JsonDeserialize( as=Date.class ) - public void setCreationtime(Date val ) { - creationtime = val; - } - - /** Current location in the dialplan */ - private DialplanCEP dialplan; - public DialplanCEP getDialplan() { - return dialplan; - } - - @JsonDeserialize( as=DialplanCEP_impl_ari_1_9_0.class ) - public void setDialplan(DialplanCEP val ) { - dialplan = val; - } - - /** Unique identifier of the channel. - -This is the same as the Uniqueid field in AMI. */ - private String id; - public String getId() { - return id; - } - - @JsonDeserialize( as=String.class ) - public void setId(String val ) { - id = val; - } - - /** The default spoken language */ - private String language; - public String getLanguage() { - return language; - } - - @JsonDeserialize( as=String.class ) - public void setLanguage(String val ) { - language = val; - } - - /** Name of the channel (i.e. SIP/foo-0000a7e3) */ - private String name; - public String getName() { - return name; - } - - @JsonDeserialize( as=String.class ) - public void setName(String val ) { - name = val; - } - - /** */ - private String state; - public String getState() { - return state; - } - - @JsonDeserialize( as=String.class ) - public void setState(String val ) { - state = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/ConfigInfo_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/ConfigInfo_impl_ari_1_9_0.java deleted file mode 100644 index e91ef4ba..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/ConfigInfo_impl_ari_1_9_0.java +++ /dev/null @@ -1,92 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Info about Asterisk configuration - * - * Defined in file: asterisk.json - * Generated by: Model - *********************************************************/ - -public class ConfigInfo_impl_ari_1_9_0 implements ConfigInfo, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Default language for media playback. */ - private String default_language; - public String getDefault_language() { - return default_language; - } - - @JsonDeserialize( as=String.class ) - public void setDefault_language(String val ) { - default_language = val; - } - - /** Maximum number of simultaneous channels. */ - private int max_channels; - public int getMax_channels() { - return max_channels; - } - - @JsonDeserialize( as=int.class ) - public void setMax_channels(int val ) { - max_channels = val; - } - - /** Maximum load avg on system. */ - private double max_load; - public double getMax_load() { - return max_load; - } - - @JsonDeserialize( as=double.class ) - public void setMax_load(double val ) { - max_load = val; - } - - /** Maximum number of open file handles (files, sockets). */ - private int max_open_files; - public int getMax_open_files() { - return max_open_files; - } - - @JsonDeserialize( as=int.class ) - public void setMax_open_files(int val ) { - max_open_files = val; - } - - /** Asterisk system name. */ - private String name; - public String getName() { - return name; - } - - @JsonDeserialize( as=String.class ) - public void setName(String val ) { - name = val; - } - - /** Effective user/group id for running Asterisk. */ - private SetId setid; - public SetId getSetid() { - return setid; - } - - @JsonDeserialize( as=SetId_impl_ari_1_9_0.class ) - public void setSetid(SetId val ) { - setid = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/ConfigTuple_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/ConfigTuple_impl_ari_1_9_0.java deleted file mode 100644 index 6c76c08f..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/ConfigTuple_impl_ari_1_9_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A key/value pair that makes up part of a configuration object. - * - * Defined in file: asterisk.json - * Generated by: Model - *********************************************************/ - -public class ConfigTuple_impl_ari_1_9_0 implements ConfigTuple, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** A configuration object attribute. */ - private String attribute; - public String getAttribute() { - return attribute; - } - - @JsonDeserialize( as=String.class ) - public void setAttribute(String val ) { - attribute = val; - } - - /** The value for the attribute. */ - private String value; - public String getValue() { - return value; - } - - @JsonDeserialize( as=String.class ) - public void setValue(String val ) { - value = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/ContactInfo_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/ContactInfo_impl_ari_1_9_0.java deleted file mode 100644 index d1f69b05..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/ContactInfo_impl_ari_1_9_0.java +++ /dev/null @@ -1,70 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Detailed information about a contact on an endpoint. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ContactInfo_impl_ari_1_9_0 implements ContactInfo, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The Address of Record this contact belongs to. */ - private String aor; - public String getAor() { - return aor; - } - - @JsonDeserialize( as=String.class ) - public void setAor(String val ) { - aor = val; - } - - /** The current status of the contact. */ - private String contact_status; - public String getContact_status() { - return contact_status; - } - - @JsonDeserialize( as=String.class ) - public void setContact_status(String val ) { - contact_status = val; - } - - /** Current round trip time, in microseconds, for the contact. */ - private String roundtrip_usec; - public String getRoundtrip_usec() { - return roundtrip_usec; - } - - @JsonDeserialize( as=String.class ) - public void setRoundtrip_usec(String val ) { - roundtrip_usec = val; - } - - /** The location of the contact. */ - private String uri; - public String getUri() { - return uri; - } - - @JsonDeserialize( as=String.class ) - public void setUri(String val ) { - uri = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/ContactStatusChange_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/ContactStatusChange_impl_ari_1_9_0.java deleted file mode 100644 index cec6eee5..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/ContactStatusChange_impl_ari_1_9_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * The state of a contact on an endpoint has changed. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class ContactStatusChange_impl_ari_1_9_0 extends Event_impl_ari_1_9_0 implements ContactStatusChange, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private ContactInfo contact_info; - public ContactInfo getContact_info() { - return contact_info; - } - - @JsonDeserialize( as=ContactInfo_impl_ari_1_9_0.class ) - public void setContact_info(ContactInfo val ) { - contact_info = val; - } - - /** */ - private Endpoint endpoint; - public Endpoint getEndpoint() { - return endpoint; - } - - @JsonDeserialize( as=Endpoint_impl_ari_1_9_0.class ) - public void setEndpoint(Endpoint val ) { - endpoint = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/DeviceStateChanged_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/DeviceStateChanged_impl_ari_1_9_0.java deleted file mode 100644 index a83e5887..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/DeviceStateChanged_impl_ari_1_9_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a device state has changed. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class DeviceStateChanged_impl_ari_1_9_0 extends Event_impl_ari_1_9_0 implements DeviceStateChanged, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Device state object */ - private DeviceState device_state; - public DeviceState getDevice_state() { - return device_state; - } - - @JsonDeserialize( as=DeviceState_impl_ari_1_9_0.class ) - public void setDevice_state(DeviceState val ) { - device_state = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/DeviceState_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/DeviceState_impl_ari_1_9_0.java deleted file mode 100644 index c26b46a4..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/DeviceState_impl_ari_1_9_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Represents the state of a device. - * - * Defined in file: deviceStates.json - * Generated by: Model - *********************************************************/ - -public class DeviceState_impl_ari_1_9_0 implements DeviceState, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Name of the device. */ - private String name; - public String getName() { - return name; - } - - @JsonDeserialize( as=String.class ) - public void setName(String val ) { - name = val; - } - - /** Device's state */ - private String state; - public String getState() { - return state; - } - - @JsonDeserialize( as=String.class ) - public void setState(String val ) { - state = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/Dial_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/Dial_impl_ari_1_9_0.java deleted file mode 100644 index 24043577..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/Dial_impl_ari_1_9_0.java +++ /dev/null @@ -1,92 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Dialing state has changed. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class Dial_impl_ari_1_9_0 extends Event_impl_ari_1_9_0 implements Dial, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The calling channel. */ - private Channel caller; - public Channel getCaller() { - return caller; - } - - @JsonDeserialize( as=Channel_impl_ari_1_9_0.class ) - public void setCaller(Channel val ) { - caller = val; - } - - /** Current status of the dialing attempt to the peer. */ - private String dialstatus; - public String getDialstatus() { - return dialstatus; - } - - @JsonDeserialize( as=String.class ) - public void setDialstatus(String val ) { - dialstatus = val; - } - - /** The dial string for calling the peer channel. */ - private String dialstring; - public String getDialstring() { - return dialstring; - } - - @JsonDeserialize( as=String.class ) - public void setDialstring(String val ) { - dialstring = val; - } - - /** Forwarding target requested by the original dialed channel. */ - private String forward; - public String getForward() { - return forward; - } - - @JsonDeserialize( as=String.class ) - public void setForward(String val ) { - forward = val; - } - - /** Channel that the caller has been forwarded to. */ - private Channel forwarded; - public Channel getForwarded() { - return forwarded; - } - - @JsonDeserialize( as=Channel_impl_ari_1_9_0.class ) - public void setForwarded(Channel val ) { - forwarded = val; - } - - /** The dialed channel. */ - private Channel peer; - public Channel getPeer() { - return peer; - } - - @JsonDeserialize( as=Channel_impl_ari_1_9_0.class ) - public void setPeer(Channel val ) { - peer = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/Dialed_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/Dialed_impl_ari_1_9_0.java deleted file mode 100644 index 20ce330a..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/Dialed_impl_ari_1_9_0.java +++ /dev/null @@ -1,26 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Dialed channel information. - * - * Defined in file: channels.json - * Generated by: Model - *********************************************************/ - -public class Dialed_impl_ari_1_9_0 implements Dialed, java.io.Serializable { -private static final long serialVersionUID = 1L; -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/DialplanCEP_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/DialplanCEP_impl_ari_1_9_0.java deleted file mode 100644 index 0a5f6e6a..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/DialplanCEP_impl_ari_1_9_0.java +++ /dev/null @@ -1,59 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Dialplan location (context/extension/priority) - * - * Defined in file: channels.json - * Generated by: Model - *********************************************************/ - -public class DialplanCEP_impl_ari_1_9_0 implements DialplanCEP, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Context in the dialplan */ - private String context; - public String getContext() { - return context; - } - - @JsonDeserialize( as=String.class ) - public void setContext(String val ) { - context = val; - } - - /** Extension in the dialplan */ - private String exten; - public String getExten() { - return exten; - } - - @JsonDeserialize( as=String.class ) - public void setExten(String val ) { - exten = val; - } - - /** Priority in the dialplan */ - private long priority; - public long getPriority() { - return priority; - } - - @JsonDeserialize( as=long.class ) - public void setPriority(long val ) { - priority = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/EndpointStateChange_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/EndpointStateChange_impl_ari_1_9_0.java deleted file mode 100644 index bf73328d..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/EndpointStateChange_impl_ari_1_9_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Endpoint state changed. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class EndpointStateChange_impl_ari_1_9_0 extends Event_impl_ari_1_9_0 implements EndpointStateChange, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Endpoint endpoint; - public Endpoint getEndpoint() { - return endpoint; - } - - @JsonDeserialize( as=Endpoint_impl_ari_1_9_0.class ) - public void setEndpoint(Endpoint val ) { - endpoint = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/Endpoint_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/Endpoint_impl_ari_1_9_0.java deleted file mode 100644 index 09c91dc8..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/Endpoint_impl_ari_1_9_0.java +++ /dev/null @@ -1,72 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * An external device that may offer/accept calls to/from Asterisk. - * - * Unlike most resources, which have a single unique identifier, an endpoint is uniquely identified by the technology/resource pair. - * - * Defined in file: endpoints.json - * Generated by: Model - *********************************************************/ - -public class Endpoint_impl_ari_1_9_0 implements Endpoint, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Id's of channels associated with this endpoint */ - private List channel_ids; - public List getChannel_ids() { - return channel_ids; - } - - @JsonDeserialize( contentAs=String.class ) - public void setChannel_ids(List val ) { - channel_ids = val; - } - - /** Identifier of the endpoint, specific to the given technology. */ - private String resource; - public String getResource() { - return resource; - } - - @JsonDeserialize( as=String.class ) - public void setResource(String val ) { - resource = val; - } - - /** Endpoint's state */ - private String state; - public String getState() { - return state; - } - - @JsonDeserialize( as=String.class ) - public void setState(String val ) { - state = val; - } - - /** Technology of the endpoint */ - private String technology; - public String getTechnology() { - return technology; - } - - @JsonDeserialize( as=String.class ) - public void setTechnology(String val ) { - technology = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/Event_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/Event_impl_ari_1_9_0.java deleted file mode 100644 index 0a3e9180..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/Event_impl_ari_1_9_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Base type for asynchronous events from Asterisk. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class Event_impl_ari_1_9_0 extends Message_impl_ari_1_9_0 implements Event, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Name of the application receiving the event. */ - private String application; - public String getApplication() { - return application; - } - - @JsonDeserialize( as=String.class ) - public void setApplication(String val ) { - application = val; - } - - /** Time at which this event was created. */ - private Date timestamp; - public Date getTimestamp() { - return timestamp; - } - - @JsonDeserialize( as=Date.class ) - public void setTimestamp(Date val ) { - timestamp = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/FormatLangPair_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/FormatLangPair_impl_ari_1_9_0.java deleted file mode 100644 index cbc52aa4..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/FormatLangPair_impl_ari_1_9_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Identifies the format and language of a sound file - * - * Defined in file: sounds.json - * Generated by: Model - *********************************************************/ - -public class FormatLangPair_impl_ari_1_9_0 implements FormatLangPair, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private String format; - public String getFormat() { - return format; - } - - @JsonDeserialize( as=String.class ) - public void setFormat(String val ) { - format = val; - } - - /** */ - private String language; - public String getLanguage() { - return language; - } - - @JsonDeserialize( as=String.class ) - public void setLanguage(String val ) { - language = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/LiveRecording_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/LiveRecording_impl_ari_1_9_0.java deleted file mode 100644 index 96eb9951..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/LiveRecording_impl_ari_1_9_0.java +++ /dev/null @@ -1,114 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A recording that is in progress - * - * Defined in file: recordings.json - * Generated by: Model - *********************************************************/ - -public class LiveRecording_impl_ari_1_9_0 implements LiveRecording, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Cause for recording failure if failed */ - private String cause; - public String getCause() { - return cause; - } - - @JsonDeserialize( as=String.class ) - public void setCause(String val ) { - cause = val; - } - - /** Duration in seconds of the recording */ - private int duration; - public int getDuration() { - return duration; - } - - @JsonDeserialize( as=int.class ) - public void setDuration(int val ) { - duration = val; - } - - /** Recording format (wav, gsm, etc.) */ - private String format; - public String getFormat() { - return format; - } - - @JsonDeserialize( as=String.class ) - public void setFormat(String val ) { - format = val; - } - - /** Base name for the recording */ - private String name; - public String getName() { - return name; - } - - @JsonDeserialize( as=String.class ) - public void setName(String val ) { - name = val; - } - - /** Duration of silence, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds. */ - private int silence_duration; - public int getSilence_duration() { - return silence_duration; - } - - @JsonDeserialize( as=int.class ) - public void setSilence_duration(int val ) { - silence_duration = val; - } - - /** */ - private String state; - public String getState() { - return state; - } - - @JsonDeserialize( as=String.class ) - public void setState(String val ) { - state = val; - } - - /** Duration of talking, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds. */ - private int talking_duration; - public int getTalking_duration() { - return talking_duration; - } - - @JsonDeserialize( as=int.class ) - public void setTalking_duration(int val ) { - talking_duration = val; - } - - /** URI for the channel or bridge being recorded */ - private String target_uri; - public String getTarget_uri() { - return target_uri; - } - - @JsonDeserialize( as=String.class ) - public void setTarget_uri(String val ) { - target_uri = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/LogChannel_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/LogChannel_impl_ari_1_9_0.java deleted file mode 100644 index b37ddbdc..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/LogChannel_impl_ari_1_9_0.java +++ /dev/null @@ -1,70 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Details of an Asterisk log channel - * - * Defined in file: asterisk.json - * Generated by: Model - *********************************************************/ - -public class LogChannel_impl_ari_1_9_0 implements LogChannel, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The log channel path */ - private String channel; - public String getChannel() { - return channel; - } - - @JsonDeserialize( as=String.class ) - public void setChannel(String val ) { - channel = val; - } - - /** The various log levels */ - private String configuration; - public String getConfiguration() { - return configuration; - } - - @JsonDeserialize( as=String.class ) - public void setConfiguration(String val ) { - configuration = val; - } - - /** Whether or not a log type is enabled */ - private String status; - public String getStatus() { - return status; - } - - @JsonDeserialize( as=String.class ) - public void setStatus(String val ) { - status = val; - } - - /** Types of logs for the log channel */ - private String type; - public String getType() { - return type; - } - - @JsonDeserialize( as=String.class ) - public void setType(String val ) { - type = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/Message_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/Message_impl_ari_1_9_0.java deleted file mode 100644 index cc898fcd..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/Message_impl_ari_1_9_0.java +++ /dev/null @@ -1,82 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonSubTypes.Type; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Base type for errors and events - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") - @JsonSubTypes({ @Type(value = MissingParams_impl_ari_1_9_0.class, name = "MissingParams") -, @Type(value = Event_impl_ari_1_9_0.class, name = "Event") -, @Type(value = ContactInfo_impl_ari_1_9_0.class, name = "ContactInfo") -, @Type(value = Peer_impl_ari_1_9_0.class, name = "Peer") -, @Type(value = DeviceStateChanged_impl_ari_1_9_0.class, name = "DeviceStateChanged") -, @Type(value = PlaybackStarted_impl_ari_1_9_0.class, name = "PlaybackStarted") -, @Type(value = PlaybackFinished_impl_ari_1_9_0.class, name = "PlaybackFinished") -, @Type(value = RecordingStarted_impl_ari_1_9_0.class, name = "RecordingStarted") -, @Type(value = RecordingFinished_impl_ari_1_9_0.class, name = "RecordingFinished") -, @Type(value = RecordingFailed_impl_ari_1_9_0.class, name = "RecordingFailed") -, @Type(value = ApplicationReplaced_impl_ari_1_9_0.class, name = "ApplicationReplaced") -, @Type(value = BridgeCreated_impl_ari_1_9_0.class, name = "BridgeCreated") -, @Type(value = BridgeDestroyed_impl_ari_1_9_0.class, name = "BridgeDestroyed") -, @Type(value = BridgeMerged_impl_ari_1_9_0.class, name = "BridgeMerged") -, @Type(value = BridgeBlindTransfer_impl_ari_1_9_0.class, name = "BridgeBlindTransfer") -, @Type(value = BridgeAttendedTransfer_impl_ari_1_9_0.class, name = "BridgeAttendedTransfer") -, @Type(value = ChannelCreated_impl_ari_1_9_0.class, name = "ChannelCreated") -, @Type(value = ChannelDestroyed_impl_ari_1_9_0.class, name = "ChannelDestroyed") -, @Type(value = ChannelEnteredBridge_impl_ari_1_9_0.class, name = "ChannelEnteredBridge") -, @Type(value = ChannelLeftBridge_impl_ari_1_9_0.class, name = "ChannelLeftBridge") -, @Type(value = ChannelStateChange_impl_ari_1_9_0.class, name = "ChannelStateChange") -, @Type(value = ChannelDtmfReceived_impl_ari_1_9_0.class, name = "ChannelDtmfReceived") -, @Type(value = ChannelDialplan_impl_ari_1_9_0.class, name = "ChannelDialplan") -, @Type(value = ChannelCallerId_impl_ari_1_9_0.class, name = "ChannelCallerId") -, @Type(value = ChannelUserevent_impl_ari_1_9_0.class, name = "ChannelUserevent") -, @Type(value = ChannelHangupRequest_impl_ari_1_9_0.class, name = "ChannelHangupRequest") -, @Type(value = ChannelVarset_impl_ari_1_9_0.class, name = "ChannelVarset") -, @Type(value = ChannelHold_impl_ari_1_9_0.class, name = "ChannelHold") -, @Type(value = ChannelUnhold_impl_ari_1_9_0.class, name = "ChannelUnhold") -, @Type(value = ChannelTalkingStarted_impl_ari_1_9_0.class, name = "ChannelTalkingStarted") -, @Type(value = ChannelTalkingFinished_impl_ari_1_9_0.class, name = "ChannelTalkingFinished") -, @Type(value = ContactStatusChange_impl_ari_1_9_0.class, name = "ContactStatusChange") -, @Type(value = PeerStatusChange_impl_ari_1_9_0.class, name = "PeerStatusChange") -, @Type(value = EndpointStateChange_impl_ari_1_9_0.class, name = "EndpointStateChange") -, @Type(value = Dial_impl_ari_1_9_0.class, name = "Dial") -, @Type(value = StasisEnd_impl_ari_1_9_0.class, name = "StasisEnd") -, @Type(value = StasisStart_impl_ari_1_9_0.class, name = "StasisStart") -, @Type(value = TextMessageReceived_impl_ari_1_9_0.class, name = "TextMessageReceived") -, @Type(value = ChannelConnectedLine_impl_ari_1_9_0.class, name = "ChannelConnectedLine") - }) - - -public class Message_impl_ari_1_9_0 implements Message, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Indicates the type of this message. */ - private String type; - public String getType() { - return type; - } - - @JsonDeserialize( as=String.class ) - public void setType(String val ) { - type = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/MissingParams_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/MissingParams_impl_ari_1_9_0.java deleted file mode 100644 index 96bf3a34..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/MissingParams_impl_ari_1_9_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Error event sent when required params are missing. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class MissingParams_impl_ari_1_9_0 extends Message_impl_ari_1_9_0 implements MissingParams, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** A list of the missing parameters */ - private List params; - public List getParams() { - return params; - } - - @JsonDeserialize( contentAs=String.class ) - public void setParams(List val ) { - params = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/Module_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/Module_impl_ari_1_9_0.java deleted file mode 100644 index f5a16c26..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/Module_impl_ari_1_9_0.java +++ /dev/null @@ -1,81 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Details of an Asterisk module - * - * Defined in file: asterisk.json - * Generated by: Model - *********************************************************/ - -public class Module_impl_ari_1_9_0 implements Module, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The description of this module */ - private String description; - public String getDescription() { - return description; - } - - @JsonDeserialize( as=String.class ) - public void setDescription(String val ) { - description = val; - } - - /** The name of this module */ - private String name; - public String getName() { - return name; - } - - @JsonDeserialize( as=String.class ) - public void setName(String val ) { - name = val; - } - - /** The running status of this module */ - private String status; - public String getStatus() { - return status; - } - - @JsonDeserialize( as=String.class ) - public void setStatus(String val ) { - status = val; - } - - /** The support state of this module */ - private String support_level; - public String getSupport_level() { - return support_level; - } - - @JsonDeserialize( as=String.class ) - public void setSupport_level(String val ) { - support_level = val; - } - - /** The number of times this module is being used */ - private int use_count; - public int getUse_count() { - return use_count; - } - - @JsonDeserialize( as=int.class ) - public void setUse_count(int val ) { - use_count = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/PeerStatusChange_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/PeerStatusChange_impl_ari_1_9_0.java deleted file mode 100644 index 9137c04f..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/PeerStatusChange_impl_ari_1_9_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * The state of a peer associated with an endpoint has changed. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class PeerStatusChange_impl_ari_1_9_0 extends Event_impl_ari_1_9_0 implements PeerStatusChange, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Endpoint endpoint; - public Endpoint getEndpoint() { - return endpoint; - } - - @JsonDeserialize( as=Endpoint_impl_ari_1_9_0.class ) - public void setEndpoint(Endpoint val ) { - endpoint = val; - } - - /** */ - private Peer peer; - public Peer getPeer() { - return peer; - } - - @JsonDeserialize( as=Peer_impl_ari_1_9_0.class ) - public void setPeer(Peer val ) { - peer = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/Peer_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/Peer_impl_ari_1_9_0.java deleted file mode 100644 index 9855a31a..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/Peer_impl_ari_1_9_0.java +++ /dev/null @@ -1,81 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Detailed information about a remote peer that communicates with Asterisk. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class Peer_impl_ari_1_9_0 implements Peer, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The IP address of the peer. */ - private String address; - public String getAddress() { - return address; - } - - @JsonDeserialize( as=String.class ) - public void setAddress(String val ) { - address = val; - } - - /** An optional reason associated with the change in peer_status. */ - private String cause; - public String getCause() { - return cause; - } - - @JsonDeserialize( as=String.class ) - public void setCause(String val ) { - cause = val; - } - - /** The current state of the peer. Note that the values of the status are dependent on the underlying peer technology. */ - private String peer_status; - public String getPeer_status() { - return peer_status; - } - - @JsonDeserialize( as=String.class ) - public void setPeer_status(String val ) { - peer_status = val; - } - - /** The port of the peer. */ - private String port; - public String getPort() { - return port; - } - - @JsonDeserialize( as=String.class ) - public void setPort(String val ) { - port = val; - } - - /** The last known time the peer was contacted. */ - private String time; - public String getTime() { - return time; - } - - @JsonDeserialize( as=String.class ) - public void setTime(String val ) { - time = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/PlaybackFinished_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/PlaybackFinished_impl_ari_1_9_0.java deleted file mode 100644 index 9dcc19b7..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/PlaybackFinished_impl_ari_1_9_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Event showing the completion of a media playback operation. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class PlaybackFinished_impl_ari_1_9_0 extends Event_impl_ari_1_9_0 implements PlaybackFinished, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Playback control object */ - private Playback playback; - public Playback getPlayback() { - return playback; - } - - @JsonDeserialize( as=Playback_impl_ari_1_9_0.class ) - public void setPlayback(Playback val ) { - playback = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/PlaybackStarted_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/PlaybackStarted_impl_ari_1_9_0.java deleted file mode 100644 index 272879e3..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/PlaybackStarted_impl_ari_1_9_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Event showing the start of a media playback operation. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class PlaybackStarted_impl_ari_1_9_0 extends Event_impl_ari_1_9_0 implements PlaybackStarted, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Playback control object */ - private Playback playback; - public Playback getPlayback() { - return playback; - } - - @JsonDeserialize( as=Playback_impl_ari_1_9_0.class ) - public void setPlayback(Playback val ) { - playback = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/Playback_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/Playback_impl_ari_1_9_0.java deleted file mode 100644 index 23231adb..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/Playback_impl_ari_1_9_0.java +++ /dev/null @@ -1,98 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Object representing the playback of media to a channel - * - * Defined in file: playbacks.json - * Generated by: Model - *********************************************************/ - -public class Playback_impl_ari_1_9_0 implements Playback, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** ID for this playback operation */ - private String id; - public String getId() { - return id; - } - - @JsonDeserialize( as=String.class ) - public void setId(String val ) { - id = val; - } - - /** For media types that support multiple languages, the language requested for playback. */ - private String language; - public String getLanguage() { - return language; - } - - @JsonDeserialize( as=String.class ) - public void setLanguage(String val ) { - language = val; - } - - /** URI for the media to play back. */ - private String media_uri; - public String getMedia_uri() { - return media_uri; - } - - @JsonDeserialize( as=String.class ) - public void setMedia_uri(String val ) { - media_uri = val; - } - - /** Current state of the playback operation. */ - private String state; - public String getState() { - return state; - } - - @JsonDeserialize( as=String.class ) - public void setState(String val ) { - state = val; - } - - /** URI for the channel or bridge to play the media on */ - private String target_uri; - public String getTarget_uri() { - return target_uri; - } - - @JsonDeserialize( as=String.class ) - public void setTarget_uri(String val ) { - target_uri = val; - } - -/********************************************************** - * If a list of URIs is being played, the next media URI to be played back. - * - * @since ari_1_10_0 - *********************************************************/ - public void setNext_media_uri(String val ){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -/********************************************************** - * If a list of URIs is being played, the next media URI to be played back. - * - * @since ari_1_10_0 - *********************************************************/ - public String getNext_media_uri(){ - throw new UnsupportedOperationException("Method availble from ..."); -}; - -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/RecordingFailed_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/RecordingFailed_impl_ari_1_9_0.java deleted file mode 100644 index 4ef34ce7..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/RecordingFailed_impl_ari_1_9_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Event showing failure of a recording operation. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class RecordingFailed_impl_ari_1_9_0 extends Event_impl_ari_1_9_0 implements RecordingFailed, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Recording control object */ - private LiveRecording recording; - public LiveRecording getRecording() { - return recording; - } - - @JsonDeserialize( as=LiveRecording_impl_ari_1_9_0.class ) - public void setRecording(LiveRecording val ) { - recording = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/RecordingFinished_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/RecordingFinished_impl_ari_1_9_0.java deleted file mode 100644 index 1313c205..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/RecordingFinished_impl_ari_1_9_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Event showing the completion of a recording operation. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class RecordingFinished_impl_ari_1_9_0 extends Event_impl_ari_1_9_0 implements RecordingFinished, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Recording control object */ - private LiveRecording recording; - public LiveRecording getRecording() { - return recording; - } - - @JsonDeserialize( as=LiveRecording_impl_ari_1_9_0.class ) - public void setRecording(LiveRecording val ) { - recording = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/RecordingStarted_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/RecordingStarted_impl_ari_1_9_0.java deleted file mode 100644 index 88f05a47..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/RecordingStarted_impl_ari_1_9_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Event showing the start of a recording operation. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class RecordingStarted_impl_ari_1_9_0 extends Event_impl_ari_1_9_0 implements RecordingStarted, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Recording control object */ - private LiveRecording recording; - public LiveRecording getRecording() { - return recording; - } - - @JsonDeserialize( as=LiveRecording_impl_ari_1_9_0.class ) - public void setRecording(LiveRecording val ) { - recording = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/SetId_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/SetId_impl_ari_1_9_0.java deleted file mode 100644 index c3fc94d1..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/SetId_impl_ari_1_9_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Effective user/group id - * - * Defined in file: asterisk.json - * Generated by: Model - *********************************************************/ - -public class SetId_impl_ari_1_9_0 implements SetId, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Effective group id. */ - private String group; - public String getGroup() { - return group; - } - - @JsonDeserialize( as=String.class ) - public void setGroup(String val ) { - group = val; - } - - /** Effective user id. */ - private String user; - public String getUser() { - return user; - } - - @JsonDeserialize( as=String.class ) - public void setUser(String val ) { - user = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/Sound_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/Sound_impl_ari_1_9_0.java deleted file mode 100644 index c9660028..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/Sound_impl_ari_1_9_0.java +++ /dev/null @@ -1,59 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A media file that may be played back. - * - * Defined in file: sounds.json - * Generated by: Model - *********************************************************/ - -public class Sound_impl_ari_1_9_0 implements Sound, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The formats and languages in which this sound is available. */ - private List formats; - public List getFormats() { - return formats; - } - - @JsonDeserialize( contentAs=FormatLangPair_impl_ari_1_9_0.class ) - public void setFormats(List val ) { - formats = val; - } - - /** Sound's identifier. */ - private String id; - public String getId() { - return id; - } - - @JsonDeserialize( as=String.class ) - public void setId(String val ) { - id = val; - } - - /** Text description of the sound, usually the words spoken. */ - private String text; - public String getText() { - return text; - } - - @JsonDeserialize( as=String.class ) - public void setText(String val ) { - text = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/StasisEnd_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/StasisEnd_impl_ari_1_9_0.java deleted file mode 100644 index 578b077a..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/StasisEnd_impl_ari_1_9_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a channel has left a Stasis application. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class StasisEnd_impl_ari_1_9_0 extends Event_impl_ari_1_9_0 implements StasisEnd, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_9_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/StasisStart_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/StasisStart_impl_ari_1_9_0.java deleted file mode 100644 index c041e6b4..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/StasisStart_impl_ari_1_9_0.java +++ /dev/null @@ -1,59 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Notification that a channel has entered a Stasis application. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class StasisStart_impl_ari_1_9_0 extends Event_impl_ari_1_9_0 implements StasisStart, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Arguments to the application */ - private List args; - public List getArgs() { - return args; - } - - @JsonDeserialize( contentAs=String.class ) - public void setArgs(List val ) { - args = val; - } - - /** */ - private Channel channel; - public Channel getChannel() { - return channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_9_0.class ) - public void setChannel(Channel val ) { - channel = val; - } - - /** */ - private Channel replace_channel; - public Channel getReplace_channel() { - return replace_channel; - } - - @JsonDeserialize( as=Channel_impl_ari_1_9_0.class ) - public void setReplace_channel(Channel val ) { - replace_channel = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/StatusInfo_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/StatusInfo_impl_ari_1_9_0.java deleted file mode 100644 index 49c35d53..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/StatusInfo_impl_ari_1_9_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Info about Asterisk status - * - * Defined in file: asterisk.json - * Generated by: Model - *********************************************************/ - -public class StatusInfo_impl_ari_1_9_0 implements StatusInfo, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** Time when Asterisk was last reloaded. */ - private Date last_reload_time; - public Date getLast_reload_time() { - return last_reload_time; - } - - @JsonDeserialize( as=Date.class ) - public void setLast_reload_time(Date val ) { - last_reload_time = val; - } - - /** Time when Asterisk was started. */ - private Date startup_time; - public Date getStartup_time() { - return startup_time; - } - - @JsonDeserialize( as=Date.class ) - public void setStartup_time(Date val ) { - startup_time = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/StoredRecording_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/StoredRecording_impl_ari_1_9_0.java deleted file mode 100644 index 425e51a6..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/StoredRecording_impl_ari_1_9_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A past recording that may be played back. - * - * Defined in file: recordings.json - * Generated by: Model - *********************************************************/ - -public class StoredRecording_impl_ari_1_9_0 implements StoredRecording, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private String format; - public String getFormat() { - return format; - } - - @JsonDeserialize( as=String.class ) - public void setFormat(String val ) { - format = val; - } - - /** */ - private String name; - public String getName() { - return name; - } - - @JsonDeserialize( as=String.class ) - public void setName(String val ) { - name = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/SystemInfo_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/SystemInfo_impl_ari_1_9_0.java deleted file mode 100644 index bd06e340..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/SystemInfo_impl_ari_1_9_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * Info about Asterisk - * - * Defined in file: asterisk.json - * Generated by: Model - *********************************************************/ - -public class SystemInfo_impl_ari_1_9_0 implements SystemInfo, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private String entity_id; - public String getEntity_id() { - return entity_id; - } - - @JsonDeserialize( as=String.class ) - public void setEntity_id(String val ) { - entity_id = val; - } - - /** Asterisk version. */ - private String version; - public String getVersion() { - return version; - } - - @JsonDeserialize( as=String.class ) - public void setVersion(String val ) { - version = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/TextMessageReceived_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/TextMessageReceived_impl_ari_1_9_0.java deleted file mode 100644 index 7211399c..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/TextMessageReceived_impl_ari_1_9_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A text message was received from an endpoint. - * - * Defined in file: events.json - * Generated by: Model - *********************************************************/ - -public class TextMessageReceived_impl_ari_1_9_0 extends Event_impl_ari_1_9_0 implements TextMessageReceived, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** */ - private Endpoint endpoint; - public Endpoint getEndpoint() { - return endpoint; - } - - @JsonDeserialize( as=Endpoint_impl_ari_1_9_0.class ) - public void setEndpoint(Endpoint val ) { - endpoint = val; - } - - /** */ - private TextMessage message; - public TextMessage getMessage() { - return message; - } - - @JsonDeserialize( as=TextMessage_impl_ari_1_9_0.class ) - public void setMessage(TextMessage val ) { - message = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/TextMessageVariable_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/TextMessageVariable_impl_ari_1_9_0.java deleted file mode 100644 index e65e364d..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/TextMessageVariable_impl_ari_1_9_0.java +++ /dev/null @@ -1,48 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A key/value pair variable in a text message. - * - * Defined in file: endpoints.json - * Generated by: Model - *********************************************************/ - -public class TextMessageVariable_impl_ari_1_9_0 implements TextMessageVariable, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** A unique key identifying the variable. */ - private String key; - public String getKey() { - return key; - } - - @JsonDeserialize( as=String.class ) - public void setKey(String val ) { - key = val; - } - - /** The value of the variable. */ - private String value; - public String getValue() { - return value; - } - - @JsonDeserialize( as=String.class ) - public void setValue(String val ) { - value = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/TextMessage_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/TextMessage_impl_ari_1_9_0.java deleted file mode 100644 index a89fb3da..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/TextMessage_impl_ari_1_9_0.java +++ /dev/null @@ -1,70 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * A text message. - * - * Defined in file: endpoints.json - * Generated by: Model - *********************************************************/ - -public class TextMessage_impl_ari_1_9_0 implements TextMessage, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The text of the message. */ - private String body; - public String getBody() { - return body; - } - - @JsonDeserialize( as=String.class ) - public void setBody(String val ) { - body = val; - } - - /** A technology specific URI specifying the source of the message. For sip and pjsip technologies, any SIP URI can be specified. For xmpp, the URI must correspond to the client connection being used to send the message. */ - private String from; - public String getFrom() { - return from; - } - - @JsonDeserialize( as=String.class ) - public void setFrom(String val ) { - from = val; - } - - /** A technology specific URI specifying the destination of the message. Valid technologies include sip, pjsip, and xmp. The destination of a message should be an endpoint. */ - private String to; - public String getTo() { - return to; - } - - @JsonDeserialize( as=String.class ) - public void setTo(String val ) { - to = val; - } - - /** Technology specific key/value pairs associated with the message. */ - private List variables; - public List getVariables() { - return variables; - } - - @JsonDeserialize( contentAs=TextMessageVariable_impl_ari_1_9_0.class ) - public void setVariables(List val ) { - variables = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/Variable_impl_ari_1_9_0.java b/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/Variable_impl_ari_1_9_0.java deleted file mode 100644 index 782b3a67..00000000 --- a/classes/ch/loway/oss/ari4java/generated/ari_1_9_0/models/Variable_impl_ari_1_9_0.java +++ /dev/null @@ -1,37 +0,0 @@ -package ch.loway.oss.ari4java.generated.ari_1_9_0.models; - -// ---------------------------------------------------- -// THIS CLASS WAS GENERATED AUTOMATICALLY -// PLEASE DO NOT EDIT -// Generated on: Wed Aug 31 18:05:10 CEST 2016 -// ---------------------------------------------------- - -import ch.loway.oss.ari4java.generated.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/********************************************************** - * The value of a channel variable - * - * Defined in file: asterisk.json - * Generated by: Model - *********************************************************/ - -public class Variable_impl_ari_1_9_0 implements Variable, java.io.Serializable { -private static final long serialVersionUID = 1L; - /** The value of the variable requested */ - private String value; - public String getValue() { - return value; - } - - @JsonDeserialize( as=String.class ) - public void setValue(String val ) { - value = val; - } - -/** No missing signatures from interface */ -} - diff --git a/classes/ch/loway/oss/ari4java/tools/ARIException.java b/classes/ch/loway/oss/ari4java/tools/ARIException.java deleted file mode 100644 index f3b15019..00000000 --- a/classes/ch/loway/oss/ari4java/tools/ARIException.java +++ /dev/null @@ -1,32 +0,0 @@ -package ch.loway.oss.ari4java.tools; - -public class ARIException extends Exception { - - private static final long serialVersionUID = 1L; - private String message = ""; - private Throwable cause = null; - - public ARIException(String message) { - this.message = message; - } - - public ARIException(Throwable t) { - cause = t; - } - - @Override - public String getMessage() { - if (cause != null) { - return cause.getMessage(); - } - return this.message; - } - - @Override - public synchronized Throwable getCause() { - if (cause != null) { - return cause; - } - return super.getCause(); - } -} diff --git a/classes/ch/loway/oss/ari4java/tools/AriAsyncHandler.java b/classes/ch/loway/oss/ari4java/tools/AriAsyncHandler.java deleted file mode 100644 index 0d0e265d..00000000 --- a/classes/ch/loway/oss/ari4java/tools/AriAsyncHandler.java +++ /dev/null @@ -1,81 +0,0 @@ - -package ch.loway.oss.ari4java.tools; - -import com.fasterxml.jackson.core.type.TypeReference; - -/** - * Delegate for handling asynchronous ARI responses. - * - * - */ -public class AriAsyncHandler implements HttpResponseHandler { - private final AriCallback callback; - private Class klazz; - private TypeReference klazzType; - private long lastResponseTime = 0; - - public AriAsyncHandler(AriCallback callback, Class klazz) { - this.callback = callback; - this.klazz = klazz; - } - - public AriAsyncHandler(AriCallback callback, TypeReference klazzType) { - this.callback = callback; - this.klazzType = klazzType; - } - - public AriCallback getCallback() { - return callback; - } - - void handleResponse(String json) { - try { - T result; - if (Void.class.equals(klazz)) { - result = null; - } else if (klazz != null) { - result = BaseAriAction.deserializeJson(json, klazz); - } else { - result = BaseAriAction.deserializeJson(json, klazzType); - } - this.callback.onSuccess(result); - } catch (RestException e) { - this.callback.onFailure(e); - } - } - - @Override - public void onChReadyToWrite() { - lastResponseTime = System.currentTimeMillis(); - } - - @Override - public void onResponseReceived() { - lastResponseTime = System.currentTimeMillis(); - } - - @Override - public void onDisconnect() { - // this is from channelInactive on the websocket raise an error so the client can reconnect if need be - this.callback.onFailure(new RestException("Asterisk WS is disconnected. Please retry.")); - } - - @Override - public void onSuccess(String response) { - handleResponse(response); - } - - @Override - public void onFailure(Throwable e) { - this.callback.onFailure(new RestException(e)); - } - - @Override - public long getLastResponseTime() { - return lastResponseTime; - } - -} - -// $Log$ -// diff --git a/classes/ch/loway/oss/ari4java/tools/BaseAriAction.java b/classes/ch/loway/oss/ari4java/tools/BaseAriAction.java deleted file mode 100644 index c632940d..00000000 --- a/classes/ch/loway/oss/ari4java/tools/BaseAriAction.java +++ /dev/null @@ -1,220 +0,0 @@ -package ch.loway.oss.ari4java.tools; - -import ch.loway.oss.ari4java.generated.Message; -import ch.loway.oss.ari4java.tools.WsClient.WsClientConnection; - -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -/** - * Base functionality for ARI actions - * - * Provides asynchronous and synchronous methods for forwarding requests to the - * HTTP or WebSocket server. - * - * Provides serialize/deserialize interface for JSON encoded objects - * - * @author lenz - * @author mwalton - */ -public class BaseAriAction { - - private String forcedResponse = null; - private HttpClient httpClient; - private WsClient wsClient; - protected List lParamQuery; - protected List lParamForm; - protected List lParamBody; - protected List lE; - protected String url; - protected String method; - protected boolean wsUpgrade = false; - protected WsClientConnection wsConnection; - - /** - * Reset contents in preparation for new RPC - */ - protected synchronized void reset() { - lParamQuery = new ArrayList(); - lParamForm = new ArrayList(); - lParamBody = new ArrayList(); - lE = new ArrayList(); - url = null; - wsUpgrade = false; - } - - public synchronized void forceResponse(String r) { - forcedResponse = r; - } - - /** - * Initiate synchronous HTTP interaction with server - * - * @return Response from server - * @throws RestException - */ - protected synchronized String httpActionSync() throws RestException { - if (forcedResponse != null) { - return forcedResponse; - } else { - if (httpClient == null) { - throw new RestException("HTTP client implementation not set"); - } else { - return httpClient.httpActionSync(this.url, this.method, this.lParamQuery, this.lParamForm, this.lParamBody, this.lE); - } - } - } - - /** - * Initiate asynchronous HTTP or WebSocket interaction with server - * - * @param asyncHandler - */ - private synchronized void httpActionAsync(AriAsyncHandler asyncHandler) { - if (forcedResponse != null) { - asyncHandler.handleResponse(forcedResponse); - } else if (wsUpgrade) { - // Websocket connection - if (wsClient == null) { - asyncHandler.getCallback().onFailure(new RestException("WebSocket client implementation not set")); - return; - } - if (wsConnection != null) { - asyncHandler.getCallback().onFailure(new RestException("This action is already connected to a WebSocket")); - return; - } - try { - wsConnection = wsClient.connect(asyncHandler, this.url, this.lParamQuery); - } catch (RestException e) { - asyncHandler.getCallback().onFailure(e); - } - } else if (httpClient == null) { - asyncHandler.getCallback().onFailure(new RestException("HTTP client implementation not set")); - } else { - try { - httpClient.httpActionAsync(this.url, this.method, this.lParamQuery, this.lParamForm, this.lParamBody, this.lE, asyncHandler); - } catch (RestException e) { - asyncHandler.getCallback().onFailure(e); - } - } - } - - // Different styled asynchronous methods - protected void httpActionAsync(AriCallback callback) { - httpActionAsync(new AriAsyncHandler(callback, Void.class)); - } - - protected void httpActionAsync(AriCallback callback, Class klazz) { - httpActionAsync(new AriAsyncHandler(callback, klazz)); - } - - protected void httpActionAsync( - AriCallback> callback, TypeReference> klazzType) { - httpActionAsync(new AriAsyncHandler(callback, klazzType)); - } - - /** - * Deserialize a type - * - * @param json - * @param klazz - * @return Deserialized type - */ - public static T deserializeJson(String json, Class klazz) throws RestException { - - ObjectMapper mapper = new ObjectMapper(); - try { - return mapper.readValue(json, klazz); - } catch (IOException e) { - e.printStackTrace(System.err); - throw new RestException("Decoding JSON: " + e.getMessage()); - } - } - - /** - * Deserialize a list - * - * @param json - * @param klazzType - * @return Deserialized list - */ - public static T deserializeJson(String json, TypeReference klazzType) throws RestException { - - ObjectMapper mapper = new ObjectMapper(); - try { - return mapper.readValue(json, klazzType); - } catch (IOException e) { - throw new RestException("Decoding JSON list: " + e.toString()); - } - - } - - /** - * Deserialize an object as a list of interface. Class erasure in Java plain - * sucks, I tell ya. - * - * In theory we should be safe given the condition that A extends C. I hope - * at least. This is bug #17 - Avoid Lists of ? extends something - * - * @param The abstract type for members of the list. - * @param The concrete type for members of the list. - * @param json Data in - * @param refConcreteType The reference concrete type, should be a List - * @return a list of A's - * @throws RestException - */ - public static List deserializeJsonAsAbstractList(String json, TypeReference> refConcreteType) throws RestException { - - ObjectMapper mapper = new ObjectMapper(); - try { - List lC = mapper.readValue(json, refConcreteType); - List lA = (List) lC; - return lA; - } catch (IOException e) { - throw new RestException("Decoding JSON list: " + e.toString()); - } - - } - - /** - * Deserialize the event. - * - * @param json - * @param klazz - * @return The event deserialized. - * @throws RestException - */ - public static Message deserializeEvent(String json, Class klazz) throws RestException { - ObjectMapper mapper = new ObjectMapper(); - try { - return (Message) mapper.readValue(json, klazz); - } catch (IOException e) { - e.printStackTrace(System.err); - throw new RestException("Decoding JSON event: " + e.toString()); - } - } - - /** - * Close the WebSocket connection - * - * @throws RestException - */ - public synchronized void disconnectWs() throws RestException { - wsConnection.disconnect(); - wsConnection = null; - } - - public synchronized void setHttpClient(HttpClient httpClient) { - this.httpClient = httpClient; - } - - public synchronized void setWsClient(WsClient wsClient) { - this.wsClient = wsClient; - } -} - -// - diff --git a/classes/ch/loway/oss/ari4java/tools/HttpClient.java b/classes/ch/loway/oss/ari4java/tools/HttpClient.java deleted file mode 100644 index 33fc0f96..00000000 --- a/classes/ch/loway/oss/ari4java/tools/HttpClient.java +++ /dev/null @@ -1,16 +0,0 @@ -package ch.loway.oss.ari4java.tools; - -import java.util.List; - -/** - * Interface to pluggable HTTP client implementation - * - * @author mwalton - * - */ -public interface HttpClient { - - String httpActionSync(String uri, String method, List parametersQuery, List parametersForm, List parametersBody,List errors) throws RestException; - - void httpActionAsync(String uri, String method, List parametersQuery, List parametersForm, List parametersBody, List errors, HttpResponseHandler responseHandler) throws RestException; -} diff --git a/classes/ch/loway/oss/ari4java/tools/HttpParam.java b/classes/ch/loway/oss/ari4java/tools/HttpParam.java deleted file mode 100644 index a39862a9..00000000 --- a/classes/ch/loway/oss/ari4java/tools/HttpParam.java +++ /dev/null @@ -1,53 +0,0 @@ - -package ch.loway.oss.ari4java.tools; - -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -/** - * - * @author lenz - */ -public class HttpParam { - public String name = ""; - public String value = ""; - - public static HttpParam build(String n, String v) { - HttpParam p = new HttpParam(); - p.name = n; - p.value = v; - return p; - } - - public static List build(String key, Map variables) { - ArrayList vars = new ArrayList<>(); - if (variables != null) { - for (Map.Entry entry : variables.entrySet()) { - vars.add(build(entry.getKey(), entry.getValue())); - } - } - return vars; - } - - public static HttpParam build(String n, int v) { - return build(n, Integer.toString(v)); - } - - public static HttpParam build(String n, long v) { - return build(n, Long.toString(v)); - } - - public static HttpParam build(String n, boolean v) { - return build(n, v ? "true" : "false"); - } - -} -// public AriConnector daddy = null; -// -// public void configure(AriConnector connector) { -// daddy = connector; -// } - -// $Log$ -// diff --git a/classes/ch/loway/oss/ari4java/tools/HttpResponse.java b/classes/ch/loway/oss/ari4java/tools/HttpResponse.java deleted file mode 100644 index 1692674a..00000000 --- a/classes/ch/loway/oss/ari4java/tools/HttpResponse.java +++ /dev/null @@ -1,20 +0,0 @@ - -package ch.loway.oss.ari4java.tools; - -/** - * - * @author lenz - */ -public class HttpResponse { - public int code = 0; - public String description = ""; - - public static HttpResponse build(int code, String descr) { - HttpResponse r = new HttpResponse(); - r.code = code; - r.description = descr; - return r; - } - -} - diff --git a/classes/ch/loway/oss/ari4java/tools/HttpResponseHandler.java b/classes/ch/loway/oss/ari4java/tools/HttpResponseHandler.java deleted file mode 100644 index 3005de0a..00000000 --- a/classes/ch/loway/oss/ari4java/tools/HttpResponseHandler.java +++ /dev/null @@ -1,45 +0,0 @@ -package ch.loway.oss.ari4java.tools; - -/** - * Interface to implementation that can handle HTTP responses - * - * @author mwalton - */ -public interface HttpResponseHandler { - - /** - * Client started rending response. - */ - void onChReadyToWrite(); - - /** - * Server finished sending response - */ - void onResponseReceived(); - - /** - * WebSocket disconnected - */ - void onDisconnect(); - - /** - * All went well. - * - * @param response - */ - void onSuccess(String response); - - /** - * Something bad happened. - * - * @param e - */ - void onFailure(Throwable e); - - /** - * The last time in epoch since last response - * - * @return epoch - */ - long getLastResponseTime(); -} diff --git a/classes/ch/loway/oss/ari4java/tools/RestException.java b/classes/ch/loway/oss/ari4java/tools/RestException.java deleted file mode 100644 index a2380319..00000000 --- a/classes/ch/loway/oss/ari4java/tools/RestException.java +++ /dev/null @@ -1,20 +0,0 @@ -package ch.loway.oss.ari4java.tools; - -/** - * A REST error. - * Made it inherit from ARIException so that you can trap ony one exception. - * - * @author lenz - */ -public class RestException extends ARIException { - - private static final long serialVersionUID = 1L; - - public RestException(String s) { - super(s); - } - - public RestException(Throwable cause) { - super(cause); - } -} diff --git a/classes/ch/loway/oss/ari4java/tools/WsClient.java b/classes/ch/loway/oss/ari4java/tools/WsClient.java deleted file mode 100644 index cb2296fe..00000000 --- a/classes/ch/loway/oss/ari4java/tools/WsClient.java +++ /dev/null @@ -1,21 +0,0 @@ -package ch.loway.oss.ari4java.tools; - -import java.util.List; -import ch.loway.oss.ari4java.tools.HttpParam; - -/** - * Interface to pluggable WebSocket client implementation - * - * @author mwalton - * - */ -public interface WsClient { - public interface WsClientConnection { - void disconnect() throws RestException; - } - - WsClientConnection connect(HttpResponseHandler callback, - String url, - List lParamQuery) throws RestException; - -} \ No newline at end of file diff --git a/classes/ch/loway/oss/ari4java/tools/WsClientAutoReconnect.java b/classes/ch/loway/oss/ari4java/tools/WsClientAutoReconnect.java deleted file mode 100644 index d6a00781..00000000 --- a/classes/ch/loway/oss/ari4java/tools/WsClientAutoReconnect.java +++ /dev/null @@ -1,11 +0,0 @@ -package ch.loway.oss.ari4java.tools; - -/** - * Interface to pluggable WebSocket reconnect implementation - * - * @author grahambrown11 - * - */ -public interface WsClientAutoReconnect { - void reconnectWs(); -} \ No newline at end of file diff --git a/classes/ch/loway/oss/ari4java/tools/http/NettyHttpClient.java b/classes/ch/loway/oss/ari4java/tools/http/NettyHttpClient.java deleted file mode 100644 index 85338996..00000000 --- a/classes/ch/loway/oss/ari4java/tools/http/NettyHttpClient.java +++ /dev/null @@ -1,396 +0,0 @@ -package ch.loway.oss.ari4java.tools.http; - -import ch.loway.oss.ari4java.tools.*; -import ch.loway.oss.ari4java.tools.HttpResponse; -import io.netty.bootstrap.Bootstrap; -import io.netty.buffer.ByteBuf; -import io.netty.buffer.Unpooled; -import io.netty.channel.Channel; -import io.netty.channel.ChannelFuture; -import io.netty.channel.ChannelFutureListener; -import io.netty.channel.ChannelInitializer; -import io.netty.channel.ChannelPipeline; -import io.netty.channel.EventLoopGroup; -import io.netty.channel.nio.NioEventLoopGroup; -import io.netty.channel.socket.SocketChannel; -import io.netty.channel.socket.nio.NioSocketChannel; -import io.netty.handler.codec.http.*; -import io.netty.handler.codec.http.websocketx.*; -import io.netty.util.concurrent.ScheduledFuture; - -import java.io.UnsupportedEncodingException; -import java.net.URI; -import java.net.URISyntaxException; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.Iterator; -import java.util.List; -import java.util.concurrent.TimeUnit; - -/** - * HTTP and WebSocket client implementation based on netty.io. - * - * Threading is handled by NioEventLoopGroup, which selects on multiple - * sockets and provides threads to handle the events on the sockets. - * - * Requires netty-all-4.0.12.Final.jar - * - * @author mwalton - * - */ -public class NettyHttpClient implements HttpClient, WsClient, WsClientAutoReconnect { - - public static final int MAX_HTTP_REQUEST_KB = 256; - - private Bootstrap bootStrap; - private URI baseUri; - private EventLoopGroup group; - private EventLoopGroup shutDownGroup; - private String username; - private String password; - - private HttpResponseHandler wsCallback; - private String wsEventsUrl; - private List wsEventsParamQuery; - private WsClientConnection wsClientConnection; - private int reconnectCount = 0; - private ChannelFuture wsChannelFuture; - private ScheduledFuture wsPingTimer = null; - private NettyWSClientHandler wsHandler; - - public NettyHttpClient() { - group = new NioEventLoopGroup(); - shutDownGroup = new NioEventLoopGroup(); - } - - public void initialize(String baseUrl, String username, String password) throws URISyntaxException { - this.username = username; - this.password = password; - baseUri = new URI(baseUrl); - String protocol = baseUri.getScheme(); - if (!"http".equals(protocol)) { - throw new IllegalArgumentException("Unsupported protocol: " + protocol); - } - // Bootstrap is the factory for HTTP connections - bootStrap = new Bootstrap(); - bootStrap.group(group); - bootStrap.channel(NioSocketChannel.class); - bootStrap.handler(new ChannelInitializer() { - - @Override - public void initChannel(SocketChannel ch) throws Exception { - ChannelPipeline pipeline = ch.pipeline(); - pipeline.addLast("http-codec", new HttpClientCodec()); - pipeline.addLast("aggregator", new HttpObjectAggregator( MAX_HTTP_REQUEST_KB * 1024)); - pipeline.addLast("http-handler", new NettyHttpClientHandler()); - } - }); - } - - public void destroy() { - // use a different event group to execute the shutdown to avoid deadlocks - shutDownGroup.schedule(new Runnable() { - @Override - public void run() { - if (wsClientConnection != null) { - try { - wsClientConnection.disconnect(); - } catch (RestException e) { - // not bubbling exception up, just ignoring - } - } - if (group != null && !group.isShuttingDown()) { - group.shutdownGracefully(5, 10, TimeUnit.SECONDS).syncUninterruptibly(); - group = null; - } - } - }, 250L, TimeUnit.MILLISECONDS); - } - - private String buildURL(String path, List parametersQuery) throws UnsupportedEncodingException { - StringBuilder uriBuilder = new StringBuilder(); - uriBuilder.append(baseUri.getPath()); - uriBuilder.append("ari"); - uriBuilder.append(path); - uriBuilder.append("?api_key="); - uriBuilder.append(URLEncoder.encode(username, "UTF-8")); - uriBuilder.append(":"); - uriBuilder.append(URLEncoder.encode(password, "UTF-8")); - if (parametersQuery != null) { - for (HttpParam hp : parametersQuery) { - if (hp.value != null && !hp.value.isEmpty()) { - uriBuilder.append("&"); - uriBuilder.append(hp.name); - uriBuilder.append("="); - uriBuilder.append(URLEncoder.encode(hp.value, "UTF-8")); - } - } - } - return uriBuilder.toString(); - } - - // Factory for WS handshakes - private WebSocketClientHandshaker getWsHandshake(String path, List parametersQuery) throws UnsupportedEncodingException { - String url = buildURL(path, parametersQuery); - try { - URI uri = new URI(url.replaceFirst("http", "ws")); - return WebSocketClientHandshakerFactory.newHandshaker( - uri, WebSocketVersion.V13, null, false, null); - } catch (URISyntaxException e) { - e.printStackTrace(); - return null; - } - } - - // Build the HTTP request based on the given parameters - private HttpRequest buildRequest(String path, String method, List parametersQuery, List parametersForm, List parametersBody) throws UnsupportedEncodingException { - String url = buildURL(path, parametersQuery); - FullHttpRequest request = new DefaultFullHttpRequest( - HttpVersion.HTTP_1_1, HttpMethod.valueOf(method), url); - //System.out.println(request.getUri()); - if (parametersBody != null && !parametersBody.isEmpty()) { - String vars = makeBodyVariables(parametersBody); - ByteBuf bbuf = Unpooled.copiedBuffer(vars, StandardCharsets.UTF_8); - - request.headers().add(HttpHeaders.Names.CONTENT_TYPE, "application/json"); - request.headers().set(HttpHeaders.Names.CONTENT_LENGTH, bbuf.readableBytes()); - request.content().clear().writeBytes(bbuf); - } - request.headers().set(HttpHeaders.Names.HOST, "localhost"); - request.headers().set(HttpHeaders.Names.CONNECTION, HttpHeaders.Values.CLOSE); - return request; - } - - private String makeBodyVariables(List variables) { - StringBuilder varBuilder = new StringBuilder(); - varBuilder.append("{").append("\"variables\": {"); - Iterator entryIterator = variables.iterator(); - while(entryIterator.hasNext()) { - HttpParam param = entryIterator.next(); - varBuilder.append("\"").append(param.name).append("\"").append(": ").append("\"").append(param.value).append("\""); - if (entryIterator.hasNext()) { - varBuilder.append(","); - } - } - varBuilder.append("}}"); - - return varBuilder.toString(); - } - - private RestException makeException(HttpResponseStatus status, String response, List errors) { - - if (status == null ) { - return new RestException("Shutdown: " + response); - } - - for (HttpResponse hr : errors) { - if (hr.code == status.code()) { - return new RestException(hr.description); - } - } - return new RestException(response); - } - - // Synchronous HTTP action - @Override - public String httpActionSync(String uri, String method, List parametersQuery, List parametersForm, List parametersBody, - List errors) throws RestException { - Channel ch; - try { - HttpRequest request = buildRequest(uri, method, parametersQuery, parametersForm, parametersBody); - //handler.reset(); - ch = bootStrap.connect(baseUri.getHost(), baseUri.getPort()).sync().channel(); - NettyHttpClientHandler handler = (NettyHttpClientHandler) ch.pipeline().get("http-handler"); - ch.writeAndFlush(request); - ch.closeFuture().sync(); - if ( httpResponseOkay(handler.getResponseStatus())) { - return handler.getResponseText(); - } else { - throw makeException(handler.getResponseStatus(), handler.getResponseText(), errors); - } - } catch (UnsupportedEncodingException e) { - throw new RestException(e); - } catch (InterruptedException e) { - throw new RestException(e); - } - } - - // Asynchronous HTTP action, response is passed to HttpResponseHandler - @Override - public void httpActionAsync(String uri, String method, List parametersQuery, List parametersForm, List parametersBody, - final List errors, final HttpResponseHandler responseHandler) - throws RestException { - try { - final HttpRequest request = buildRequest(uri, method, parametersQuery, parametersForm, parametersBody); - // Get future channel - ChannelFuture cf = bootStrap.connect(baseUri.getHost(), baseUri.getPort()); - cf.addListener(new ChannelFutureListener() { - - @Override - public void operationComplete(ChannelFuture future) throws Exception { - if (future.isSuccess()) { - Channel ch = future.channel(); - responseHandler.onChReadyToWrite(); - ch.writeAndFlush(request); - ch.closeFuture().addListener(new ChannelFutureListener() { - - @Override - public void operationComplete(ChannelFuture future) throws Exception { - responseHandler.onResponseReceived(); - if (future.isSuccess()) { - NettyHttpClientHandler handler = (NettyHttpClientHandler) future.channel().pipeline().get("http-handler"); - HttpResponseStatus rStatus = handler.getResponseStatus(); - - if ( httpResponseOkay(rStatus)) { - responseHandler.onSuccess(handler.getResponseText()); - } else { - responseHandler.onFailure(makeException(handler.getResponseStatus(), handler.getResponseText(), errors)); - } - } else { - responseHandler.onFailure(future.cause()); - } - } - }); - } else { - responseHandler.onFailure(future.cause()); - } - } - }); - } catch (UnsupportedEncodingException e) { - throw new RestException(e); - } - } - // WsClient implementation - connect to WebSocket server - - @Override - public WsClientConnection connect(final HttpResponseHandler callback, final String url, final List lParamQuery) throws RestException { - - this.wsCallback = callback; - this.wsEventsUrl = url; - this.wsEventsParamQuery = lParamQuery; - try { - this.wsHandler = new NettyWSClientHandler(getWsHandshake(url, lParamQuery), callback, this); - } catch (UnsupportedEncodingException e) { - throw new RestException(e); - } - - Bootstrap wsBootStrap = new Bootstrap(); - wsBootStrap.group(group); - wsBootStrap.channel(NioSocketChannel.class); - wsBootStrap.handler(new ChannelInitializer() { - - @Override - public void initChannel(SocketChannel ch) throws Exception { - ChannelPipeline pipeline = ch.pipeline(); - pipeline.addLast("http-codec", new HttpClientCodec()); - pipeline.addLast("aggregator", new HttpObjectAggregator(MAX_HTTP_REQUEST_KB * 1024)); - pipeline.addLast("ws-handler", wsHandler); - } - }); - wsChannelFuture = wsBootStrap.connect(baseUri.getHost(), baseUri.getPort()); - wsChannelFuture.addListener(new ChannelFutureListener() { - - @Override - public void operationComplete(ChannelFuture future) throws Exception { - if (future.isSuccess()) { - callback.onChReadyToWrite(); - // reset the reconnect counter on successful connect - reconnectCount = 0; - } else { - if (reconnectCount >= 10) - callback.onFailure(future.cause()); - else - reconnectWs(); - } - } - }); - - // start a ws ping schedule - startPing(); - - // Provide disconnection handle to client - return createWsClientConnection(); - } - - private void startPing() { - if (wsPingTimer == null) { - wsPingTimer = group.scheduleAtFixedRate(new Runnable() { - @Override - public void run() { - if (System.currentTimeMillis() - wsCallback.getLastResponseTime() > 15000) { - if (!wsChannelFuture.isCancelled() && wsChannelFuture.channel() != null) { - WebSocketFrame frame = new PingWebSocketFrame(Unpooled.wrappedBuffer("ari4j".getBytes( StandardCharsets.UTF_8 ))); - wsChannelFuture.channel().writeAndFlush(frame); - } - } - } - }, 5, 5, TimeUnit.MINUTES); - } - } - - private WsClientConnection createWsClientConnection() { - if (this.wsClientConnection == null) { - this.wsClientConnection = new WsClientConnection() { - - @Override - public void disconnect() throws RestException { - wsHandler.setShuttingDown(true); - Channel ch = wsChannelFuture.channel(); - if (ch != null) { - ch.writeAndFlush(new CloseWebSocketFrame()); - // NettyWSClientHandler will close the connection when the server - // responds to the CloseWebSocketFrame. - } - } - }; - } - return this.wsClientConnection; - } - - /** - * Checks if a response is okay. - * All 2XX responses are supposed to be okay. - * - * @param status - * @return whether it is a 2XX code or not (error!) - */ - private boolean httpResponseOkay(HttpResponseStatus status) { - - if (HttpResponseStatus.OK.equals(status) - || HttpResponseStatus.NO_CONTENT.equals(status) - || HttpResponseStatus.ACCEPTED.equals(status) - || HttpResponseStatus.CREATED.equals(status)) { - return true; - } else { - return false; - } - - } - - - @Override - public void reconnectWs() { - // cancel the ping timer - if (wsPingTimer != null) { - wsPingTimer.cancel(false); - wsPingTimer = null; - } - // if not shutdown reconnect, note the check not on the shutDownGroup - if (!group.isShuttingDown()) { - // schedule reconnect after a 1,5,10 seconds - long[] timeouts = {1L, 5L, 10L}; - shutDownGroup.schedule(new Runnable() { - @Override - public void run() { - reconnectCount++; - try { - System.err.println(System.currentTimeMillis() + " ** connecting... try:" + reconnectCount + " ++"); - connect(wsCallback, wsEventsUrl, wsEventsParamQuery); - } catch (RestException e) { - wsCallback.onFailure(e); - } - } - }, reconnectCount >= timeouts.length ? timeouts[timeouts.length - 1] : timeouts[reconnectCount], TimeUnit.SECONDS); - } - } -} diff --git a/classes/ch/loway/oss/ari4java/tools/http/NettyHttpClientHandler.java b/classes/ch/loway/oss/ari4java/tools/http/NettyHttpClientHandler.java deleted file mode 100644 index 7fb2a4e8..00000000 --- a/classes/ch/loway/oss/ari4java/tools/http/NettyHttpClientHandler.java +++ /dev/null @@ -1,61 +0,0 @@ -package ch.loway.oss.ari4java.tools.http; - -import io.netty.channel.ChannelHandler; -import io.netty.channel.ChannelHandlerContext; -import io.netty.channel.SimpleChannelInboundHandler; -import io.netty.handler.codec.http.FullHttpResponse; -import io.netty.handler.codec.http.HttpResponseStatus; -import java.nio.charset.Charset; - -/** - * HttpClientHandler handles the asynchronous response from the remote - * HTTP server. - * - * @author mwalton - * - */ - -@ChannelHandler.Sharable -public class NettyHttpClientHandler extends SimpleChannelInboundHandler { - protected String responseText; - protected HttpResponseStatus responseStatus; - - public void reset() { - responseText = null; - responseStatus = null; - } - - @Override - protected void channelRead0(ChannelHandlerContext ctx, Object msg) throws Exception { - //Channel ch = ctx.channel(); - if (msg instanceof FullHttpResponse) { - FullHttpResponse response = (FullHttpResponse) msg; - responseText = response.content().toString(Charset.defaultCharset()); - responseStatus = response.getStatus(); - - //System.out.println( "S:" + responseStatus + " T:" + responseText); - - } else { - // TODO: what? - if ( msg != null ) { - System.out.println( "Unknown object:" + msg); - } - } - } - - public String getResponseText() { - return responseText; - } - - public HttpResponseStatus getResponseStatus() { - return responseStatus; - } - - @Override - public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception { - cause.printStackTrace(); - ctx.close(); - } - -} - diff --git a/classes/ch/loway/oss/ari4java/tools/http/NettyWSClientHandler.java b/classes/ch/loway/oss/ari4java/tools/http/NettyWSClientHandler.java deleted file mode 100644 index 5095bc0b..00000000 --- a/classes/ch/loway/oss/ari4java/tools/http/NettyWSClientHandler.java +++ /dev/null @@ -1,122 +0,0 @@ -package ch.loway.oss.ari4java.tools.http; - -import ch.loway.oss.ari4java.tools.HttpResponseHandler; -import ch.loway.oss.ari4java.tools.WsClientAutoReconnect; -import io.netty.channel.Channel; -import io.netty.channel.ChannelFuture; -import io.netty.channel.ChannelHandler; -import io.netty.channel.ChannelHandlerContext; -import io.netty.channel.ChannelPromise; -import io.netty.handler.codec.http.FullHttpResponse; -import io.netty.handler.codec.http.websocketx.*; -import io.netty.util.CharsetUtil; - -/** - * NettyWSClientHandler handles the transactions with the remote - * WebSocket, forwarding to the client HttpResponseHandler interface. - * - * @author mwalton - * - */ -@ChannelHandler.Sharable -public class NettyWSClientHandler extends NettyHttpClientHandler { - - final WebSocketClientHandshaker handshaker; - private ChannelPromise handshakeFuture; - final HttpResponseHandler wsCallback; - private WsClientAutoReconnect wsClient = null; - private boolean shuttingDown = false; - - public NettyWSClientHandler(WebSocketClientHandshaker handshaker, HttpResponseHandler wsCallback, WsClientAutoReconnect wsClient) { - this(handshaker, wsCallback); - this.wsClient = wsClient; - } - - public NettyWSClientHandler(WebSocketClientHandshaker handshaker, HttpResponseHandler wsCallback) { - this.handshaker = handshaker; - this.wsCallback = wsCallback; - } - - public ChannelFuture handshakeFuture() { - return handshakeFuture; - } - - @Override - public void handlerAdded(ChannelHandlerContext ctx) throws Exception { - handshakeFuture = ctx.newPromise(); - } - - @Override - public void channelActive(ChannelHandlerContext ctx) throws Exception { - handshaker.handshake(ctx.channel()); - } - - @Override - public void channelInactive(ChannelHandlerContext ctx) throws Exception { - if (!shuttingDown) { - if (this.wsClient != null) { - wsClient.reconnectWs(); - } else { - wsCallback.onDisconnect(); - } - } - } - - @Override - protected void channelRead0(ChannelHandlerContext ctx, Object msg) throws Exception { - Channel ch = ctx.channel(); - - if (!handshaker.isHandshakeComplete()) { - handshaker.finishHandshake(ch, (FullHttpResponse) msg); - handshakeFuture.setSuccess(); - wsCallback.onChReadyToWrite(); - return; - } - - if (msg instanceof FullHttpResponse) { - FullHttpResponse response = (FullHttpResponse) msg; - String error = "Unexpected FullHttpResponse (getStatus=" + response.getStatus() + ", content=" + response.content().toString(CharsetUtil.UTF_8) + ')'; - System.err.println(error); - throw new Exception(error); - } - - // call this so we can set the last received time - wsCallback.onResponseReceived(); - - WebSocketFrame frame = (WebSocketFrame) msg; - if (frame instanceof TextWebSocketFrame) { - TextWebSocketFrame textFrame = (TextWebSocketFrame) frame; - responseText = textFrame.text(); - wsCallback.onSuccess(textFrame.text()); - } else if (frame instanceof CloseWebSocketFrame) { - ch.close(); - if (!shuttingDown) { - if (this.wsClient != null) { - wsClient.reconnectWs(); - } else { - wsCallback.onDisconnect(); - } - } - } - - } - - @Override - public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception { - cause.printStackTrace(); - if (!handshakeFuture.isDone()) { - handshakeFuture.setFailure(cause); - } - ctx.close(); - wsCallback.onFailure(cause); - } - - public boolean isShuttingDown() { - return shuttingDown; - } - - public void setShuttingDown(boolean shuttingDown) { - this.shuttingDown = shuttingDown; - } -} - diff --git a/codegen-data/ari_0_0_1/README.md b/codegen-data/ari_0_0_1/README.md deleted file mode 100644 index bf909c7e..00000000 --- a/codegen-data/ari_0_0_1/README.md +++ /dev/null @@ -1 +0,0 @@ -Snapshot taken from Asterisk 12 beta 2 - November 25, 2013 diff --git a/codegen-data/ari_0_0_1/applications.json b/codegen-data/ari_0_0_1/applications.json deleted file mode 100644 index 4eaec41a..00000000 --- a/codegen-data/ari_0_0_1/applications.json +++ /dev/null @@ -1,172 +0,0 @@ -{ - "_copyright": "Copyright (C) 2013, Digium, Inc.", - "_author": "David M. Lee, II ", - "_svn_revision": "$Revision: 403134 $", - "apiVersion": "0.0.1", - "swaggerVersion": "1.1", - "basePath": "http://localhost:8088/stasis", - "resourcePath": "/api-docs/applications.{format}", - "apis": [ - { - "path": "/applications", - "description": "Stasis applications", - "operations": [ - { - "httpMethod": "GET", - "summary": "List all applications.", - "nickname": "list", - "responseClass": "List[Application]" - } - ] - }, - { - "path": "/applications/{applicationName}", - "description": "Stasis application", - "operations": [ - { - "httpMethod": "GET", - "summary": "Get details of an application.", - "nickname": "get", - "responseClass": "Application", - "parameters": [ - { - "name": "applicationName", - "description": "Application's name", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Application does not exist." - } - ] - } - ] - }, - { - "path": "/applications/{applicationName}/subscription", - "description": "Stasis application", - "operations": [ - { - "httpMethod": "POST", - "summary": "Subscribe an application to a event source.", - "notes": "Returns the state of the application after the subscriptions have changed", - "nickname": "subscribe", - "responseClass": "Application", - "parameters": [ - { - "name": "applicationName", - "description": "Application's name", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "eventSource", - "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}/{resource}, deviceState:{deviceName}", - "paramType": "query", - "required": true, - "allowMultiple": true, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Missing parameter." - }, - { - "code": 404, - "reason": "Application does not exist." - }, - { - "code": 422, - "reason": "Event source does not exist." - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Unsubscribe an application from an event source.", - "notes": "Returns the state of the application after the subscriptions have changed", - "nickname": "unsubscribe", - "responseClass": "Application", - "parameters": [ - { - "name": "applicationName", - "description": "Application's name", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "eventSource", - "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}/{resource}, device_state:{deviceName}", - "paramType": "query", - "required": true, - "allowMultiple": true, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Missing parameter; event source scheme not recognized." - }, - { - "code": 404, - "reason": "Application does not exist." - }, - { - "code": 409, - "reason": "Application not subscribed to event source." - }, - { - "code": 422, - "reason": "Event source does not exist." - } - ] - } - ] - } - ], - "models": { - "Application": { - "id": "Application", - "description": "Details of a Stasis application", - "properties": { - "name": { - "type": "string", - "description": "Name of this application", - "required": true - }, - "channel_ids": { - "type": "List[string]", - "description": "Id's for channels subscribed to.", - "required": true - }, - "bridge_ids": { - "type": "List[string]", - "description": "Id's for bridges subscribed to.", - "required": true - }, - "endpoint_ids": { - "type": "List[string]", - "description": "{tech}/{resource} for endpoints subscribed to.", - "required": true - }, - "device_names": { - "type": "List[string]", - "description": "Names of the devices subscribed to.", - "required": true - } - } - } - } -} diff --git a/codegen-data/ari_0_0_1/asterisk.json b/codegen-data/ari_0_0_1/asterisk.json deleted file mode 100644 index 59e9ad76..00000000 --- a/codegen-data/ari_0_0_1/asterisk.json +++ /dev/null @@ -1,259 +0,0 @@ -{ - "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", - "_author": "David M. Lee, II ", - "_svn_revision": "$Revision: 402528 $", - "apiVersion": "0.0.1", - "swaggerVersion": "1.1", - "basePath": "http://localhost:8088/stasis", - "resourcePath": "/api-docs/asterisk.{format}", - "apis": [ - { - "path": "/asterisk/info", - "description": "Asterisk system information (similar to core show settings)", - "operations": [ - { - "httpMethod": "GET", - "summary": "Gets Asterisk system information.", - "nickname": "getInfo", - "responseClass": "AsteriskInfo", - "parameters": [ - { - "name": "only", - "description": "Filter information returned", - "paramType": "query", - "required": false, - "allowMultiple": true, - "dataType": "string", - "allowableValues": { - "valueType": "LIST", - "values": [ - "build", - "system", - "config", - "status" - ] - } - } - ] - } - ] - }, - { - "path": "/asterisk/variable", - "description": "Global variables", - "operations": [ - { - "httpMethod": "GET", - "summary": "Get the value of a global variable.", - "nickname": "getGlobalVar", - "responseClass": "Variable", - "parameters": [ - { - "name": "variable", - "description": "The variable to get", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Missing variable parameter." - } - ] - }, - { - "httpMethod": "POST", - "summary": "Set the value of a global variable.", - "nickname": "setGlobalVar", - "responseClass": "void", - "parameters": [ - { - "name": "variable", - "description": "The variable to set", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "value", - "description": "The value to set the variable to", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Missing variable parameter." - } - ] - } - ] - } - ], - "models": { - "BuildInfo": { - "id": "BuildInfo", - "description": "Info about how Asterisk was built", - "properties": { - "os": { - "required": true, - "type": "string", - "description": "OS Asterisk was built on." - }, - "kernel": { - "required": true, - "type": "string", - "description": "Kernel version Asterisk was built on." - }, - "options": { - "required": true, - "type": "string", - "description": "Compile time options, or empty string if default." - }, - "machine": { - "required": true, - "type": "string", - "description": "Machine architecture (x86_64, i686, ppc, etc.)" - }, - "date": { - "required": true, - "type": "string", - "description": "Date and time when Asterisk was built." - }, - "user": { - "required": true, - "type": "string", - "description": "Username that build Asterisk" - } - } - }, - "SystemInfo": { - "id": "SystemInfo", - "description": "Info about Asterisk", - "properties": { - "version": { - "required": true, - "type": "string", - "description": "Asterisk version." - }, - "entity_id": { - "required": true, - "type": "string", - "description": "" - } - } - }, - "SetId": { - "id": "SetId", - "description": "Effective user/group id", - "properties": { - "user": { - "required": true, - "type": "string", - "description": "Effective user id." - }, - "group": { - "required": true, - "type": "string", - "description": "Effective group id." - } - } - }, - "ConfigInfo": { - "id": "ConfigInfo", - "description": "Info about Asterisk configuration", - "properties": { - "name": { - "required": true, - "type": "string", - "description": "Asterisk system name." - }, - "default_language": { - "required": true, - "type": "string", - "description": "Default language for media playback." - }, - "max_channels": { - "required": false, - "type": "int", - "description": "Maximum number of simultaneous channels." - }, - "max_open_files": { - "required": false, - "type": "int", - "description": "Maximum number of open file handles (files, sockets)." - }, - "max_load": { - "required": false, - "type": "double", - "description": "Maximum load avg on system." - }, - "setid": { - "required": true, - "type": "SetId", - "description": "Effective user/group id for running Asterisk." - } - } - }, - "StatusInfo": { - "id": "StatusInfo", - "description": "Info about Asterisk status", - "properties": { - "startup_time": { - "required": true, - "type": "Date", - "description": "Time when Asterisk was started." - }, - "last_reload_time": { - "required": true, - "type": "Date", - "description": "Time when Asterisk was last reloaded." - } - } - }, - "AsteriskInfo": { - "id": "AsteriskInfo", - "description": "Asterisk system information", - "properties": { - "build": { - "required": false, - "type": "BuildInfo", - "description": "Info about how Asterisk was built" - }, - "system": { - "required": false, - "type": "SystemInfo", - "description": "Info about the system running Asterisk" - }, - "config": { - "required": false, - "type": "ConfigInfo", - "description": "Info about Asterisk configuration" - }, - "status": { - "required": false, - "type": "StatusInfo", - "description": "Info about Asterisk status" - } - } - }, - "Variable": { - "id": "Variable", - "description": "The value of a channel variable", - "properties": { - "value": { - "required": true, - "type": "string", - "description": "The value of the variable requested" - } - } - } - } -} diff --git a/codegen-data/ari_0_0_1/bridges.json b/codegen-data/ari_0_0_1/bridges.json deleted file mode 100644 index 6636aa93..00000000 --- a/codegen-data/ari_0_0_1/bridges.json +++ /dev/null @@ -1,513 +0,0 @@ -{ - "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", - "_author": "David M. Lee, II ", - "_svn_revision": "$Revision: 402528 $", - "apiVersion": "0.0.1", - "swaggerVersion": "1.1", - "basePath": "http://localhost:8088/stasis", - "resourcePath": "/api-docs/bridges.{format}", - "apis": [ - { - "path": "/bridges", - "description": "Active bridges", - "operations": [ - { - "httpMethod": "GET", - "summary": "List all active bridges in Asterisk.", - "nickname": "list", - "responseClass": "List[Bridge]" - }, - { - "httpMethod": "POST", - "summary": "Create a new bridge.", - "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", - "nickname": "create", - "responseClass": "Bridge", - "parameters": [ - { - "name": "type", - "description": "Type of bridge to create.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string", - "allowableValues": { - "valueType": "LIST", - "values": [ - "mixing", - "holding" - ] - } - } - ] - } - ] - }, - { - "path": "/bridges/{bridgeId}", - "description": "Individual bridge", - "operations": [ - { - "httpMethod": "GET", - "summary": "Get bridge details.", - "nickname": "get", - "responseClass": "Bridge", - "parameters": [ - { - "name": "bridgeId", - "description": "Bridge's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Bridge not found" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Shut down a bridge.", - "notes": "If any channels are in this bridge, they will be removed and resume whatever they were doing beforehand.", - "nickname": "destroy", - "responseClass": "void", - "parameters": [ - { - "name": "bridgeId", - "description": "Bridge's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Bridge not found" - } - ] - } - ] - }, - { - "path": "/bridges/{bridgeId}/addChannel", - "description": "Add a channel to a bridge", - "operations": [ - { - "httpMethod": "POST", - "summary": "Add a channel to a bridge.", - "nickname": "addChannel", - "responseClass": "void", - "parameters": [ - { - "name": "bridgeId", - "description": "Bridge's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "channel", - "description": "Ids of channels to add to bridge", - "paramType": "query", - "required": true, - "allowMultiple": true, - "dataType": "string" - }, - { - "name": "role", - "description": "Channel's role in the bridge", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Channel not found" - }, - { - "code": 404, - "reason": "Bridge not found" - }, - { - "code": 409, - "reason": "Bridge not in Stasis application" - }, - { - "code": 422, - "reason": "Channel not in Stasis application" - } - ] - } - ] - }, - { - "path": "/bridges/{bridgeId}/removeChannel", - "description": "Remove a channel from a bridge", - "operations": [ - { - "httpMethod": "POST", - "summary": "Remove a channel from a bridge.", - "nickname": "removeChannel", - "responseClass": "void", - "parameters": [ - { - "name": "bridgeId", - "description": "Bridge's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "channel", - "description": "Ids of channels to remove from bridge", - "paramType": "query", - "required": true, - "allowMultiple": true, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Channel not found" - }, - { - "code": 404, - "reason": "Bridge not found" - }, - { - "code": 409, - "reason": "Bridge not in Stasis application" - }, - { - "code": 422, - "reason": "Channel not in this bridge" - } - ] - } - ] - }, - { - "path": "/bridges/{bridgeId}/moh", - "description": "Play music on hold to a bridge", - "operations": [ - { - "httpMethod": "POST", - "summary": "Play music on hold to a bridge or change the MOH class that is playing.", - "nickname": "startMoh", - "responseClass": "void", - "parameters": [ - { - "name": "bridgeId", - "description": "Bridge's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "mohClass", - "description": "Channel's id", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Bridge not found" - }, - { - "code": 409, - "reason": "Bridge not in Stasis application" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Stop playing music on hold to a bridge.", - "notes": "This will only stop music on hold being played via POST bridges/{bridgeId}/moh.", - "nickname": "stopMoh", - "responseClass": "void", - "parameters": [ - { - "name": "bridgeId", - "description": "Bridge's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Bridge not found" - }, - { - "code": 409, - "reason": "Bridge not in Stasis application" - } - ] - } - ] - }, - { - "path": "/bridges/{bridgeId}/play", - "description": "Play media to the participants of a bridge", - "operations": [ - { - "httpMethod": "POST", - "summary": "Start playback of media on a bridge.", - "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.)", - "nickname": "play", - "responseClass": "Playback", - "parameters": [ - { - "name": "bridgeId", - "description": "Bridge's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "media", - "description": "Media's URI to play.", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "lang", - "description": "For sounds, selects language for sound.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "offsetms", - "description": "Number of media to skip before playing.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 0, - "allowableValues": { - "valueType": "RANGE", - "min": 0 - } - - }, - { - "name": "skipms", - "description": "Number of milliseconds to skip for forward/reverse operations.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 3000, - "allowableValues": { - "valueType": "RANGE", - "min": 0 - } - - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Bridge not found" - }, - { - "code": 409, - "reason": "Bridge not in a Stasis application" - } - ] - } - ] - }, - { - "path": "/bridges/{bridgeId}/record", - "description": "Record audio on a bridge", - "operations": [ - { - "httpMethod": "POST", - "summary": "Start a recording.", - "notes": "This records the mixed audio from all channels participating in this bridge.", - "nickname": "record", - "responseClass": "LiveRecording", - "parameters": [ - { - "name": "bridgeId", - "description": "Bridge's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "name", - "description": "Recording's filename", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "format", - "description": "Format to encode audio in", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "maxDurationSeconds", - "description": "Maximum duration of the recording, in seconds. 0 for no limit.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 0, - "allowableValues": { - "valueType": "RANGE", - "min": 0 - } - }, - { - "name": "maxSilenceSeconds", - "description": "Maximum duration of silence, in seconds. 0 for no limit.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 0, - "allowableValues": { - "valueType": "RANGE", - "min": 0 - } - }, - { - "name": "ifExists", - "description": "Action to take if a recording with the same name already exists.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string", - "defaultValue": "fail", - "allowableValues": { - "valueType": "LIST", - "values": [ - "fail", - "overwrite", - "append" - ] - } - }, - { - "name": "beep", - "description": "Play beep when recording begins", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "boolean", - "defaultValue": false - }, - { - "name": "terminateOn", - "description": "DTMF input to terminate recording.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string", - "defaultValue": "none", - "allowableValues": { - "valueType": "LIST", - "values": [ - "none", - "any", - "*", - "#" - ] - } - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Invalid parameters" - }, - { - "code": 404, - "reason": "Bridge not found" - }, - { - "code": 409, - "reason": "Bridge is not in a Stasis application; A recording with the same name already exists on the system and can not be overwritten because it is in progress or ifExists=fail" - }, - { - "code": 422, - "reason": "The format specified is unknown on this system" - } - ] - } - ] - } - ], - "models": { - "Bridge": { - "id": "Bridge", - "description": "The merging of media from one or more channels.\n\nEveryone on the bridge receives the same audio.", - "properties": { - "id": { - "type": "string", - "description": "Unique identifier for this bridge", - "required": true - }, - "technology": { - "type": "string", - "description": "Name of the current bridging technology", - "required": true - }, - "bridge_type": { - "type": "string", - "description": "Type of bridge technology", - "required": true, - "allowableValues": { - "valueType": "LIST", - "values": [ - "mixing", - "holding" - ] - } - }, - "bridge_class": { - "type": "string", - "description": "Bridging class", - "required": true - }, - "channels": { - "type": "List[string]", - "description": "Ids of channels participating in this bridge", - "required": true - } - } - } - } -} diff --git a/codegen-data/ari_0_0_1/channels.json b/codegen-data/ari_0_0_1/channels.json deleted file mode 100644 index 97e6b103..00000000 --- a/codegen-data/ari_0_0_1/channels.json +++ /dev/null @@ -1,1144 +0,0 @@ -{ - "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", - "_author": "David M. Lee, II ", - "_svn_revision": "$Revision: 403117 $", - "apiVersion": "0.0.1", - "swaggerVersion": "1.1", - "basePath": "http://localhost:8088/stasis", - "resourcePath": "/api-docs/channels.{format}", - "apis": [ - { - "path": "/channels", - "description": "Active channels", - "operations": [ - { - "httpMethod": "GET", - "summary": "List all active channels in Asterisk.", - "nickname": "list", - "responseClass": "List[Channel]" - }, - { - "httpMethod": "POST", - "summary": "Create a new channel (originate).", - "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.", - "nickname": "originate", - "responseClass": "Channel", - "parameters": [ - { - "name": "endpoint", - "description": "Endpoint to call.", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "extension", - "description": "The extension to dial after the endpoint answers", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "context", - "description": "The context to dial after the endpoint answers. If omitted, uses 'default'", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "priority", - "description": "The priority to dial after the endpoint answers. If omitted, uses 1", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "long" - }, - { - "name": "app", - "description": "The application that is subscribed to the originated channel, and passed to the Stasis application.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "appArgs", - "description": "The application arguments to pass to the Stasis application.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "callerId", - "description": "CallerID to use when dialing the endpoint or extension.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "timeout", - "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 30 - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Invalid parameters for originating a channel." - } - ] - } - ] - }, - { - "path": "/channels/{channelId}", - "description": "Active channel", - "operations": [ - { - "httpMethod": "GET", - "summary": "Channel details.", - "nickname": "get", - "responseClass": "Channel", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Delete (i.e. hangup) a channel.", - "nickname": "hangup", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "reason", - "description": "Reason for hanging up the channel", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string", - "defalutValue": "normal", - "allowableValues": { - "valueType": "LIST", - "values": [ - "normal", - "busy", - "congestion" - ] - } - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Invalid reason for hangup provided" - }, - { - "code": 404, - "reason": "Channel not found" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/continue", - "description": "Exit application; continue execution in the dialplan", - "operations": [ - { - "httpMethod": "POST", - "summary": "Exit application; continue execution in the dialplan.", - "nickname": "continueInDialplan", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "context", - "description": "The context to continue to.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "extension", - "description": "The extension to continue to.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "priority", - "description": "The priority to continue to.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/answer", - "description": "Answer a channel", - "operations": [ - { - "httpMethod": "POST", - "summary": "Answer a channel.", - "nickname": "answer", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/ring", - "description": "Send a ringing indication to a channel", - "operations": [ - { - "httpMethod": "POST", - "summary": "Indicate ringing to a channel.", - "nickname": "ring", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Stop ringing indication on a channel if locally generated.", - "nickname": "ringStop", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/dtmf", - "description": "Send DTMF to a channel", - "operations": [ - { - "httpMethod": "POST", - "summary": "Send provided DTMF to a given channel.", - "nickname": "sendDTMF", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "dtmf", - "description": "DTMF To send.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "before", - "description": "Amount of time to wait before DTMF digits (specified in milliseconds) start.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 0 - }, - { - "name": "between", - "description": "Amount of time in between DTMF digits (specified in milliseconds).", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 100 - }, - { - "name": "duration", - "description": "Length of each DTMF digit (specified in milliseconds).", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 100 - }, - { - "name": "after", - "description": "Amount of time to wait after DTMF digits (specified in milliseconds) end.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 0 - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "DTMF is required" - }, - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/mute", - "description": "Mute a channel", - "operations": [ - { - "httpMethod": "POST", - "summary": "Mute a channel.", - "nickname": "mute", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "direction", - "description": "Direction in which to mute audio", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string", - "defaultValue": "both", - "allowableValues": { - "valueType": "LIST", - "values": [ - "both", - "in", - "out" - ] - } - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Unmute a channel.", - "nickname": "unmute", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "direction", - "description": "Direction in which to unmute audio", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string", - "defaultValue": "both", - "allowableValues": { - "valueType": "LIST", - "values": [ - "both", - "in", - "out" - ] - } - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/hold", - "description": "Put a channel on hold", - "operations": [ - { - "httpMethod": "POST", - "summary": "Hold a channel.", - "nickname": "hold", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Remove a channel from hold.", - "nickname": "unhold", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/moh", - "description": "Play music on hold to a channel", - "operations": [ - { - "httpMethod": "POST", - "summary": "Play music on hold to a channel.", - "notes": "Using media operations such as /play on a channel playing MOH in this manner will suspend MOH without resuming automatically. If continuing music on hold is desired, the stasis application must reinitiate music on hold.", - "nickname": "startMoh", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "mohClass", - "description": "Music on hold class to use", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Stop playing music on hold to a channel.", - "nickname": "stopMoh", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/silence", - "description": "Play silence to a channel", - "operations": [ - { - "httpMethod": "POST", - "summary": "Play silence to a channel.", - "notes": "Using media operations such as /play on a channel playing silence in this manner will suspend silence without resuming automatically.", - "nickname": "startSilence", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Stop playing silence to a channel.", - "nickname": "stopSilence", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/play", - "description": "Play media to a channel", - "operations": [ - { - "httpMethod": "POST", - "summary": "Start playback of media.", - "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.)", - "nickname": "play", - "responseClass": "Playback", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "media", - "description": "Media's URI to play.", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "lang", - "description": "For sounds, selects language for sound.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "offsetms", - "description": "Number of media to skip before playing.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int" - }, - { - "name": "skipms", - "description": "Number of milliseconds to skip for forward/reverse operations.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 3000 - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/record", - "description": "Record audio from a channel", - "operations": [ - { - "httpMethod": "POST", - "summary": "Start a recording.", - "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.", - "nickname": "record", - "responseClass": "LiveRecording", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "name", - "description": "Recording's filename", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "format", - "description": "Format to encode audio in", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "maxDurationSeconds", - "description": "Maximum duration of the recording, in seconds. 0 for no limit", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 0, - "allowableValues": { - "valueType": "RANGE", - "min": 0 - } - }, - { - "name": "maxSilenceSeconds", - "description": "Maximum duration of silence, in seconds. 0 for no limit", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 0, - "allowableValues": { - "valueType": "RANGE", - "min": 0 - } - }, - { - "name": "ifExists", - "description": "Action to take if a recording with the same name already exists.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string", - "defaultValue": "fail", - "allowableValues": { - "valueType": "LIST", - "values": [ - "fail", - "overwrite", - "append" - ] - } - }, - { - "name": "beep", - "description": "Play beep when recording begins", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "boolean", - "defaultValue": false - }, - { - "name": "terminateOn", - "description": "DTMF input to terminate recording", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string", - "defaultValue": "none", - "allowableValues": { - "valueType": "LIST", - "values": [ - "none", - "any", - "*", - "#" - ] - } - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Invalid parameters" - }, - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "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" - }, - { - "code": 422, - "reason": "The format specified is unknown on this system" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/variable", - "description": "Variables on a channel", - "operations": [ - { - "httpMethod": "GET", - "summary": "Get the value of a channel variable or function.", - "nickname": "getChannelVar", - "responseClass": "Variable", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "variable", - "description": "The channel variable or function to get", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Missing variable parameter." - }, - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - }, - { - "httpMethod": "POST", - "summary": "Set the value of a channel variable or function.", - "nickname": "setChannelVar", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "variable", - "description": "The channel variable or function to set", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "value", - "description": "The value to set the variable to", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Missing variable parameter." - }, - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/snoop", - "description": "Snoop (spy/whisper) on a channel", - "operations": [ - { - "httpMethod": "POST", - "summary": "Start snooping.", - "notes": "Snoop (spy/whisper) on a specific channel.", - "nickname": "snoopChannel", - "responseClass": "Channel", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "spy", - "description": "Direction of audio to spy on", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string", - "defaultValue": "none", - "allowableValues": { - "valueType": "LIST", - "values": [ - "none", - "both", - "out", - "in" - ] - } - }, - { - "name": "whisper", - "description": "Direction of audio to whisper into", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string", - "defaultValue": "none", - "allowableValues": { - "valueType": "LIST", - "values": [ - "none", - "both", - "out", - "in" - ] - } - }, - { - "name": "app", - "description": "Application the snooping channel is placed into", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "appArgs", - "description": "The application arguments to pass to the Stasis application", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Invalid parameters" - }, - { - "code": 404, - "reason": "Channel not found" - } - ] - } - ] - } - ], - "models": { - "Dialed": { - "id": "Dialed", - "description": "Dialed channel information.", - "properties": {} - }, - "DialplanCEP": { - "id": "DialplanCEP", - "description": "Dialplan location (context/extension/priority)", - "properties": { - "context": { - "required": true, - "type": "string", - "description": "Context in the dialplan" - }, - "exten": { - "required": true, - "type": "string", - "description": "Extension in the dialplan" - }, - "priority": { - "required": true, - "type": "long", - "description": "Priority in the dialplan" - } - } - }, - "CallerID": { - "id": "CallerID", - "description": "Caller identification", - "properties": { - "name": { - "required": true, - "type": "string" - }, - "number": { - "required": true, - "type": "string" - } - } - }, - "Channel": { - "id": "Channel", - "description": "A specific communication connection between Asterisk and an Endpoint.", - "properties": { - "id": { - "required": true, - "type": "string", - "description": "Unique identifier of the channel.\n\nThis is the same as the Uniqueid field in AMI." - }, - "name": { - "required": true, - "type": "string", - "description": "Name of the channel (i.e. SIP/foo-0000a7e3)" - }, - "state": { - "required": true, - "type": "string", - "allowableValues": { - "valueType": "LIST", - "values": [ - "Down", - "Rsrved", - "OffHook", - "Dialing", - "Ring", - "Ringing", - "Up", - "Busy", - "Dialing Offhook", - "Pre-ring", - "Unknown" - ] - } - }, - "caller": { - "required": true, - "type": "CallerID" - }, - "connected": { - "required": true, - "type": "CallerID" - }, - "accountcode": { - "required": true, - "type": "string" - }, - "dialplan": { - "required": true, - "type": "DialplanCEP", - "description": "Current location in the dialplan" - }, - "creationtime": { - "required": true, - "type": "Date", - "description": "Timestamp when channel was created" - } - } - } - } -} diff --git a/codegen-data/ari_0_0_1/deviceStates.json b/codegen-data/ari_0_0_1/deviceStates.json deleted file mode 100644 index 5d88ebf2..00000000 --- a/codegen-data/ari_0_0_1/deviceStates.json +++ /dev/null @@ -1,151 +0,0 @@ -{ - "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", - "_author": "Kevin Harwell ", - "_svn_revision": "$Revision: 403134 $", - "apiVersion": "0.0.1", - "swaggerVersion": "1.1", - "basePath": "http://localhost:8088/stasis", - "resourcePath": "/api-docs/deviceStates.{format}", - "apis": [ - { - "path": "/deviceStates", - "description": "Device states", - "operations": [ - { - "httpMethod": "GET", - "summary": "List all ARI controlled device states.", - "nickname": "list", - "responseClass": "List[DeviceState]" - } - ] - }, - { - "path": "/deviceStates/{deviceName}", - "description": "Device state", - "operations": [ - { - "httpMethod": "GET", - "summary": "Retrieve the current state of a device.", - "nickname": "get", - "responseClass": "DeviceState", - "parameters": [ - { - "name": "deviceName", - "description": "Name of the device", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ] - }, - { - "httpMethod": "PUT", - "summary": "Change the state of a device controlled by ARI. (Note - implicitly creates the device state).", - "nickname": "update", - "responseClass": "void", - "parameters": [ - { - "name": "deviceName", - "description": "Name of the device", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "deviceState", - "description": "Device state value", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string", - "allowableValues": { - "valueType": "LIST", - "values": [ - "NOT_INUSE", - "INUSE", - "BUSY", - "INVALID", - "UNAVAILABLE", - "RINGING", - "RINGINUSE", - "ONHOLD" - ] - } - - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Device name is missing" - }, - { - "code": 409, - "reason": "Uncontrolled device specified" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Destroy a device-state controlled by ARI.", - "nickname": "delete", - "responseClass": "void", - "parameters": [ - { - "name": "deviceName", - "description": "Name of the device", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Device name is missing" - }, - { - "code": 409, - "reason": "Uncontrolled device specified" - } - ] - } - ] - } - ], - "models": { - "DeviceState": { - "id": "DeviceState", - "description": "Represents the state of a device.", - "properties": { - "name": { - "type": "string", - "description": "Name of the device.", - "required": true - }, - "state": { - "type": "string", - "description": "Device's state", - "required": true, - "allowableValues": { - "valueType": "LIST", - "values": [ - "UNKNOWN", - "NOT_INUSE", - "INUSE", - "BUSY", - "INVALID", - "UNAVAILABLE", - "RINGING", - "RINGINUSE", - "ONHOLD" - ] - } - } - } - } - } -} diff --git a/codegen-data/ari_0_0_1/endpoints.json b/codegen-data/ari_0_0_1/endpoints.json deleted file mode 100644 index a5385276..00000000 --- a/codegen-data/ari_0_0_1/endpoints.json +++ /dev/null @@ -1,117 +0,0 @@ -{ - "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", - "_author": "David M. Lee, II ", - "_svn_revision": "$Revision: 402787 $", - "apiVersion": "0.0.1", - "swaggerVersion": "1.1", - "basePath": "http://localhost:8088/stasis", - "resourcePath": "/api-docs/endpoints.{format}", - "apis": [ - { - "path": "/endpoints", - "description": "Asterisk endpoints", - "operations": [ - { - "httpMethod": "GET", - "summary": "List all endpoints.", - "nickname": "list", - "responseClass": "List[Endpoint]" - } - ] - }, - { - "path": "/endpoints/{tech}", - "description": "Asterisk endpoints", - "operations": [ - { - "httpMethod": "GET", - "summary": "List available endoints for a given endpoint technology.", - "nickname": "listByTech", - "responseClass": "List[Endpoint]", - "parameters": [ - { - "name": "tech", - "description": "Technology of the endpoints (sip,iax2,...)", - "paramType": "path", - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Endpoints not found" - } - ] - } - ] - }, - { - "path": "/endpoints/{tech}/{resource}", - "description": "Single endpoint", - "operations": [ - { - "httpMethod": "GET", - "summary": "Details for an endpoint.", - "nickname": "get", - "responseClass": "Endpoint", - "parameters": [ - { - "name": "tech", - "description": "Technology of the endpoint", - "paramType": "path", - "dataType": "string" - }, - { - "name": "resource", - "description": "ID of the endpoint", - "paramType": "path", - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Endpoints not found" - } - ] - } - ] - } - ], - "models": { - "Endpoint": { - "id": "Endpoint", - "description": "An external device that may offer/accept calls to/from Asterisk.\n\nUnlike most resources, which have a single unique identifier, an endpoint is uniquely identified by the technology/resource pair.", - "properties": { - "technology": { - "type": "string", - "description": "Technology of the endpoint", - "required": true - }, - "resource": { - "type": "string", - "description": "Identifier of the endpoint, specific to the given technology.", - "required": true - }, - "state": { - "type": "string", - "description": "Endpoint's state", - "required": false, - "allowableValues": { - "valueType": "LIST", - "values": [ - "unknown", - "offline", - "online" - ] - } - }, - "channel_ids": { - "type": "List[string]", - "description": "Id's of channels associated with this endpoint", - "required": true - } - } - } - } -} diff --git a/codegen-data/ari_0_0_1/events.json b/codegen-data/ari_0_0_1/events.json deleted file mode 100644 index d92209d8..00000000 --- a/codegen-data/ari_0_0_1/events.json +++ /dev/null @@ -1,437 +0,0 @@ -{ - "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", - "_author": "David M. Lee, II ", - "_svn_revision": "$Revision: 403134 $", - "apiVersion": "0.0.1", - "swaggerVersion": "1.2", - "basePath": "http://localhost:8088/stasis", - "resourcePath": "/api-docs/events.{format}", - "apis": [ - { - "path": "/events", - "description": "Events from Asterisk to applications", - "operations": [ - { - "httpMethod": "GET", - "upgrade": "websocket", - "websocketProtocol": "ari", - "summary": "WebSocket connection for events.", - "nickname": "eventWebsocket", - "responseClass": "Message", - "parameters": [ - { - "name": "app", - "description": "Applications to subscribe to.", - "paramType": "query", - "required": true, - "allowMultiple": true, - "dataType": "string" - } - ] - } - ] - } - ], - "models": { - "Message": { - "id": "Message", - "description": "Base type for errors and events", - "discriminator": "type", - "properties": { - "type": { - "type": "string", - "required": true, - "description": "Indicates the type of this message." - } - }, - "subTypes": [ - "MissingParams", - "Event" - ] - }, - "MissingParams": { - "id": "MissingParams", - "description": "Error event sent when required params are missing.", - "properties": { - "params": { - "required": true, - "type": "List[string]", - "description": "A list of the missing parameters" - } - } - }, - "Event": { - "id": "Event", - "description": "Base type for asynchronous events from Asterisk.", - "properties": { - "application": { - "type": "string", - "description": "Name of the application receiving the event.", - "required": true - }, - "timestamp": { - "type": "Date", - "description": "Time at which this event was created.", - "required": false - } - }, - "subTypes": [ - "DeviceStateChanged", - "PlaybackStarted", - "PlaybackFinished", - "ApplicationReplaced", - "BridgeCreated", - "BridgeDestroyed", - "BridgeMerged", - "ChannelCreated", - "ChannelDestroyed", - "ChannelEnteredBridge", - "ChannelLeftBridge", - "ChannelStateChange", - "ChannelDtmfReceived", - "ChannelDialplan", - "ChannelCallerId", - "ChannelUserevent", - "ChannelHangupRequest", - "ChannelVarset", - "EndpointStateChange", - "StasisEnd", - "StasisStart" - ] - }, - "DeviceStateChanged": { - "id": "DeviceStateChanged", - "description": "Notification that a device state has changed.", - "properties": { - "device_state": { - "type": "DeviceState", - "description": "Device state object", - "required": true - } - } - }, - "PlaybackStarted": { - "id": "PlaybackStarted", - "description": "Event showing the start of a media playback operation.", - "properties": { - "playback": { - "type": "Playback", - "description": "Playback control object", - "required": true - } - } - }, - "PlaybackFinished": { - "id": "PlaybackFinished", - "description": "Event showing the completion of a media playback operation.", - "properties": { - "playback": { - "type": "Playback", - "description": "Playback control object", - "required": true - } - } - }, - "RecordingStarted": { - "id": "RecordingStarted", - "extends": "Event", - "description": "Event showing the start of a recording operation.", - "properties": { - "recording": { - "type": "LiveRecording", - "description": "Recording control object", - "required": true - } - } - }, - "RecordingFinished": { - "id": "RecordingFinished", - "extends": "Event", - "description": "Event showing the completion of a recording operation.", - "properties": { - "recording": { - "type": "LiveRecording", - "description": "Recording control object", - "required": true - } - } - }, - "RecordingFailed": { - "id": "RecordingFailed", - "extends": "Event", - "description": "Event showing failure of a recording operation.", - "properties": { - "recording": { - "type": "LiveRecording", - "description": "Recording control object", - "required": true - } - } - }, - "ApplicationReplaced": { - "id": "ApplicationReplaced", - "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.", - "properties": {} - }, - "BridgeCreated": { - "id": "BridgeCreated", - "description": "Notification that a bridge has been created.", - "properties": { - "bridge": { - "required": true, - "type": "Bridge" - } - } - }, - "BridgeDestroyed": { - "id": "BridgeDestroyed", - "description": "Notification that a bridge has been destroyed.", - "properties": { - "bridge": { - "required": true, - "type": "Bridge" - } - } - }, - "BridgeMerged": { - "id": "BridgeMerged", - "description": "Notification that one bridge has merged into another.", - "properties": { - "bridge": { - "required": true, - "type": "Bridge" - }, - "bridge_from": { - "required": true, - "type": "Bridge" - } - } - }, - "ChannelCreated": { - "id": "ChannelCreated", - "description": "Notification that a channel has been created.", - "properties": { - "channel": { - "required": true, - "type": "Channel" - } - } - }, - "ChannelDestroyed": { - "id": "ChannelDestroyed", - "description": "Notification that a channel has been destroyed.", - "properties": { - "cause": { - "required": true, - "description": "Integer representation of the cause of the hangup", - "type": "int" - }, - "cause_txt": { - "required": true, - "description": "Text representation of the cause of the hangup", - "type": "string" - }, - "channel": { - "required": true, - "type": "Channel" - } - } - }, - "ChannelEnteredBridge": { - "id": "ChannelEnteredBridge", - "description": "Notification that a channel has entered a bridge.", - "properties": { - "bridge": { - "required": true, - "type": "Bridge" - }, - "channel": { - "type": "Channel" - } - } - }, - "ChannelLeftBridge": { - "id": "ChannelLeftBridge", - "description": "Notification that a channel has left a bridge.", - "properties": { - "bridge": { - "required": true, - "type": "Bridge" - }, - "channel": { - "required": true, - "type": "Channel" - } - } - }, - "ChannelStateChange": { - "id": "ChannelStateChange", - "description": "Notification of a channel's state change.", - "properties": { - "channel": { - "required": true, - "type": "Channel" - } - } - }, - "ChannelDtmfReceived": { - "id": "ChannelDtmfReceived", - "description": "DTMF received on a channel.\n\nThis event is sent when the DTMF ends. There is no notification about the start of DTMF", - "properties": { - "digit": { - "required": true, - "type": "string", - "description": "DTMF digit received (0-9, A-E, # or *)" - }, - "duration_ms": { - "required": true, - "type": "int", - "description": "Number of milliseconds DTMF was received" - }, - "channel": { - "required": true, - "type": "Channel", - "description": "The channel on which DTMF was received" - } - } - }, - "ChannelDialplan": { - "id": "ChannelDialplan", - "description": "Channel changed location in the dialplan.", - "properties": { - "channel": { - "required": true, - "type": "Channel", - "description": "The channel that changed dialplan location." - }, - "dialplan_app": { - "required": true, - "type": "string", - "description": "The application about to be executed." - }, - "dialplan_app_data": { - "required": true, - "type": "string", - "description": "The data to be passed to the application." - } - } - }, - "ChannelCallerId": { - "id": "ChannelCallerId", - "description": "Channel changed Caller ID.", - "properties": { - "caller_presentation": { - "required": true, - "type": "int", - "description": "The integer representation of the Caller Presentation value." - }, - "caller_presentation_txt": { - "required": true, - "type": "string", - "description": "The text representation of the Caller Presentation value." - }, - "channel": { - "required": true, - "type": "Channel", - "description": "The channel that changed Caller ID." - } - } - }, - "ChannelUserevent": { - "id": "ChannelUserevent", - "description": "User-generated event with additional user-defined fields in the object.", - "properties": { - "eventname": { - "required": true, - "type": "string", - "description": "The name of the user event." - }, - "channel": { - "required": true, - "type": "Channel", - "description": "The channel that signaled the user event." - }, - "userevent": { - "required": true, - "type": "object", - "description": "Custom Userevent data" - } - } - }, - "ChannelHangupRequest": { - "id": "ChannelHangupRequest", - "description": "A hangup was requested on the channel.", - "properties": { - "cause": { - "type": "int", - "description": "Integer representation of the cause of the hangup." - }, - "soft": { - "type": "boolean", - "description": "Whether the hangup request was a soft hangup request." - }, - "channel": { - "required": true, - "type": "Channel", - "description": "The channel on which the hangup was requested." - } - } - }, - "ChannelVarset": { - "id": "ChannelVarset", - "description": "Channel variable changed.", - "properties": { - "variable": { - "required": true, - "type": "string", - "description": "The variable that changed." - }, - "value": { - "required": true, - "type": "string", - "description": "The new value of the variable." - }, - "channel": { - "required": false, - "type": "Channel", - "description": "The channel on which the variable was set.\n\nIf missing, the variable is a global variable." - } - } - }, - "EndpointStateChange": { - "id": "EndpointStateChange", - "description": "Endpoint state changed.", - "properties": { - "endpoint": { - "required": true, - "type": "Endpoint" - } - } - }, - "StasisEnd": { - "id": "StasisEnd", - "description": "Notification that a channel has left a Stasis application.", - "properties": { - "channel": { - "required": true, - "type": "Channel" - } - } - }, - "StasisStart": { - "id": "StasisStart", - "description": "Notification that a channel has entered a Stasis application.", - "properties": { - "args": { - "required": true, - "type": "List[string]", - "description": "Arguments to the application" - }, - "channel": { - "required": true, - "type": "Channel" - } - } - } - } -} diff --git a/codegen-data/ari_0_0_1/playbacks.json b/codegen-data/ari_0_0_1/playbacks.json deleted file mode 100644 index d5650943..00000000 --- a/codegen-data/ari_0_0_1/playbacks.json +++ /dev/null @@ -1,155 +0,0 @@ -{ - "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", - "_author": "David M. Lee, II ", - "_svn_revision": "$Revision: 402560 $", - "apiVersion": "0.0.1", - "swaggerVersion": "1.1", - "basePath": "http://localhost:8088/stasis", - "resourcePath": "/api-docs/playbacks.{format}", - "apis": [ - { - "path": "/playbacks/{playbackId}", - "description": "Control object for a playback operation.", - "operations": [ - { - "httpMethod": "GET", - "summary": "Get a playback's details.", - "nickname": "get", - "responseClass": "Playback", - "parameters": [ - { - "name": "playbackId", - "description": "Playback's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "The playback cannot be found" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Stop a playback.", - "nickname": "stop", - "responseClass": "void", - "parameters": [ - { - "name": "playbackId", - "description": "Playback's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "The playback cannot be found" - } - ] - } - ] - }, - { - "path": "/playbacks/{playbackId}/control", - "description": "Control object for a playback operation.", - "operations": [ - { - "httpMethod": "POST", - "summary": "Control a playback.", - "nickname": "control", - "responseClass": "void", - "parameters": [ - { - "name": "playbackId", - "description": "Playback's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "operation", - "description": "Operation to perform on the playback.", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string", - "allowableValues": { - "valueType": "LIST", - "values": [ - "restart", - "pause", - "unpause", - "reverse", - "forward" - ] - } - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "The provided operation parameter was invalid" - }, - { - "code": 404, - "reason": "The playback cannot be found" - }, - { - "code": 409, - "reason": "The operation cannot be performed in the playback's current state" - } -] - } - ] - } - ], - "models": { - "Playback": { - "id": "Playback", - "description": "Object representing the playback of media to a channel", - "properties": { - "id": { - "type": "string", - "description": "ID for this playback operation", - "required": true - }, - "media_uri": { - "type": "string", - "description": "URI for the media to play back.", - "required": true - }, - "target_uri": { - "type": "string", - "description": "URI for the channel or bridge to play the media on", - "required": true - }, - "language": { - "type": "string", - "description": "For media types that support multiple languages, the language requested for playback." - }, - "state": { - "type": "string", - "description": "Current state of the playback operation.", - "required": true, - "allowableValues": { - "valueType": "LIST", - "values": [ - "queued", - "playing", - "complete" - ] - } - } - } - } - } -} diff --git a/codegen-data/ari_0_0_1/recordings.json b/codegen-data/ari_0_0_1/recordings.json deleted file mode 100644 index 8e7c8df8..00000000 --- a/codegen-data/ari_0_0_1/recordings.json +++ /dev/null @@ -1,326 +0,0 @@ -{ - "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", - "_author": "David M. Lee, II ", - "_svn_revision": "$Revision: 403119 $", - "apiVersion": "0.0.1", - "swaggerVersion": "1.1", - "basePath": "http://localhost:8088/stasis", - "resourcePath": "/api-docs/recordings.{format}", - "apis": [ - { - "path": "/recordings/stored", - "description": "Recordings", - "operations": [ - { - "httpMethod": "GET", - "summary": "List recordings that are complete.", - "nickname": "listStored", - "responseClass": "List[StoredRecording]" - } - ] - }, - { - "path": "/recordings/stored/{recordingName}", - "description": "Individual recording", - "operations": [ - { - "httpMethod": "GET", - "summary": "Get a stored recording's details.", - "nickname": "getStored", - "responseClass": "StoredRecording", - "parameters": [ - { - "name": "recordingName", - "description": "The name of the recording", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Recording not found" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Delete a stored recording.", - "nickname": "deleteStored", - "responseClass": "void", - "parameters": [ - { - "name": "recordingName", - "description": "The name of the recording", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Recording not found" - } - ] - } - ] - }, - { - "path": "/recordings/live/{recordingName}", - "description": "A recording that is in progress", - "operations": [ - { - "httpMethod": "GET", - "summary": "List live recordings.", - "nickname": "getLive", - "responseClass": "LiveRecording", - "parameters": [ - { - "name": "recordingName", - "description": "The name of the recording", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Recording not found" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Stop a live recording and discard it.", - "nickname": "cancel", - "responseClass": "void", - "parameters": [ - { - "name": "recordingName", - "description": "The name of the recording", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Recording not found" - } - ] - } - ] - }, - { - "path": "/recordings/live/{recordingName}/stop", - "operations": [ - { - "httpMethod": "POST", - "summary": "Stop a live recording and store it.", - "nickname": "stop", - "responseClass": "void", - "parameters": [ - { - "name": "recordingName", - "description": "The name of the recording", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Recording not found" - } - ] - } - ] - }, - { - "path": "/recordings/live/{recordingName}/pause", - "operations": [ - { - "httpMethod": "POST", - "summary": "Pause a live recording.", - "notes": "Pausing a recording suspends silence detection, which will be restarted when the recording is unpaused. Paused time is not included in the accounting for maxDurationSeconds.", - "nickname": "pause", - "responseClass": "void", - "parameters": [ - { - "name": "recordingName", - "description": "The name of the recording", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Recording not found" - }, - { - "code": 409, - "reason": "Recording not in session" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Unpause a live recording.", - "nickname": "unpause", - "responseClass": "void", - "parameters": [ - { - "name": "recordingName", - "description": "The name of the recording", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Recording not found" - }, - { - "code": 409, - "reason": "Recording not in session" - } - ] - } - ] - }, - { - "path": "/recordings/live/{recordingName}/mute", - "operations": [ - { - "httpMethod": "POST", - "summary": "Mute a live recording.", - "notes": "Muting a recording suspends silence detection, which will be restarted when the recording is unmuted.", - "nickname": "mute", - "responseClass": "void", - "parameters": [ - { - "name": "recordingName", - "description": "The name of the recording", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Recording not found" - }, - { - "code": 409, - "reason": "Recording not in session" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Unmute a live recording.", - "nickname": "unmute", - "responseClass": "void", - "parameters": [ - { - "name": "recordingName", - "description": "The name of the recording", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Recording not found" - }, - { - "code": 409, - "reason": "Recording not in session" - } - ] - } - ] - } - ], - "models": { - "StoredRecording": { - "id": "StoredRecording", - "description": "A past recording that may be played back.", - "properties": { - "name": { - "required": true, - "type": "string" - }, - "format": { - "required": true, - "type": "string" - } - } - }, - "LiveRecording": { - "id": "LiveRecording", - "description": "A recording that is in progress", - "properties": { - "name": { - "required": true, - "type": "string", - "description": "Base name for the recording" - }, - "format": { - "required": true, - "type": "string", - "description": "Recording format (wav, gsm, etc.)" - }, - "state": { - "required": false, - "type": "string", - "allowableValues": { - "valueType": "LIST", - "values": [ - "queued", - "recording", - "paused", - "done", - "failed", - "canceled" - ] - } - }, - "cause": { - "required": false, - "type": "string", - "description": "Cause for recording failure if failed" - }, - "state": { - "required": true, - "type": "string" - }, - "format": { - "required": true, - "type": "string" - } - } - } - } -} diff --git a/codegen-data/ari_0_0_1/sounds.json b/codegen-data/ari_0_0_1/sounds.json deleted file mode 100644 index 1a92ee02..00000000 --- a/codegen-data/ari_0_0_1/sounds.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", - "_author": "David M. Lee, II ", - "_svn_revision": "$Revision: 402528 $", - "apiVersion": "0.0.1", - "swaggerVersion": "1.1", - "basePath": "http://localhost:8088/stasis", - "resourcePath": "/api-docs/sounds.{format}", - "apis": [ - { - "path": "/sounds", - "description": "Sounds", - "operations": [ - { - "httpMethod": "GET", - "summary": "List all sounds.", - "nickname": "list", - "responseClass": "List[Sound]", - "parameters": [ - { - "name": "lang", - "description": "Lookup sound for a specific language.", - "paramType": "query", - "dataType": "string", - "required": false - }, - { - "name": "format", - "description": "Lookup sound in a specific format.", - "paramType": "query", - "dataType": "string", - "required": false, - "__note": "core show translation can show translation paths between formats, along with relative costs. so this could be just installed format, or we could follow that for transcoded formats." - } - ] - } - ] - }, - { - "path": "/sounds/{soundId}", - "description": "Individual sound", - "operations": [ - { - "httpMethod": "GET", - "summary": "Get a sound's details.", - "nickname": "get", - "responseClass": "Sound", - "parameters": [ - { - "name": "soundId", - "description": "Sound's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ] - } - ] - } - ], - "models": { - "FormatLangPair": { - "id": "FormatLangPair", - "description": "Identifies the format and language of a sound file", - "properties": { - "language": { - "required": true, - "type": "string" - }, - "format": { - "required": true, - "type": "string" - } - } - }, - "Sound": { - "id": "Sound", - "description": "A media file that may be played back.", - "properties": { - "id": { - "required": true, - "description": "Sound's identifier.", - "type": "string" - }, - "text": { - "required": false, - "description": "Text description of the sound, usually the words spoken.", - "type": "string" - }, - "formats": { - "required": true, - "description": "The formats and languages in which this sound is available.", - "type": "List[FormatLangPair]" - } - } - } - } -} diff --git a/codegen-data/ari_1_0_0/applications.json b/codegen-data/ari_1_0_0/applications.json deleted file mode 100644 index 0ef07406..00000000 --- a/codegen-data/ari_1_0_0/applications.json +++ /dev/null @@ -1,172 +0,0 @@ -{ - "_copyright": "Copyright (C) 2013, Digium, Inc.", - "_author": "David M. Lee, II ", - "_svn_revision": "$Revision: 404509 $", - "apiVersion": "1.0.0", - "swaggerVersion": "1.1", - "basePath": "http://localhost:8088/stasis", - "resourcePath": "/api-docs/applications.{format}", - "apis": [ - { - "path": "/applications", - "description": "Stasis applications", - "operations": [ - { - "httpMethod": "GET", - "summary": "List all applications.", - "nickname": "list", - "responseClass": "List[Application]" - } - ] - }, - { - "path": "/applications/{applicationName}", - "description": "Stasis application", - "operations": [ - { - "httpMethod": "GET", - "summary": "Get details of an application.", - "nickname": "get", - "responseClass": "Application", - "parameters": [ - { - "name": "applicationName", - "description": "Application's name", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Application does not exist." - } - ] - } - ] - }, - { - "path": "/applications/{applicationName}/subscription", - "description": "Stasis application", - "operations": [ - { - "httpMethod": "POST", - "summary": "Subscribe an application to a event source.", - "notes": "Returns the state of the application after the subscriptions have changed", - "nickname": "subscribe", - "responseClass": "Application", - "parameters": [ - { - "name": "applicationName", - "description": "Application's name", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "eventSource", - "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}/{resource}, deviceState:{deviceName}", - "paramType": "query", - "required": true, - "allowMultiple": true, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Missing parameter." - }, - { - "code": 404, - "reason": "Application does not exist." - }, - { - "code": 422, - "reason": "Event source does not exist." - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Unsubscribe an application from an event source.", - "notes": "Returns the state of the application after the subscriptions have changed", - "nickname": "unsubscribe", - "responseClass": "Application", - "parameters": [ - { - "name": "applicationName", - "description": "Application's name", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "eventSource", - "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}/{resource}, deviceState:{deviceName}", - "paramType": "query", - "required": true, - "allowMultiple": true, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Missing parameter; event source scheme not recognized." - }, - { - "code": 404, - "reason": "Application does not exist." - }, - { - "code": 409, - "reason": "Application not subscribed to event source." - }, - { - "code": 422, - "reason": "Event source does not exist." - } - ] - } - ] - } - ], - "models": { - "Application": { - "id": "Application", - "description": "Details of a Stasis application", - "properties": { - "name": { - "type": "string", - "description": "Name of this application", - "required": true - }, - "channel_ids": { - "type": "List[string]", - "description": "Id's for channels subscribed to.", - "required": true - }, - "bridge_ids": { - "type": "List[string]", - "description": "Id's for bridges subscribed to.", - "required": true - }, - "endpoint_ids": { - "type": "List[string]", - "description": "{tech}/{resource} for endpoints subscribed to.", - "required": true - }, - "device_names": { - "type": "List[string]", - "description": "Names of the devices subscribed to.", - "required": true - } - } - } - } -} diff --git a/codegen-data/ari_1_0_0/asterisk.json b/codegen-data/ari_1_0_0/asterisk.json deleted file mode 100644 index 4c7da96e..00000000 --- a/codegen-data/ari_1_0_0/asterisk.json +++ /dev/null @@ -1,259 +0,0 @@ -{ - "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", - "_author": "David M. Lee, II ", - "_svn_revision": "$Revision: 404184 $", - "apiVersion": "1.0.0", - "swaggerVersion": "1.1", - "basePath": "http://localhost:8088/stasis", - "resourcePath": "/api-docs/asterisk.{format}", - "apis": [ - { - "path": "/asterisk/info", - "description": "Asterisk system information (similar to core show settings)", - "operations": [ - { - "httpMethod": "GET", - "summary": "Gets Asterisk system information.", - "nickname": "getInfo", - "responseClass": "AsteriskInfo", - "parameters": [ - { - "name": "only", - "description": "Filter information returned", - "paramType": "query", - "required": false, - "allowMultiple": true, - "dataType": "string", - "allowableValues": { - "valueType": "LIST", - "values": [ - "build", - "system", - "config", - "status" - ] - } - } - ] - } - ] - }, - { - "path": "/asterisk/variable", - "description": "Global variables", - "operations": [ - { - "httpMethod": "GET", - "summary": "Get the value of a global variable.", - "nickname": "getGlobalVar", - "responseClass": "Variable", - "parameters": [ - { - "name": "variable", - "description": "The variable to get", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Missing variable parameter." - } - ] - }, - { - "httpMethod": "POST", - "summary": "Set the value of a global variable.", - "nickname": "setGlobalVar", - "responseClass": "void", - "parameters": [ - { - "name": "variable", - "description": "The variable to set", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "value", - "description": "The value to set the variable to", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Missing variable parameter." - } - ] - } - ] - } - ], - "models": { - "BuildInfo": { - "id": "BuildInfo", - "description": "Info about how Asterisk was built", - "properties": { - "os": { - "required": true, - "type": "string", - "description": "OS Asterisk was built on." - }, - "kernel": { - "required": true, - "type": "string", - "description": "Kernel version Asterisk was built on." - }, - "options": { - "required": true, - "type": "string", - "description": "Compile time options, or empty string if default." - }, - "machine": { - "required": true, - "type": "string", - "description": "Machine architecture (x86_64, i686, ppc, etc.)" - }, - "date": { - "required": true, - "type": "string", - "description": "Date and time when Asterisk was built." - }, - "user": { - "required": true, - "type": "string", - "description": "Username that build Asterisk" - } - } - }, - "SystemInfo": { - "id": "SystemInfo", - "description": "Info about Asterisk", - "properties": { - "version": { - "required": true, - "type": "string", - "description": "Asterisk version." - }, - "entity_id": { - "required": true, - "type": "string", - "description": "" - } - } - }, - "SetId": { - "id": "SetId", - "description": "Effective user/group id", - "properties": { - "user": { - "required": true, - "type": "string", - "description": "Effective user id." - }, - "group": { - "required": true, - "type": "string", - "description": "Effective group id." - } - } - }, - "ConfigInfo": { - "id": "ConfigInfo", - "description": "Info about Asterisk configuration", - "properties": { - "name": { - "required": true, - "type": "string", - "description": "Asterisk system name." - }, - "default_language": { - "required": true, - "type": "string", - "description": "Default language for media playback." - }, - "max_channels": { - "required": false, - "type": "int", - "description": "Maximum number of simultaneous channels." - }, - "max_open_files": { - "required": false, - "type": "int", - "description": "Maximum number of open file handles (files, sockets)." - }, - "max_load": { - "required": false, - "type": "double", - "description": "Maximum load avg on system." - }, - "setid": { - "required": true, - "type": "SetId", - "description": "Effective user/group id for running Asterisk." - } - } - }, - "StatusInfo": { - "id": "StatusInfo", - "description": "Info about Asterisk status", - "properties": { - "startup_time": { - "required": true, - "type": "Date", - "description": "Time when Asterisk was started." - }, - "last_reload_time": { - "required": true, - "type": "Date", - "description": "Time when Asterisk was last reloaded." - } - } - }, - "AsteriskInfo": { - "id": "AsteriskInfo", - "description": "Asterisk system information", - "properties": { - "build": { - "required": false, - "type": "BuildInfo", - "description": "Info about how Asterisk was built" - }, - "system": { - "required": false, - "type": "SystemInfo", - "description": "Info about the system running Asterisk" - }, - "config": { - "required": false, - "type": "ConfigInfo", - "description": "Info about Asterisk configuration" - }, - "status": { - "required": false, - "type": "StatusInfo", - "description": "Info about Asterisk status" - } - } - }, - "Variable": { - "id": "Variable", - "description": "The value of a channel variable", - "properties": { - "value": { - "required": true, - "type": "string", - "description": "The value of the variable requested" - } - } - } - } -} diff --git a/codegen-data/ari_1_0_0/bridges.json b/codegen-data/ari_1_0_0/bridges.json deleted file mode 100644 index 8c8007a4..00000000 --- a/codegen-data/ari_1_0_0/bridges.json +++ /dev/null @@ -1,531 +0,0 @@ -{ - "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", - "_author": "David M. Lee, II ", - "_svn_revision": "$Revision: 404184 $", - "apiVersion": "1.0.0", - "swaggerVersion": "1.1", - "basePath": "http://localhost:8088/stasis", - "resourcePath": "/api-docs/bridges.{format}", - "apis": [ - { - "path": "/bridges", - "description": "Active bridges", - "operations": [ - { - "httpMethod": "GET", - "summary": "List all active bridges in Asterisk.", - "nickname": "list", - "responseClass": "List[Bridge]" - }, - { - "httpMethod": "POST", - "summary": "Create a new bridge.", - "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", - "nickname": "create", - "responseClass": "Bridge", - "parameters": [ - { - "name": "type", - "description": "Type of bridge to create.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string", - "allowableValues": { - "valueType": "LIST", - "values": [ - "mixing", - "holding" - ] - } - }, - { - "name": "name", - "description": "Name to give to the bridge being created.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ] - } - ] - }, - { - "path": "/bridges/{bridgeId}", - "description": "Individual bridge", - "operations": [ - { - "httpMethod": "GET", - "summary": "Get bridge details.", - "nickname": "get", - "responseClass": "Bridge", - "parameters": [ - { - "name": "bridgeId", - "description": "Bridge's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Bridge not found" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Shut down a bridge.", - "notes": "If any channels are in this bridge, they will be removed and resume whatever they were doing beforehand.", - "nickname": "destroy", - "responseClass": "void", - "parameters": [ - { - "name": "bridgeId", - "description": "Bridge's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Bridge not found" - } - ] - } - ] - }, - { - "path": "/bridges/{bridgeId}/addChannel", - "description": "Add a channel to a bridge", - "operations": [ - { - "httpMethod": "POST", - "summary": "Add a channel to a bridge.", - "nickname": "addChannel", - "responseClass": "void", - "parameters": [ - { - "name": "bridgeId", - "description": "Bridge's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "channel", - "description": "Ids of channels to add to bridge", - "paramType": "query", - "required": true, - "allowMultiple": true, - "dataType": "string" - }, - { - "name": "role", - "description": "Channel's role in the bridge", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Channel not found" - }, - { - "code": 404, - "reason": "Bridge not found" - }, - { - "code": 409, - "reason": "Bridge not in Stasis application; Channel currently recording" - }, - { - "code": 422, - "reason": "Channel not in Stasis application" - } - ] - } - ] - }, - { - "path": "/bridges/{bridgeId}/removeChannel", - "description": "Remove a channel from a bridge", - "operations": [ - { - "httpMethod": "POST", - "summary": "Remove a channel from a bridge.", - "nickname": "removeChannel", - "responseClass": "void", - "parameters": [ - { - "name": "bridgeId", - "description": "Bridge's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "channel", - "description": "Ids of channels to remove from bridge", - "paramType": "query", - "required": true, - "allowMultiple": true, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Channel not found" - }, - { - "code": 404, - "reason": "Bridge not found" - }, - { - "code": 409, - "reason": "Bridge not in Stasis application" - }, - { - "code": 422, - "reason": "Channel not in this bridge" - } - ] - } - ] - }, - { - "path": "/bridges/{bridgeId}/moh", - "description": "Play music on hold to a bridge", - "operations": [ - { - "httpMethod": "POST", - "summary": "Play music on hold to a bridge or change the MOH class that is playing.", - "nickname": "startMoh", - "responseClass": "void", - "parameters": [ - { - "name": "bridgeId", - "description": "Bridge's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "mohClass", - "description": "Channel's id", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Bridge not found" - }, - { - "code": 409, - "reason": "Bridge not in Stasis application" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Stop playing music on hold to a bridge.", - "notes": "This will only stop music on hold being played via POST bridges/{bridgeId}/moh.", - "nickname": "stopMoh", - "responseClass": "void", - "parameters": [ - { - "name": "bridgeId", - "description": "Bridge's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Bridge not found" - }, - { - "code": 409, - "reason": "Bridge not in Stasis application" - } - ] - } - ] - }, - { - "path": "/bridges/{bridgeId}/play", - "description": "Play media to the participants of a bridge", - "operations": [ - { - "httpMethod": "POST", - "summary": "Start playback of media on a bridge.", - "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.)", - "nickname": "play", - "responseClass": "Playback", - "parameters": [ - { - "name": "bridgeId", - "description": "Bridge's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "media", - "description": "Media's URI to play.", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "lang", - "description": "For sounds, selects language for sound.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "offsetms", - "description": "Number of media to skip before playing.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 0, - "allowableValues": { - "valueType": "RANGE", - "min": 0 - } - - }, - { - "name": "skipms", - "description": "Number of milliseconds to skip for forward/reverse operations.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 3000, - "allowableValues": { - "valueType": "RANGE", - "min": 0 - } - - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Bridge not found" - }, - { - "code": 409, - "reason": "Bridge not in a Stasis application" - } - ] - } - ] - }, - { - "path": "/bridges/{bridgeId}/record", - "description": "Record audio on a bridge", - "operations": [ - { - "httpMethod": "POST", - "summary": "Start a recording.", - "notes": "This records the mixed audio from all channels participating in this bridge.", - "nickname": "record", - "responseClass": "LiveRecording", - "parameters": [ - { - "name": "bridgeId", - "description": "Bridge's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "name", - "description": "Recording's filename", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "format", - "description": "Format to encode audio in", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "maxDurationSeconds", - "description": "Maximum duration of the recording, in seconds. 0 for no limit.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 0, - "allowableValues": { - "valueType": "RANGE", - "min": 0 - } - }, - { - "name": "maxSilenceSeconds", - "description": "Maximum duration of silence, in seconds. 0 for no limit.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 0, - "allowableValues": { - "valueType": "RANGE", - "min": 0 - } - }, - { - "name": "ifExists", - "description": "Action to take if a recording with the same name already exists.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string", - "defaultValue": "fail", - "allowableValues": { - "valueType": "LIST", - "values": [ - "fail", - "overwrite", - "append" - ] - } - }, - { - "name": "beep", - "description": "Play beep when recording begins", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "boolean", - "defaultValue": false - }, - { - "name": "terminateOn", - "description": "DTMF input to terminate recording.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string", - "defaultValue": "none", - "allowableValues": { - "valueType": "LIST", - "values": [ - "none", - "any", - "*", - "#" - ] - } - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Invalid parameters" - }, - { - "code": 404, - "reason": "Bridge not found" - }, - { - "code": 409, - "reason": "Bridge is not in a Stasis application; A recording with the same name already exists on the system and can not be overwritten because it is in progress or ifExists=fail" - }, - { - "code": 422, - "reason": "The format specified is unknown on this system" - } - ] - } - ] - } - ], - "models": { - "Bridge": { - "id": "Bridge", - "description": "The merging of media from one or more channels.\n\nEveryone on the bridge receives the same audio.", - "properties": { - "id": { - "type": "string", - "description": "Unique identifier for this bridge", - "required": true - }, - "technology": { - "type": "string", - "description": "Name of the current bridging technology", - "required": true - }, - "bridge_type": { - "type": "string", - "description": "Type of bridge technology", - "required": true, - "allowableValues": { - "valueType": "LIST", - "values": [ - "mixing", - "holding" - ] - } - }, - "bridge_class": { - "type": "string", - "description": "Bridging class", - "required": true - }, - "creator": { - "type": "string", - "description": "Entity that created the bridge", - "required": true - }, - "name": { - "type": "string", - "description": "Name the creator gave the bridge", - "required": true - }, - "channels": { - "type": "List[string]", - "description": "Ids of channels participating in this bridge", - "required": true - } - } - } - } -} diff --git a/codegen-data/ari_1_0_0/channels.json b/codegen-data/ari_1_0_0/channels.json deleted file mode 100644 index 6122f6d9..00000000 --- a/codegen-data/ari_1_0_0/channels.json +++ /dev/null @@ -1,1144 +0,0 @@ -{ - "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", - "_author": "David M. Lee, II ", - "_svn_revision": "$Revision: 404509 $", - "apiVersion": "1.0.0", - "swaggerVersion": "1.1", - "basePath": "http://localhost:8088/stasis", - "resourcePath": "/api-docs/channels.{format}", - "apis": [ - { - "path": "/channels", - "description": "Active channels", - "operations": [ - { - "httpMethod": "GET", - "summary": "List all active channels in Asterisk.", - "nickname": "list", - "responseClass": "List[Channel]" - }, - { - "httpMethod": "POST", - "summary": "Create a new channel (originate).", - "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.", - "nickname": "originate", - "responseClass": "Channel", - "parameters": [ - { - "name": "endpoint", - "description": "Endpoint to call.", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "extension", - "description": "The extension to dial after the endpoint answers", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "context", - "description": "The context to dial after the endpoint answers. If omitted, uses 'default'", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "priority", - "description": "The priority to dial after the endpoint answers. If omitted, uses 1", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "long" - }, - { - "name": "app", - "description": "The application that is subscribed to the originated channel, and passed to the Stasis application.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "appArgs", - "description": "The application arguments to pass to the Stasis application.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "callerId", - "description": "CallerID to use when dialing the endpoint or extension.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "timeout", - "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 30 - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Invalid parameters for originating a channel." - } - ] - } - ] - }, - { - "path": "/channels/{channelId}", - "description": "Active channel", - "operations": [ - { - "httpMethod": "GET", - "summary": "Channel details.", - "nickname": "get", - "responseClass": "Channel", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Delete (i.e. hangup) a channel.", - "nickname": "hangup", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "reason", - "description": "Reason for hanging up the channel", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string", - "defalutValue": "normal", - "allowableValues": { - "valueType": "LIST", - "values": [ - "normal", - "busy", - "congestion" - ] - } - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Invalid reason for hangup provided" - }, - { - "code": 404, - "reason": "Channel not found" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/continue", - "description": "Exit application; continue execution in the dialplan", - "operations": [ - { - "httpMethod": "POST", - "summary": "Exit application; continue execution in the dialplan.", - "nickname": "continueInDialplan", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "context", - "description": "The context to continue to.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "extension", - "description": "The extension to continue to.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "priority", - "description": "The priority to continue to.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/answer", - "description": "Answer a channel", - "operations": [ - { - "httpMethod": "POST", - "summary": "Answer a channel.", - "nickname": "answer", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/ring", - "description": "Send a ringing indication to a channel", - "operations": [ - { - "httpMethod": "POST", - "summary": "Indicate ringing to a channel.", - "nickname": "ring", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Stop ringing indication on a channel if locally generated.", - "nickname": "ringStop", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/dtmf", - "description": "Send DTMF to a channel", - "operations": [ - { - "httpMethod": "POST", - "summary": "Send provided DTMF to a given channel.", - "nickname": "sendDTMF", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "dtmf", - "description": "DTMF To send.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "before", - "description": "Amount of time to wait before DTMF digits (specified in milliseconds) start.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 0 - }, - { - "name": "between", - "description": "Amount of time in between DTMF digits (specified in milliseconds).", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 100 - }, - { - "name": "duration", - "description": "Length of each DTMF digit (specified in milliseconds).", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 100 - }, - { - "name": "after", - "description": "Amount of time to wait after DTMF digits (specified in milliseconds) end.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 0 - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "DTMF is required" - }, - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/mute", - "description": "Mute a channel", - "operations": [ - { - "httpMethod": "POST", - "summary": "Mute a channel.", - "nickname": "mute", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "direction", - "description": "Direction in which to mute audio", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string", - "defaultValue": "both", - "allowableValues": { - "valueType": "LIST", - "values": [ - "both", - "in", - "out" - ] - } - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Unmute a channel.", - "nickname": "unmute", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "direction", - "description": "Direction in which to unmute audio", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string", - "defaultValue": "both", - "allowableValues": { - "valueType": "LIST", - "values": [ - "both", - "in", - "out" - ] - } - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/hold", - "description": "Put a channel on hold", - "operations": [ - { - "httpMethod": "POST", - "summary": "Hold a channel.", - "nickname": "hold", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Remove a channel from hold.", - "nickname": "unhold", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/moh", - "description": "Play music on hold to a channel", - "operations": [ - { - "httpMethod": "POST", - "summary": "Play music on hold to a channel.", - "notes": "Using media operations such as /play on a channel playing MOH in this manner will suspend MOH without resuming automatically. If continuing music on hold is desired, the stasis application must reinitiate music on hold.", - "nickname": "startMoh", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "mohClass", - "description": "Music on hold class to use", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Stop playing music on hold to a channel.", - "nickname": "stopMoh", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/silence", - "description": "Play silence to a channel", - "operations": [ - { - "httpMethod": "POST", - "summary": "Play silence to a channel.", - "notes": "Using media operations such as /play on a channel playing silence in this manner will suspend silence without resuming automatically.", - "nickname": "startSilence", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Stop playing silence to a channel.", - "nickname": "stopSilence", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/play", - "description": "Play media to a channel", - "operations": [ - { - "httpMethod": "POST", - "summary": "Start playback of media.", - "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.)", - "nickname": "play", - "responseClass": "Playback", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "media", - "description": "Media's URI to play.", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "lang", - "description": "For sounds, selects language for sound.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "offsetms", - "description": "Number of media to skip before playing.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int" - }, - { - "name": "skipms", - "description": "Number of milliseconds to skip for forward/reverse operations.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 3000 - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/record", - "description": "Record audio from a channel", - "operations": [ - { - "httpMethod": "POST", - "summary": "Start a recording.", - "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.", - "nickname": "record", - "responseClass": "LiveRecording", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "name", - "description": "Recording's filename", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "format", - "description": "Format to encode audio in", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "maxDurationSeconds", - "description": "Maximum duration of the recording, in seconds. 0 for no limit", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 0, - "allowableValues": { - "valueType": "RANGE", - "min": 0 - } - }, - { - "name": "maxSilenceSeconds", - "description": "Maximum duration of silence, in seconds. 0 for no limit", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 0, - "allowableValues": { - "valueType": "RANGE", - "min": 0 - } - }, - { - "name": "ifExists", - "description": "Action to take if a recording with the same name already exists.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string", - "defaultValue": "fail", - "allowableValues": { - "valueType": "LIST", - "values": [ - "fail", - "overwrite", - "append" - ] - } - }, - { - "name": "beep", - "description": "Play beep when recording begins", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "boolean", - "defaultValue": false - }, - { - "name": "terminateOn", - "description": "DTMF input to terminate recording", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string", - "defaultValue": "none", - "allowableValues": { - "valueType": "LIST", - "values": [ - "none", - "any", - "*", - "#" - ] - } - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Invalid parameters" - }, - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "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" - }, - { - "code": 422, - "reason": "The format specified is unknown on this system" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/variable", - "description": "Variables on a channel", - "operations": [ - { - "httpMethod": "GET", - "summary": "Get the value of a channel variable or function.", - "nickname": "getChannelVar", - "responseClass": "Variable", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "variable", - "description": "The channel variable or function to get", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Missing variable parameter." - }, - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - }, - { - "httpMethod": "POST", - "summary": "Set the value of a channel variable or function.", - "nickname": "setChannelVar", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "variable", - "description": "The channel variable or function to set", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "value", - "description": "The value to set the variable to", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Missing variable parameter." - }, - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/snoop", - "description": "Snoop (spy/whisper) on a channel", - "operations": [ - { - "httpMethod": "POST", - "summary": "Start snooping.", - "notes": "Snoop (spy/whisper) on a specific channel.", - "nickname": "snoopChannel", - "responseClass": "Channel", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "spy", - "description": "Direction of audio to spy on", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string", - "defaultValue": "none", - "allowableValues": { - "valueType": "LIST", - "values": [ - "none", - "both", - "out", - "in" - ] - } - }, - { - "name": "whisper", - "description": "Direction of audio to whisper into", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string", - "defaultValue": "none", - "allowableValues": { - "valueType": "LIST", - "values": [ - "none", - "both", - "out", - "in" - ] - } - }, - { - "name": "app", - "description": "Application the snooping channel is placed into", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "appArgs", - "description": "The application arguments to pass to the Stasis application", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Invalid parameters" - }, - { - "code": 404, - "reason": "Channel not found" - } - ] - } - ] - } - ], - "models": { - "Dialed": { - "id": "Dialed", - "description": "Dialed channel information.", - "properties": {} - }, - "DialplanCEP": { - "id": "DialplanCEP", - "description": "Dialplan location (context/extension/priority)", - "properties": { - "context": { - "required": true, - "type": "string", - "description": "Context in the dialplan" - }, - "exten": { - "required": true, - "type": "string", - "description": "Extension in the dialplan" - }, - "priority": { - "required": true, - "type": "long", - "description": "Priority in the dialplan" - } - } - }, - "CallerID": { - "id": "CallerID", - "description": "Caller identification", - "properties": { - "name": { - "required": true, - "type": "string" - }, - "number": { - "required": true, - "type": "string" - } - } - }, - "Channel": { - "id": "Channel", - "description": "A specific communication connection between Asterisk and an Endpoint.", - "properties": { - "id": { - "required": true, - "type": "string", - "description": "Unique identifier of the channel.\n\nThis is the same as the Uniqueid field in AMI." - }, - "name": { - "required": true, - "type": "string", - "description": "Name of the channel (i.e. SIP/foo-0000a7e3)" - }, - "state": { - "required": true, - "type": "string", - "allowableValues": { - "valueType": "LIST", - "values": [ - "Down", - "Rsrved", - "OffHook", - "Dialing", - "Ring", - "Ringing", - "Up", - "Busy", - "Dialing Offhook", - "Pre-ring", - "Unknown" - ] - } - }, - "caller": { - "required": true, - "type": "CallerID" - }, - "connected": { - "required": true, - "type": "CallerID" - }, - "accountcode": { - "required": true, - "type": "string" - }, - "dialplan": { - "required": true, - "type": "DialplanCEP", - "description": "Current location in the dialplan" - }, - "creationtime": { - "required": true, - "type": "Date", - "description": "Timestamp when channel was created" - } - } - } - } -} diff --git a/codegen-data/ari_1_0_0/deviceStates.json b/codegen-data/ari_1_0_0/deviceStates.json deleted file mode 100644 index 9eedf7aa..00000000 --- a/codegen-data/ari_1_0_0/deviceStates.json +++ /dev/null @@ -1,151 +0,0 @@ -{ - "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", - "_author": "Kevin Harwell ", - "_svn_revision": "$Revision: 404184 $", - "apiVersion": "1.0.0", - "swaggerVersion": "1.1", - "basePath": "http://localhost:8088/stasis", - "resourcePath": "/api-docs/deviceStates.{format}", - "apis": [ - { - "path": "/deviceStates", - "description": "Device states", - "operations": [ - { - "httpMethod": "GET", - "summary": "List all ARI controlled device states.", - "nickname": "list", - "responseClass": "List[DeviceState]" - } - ] - }, - { - "path": "/deviceStates/{deviceName}", - "description": "Device state", - "operations": [ - { - "httpMethod": "GET", - "summary": "Retrieve the current state of a device.", - "nickname": "get", - "responseClass": "DeviceState", - "parameters": [ - { - "name": "deviceName", - "description": "Name of the device", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ] - }, - { - "httpMethod": "PUT", - "summary": "Change the state of a device controlled by ARI. (Note - implicitly creates the device state).", - "nickname": "update", - "responseClass": "void", - "parameters": [ - { - "name": "deviceName", - "description": "Name of the device", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "deviceState", - "description": "Device state value", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string", - "allowableValues": { - "valueType": "LIST", - "values": [ - "NOT_INUSE", - "INUSE", - "BUSY", - "INVALID", - "UNAVAILABLE", - "RINGING", - "RINGINUSE", - "ONHOLD" - ] - } - - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Device name is missing" - }, - { - "code": 409, - "reason": "Uncontrolled device specified" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Destroy a device-state controlled by ARI.", - "nickname": "delete", - "responseClass": "void", - "parameters": [ - { - "name": "deviceName", - "description": "Name of the device", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Device name is missing" - }, - { - "code": 409, - "reason": "Uncontrolled device specified" - } - ] - } - ] - } - ], - "models": { - "DeviceState": { - "id": "DeviceState", - "description": "Represents the state of a device.", - "properties": { - "name": { - "type": "string", - "description": "Name of the device.", - "required": true - }, - "state": { - "type": "string", - "description": "Device's state", - "required": true, - "allowableValues": { - "valueType": "LIST", - "values": [ - "UNKNOWN", - "NOT_INUSE", - "INUSE", - "BUSY", - "INVALID", - "UNAVAILABLE", - "RINGING", - "RINGINUSE", - "ONHOLD" - ] - } - } - } - } - } -} diff --git a/codegen-data/ari_1_0_0/endpoints.json b/codegen-data/ari_1_0_0/endpoints.json deleted file mode 100644 index d744d40b..00000000 --- a/codegen-data/ari_1_0_0/endpoints.json +++ /dev/null @@ -1,117 +0,0 @@ -{ - "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", - "_author": "David M. Lee, II ", - "_svn_revision": "$Revision: 404184 $", - "apiVersion": "1.0.0", - "swaggerVersion": "1.1", - "basePath": "http://localhost:8088/stasis", - "resourcePath": "/api-docs/endpoints.{format}", - "apis": [ - { - "path": "/endpoints", - "description": "Asterisk endpoints", - "operations": [ - { - "httpMethod": "GET", - "summary": "List all endpoints.", - "nickname": "list", - "responseClass": "List[Endpoint]" - } - ] - }, - { - "path": "/endpoints/{tech}", - "description": "Asterisk endpoints", - "operations": [ - { - "httpMethod": "GET", - "summary": "List available endoints for a given endpoint technology.", - "nickname": "listByTech", - "responseClass": "List[Endpoint]", - "parameters": [ - { - "name": "tech", - "description": "Technology of the endpoints (sip,iax2,...)", - "paramType": "path", - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Endpoints not found" - } - ] - } - ] - }, - { - "path": "/endpoints/{tech}/{resource}", - "description": "Single endpoint", - "operations": [ - { - "httpMethod": "GET", - "summary": "Details for an endpoint.", - "nickname": "get", - "responseClass": "Endpoint", - "parameters": [ - { - "name": "tech", - "description": "Technology of the endpoint", - "paramType": "path", - "dataType": "string" - }, - { - "name": "resource", - "description": "ID of the endpoint", - "paramType": "path", - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Endpoints not found" - } - ] - } - ] - } - ], - "models": { - "Endpoint": { - "id": "Endpoint", - "description": "An external device that may offer/accept calls to/from Asterisk.\n\nUnlike most resources, which have a single unique identifier, an endpoint is uniquely identified by the technology/resource pair.", - "properties": { - "technology": { - "type": "string", - "description": "Technology of the endpoint", - "required": true - }, - "resource": { - "type": "string", - "description": "Identifier of the endpoint, specific to the given technology.", - "required": true - }, - "state": { - "type": "string", - "description": "Endpoint's state", - "required": false, - "allowableValues": { - "valueType": "LIST", - "values": [ - "unknown", - "offline", - "online" - ] - } - }, - "channel_ids": { - "type": "List[string]", - "description": "Id's of channels associated with this endpoint", - "required": true - } - } - } - } -} diff --git a/codegen-data/ari_1_0_0/events.json b/codegen-data/ari_1_0_0/events.json deleted file mode 100644 index 8584ec22..00000000 --- a/codegen-data/ari_1_0_0/events.json +++ /dev/null @@ -1,477 +0,0 @@ -{ - "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", - "_author": "David M. Lee, II ", - "_svn_revision": "$Revision: 404184 $", - "apiVersion": "1.0.0", - "swaggerVersion": "1.2", - "basePath": "http://localhost:8088/stasis", - "resourcePath": "/api-docs/events.{format}", - "apis": [ - { - "path": "/events", - "description": "Events from Asterisk to applications", - "operations": [ - { - "httpMethod": "GET", - "upgrade": "websocket", - "websocketProtocol": "ari", - "summary": "WebSocket connection for events.", - "nickname": "eventWebsocket", - "responseClass": "Message", - "parameters": [ - { - "name": "app", - "description": "Applications to subscribe to.", - "paramType": "query", - "required": true, - "allowMultiple": true, - "dataType": "string" - } - ] - } - ] - } - ], - "models": { - "Message": { - "id": "Message", - "description": "Base type for errors and events", - "discriminator": "type", - "properties": { - "type": { - "type": "string", - "required": true, - "description": "Indicates the type of this message." - } - }, - "subTypes": [ - "MissingParams", - "Event" - ] - }, - "MissingParams": { - "id": "MissingParams", - "description": "Error event sent when required params are missing.", - "properties": { - "params": { - "required": true, - "type": "List[string]", - "description": "A list of the missing parameters" - } - } - }, - "Event": { - "id": "Event", - "description": "Base type for asynchronous events from Asterisk.", - "properties": { - "application": { - "type": "string", - "description": "Name of the application receiving the event.", - "required": true - }, - "timestamp": { - "type": "Date", - "description": "Time at which this event was created.", - "required": false - } - }, - "subTypes": [ - "DeviceStateChanged", - "PlaybackStarted", - "PlaybackFinished", - "RecordingStarted", - "RecordingFinished", - "RecordingFailed", - "ApplicationReplaced", - "BridgeCreated", - "BridgeDestroyed", - "BridgeMerged", - "ChannelCreated", - "ChannelDestroyed", - "ChannelEnteredBridge", - "ChannelLeftBridge", - "ChannelStateChange", - "ChannelDtmfReceived", - "ChannelDialplan", - "ChannelCallerId", - "ChannelUserevent", - "ChannelHangupRequest", - "ChannelVarset", - "EndpointStateChange", - "Dial", - "StasisEnd", - "StasisStart" - ] - }, - "DeviceStateChanged": { - "id": "DeviceStateChanged", - "description": "Notification that a device state has changed.", - "properties": { - "device_state": { - "type": "DeviceState", - "description": "Device state object", - "required": true - } - } - }, - "PlaybackStarted": { - "id": "PlaybackStarted", - "description": "Event showing the start of a media playback operation.", - "properties": { - "playback": { - "type": "Playback", - "description": "Playback control object", - "required": true - } - } - }, - "PlaybackFinished": { - "id": "PlaybackFinished", - "description": "Event showing the completion of a media playback operation.", - "properties": { - "playback": { - "type": "Playback", - "description": "Playback control object", - "required": true - } - } - }, - "RecordingStarted": { - "id": "RecordingStarted", - "extends": "Event", - "description": "Event showing the start of a recording operation.", - "properties": { - "recording": { - "type": "LiveRecording", - "description": "Recording control object", - "required": true - } - } - }, - "RecordingFinished": { - "id": "RecordingFinished", - "extends": "Event", - "description": "Event showing the completion of a recording operation.", - "properties": { - "recording": { - "type": "LiveRecording", - "description": "Recording control object", - "required": true - } - } - }, - "RecordingFailed": { - "id": "RecordingFailed", - "extends": "Event", - "description": "Event showing failure of a recording operation.", - "properties": { - "recording": { - "type": "LiveRecording", - "description": "Recording control object", - "required": true - } - } - }, - "ApplicationReplaced": { - "id": "ApplicationReplaced", - "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.", - "properties": {} - }, - "BridgeCreated": { - "id": "BridgeCreated", - "description": "Notification that a bridge has been created.", - "properties": { - "bridge": { - "required": true, - "type": "Bridge" - } - } - }, - "BridgeDestroyed": { - "id": "BridgeDestroyed", - "description": "Notification that a bridge has been destroyed.", - "properties": { - "bridge": { - "required": true, - "type": "Bridge" - } - } - }, - "BridgeMerged": { - "id": "BridgeMerged", - "description": "Notification that one bridge has merged into another.", - "properties": { - "bridge": { - "required": true, - "type": "Bridge" - }, - "bridge_from": { - "required": true, - "type": "Bridge" - } - } - }, - "ChannelCreated": { - "id": "ChannelCreated", - "description": "Notification that a channel has been created.", - "properties": { - "channel": { - "required": true, - "type": "Channel" - } - } - }, - "ChannelDestroyed": { - "id": "ChannelDestroyed", - "description": "Notification that a channel has been destroyed.", - "properties": { - "cause": { - "required": true, - "description": "Integer representation of the cause of the hangup", - "type": "int" - }, - "cause_txt": { - "required": true, - "description": "Text representation of the cause of the hangup", - "type": "string" - }, - "channel": { - "required": true, - "type": "Channel" - } - } - }, - "ChannelEnteredBridge": { - "id": "ChannelEnteredBridge", - "description": "Notification that a channel has entered a bridge.", - "properties": { - "bridge": { - "required": true, - "type": "Bridge" - }, - "channel": { - "type": "Channel" - } - } - }, - "ChannelLeftBridge": { - "id": "ChannelLeftBridge", - "description": "Notification that a channel has left a bridge.", - "properties": { - "bridge": { - "required": true, - "type": "Bridge" - }, - "channel": { - "required": true, - "type": "Channel" - } - } - }, - "ChannelStateChange": { - "id": "ChannelStateChange", - "description": "Notification of a channel's state change.", - "properties": { - "channel": { - "required": true, - "type": "Channel" - } - } - }, - "ChannelDtmfReceived": { - "id": "ChannelDtmfReceived", - "description": "DTMF received on a channel.\n\nThis event is sent when the DTMF ends. There is no notification about the start of DTMF", - "properties": { - "digit": { - "required": true, - "type": "string", - "description": "DTMF digit received (0-9, A-E, # or *)" - }, - "duration_ms": { - "required": true, - "type": "int", - "description": "Number of milliseconds DTMF was received" - }, - "channel": { - "required": true, - "type": "Channel", - "description": "The channel on which DTMF was received" - } - } - }, - "ChannelDialplan": { - "id": "ChannelDialplan", - "description": "Channel changed location in the dialplan.", - "properties": { - "channel": { - "required": true, - "type": "Channel", - "description": "The channel that changed dialplan location." - }, - "dialplan_app": { - "required": true, - "type": "string", - "description": "The application about to be executed." - }, - "dialplan_app_data": { - "required": true, - "type": "string", - "description": "The data to be passed to the application." - } - } - }, - "ChannelCallerId": { - "id": "ChannelCallerId", - "description": "Channel changed Caller ID.", - "properties": { - "caller_presentation": { - "required": true, - "type": "int", - "description": "The integer representation of the Caller Presentation value." - }, - "caller_presentation_txt": { - "required": true, - "type": "string", - "description": "The text representation of the Caller Presentation value." - }, - "channel": { - "required": true, - "type": "Channel", - "description": "The channel that changed Caller ID." - } - } - }, - "ChannelUserevent": { - "id": "ChannelUserevent", - "description": "User-generated event with additional user-defined fields in the object.", - "properties": { - "eventname": { - "required": true, - "type": "string", - "description": "The name of the user event." - }, - "channel": { - "required": true, - "type": "Channel", - "description": "The channel that signaled the user event." - }, - "userevent": { - "required": true, - "type": "object", - "description": "Custom Userevent data" - } - } - }, - "ChannelHangupRequest": { - "id": "ChannelHangupRequest", - "description": "A hangup was requested on the channel.", - "properties": { - "cause": { - "type": "int", - "description": "Integer representation of the cause of the hangup." - }, - "soft": { - "type": "boolean", - "description": "Whether the hangup request was a soft hangup request." - }, - "channel": { - "required": true, - "type": "Channel", - "description": "The channel on which the hangup was requested." - } - } - }, - "ChannelVarset": { - "id": "ChannelVarset", - "description": "Channel variable changed.", - "properties": { - "variable": { - "required": true, - "type": "string", - "description": "The variable that changed." - }, - "value": { - "required": true, - "type": "string", - "description": "The new value of the variable." - }, - "channel": { - "required": false, - "type": "Channel", - "description": "The channel on which the variable was set.\n\nIf missing, the variable is a global variable." - } - } - }, - "EndpointStateChange": { - "id": "EndpointStateChange", - "description": "Endpoint state changed.", - "properties": { - "endpoint": { - "required": true, - "type": "Endpoint" - } - } - }, - "Dial": { - "id": "Dial", - "description": "Dialing state has changed.", - "properties": { - "caller": { - "required": false, - "type": "Channel", - "description": "The calling channel." - }, - "peer": { - "required": true, - "type": "Channel", - "description": "The dialed channel." - }, - "forward": { - "required": false, - "type": "string", - "description": "Forwarding target requested by the original dialed channel." - }, - "forwarded": { - "required": false, - "type": "Channel", - "description": "Channel that the caller has been forwarded to." - }, - "dialstring": { - "required": false, - "type": "string", - "description": "The dial string for calling the peer channel." - }, - "dialstatus": { - "required": true, - "type": "string", - "description": "Current status of the dialing attempt to the peer." - } - } - }, - "StasisEnd": { - "id": "StasisEnd", - "description": "Notification that a channel has left a Stasis application.", - "properties": { - "channel": { - "required": true, - "type": "Channel" - } - } - }, - "StasisStart": { - "id": "StasisStart", - "description": "Notification that a channel has entered a Stasis application.", - "properties": { - "args": { - "required": true, - "type": "List[string]", - "description": "Arguments to the application" - }, - "channel": { - "required": true, - "type": "Channel" - } - } - } - } -} diff --git a/codegen-data/ari_1_0_0/playbacks.json b/codegen-data/ari_1_0_0/playbacks.json deleted file mode 100644 index 1f7ea587..00000000 --- a/codegen-data/ari_1_0_0/playbacks.json +++ /dev/null @@ -1,155 +0,0 @@ -{ - "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", - "_author": "David M. Lee, II ", - "_svn_revision": "$Revision: 404184 $", - "apiVersion": "1.0.0", - "swaggerVersion": "1.1", - "basePath": "http://localhost:8088/stasis", - "resourcePath": "/api-docs/playbacks.{format}", - "apis": [ - { - "path": "/playbacks/{playbackId}", - "description": "Control object for a playback operation.", - "operations": [ - { - "httpMethod": "GET", - "summary": "Get a playback's details.", - "nickname": "get", - "responseClass": "Playback", - "parameters": [ - { - "name": "playbackId", - "description": "Playback's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "The playback cannot be found" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Stop a playback.", - "nickname": "stop", - "responseClass": "void", - "parameters": [ - { - "name": "playbackId", - "description": "Playback's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "The playback cannot be found" - } - ] - } - ] - }, - { - "path": "/playbacks/{playbackId}/control", - "description": "Control object for a playback operation.", - "operations": [ - { - "httpMethod": "POST", - "summary": "Control a playback.", - "nickname": "control", - "responseClass": "void", - "parameters": [ - { - "name": "playbackId", - "description": "Playback's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "operation", - "description": "Operation to perform on the playback.", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string", - "allowableValues": { - "valueType": "LIST", - "values": [ - "restart", - "pause", - "unpause", - "reverse", - "forward" - ] - } - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "The provided operation parameter was invalid" - }, - { - "code": 404, - "reason": "The playback cannot be found" - }, - { - "code": 409, - "reason": "The operation cannot be performed in the playback's current state" - } -] - } - ] - } - ], - "models": { - "Playback": { - "id": "Playback", - "description": "Object representing the playback of media to a channel", - "properties": { - "id": { - "type": "string", - "description": "ID for this playback operation", - "required": true - }, - "media_uri": { - "type": "string", - "description": "URI for the media to play back.", - "required": true - }, - "target_uri": { - "type": "string", - "description": "URI for the channel or bridge to play the media on", - "required": true - }, - "language": { - "type": "string", - "description": "For media types that support multiple languages, the language requested for playback." - }, - "state": { - "type": "string", - "description": "Current state of the playback operation.", - "required": true, - "allowableValues": { - "valueType": "LIST", - "values": [ - "queued", - "playing", - "complete" - ] - } - } - } - } - } -} diff --git a/codegen-data/ari_1_0_0/recordings.json b/codegen-data/ari_1_0_0/recordings.json deleted file mode 100644 index 5fd266e5..00000000 --- a/codegen-data/ari_1_0_0/recordings.json +++ /dev/null @@ -1,326 +0,0 @@ -{ - "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", - "_author": "David M. Lee, II ", - "_svn_revision": "$Revision: 404184 $", - "apiVersion": "1.0.0", - "swaggerVersion": "1.1", - "basePath": "http://localhost:8088/stasis", - "resourcePath": "/api-docs/recordings.{format}", - "apis": [ - { - "path": "/recordings/stored", - "description": "Recordings", - "operations": [ - { - "httpMethod": "GET", - "summary": "List recordings that are complete.", - "nickname": "listStored", - "responseClass": "List[StoredRecording]" - } - ] - }, - { - "path": "/recordings/stored/{recordingName}", - "description": "Individual recording", - "operations": [ - { - "httpMethod": "GET", - "summary": "Get a stored recording's details.", - "nickname": "getStored", - "responseClass": "StoredRecording", - "parameters": [ - { - "name": "recordingName", - "description": "The name of the recording", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Recording not found" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Delete a stored recording.", - "nickname": "deleteStored", - "responseClass": "void", - "parameters": [ - { - "name": "recordingName", - "description": "The name of the recording", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Recording not found" - } - ] - } - ] - }, - { - "path": "/recordings/live/{recordingName}", - "description": "A recording that is in progress", - "operations": [ - { - "httpMethod": "GET", - "summary": "List live recordings.", - "nickname": "getLive", - "responseClass": "LiveRecording", - "parameters": [ - { - "name": "recordingName", - "description": "The name of the recording", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Recording not found" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Stop a live recording and discard it.", - "nickname": "cancel", - "responseClass": "void", - "parameters": [ - { - "name": "recordingName", - "description": "The name of the recording", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Recording not found" - } - ] - } - ] - }, - { - "path": "/recordings/live/{recordingName}/stop", - "operations": [ - { - "httpMethod": "POST", - "summary": "Stop a live recording and store it.", - "nickname": "stop", - "responseClass": "void", - "parameters": [ - { - "name": "recordingName", - "description": "The name of the recording", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Recording not found" - } - ] - } - ] - }, - { - "path": "/recordings/live/{recordingName}/pause", - "operations": [ - { - "httpMethod": "POST", - "summary": "Pause a live recording.", - "notes": "Pausing a recording suspends silence detection, which will be restarted when the recording is unpaused. Paused time is not included in the accounting for maxDurationSeconds.", - "nickname": "pause", - "responseClass": "void", - "parameters": [ - { - "name": "recordingName", - "description": "The name of the recording", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Recording not found" - }, - { - "code": 409, - "reason": "Recording not in session" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Unpause a live recording.", - "nickname": "unpause", - "responseClass": "void", - "parameters": [ - { - "name": "recordingName", - "description": "The name of the recording", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Recording not found" - }, - { - "code": 409, - "reason": "Recording not in session" - } - ] - } - ] - }, - { - "path": "/recordings/live/{recordingName}/mute", - "operations": [ - { - "httpMethod": "POST", - "summary": "Mute a live recording.", - "notes": "Muting a recording suspends silence detection, which will be restarted when the recording is unmuted.", - "nickname": "mute", - "responseClass": "void", - "parameters": [ - { - "name": "recordingName", - "description": "The name of the recording", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Recording not found" - }, - { - "code": 409, - "reason": "Recording not in session" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Unmute a live recording.", - "nickname": "unmute", - "responseClass": "void", - "parameters": [ - { - "name": "recordingName", - "description": "The name of the recording", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Recording not found" - }, - { - "code": 409, - "reason": "Recording not in session" - } - ] - } - ] - } - ], - "models": { - "StoredRecording": { - "id": "StoredRecording", - "description": "A past recording that may be played back.", - "properties": { - "name": { - "required": true, - "type": "string" - }, - "format": { - "required": true, - "type": "string" - } - } - }, - "LiveRecording": { - "id": "LiveRecording", - "description": "A recording that is in progress", - "properties": { - "name": { - "required": true, - "type": "string", - "description": "Base name for the recording" - }, - "format": { - "required": true, - "type": "string", - "description": "Recording format (wav, gsm, etc.)" - }, - "state": { - "required": false, - "type": "string", - "allowableValues": { - "valueType": "LIST", - "values": [ - "queued", - "recording", - "paused", - "done", - "failed", - "canceled" - ] - } - }, - "cause": { - "required": false, - "type": "string", - "description": "Cause for recording failure if failed" - }, - "state": { - "required": true, - "type": "string" - }, - "format": { - "required": true, - "type": "string" - } - } - } - } -} diff --git a/codegen-data/ari_1_0_0/sounds.json b/codegen-data/ari_1_0_0/sounds.json deleted file mode 100644 index 0825909d..00000000 --- a/codegen-data/ari_1_0_0/sounds.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", - "_author": "David M. Lee, II ", - "_svn_revision": "$Revision: 404184 $", - "apiVersion": "1.0.0", - "swaggerVersion": "1.1", - "basePath": "http://localhost:8088/stasis", - "resourcePath": "/api-docs/sounds.{format}", - "apis": [ - { - "path": "/sounds", - "description": "Sounds", - "operations": [ - { - "httpMethod": "GET", - "summary": "List all sounds.", - "nickname": "list", - "responseClass": "List[Sound]", - "parameters": [ - { - "name": "lang", - "description": "Lookup sound for a specific language.", - "paramType": "query", - "dataType": "string", - "required": false - }, - { - "name": "format", - "description": "Lookup sound in a specific format.", - "paramType": "query", - "dataType": "string", - "required": false, - "__note": "core show translation can show translation paths between formats, along with relative costs. so this could be just installed format, or we could follow that for transcoded formats." - } - ] - } - ] - }, - { - "path": "/sounds/{soundId}", - "description": "Individual sound", - "operations": [ - { - "httpMethod": "GET", - "summary": "Get a sound's details.", - "nickname": "get", - "responseClass": "Sound", - "parameters": [ - { - "name": "soundId", - "description": "Sound's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ] - } - ] - } - ], - "models": { - "FormatLangPair": { - "id": "FormatLangPair", - "description": "Identifies the format and language of a sound file", - "properties": { - "language": { - "required": true, - "type": "string" - }, - "format": { - "required": true, - "type": "string" - } - } - }, - "Sound": { - "id": "Sound", - "description": "A media file that may be played back.", - "properties": { - "id": { - "required": true, - "description": "Sound's identifier.", - "type": "string" - }, - "text": { - "required": false, - "description": "Text description of the sound, usually the words spoken.", - "type": "string" - }, - "formats": { - "required": true, - "description": "The formats and languages in which this sound is available.", - "type": "List[FormatLangPair]" - } - } - } - } -} diff --git a/codegen-data/ari_1_10_0/asterisk.json b/codegen-data/ari_1_10_0/asterisk.json deleted file mode 100644 index 0db20622..00000000 --- a/codegen-data/ari_1_10_0/asterisk.json +++ /dev/null @@ -1,692 +0,0 @@ -{ - "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", - "_author": "David M. Lee, II ", - "_svn_revision": "$Revision$", - "apiVersion": "1.7.0", - "swaggerVersion": "1.1", - "basePath": "http://localhost:8088/ari", - "resourcePath": "/api-docs/asterisk.{format}", - "apis": [ - { - "path": "/asterisk/config/dynamic/{configClass}/{objectType}/{id}", - "description": "Asterisk dynamic configuration", - "operations": [ - { - "httpMethod": "GET", - "summary": "Retrieve a dynamic configuration object.", - "nickname": "getObject", - "responseClass": "List[ConfigTuple]", - "parameters": [ - { - "name": "configClass", - "description": "The configuration class containing dynamic configuration objects.", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "objectType", - "description": "The type of configuration object to retrieve.", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "id", - "description": "The unique identifier of the object to retrieve.", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "{configClass|objectType|id} not found" - } - ] - }, - { - "httpMethod": "PUT", - "summary": "Create or update a dynamic configuration object.", - "nickname": "updateObject", - "responseClass": "List[ConfigTuple]", - "parameters": [ - { - "name": "configClass", - "description": "The configuration class containing dynamic configuration objects.", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "objectType", - "description": "The type of configuration object to create or update.", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "id", - "description": "The unique identifier of the object to create or update.", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "fields", - "description": "The body object should have a value that is a list of ConfigTuples, which provide the fields to update. Ex. [ { \"attribute\": \"directmedia\", \"value\": \"false\" } ]", - "paramType": "body", - "required": false, - "dataType": "containers", - "allowMultiple": false - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Bad request body" - }, - { - "code": 403, - "reason": "Could not create or update object" - }, - { - "code": 404, - "reason": "{configClass|objectType} not found" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Delete a dynamic configuration object.", - "nickname": "deleteObject", - "responseClass": "void", - "parameters": [ - { - "name": "configClass", - "description": "The configuration class containing dynamic configuration objects.", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "objectType", - "description": "The type of configuration object to delete.", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "id", - "description": "The unique identifier of the object to delete.", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 403, - "reason": "Could not delete object" - }, - { - "code": 404, - "reason": "{configClass|objectType|id} not found" - } - ] - } - ] - }, - { - "path": "/asterisk/info", - "description": "Asterisk system information (similar to core show settings)", - "operations": [ - { - "httpMethod": "GET", - "summary": "Gets Asterisk system information.", - "nickname": "getInfo", - "responseClass": "AsteriskInfo", - "parameters": [ - { - "name": "only", - "description": "Filter information returned", - "paramType": "query", - "required": false, - "allowMultiple": true, - "dataType": "string", - "allowableValues": { - "valueType": "LIST", - "values": [ - "build", - "system", - "config", - "status" - ] - } - } - ] - } - ] - }, - { - "path": "/asterisk/modules", - "description": "Asterisk modules", - "operations": [ - { - "httpMethod": "GET", - "summary": "List Asterisk modules.", - "nickname": "listModules", - "responseClass": "List[Module]" - } - ] - }, - { - "path": "/asterisk/modules/{moduleName}", - "description": "Asterisk module", - "operations": [ - { - "httpMethod": "GET", - "summary": "Get Asterisk module information.", - "nickname": "getModule", - "responseClass": "Module", - "parameters": [ - { - "name": "moduleName", - "description": "Module's name", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Module could not be found in running modules." - }, - { - "code": 409, - "reason": "Module information could not be retrieved." - } - ] - }, - { - "httpMethod": "POST", - "summary": "Load an Asterisk module.", - "nickname": "loadModule", - "responseClass": "void", - "parameters": [ - { - "name": "moduleName", - "description": "Module's name", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 409, - "reason": "Module could not be loaded." - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Unload an Asterisk module.", - "nickname": "unloadModule", - "responseClass": "void", - "parameters": [ - { - "name": "moduleName", - "description": "Module's name", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Module not found in running modules." - }, - { - "code": 409, - "reason": "Module could not be unloaded." - } - ] - }, - { - "httpMethod": "PUT", - "summary": "Reload an Asterisk module.", - "nickname": "reloadModule", - "responseClass": "void", - "parameters": [ - { - "name": "moduleName", - "description": "Module's name", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Module not found in running modules." - }, - { - "code": 409, - "reason": "Module could not be reloaded." - } - ] - } - ] - }, - { - "path": "/asterisk/logging", - "description": "Asterisk log channels", - "operations": [ - { - "httpMethod": "GET", - "summary": "Gets Asterisk log channel information.", - "nickname": "listLogChannels", - "responseClass": "List[LogChannel]" - } - ] - }, - { - "path": "/asterisk/logging/{logChannelName}", - "description": "Asterisk log channel", - "operations": [ - { - "httpMethod": "POST", - "summary": "Adds a log channel.", - "nickname": "addLog", - "responseClass": "void", - "parameters": [ - { - "name": "logChannelName", - "description": "The log channel to add", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "configuration", - "description": "levels of the log channel", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Bad request body" - }, - { - "code": 409, - "reason": "Log channel could not be created." - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Deletes a log channel.", - "nickname": "deleteLog", - "responseClass": "void", - "parameters": [ - { - "name": "logChannelName", - "description": "Log channels name", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Log channel does not exist." - } - ] - } - ] - }, - { - "path": "/asterisk/logging/{logChannelName}/rotate", - "description": "Asterisk log channel", - "operations": [ - { - "httpMethod": "PUT", - "summary": "Rotates a log channel.", - "nickname": "rotateLog", - "responseClass": "void", - "parameters": [ - { - "name": "logChannelName", - "description": "Log channel's name", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Log channel does not exist." - } - ] - } - ] - }, - { - "path": "/asterisk/variable", - "description": "Global variables", - "operations": [ - { - "httpMethod": "GET", - "summary": "Get the value of a global variable.", - "nickname": "getGlobalVar", - "responseClass": "Variable", - "parameters": [ - { - "name": "variable", - "description": "The variable to get", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Missing variable parameter." - } - ] - }, - { - "httpMethod": "POST", - "summary": "Set the value of a global variable.", - "nickname": "setGlobalVar", - "responseClass": "void", - "parameters": [ - { - "name": "variable", - "description": "The variable to set", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "value", - "description": "The value to set the variable to", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Missing variable parameter." - } - ] - } - ] - } - ], - "models": { - "BuildInfo": { - "id": "BuildInfo", - "description": "Info about how Asterisk was built", - "properties": { - "os": { - "required": true, - "type": "string", - "description": "OS Asterisk was built on." - }, - "kernel": { - "required": true, - "type": "string", - "description": "Kernel version Asterisk was built on." - }, - "options": { - "required": true, - "type": "string", - "description": "Compile time options, or empty string if default." - }, - "machine": { - "required": true, - "type": "string", - "description": "Machine architecture (x86_64, i686, ppc, etc.)" - }, - "date": { - "required": true, - "type": "string", - "description": "Date and time when Asterisk was built." - }, - "user": { - "required": true, - "type": "string", - "description": "Username that build Asterisk" - } - } - }, - "SystemInfo": { - "id": "SystemInfo", - "description": "Info about Asterisk", - "properties": { - "version": { - "required": true, - "type": "string", - "description": "Asterisk version." - }, - "entity_id": { - "required": true, - "type": "string", - "description": "" - } - } - }, - "SetId": { - "id": "SetId", - "description": "Effective user/group id", - "properties": { - "user": { - "required": true, - "type": "string", - "description": "Effective user id." - }, - "group": { - "required": true, - "type": "string", - "description": "Effective group id." - } - } - }, - "ConfigInfo": { - "id": "ConfigInfo", - "description": "Info about Asterisk configuration", - "properties": { - "name": { - "required": true, - "type": "string", - "description": "Asterisk system name." - }, - "default_language": { - "required": true, - "type": "string", - "description": "Default language for media playback." - }, - "max_channels": { - "required": false, - "type": "int", - "description": "Maximum number of simultaneous channels." - }, - "max_open_files": { - "required": false, - "type": "int", - "description": "Maximum number of open file handles (files, sockets)." - }, - "max_load": { - "required": false, - "type": "double", - "description": "Maximum load avg on system." - }, - "setid": { - "required": true, - "type": "SetId", - "description": "Effective user/group id for running Asterisk." - } - } - }, - "StatusInfo": { - "id": "StatusInfo", - "description": "Info about Asterisk status", - "properties": { - "startup_time": { - "required": true, - "type": "Date", - "description": "Time when Asterisk was started." - }, - "last_reload_time": { - "required": true, - "type": "Date", - "description": "Time when Asterisk was last reloaded." - } - } - }, - "AsteriskInfo": { - "id": "AsteriskInfo", - "description": "Asterisk system information", - "properties": { - "build": { - "required": false, - "type": "BuildInfo", - "description": "Info about how Asterisk was built" - }, - "system": { - "required": false, - "type": "SystemInfo", - "description": "Info about the system running Asterisk" - }, - "config": { - "required": false, - "type": "ConfigInfo", - "description": "Info about Asterisk configuration" - }, - "status": { - "required": false, - "type": "StatusInfo", - "description": "Info about Asterisk status" - } - } - }, - "Module": { - "id": "Module", - "description": "Details of an Asterisk module", - "properties": { - "name": { - "type": "string", - "description": "The name of this module", - "required": true - }, - "description": { - "type": "string", - "description": "The description of this module", - "required": true - }, - "use_count": { - "type": "int", - "description": "The number of times this module is being used", - "required": true - }, - "status": { - "type": "string", - "description": "The running status of this module", - "required": true - }, - "support_level": { - "type": "string", - "description": "The support state of this module", - "required": true - } - } - }, - "LogChannel": { - "id": "LogChannel", - "description": "Details of an Asterisk log channel", - "properties": { - "channel": { - "type": "string", - "description": "The log channel path", - "required": true - }, - "type": { - "type": "string", - "description": "Types of logs for the log channel", - "required": true - }, - "status": { - "type": "string", - "description": "Whether or not a log type is enabled", - "required": true - }, - "configuration": { - "type": "string", - "description": "The various log levels", - "required": true - } - } - }, - "Variable": { - "id": "Variable", - "description": "The value of a channel variable", - "properties": { - "value": { - "required": true, - "type": "string", - "description": "The value of the variable requested" - } - } - }, - "ConfigTuple": { - "id": "ConfigTuple", - "description": "A key/value pair that makes up part of a configuration object.", - "properties": { - "attribute": { - "required": true, - "type": "string", - "description": "A configuration object attribute." - }, - "value": { - "required": true, - "type": "string", - "description": "The value for the attribute." - } - } - } - } -} diff --git a/codegen-data/ari_1_10_0/bridges.json b/codegen-data/ari_1_10_0/bridges.json deleted file mode 100644 index ab2c6c2d..00000000 --- a/codegen-data/ari_1_10_0/bridges.json +++ /dev/null @@ -1,656 +0,0 @@ -{ - "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", - "_author": "David M. Lee, II ", - "_svn_revision": "$Revision$", - "apiVersion": "1.7.0", - "swaggerVersion": "1.1", - "basePath": "http://localhost:8088/ari", - "resourcePath": "/api-docs/bridges.{format}", - "apis": [ - { - "path": "/bridges", - "description": "Active bridges", - "operations": [ - { - "httpMethod": "GET", - "summary": "List all active bridges in Asterisk.", - "nickname": "list", - "responseClass": "List[Bridge]" - }, - { - "httpMethod": "POST", - "summary": "Create a new bridge.", - "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", - "nickname": "create", - "responseClass": "Bridge", - "parameters": [ - { - "name": "type", - "description": "Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media).", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "bridgeId", - "description": "Unique ID to give to the bridge being created.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "name", - "description": "Name to give to the bridge being created.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ] - } - ] - }, - { - "path": "/bridges/{bridgeId}", - "description": "Individual bridge", - "operations": [ - { - "httpMethod": "POST", - "summary": "Create a new bridge or updates an existing one.", - "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", - "nickname": "createWithId", - "responseClass": "Bridge", - "parameters": [ - { - "name": "type", - "description": "Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media) to set.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "bridgeId", - "description": "Unique ID to give to the bridge being created.", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "name", - "description": "Set the name of the bridge.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ] - }, - { - "httpMethod": "GET", - "summary": "Get bridge details.", - "nickname": "get", - "responseClass": "Bridge", - "parameters": [ - { - "name": "bridgeId", - "description": "Bridge's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Bridge not found" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Shut down a bridge.", - "notes": "If any channels are in this bridge, they will be removed and resume whatever they were doing beforehand.", - "nickname": "destroy", - "responseClass": "void", - "parameters": [ - { - "name": "bridgeId", - "description": "Bridge's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Bridge not found" - } - ] - } - ] - }, - { - "path": "/bridges/{bridgeId}/addChannel", - "description": "Add a channel to a bridge", - "operations": [ - { - "httpMethod": "POST", - "summary": "Add a channel to a bridge.", - "nickname": "addChannel", - "responseClass": "void", - "parameters": [ - { - "name": "bridgeId", - "description": "Bridge's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "channel", - "description": "Ids of channels to add to bridge", - "paramType": "query", - "required": true, - "allowMultiple": true, - "dataType": "string" - }, - { - "name": "role", - "description": "Channel's role in the bridge", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Channel not found" - }, - { - "code": 404, - "reason": "Bridge not found" - }, - { - "code": 409, - "reason": "Bridge not in Stasis application; Channel currently recording" - }, - { - "code": 422, - "reason": "Channel not in Stasis application" - } - ] - } - ] - }, - { - "path": "/bridges/{bridgeId}/removeChannel", - "description": "Remove a channel from a bridge", - "operations": [ - { - "httpMethod": "POST", - "summary": "Remove a channel from a bridge.", - "nickname": "removeChannel", - "responseClass": "void", - "parameters": [ - { - "name": "bridgeId", - "description": "Bridge's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "channel", - "description": "Ids of channels to remove from bridge", - "paramType": "query", - "required": true, - "allowMultiple": true, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Channel not found" - }, - { - "code": 404, - "reason": "Bridge not found" - }, - { - "code": 409, - "reason": "Bridge not in Stasis application" - }, - { - "code": 422, - "reason": "Channel not in this bridge" - } - ] - } - ] - }, - { - "path": "/bridges/{bridgeId}/moh", - "description": "Play music on hold to a bridge", - "operations": [ - { - "httpMethod": "POST", - "summary": "Play music on hold to a bridge or change the MOH class that is playing.", - "nickname": "startMoh", - "responseClass": "void", - "parameters": [ - { - "name": "bridgeId", - "description": "Bridge's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "mohClass", - "description": "Channel's id", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Bridge not found" - }, - { - "code": 409, - "reason": "Bridge not in Stasis application" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Stop playing music on hold to a bridge.", - "notes": "This will only stop music on hold being played via POST bridges/{bridgeId}/moh.", - "nickname": "stopMoh", - "responseClass": "void", - "parameters": [ - { - "name": "bridgeId", - "description": "Bridge's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Bridge not found" - }, - { - "code": 409, - "reason": "Bridge not in Stasis application" - } - ] - } - ] - }, - { - "path": "/bridges/{bridgeId}/play", - "description": "Play media to the participants of a bridge", - "operations": [ - { - "httpMethod": "POST", - "summary": "Start playback of media on a bridge.", - "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", - "nickname": "play", - "responseClass": "Playback", - "parameters": [ - { - "name": "bridgeId", - "description": "Bridge's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "media", - "description": "Media URIs to play.", - "paramType": "query", - "required": true, - "allowMultiple": true, - "dataType": "string" - }, - { - "name": "lang", - "description": "For sounds, selects language for sound.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "offsetms", - "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 0, - "allowableValues": { - "valueType": "RANGE", - "min": 0 - } - - }, - { - "name": "skipms", - "description": "Number of milliseconds to skip for forward/reverse operations.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 3000, - "allowableValues": { - "valueType": "RANGE", - "min": 0 - } - }, - { - "name": "playbackId", - "description": "Playback Id.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Bridge not found" - }, - { - "code": 409, - "reason": "Bridge not in a Stasis application" - } - ] - } - ] - }, - { - "path": "/bridges/{bridgeId}/play/{playbackId}", - "description": "Play media to a bridge", - "operations": [ - { - "httpMethod": "POST", - "summary": "Start playback of media on a bridge.", - "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", - "nickname": "playWithId", - "responseClass": "Playback", - "parameters": [ - { - "name": "bridgeId", - "description": "Bridge's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "playbackId", - "description": "Playback ID.", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "media", - "description": "Media URIs to play.", - "paramType": "query", - "required": true, - "allowMultiple": true, - "dataType": "string" - }, - { - "name": "lang", - "description": "For sounds, selects language for sound.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "offsetms", - "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 0, - "allowableValues": { - "valueType": "RANGE", - "min": 0 - } - }, - { - "name": "skipms", - "description": "Number of milliseconds to skip for forward/reverse operations.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 3000, - "allowableValues": { - "valueType": "RANGE", - "min": 0 - } - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Bridge not found" - }, - { - "code": 409, - "reason": "Bridge not in a Stasis application" - } - ] - - } - ] - }, - { - "path": "/bridges/{bridgeId}/record", - "description": "Record audio on a bridge", - "operations": [ - { - "httpMethod": "POST", - "summary": "Start a recording.", - "notes": "This records the mixed audio from all channels participating in this bridge.", - "nickname": "record", - "responseClass": "LiveRecording", - "parameters": [ - { - "name": "bridgeId", - "description": "Bridge's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "name", - "description": "Recording's filename", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "format", - "description": "Format to encode audio in", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "maxDurationSeconds", - "description": "Maximum duration of the recording, in seconds. 0 for no limit.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 0, - "allowableValues": { - "valueType": "RANGE", - "min": 0 - } - }, - { - "name": "maxSilenceSeconds", - "description": "Maximum duration of silence, in seconds. 0 for no limit.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 0, - "allowableValues": { - "valueType": "RANGE", - "min": 0 - } - }, - { - "name": "ifExists", - "description": "Action to take if a recording with the same name already exists.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string", - "defaultValue": "fail", - "allowableValues": { - "valueType": "LIST", - "values": [ - "fail", - "overwrite", - "append" - ] - } - }, - { - "name": "beep", - "description": "Play beep when recording begins", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "boolean", - "defaultValue": false - }, - { - "name": "terminateOn", - "description": "DTMF input to terminate recording.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string", - "defaultValue": "none", - "allowableValues": { - "valueType": "LIST", - "values": [ - "none", - "any", - "*", - "#" - ] - } - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Invalid parameters" - }, - { - "code": 404, - "reason": "Bridge not found" - }, - { - "code": 409, - "reason": "Bridge is not in a Stasis application; A recording with the same name already exists on the system and can not be overwritten because it is in progress or ifExists=fail" - }, - { - "code": 422, - "reason": "The format specified is unknown on this system" - } - ] - } - ] - } - ], - "models": { - "Bridge": { - "id": "Bridge", - "description": "The merging of media from one or more channels.\n\nEveryone on the bridge receives the same audio.", - "properties": { - "id": { - "type": "string", - "description": "Unique identifier for this bridge", - "required": true - }, - "technology": { - "type": "string", - "description": "Name of the current bridging technology", - "required": true - }, - "bridge_type": { - "type": "string", - "description": "Type of bridge technology", - "required": true, - "allowableValues": { - "valueType": "LIST", - "values": [ - "mixing", - "holding" - ] - } - }, - "bridge_class": { - "type": "string", - "description": "Bridging class", - "required": true - }, - "creator": { - "type": "string", - "description": "Entity that created the bridge", - "required": true - }, - "name": { - "type": "string", - "description": "Name the creator gave the bridge", - "required": true - }, - "channels": { - "type": "List[string]", - "description": "Ids of channels participating in this bridge", - "required": true - } - } - } - } -} diff --git a/codegen-data/ari_1_10_0/channels.json b/codegen-data/ari_1_10_0/channels.json deleted file mode 100644 index 75feeb10..00000000 --- a/codegen-data/ari_1_10_0/channels.json +++ /dev/null @@ -1,1753 +0,0 @@ -{ - "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", - "_author": "David M. Lee, II ", - "_svn_revision": "$Revision$", - "apiVersion": "1.7.0", - "swaggerVersion": "1.1", - "basePath": "http://localhost:8088/ari", - "resourcePath": "/api-docs/channels.{format}", - "apis": [ - { - "path": "/channels", - "description": "Active channels", - "operations": [ - { - "httpMethod": "GET", - "summary": "List all active channels in Asterisk.", - "nickname": "list", - "responseClass": "List[Channel]" - }, - { - "httpMethod": "POST", - "summary": "Create a new channel (originate).", - "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.", - "nickname": "originate", - "responseClass": "Channel", - "parameters": [ - { - "name": "endpoint", - "description": "Endpoint to call.", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "extension", - "description": "The extension to dial after the endpoint answers. Mutually exclusive with 'app'.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "context", - "description": "The context to dial after the endpoint answers. If omitted, uses 'default'. Mutually exclusive with 'app'.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "priority", - "description": "The priority to dial after the endpoint answers. If omitted, uses 1. Mutually exclusive with 'app'.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "long" - }, - { - "name": "label", - "description": "The label to dial after the endpoint answers. Will supersede 'priority' if provided. Mutually exclusive with 'app'.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "app", - "description": "The application that is subscribed to the originated channel. When the channel is answered, it will be passed to this Stasis application. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "appArgs", - "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "callerId", - "description": "CallerID to use when dialing the endpoint or extension.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "timeout", - "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 30 - }, - { - "name": "variables", - "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", - "paramType": "body", - "required": false, - "dataType": "containers", - "allowMultiple": false - }, - { - "name": "channelId", - "description": "The unique id to assign the channel on creation.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "otherChannelId", - "description": "The unique id to assign the second channel when using local channels.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "originator", - "description": "The unique id of the channel which is originating this one.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "formats", - "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Invalid parameters for originating a channel." - } - ] - } - ] - }, - { - "path": "/channels/create", - "description": "Create a channel and place it in a Stasis app, but do not dial the channel yet.", - "operations": [ - { - "httpMethod": "POST", - "summary": "Create channel.", - "nickname": "create", - "responseClass": "Channel", - "parameters": [ - { - "name": "endpoint", - "description": "Endpoint for channel communication", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "app", - "description": "Stasis Application to place channel into", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "appArgs", - "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "channelId", - "description": "The unique id to assign the channel on creation.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "otherChannelId", - "description": "The unique id to assign the second channel when using local channels.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "originator", - "description": "Unique ID of the calling channel", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "formats", - "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}", - "description": "Active channel", - "operations": [ - { - "httpMethod": "GET", - "summary": "Channel details.", - "nickname": "get", - "responseClass": "Channel", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - } - ] - }, - { - "httpMethod": "POST", - "summary": "Create a new channel (originate with id).", - "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.", - "nickname": "originateWithId", - "responseClass": "Channel", - "parameters": [ - { - "name": "channelId", - "description": "The unique id to assign the channel on creation.", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "endpoint", - "description": "Endpoint to call.", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "extension", - "description": "The extension to dial after the endpoint answers. Mutually exclusive with 'app'.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "context", - "description": "The context to dial after the endpoint answers. If omitted, uses 'default'. Mutually exclusive with 'app'.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "priority", - "description": "The priority to dial after the endpoint answers. If omitted, uses 1. Mutually exclusive with 'app'.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "long" - }, - { - "name": "label", - "description": "The label to dial after the endpoint answers. Will supersede 'priority' if provided. Mutually exclusive with 'app'.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "app", - "description": "The application that is subscribed to the originated channel. When the channel is answered, it will be passed to this Stasis application. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "appArgs", - "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "callerId", - "description": "CallerID to use when dialing the endpoint or extension.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "timeout", - "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 30 - }, - { - "name": "variables", - "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", - "paramType": "body", - "required": false, - "dataType": "containers", - "allowMultiple": false - }, - { - "name": "otherChannelId", - "description": "The unique id to assign the second channel when using local channels.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "originator", - "description": "The unique id of the channel which is originating this one.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "formats", - "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Invalid parameters for originating a channel." - } - ] - - }, - { - "httpMethod": "DELETE", - "summary": "Delete (i.e. hangup) a channel.", - "nickname": "hangup", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "reason", - "description": "Reason for hanging up the channel", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string", - "defalutValue": "normal", - "allowableValues": { - "valueType": "LIST", - "values": [ - "normal", - "busy", - "congestion", - "no_answer" - ] - } - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Invalid reason for hangup provided" - }, - { - "code": 404, - "reason": "Channel not found" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/continue", - "description": "Exit application; continue execution in the dialplan", - "operations": [ - { - "httpMethod": "POST", - "summary": "Exit application; continue execution in the dialplan.", - "nickname": "continueInDialplan", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "context", - "description": "The context to continue to.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "extension", - "description": "The extension to continue to.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "priority", - "description": "The priority to continue to.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int" - }, - { - "name": "label", - "description": "The label to continue to - will supersede 'priority' if both are provided.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - }, - { - "code": 412, - "reason": "Channel in invalid state" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/redirect", - "description": "Inform the channel that it should redirect itself to a different location. Note that this will almost certainly cause the channel to exit the application.", - "operations": [ - { - "httpMethod": "POST", - "summary": "Redirect the channel to a different location.", - "nickname": "redirect", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "endpoint", - "description": "The endpoint to redirect the channel to", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Endpoint parameter not provided" - }, - { - "code": 404, - "reason": "Channel or endpoint not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - }, - { - "code": 422, - "reason": "Endpoint is not the same type as the channel" - }, - { - "code": 412, - "reason": "Channel in invalid state" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/answer", - "description": "Answer a channel", - "operations": [ - { - "httpMethod": "POST", - "summary": "Answer a channel.", - "nickname": "answer", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - }, - { - "code": 412, - "reason": "Channel in invalid state" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/ring", - "description": "Send a ringing indication to a channel", - "operations": [ - { - "httpMethod": "POST", - "summary": "Indicate ringing to a channel.", - "nickname": "ring", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - }, - { - "code": 412, - "reason": "Channel in invalid state" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Stop ringing indication on a channel if locally generated.", - "nickname": "ringStop", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - }, - { - "code": 412, - "reason": "Channel in invalid state" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/dtmf", - "description": "Send DTMF to a channel", - "operations": [ - { - "httpMethod": "POST", - "summary": "Send provided DTMF to a given channel.", - "nickname": "sendDTMF", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "dtmf", - "description": "DTMF To send.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "before", - "description": "Amount of time to wait before DTMF digits (specified in milliseconds) start.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 0 - }, - { - "name": "between", - "description": "Amount of time in between DTMF digits (specified in milliseconds).", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 100 - }, - { - "name": "duration", - "description": "Length of each DTMF digit (specified in milliseconds).", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 100 - }, - { - "name": "after", - "description": "Amount of time to wait after DTMF digits (specified in milliseconds) end.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 0 - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "DTMF is required" - }, - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - }, - { - "code": 412, - "reason": "Channel in invalid state" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/mute", - "description": "Mute a channel", - "operations": [ - { - "httpMethod": "POST", - "summary": "Mute a channel.", - "nickname": "mute", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "direction", - "description": "Direction in which to mute audio", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string", - "defaultValue": "both", - "allowableValues": { - "valueType": "LIST", - "values": [ - "both", - "in", - "out" - ] - } - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - }, - { - "code": 412, - "reason": "Channel in invalid state" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Unmute a channel.", - "nickname": "unmute", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "direction", - "description": "Direction in which to unmute audio", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string", - "defaultValue": "both", - "allowableValues": { - "valueType": "LIST", - "values": [ - "both", - "in", - "out" - ] - } - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - }, - { - "code": 412, - "reason": "Channel in invalid state" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/hold", - "description": "Put a channel on hold", - "operations": [ - { - "httpMethod": "POST", - "summary": "Hold a channel.", - "nickname": "hold", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - }, - { - "code": 412, - "reason": "Channel in invalid state" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Remove a channel from hold.", - "nickname": "unhold", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - }, - { - "code": 412, - "reason": "Channel in invalid state" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/moh", - "description": "Play music on hold to a channel", - "operations": [ - { - "httpMethod": "POST", - "summary": "Play music on hold to a channel.", - "notes": "Using media operations such as /play on a channel playing MOH in this manner will suspend MOH without resuming automatically. If continuing music on hold is desired, the stasis application must reinitiate music on hold.", - "nickname": "startMoh", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "mohClass", - "description": "Music on hold class to use", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - }, - { - "code": 412, - "reason": "Channel in invalid state" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Stop playing music on hold to a channel.", - "nickname": "stopMoh", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - }, - { - "code": 412, - "reason": "Channel in invalid state" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/silence", - "description": "Play silence to a channel", - "operations": [ - { - "httpMethod": "POST", - "summary": "Play silence to a channel.", - "notes": "Using media operations such as /play on a channel playing silence in this manner will suspend silence without resuming automatically.", - "nickname": "startSilence", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - }, - { - "code": 412, - "reason": "Channel in invalid state" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Stop playing silence to a channel.", - "nickname": "stopSilence", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - }, - { - "code": 412, - "reason": "Channel in invalid state" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/play", - "description": "Play media to a channel", - "operations": [ - { - "httpMethod": "POST", - "summary": "Start playback of media.", - "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", - "nickname": "play", - "responseClass": "Playback", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "media", - "description": "Media URIs to play.", - "paramType": "query", - "required": true, - "allowMultiple": true, - "dataType": "string" - }, - { - "name": "lang", - "description": "For sounds, selects language for sound.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "offsetms", - "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int" - }, - { - "name": "skipms", - "description": "Number of milliseconds to skip for forward/reverse operations.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 3000 - }, - { - "name": "playbackId", - "description": "Playback ID.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - }, - { - "code": 412, - "reason": "Channel in invalid state" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/play/{playbackId}", - "description": "Play media to a channel", - "operations": [ - { - "httpMethod": "POST", - "summary": "Start playback of media and specify the playbackId.", - "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", - "nickname": "playWithId", - "responseClass": "Playback", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "playbackId", - "description": "Playback ID.", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "media", - "description": "Media URIs to play.", - "paramType": "query", - "required": true, - "allowMultiple": true, - "dataType": "string" - }, - { - "name": "lang", - "description": "For sounds, selects language for sound.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "offsetms", - "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int" - }, - { - "name": "skipms", - "description": "Number of milliseconds to skip for forward/reverse operations.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 3000 - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - }, - { - "code": 412, - "reason": "Channel in invalid state" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/record", - "description": "Record audio from a channel", - "operations": [ - { - "httpMethod": "POST", - "summary": "Start a recording.", - "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.", - "nickname": "record", - "responseClass": "LiveRecording", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "name", - "description": "Recording's filename", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "format", - "description": "Format to encode audio in", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "maxDurationSeconds", - "description": "Maximum duration of the recording, in seconds. 0 for no limit", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 0, - "allowableValues": { - "valueType": "RANGE", - "min": 0 - } - }, - { - "name": "maxSilenceSeconds", - "description": "Maximum duration of silence, in seconds. 0 for no limit", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 0, - "allowableValues": { - "valueType": "RANGE", - "min": 0 - } - }, - { - "name": "ifExists", - "description": "Action to take if a recording with the same name already exists.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string", - "defaultValue": "fail", - "allowableValues": { - "valueType": "LIST", - "values": [ - "fail", - "overwrite", - "append" - ] - } - }, - { - "name": "beep", - "description": "Play beep when recording begins", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "boolean", - "defaultValue": false - }, - { - "name": "terminateOn", - "description": "DTMF input to terminate recording", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string", - "defaultValue": "none", - "allowableValues": { - "valueType": "LIST", - "values": [ - "none", - "any", - "*", - "#" - ] - } - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Invalid parameters" - }, - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "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" - }, - { - "code": 422, - "reason": "The format specified is unknown on this system" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/variable", - "description": "Variables on a channel", - "operations": [ - { - "httpMethod": "GET", - "summary": "Get the value of a channel variable or function.", - "nickname": "getChannelVar", - "responseClass": "Variable", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "variable", - "description": "The channel variable or function to get", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Missing variable parameter." - }, - { - "code": 404, - "reason": "Channel or variable not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - }, - { - "httpMethod": "POST", - "summary": "Set the value of a channel variable or function.", - "nickname": "setChannelVar", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "variable", - "description": "The channel variable or function to set", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "value", - "description": "The value to set the variable to", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Missing variable parameter." - }, - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/snoop", - "description": "Snoop (spy/whisper) on a channel", - "operations": [ - { - "httpMethod": "POST", - "summary": "Start snooping.", - "notes": "Snoop (spy/whisper) on a specific channel.", - "nickname": "snoopChannel", - "responseClass": "Channel", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "spy", - "description": "Direction of audio to spy on", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string", - "defaultValue": "none", - "allowableValues": { - "valueType": "LIST", - "values": [ - "none", - "both", - "out", - "in" - ] - } - }, - { - "name": "whisper", - "description": "Direction of audio to whisper into", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string", - "defaultValue": "none", - "allowableValues": { - "valueType": "LIST", - "values": [ - "none", - "both", - "out", - "in" - ] - } - }, - { - "name": "app", - "description": "Application the snooping channel is placed into", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "appArgs", - "description": "The application arguments to pass to the Stasis application", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "snoopId", - "description": "Unique ID to assign to snooping channel", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Invalid parameters" - }, - { - "code": 404, - "reason": "Channel not found" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/snoop/{snoopId}", - "description": "Snoop (spy/whisper) on a channel", - "operations": [ - { - "httpMethod": "POST", - "summary": "Start snooping.", - "notes": "Snoop (spy/whisper) on a specific channel.", - "nickname": "snoopChannelWithId", - "responseClass": "Channel", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "snoopId", - "description": "Unique ID to assign to snooping channel", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "spy", - "description": "Direction of audio to spy on", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string", - "defaultValue": "none", - "allowableValues": { - "valueType": "LIST", - "values": [ - "none", - "both", - "out", - "in" - ] - } - }, - { - "name": "whisper", - "description": "Direction of audio to whisper into", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string", - "defaultValue": "none", - "allowableValues": { - "valueType": "LIST", - "values": [ - "none", - "both", - "out", - "in" - ] - } - }, - { - "name": "app", - "description": "Application the snooping channel is placed into", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "appArgs", - "description": "The application arguments to pass to the Stasis application", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Invalid parameters" - }, - { - "code": 404, - "reason": "Channel not found" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/dial", - "description": "Dial a channel", - "operations": [ - { - "httpMethod": "POST", - "summary": "Dial a created channel.", - "nickname": "dial", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "caller", - "description": "Channel ID of caller", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "timeout", - "description": "Dial timeout", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 0, - "allowableValues": { - "valueType": "RANGE", - "min": 0 - } - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel cannot be found." - }, - { - "code": 409, - "reason": "Channel cannot be dialed." - } - ] - } - ] - } - ], - "models": { - "Dialed": { - "id": "Dialed", - "description": "Dialed channel information.", - "properties": {} - }, - "DialplanCEP": { - "id": "DialplanCEP", - "description": "Dialplan location (context/extension/priority)", - "properties": { - "context": { - "required": true, - "type": "string", - "description": "Context in the dialplan" - }, - "exten": { - "required": true, - "type": "string", - "description": "Extension in the dialplan" - }, - "priority": { - "required": true, - "type": "long", - "description": "Priority in the dialplan" - } - } - }, - "CallerID": { - "id": "CallerID", - "description": "Caller identification", - "properties": { - "name": { - "required": true, - "type": "string" - }, - "number": { - "required": true, - "type": "string" - } - } - }, - "Channel": { - "id": "Channel", - "description": "A specific communication connection between Asterisk and an Endpoint.", - "properties": { - "id": { - "required": true, - "type": "string", - "description": "Unique identifier of the channel.\n\nThis is the same as the Uniqueid field in AMI." - }, - "name": { - "required": true, - "type": "string", - "description": "Name of the channel (i.e. SIP/foo-0000a7e3)" - }, - "state": { - "required": true, - "type": "string", - "allowableValues": { - "valueType": "LIST", - "values": [ - "Down", - "Rsrved", - "OffHook", - "Dialing", - "Ring", - "Ringing", - "Up", - "Busy", - "Dialing Offhook", - "Pre-ring", - "Unknown" - ] - } - }, - "caller": { - "required": true, - "type": "CallerID" - }, - "connected": { - "required": true, - "type": "CallerID" - }, - "accountcode": { - "required": true, - "type": "string" - }, - "dialplan": { - "required": true, - "type": "DialplanCEP", - "description": "Current location in the dialplan" - }, - "creationtime": { - "required": true, - "type": "Date", - "description": "Timestamp when channel was created" - }, - "language": { - "required": true, - "type": "string", - "description": "The default spoken language" - } - } - } - } -} diff --git a/codegen-data/ari_1_10_0/events.json b/codegen-data/ari_1_10_0/events.json deleted file mode 100644 index ca261610..00000000 --- a/codegen-data/ari_1_10_0/events.json +++ /dev/null @@ -1,875 +0,0 @@ -{ - "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", - "_author": "David M. Lee, II ", - "_svn_revision": "$Revision$", - "apiVersion": "1.7.0", - "swaggerVersion": "1.2", - "basePath": "http://localhost:8088/ari", - "resourcePath": "/api-docs/events.{format}", - "apis": [ - { - "path": "/events", - "description": "Events from Asterisk to applications", - "operations": [ - { - "httpMethod": "GET", - "upgrade": "websocket", - "websocketProtocol": "ari", - "summary": "WebSocket connection for events.", - "nickname": "eventWebsocket", - "responseClass": "Message", - "parameters": [ - { - "name": "app", - "description": "Applications to subscribe to.", - "paramType": "query", - "required": true, - "allowMultiple": true, - "dataType": "string" - }, - { - "name": "subscribeAll", - "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'.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "boolean" - } - ] - } - ] - }, - { - "path": "/events/user/{eventName}", - "description": "Stasis application user events", - "operations": [ - { - "httpMethod": "POST", - "summary": "Generate a user event.", - "nickname": "userEvent", - "responseClass": "void", - "parameters": [ - { - "name": "eventName", - "description": "Event name", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "application", - "description": "The name of the application that will receive this event", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "source", - "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}/{resource}, deviceState:{deviceName}", - "paramType": "query", - "required": false, - "allowMultiple": true, - "dataType": "string" - }, - { - "name": "variables", - "description": "The \"variables\" key in the body object holds custom key/value pairs to add to the user event. Ex. { \"variables\": { \"key\": \"value\" } }", - "paramType": "body", - "required": false, - "allowMultiple": false, - "dataType": "containers" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Application does not exist." - }, - { - "code": 422, - "reason": "Event source not found." - }, - { - "code": 400, - "reason": "Invalid even tsource URI or userevent data." - } - ] - } - ] - } - ], - "models": { - "Message": { - "id": "Message", - "description": "Base type for errors and events", - "discriminator": "type", - "properties": { - "type": { - "type": "string", - "required": true, - "description": "Indicates the type of this message." - } - }, - "subTypes": [ - "MissingParams", - "Event" - ] - }, - "MissingParams": { - "id": "MissingParams", - "description": "Error event sent when required params are missing.", - "properties": { - "params": { - "required": true, - "type": "List[string]", - "description": "A list of the missing parameters" - } - } - }, - "Event": { - "id": "Event", - "description": "Base type for asynchronous events from Asterisk.", - "properties": { - "application": { - "type": "string", - "description": "Name of the application receiving the event.", - "required": true - }, - "timestamp": { - "type": "Date", - "description": "Time at which this event was created.", - "required": false - } - }, - "subTypes": [ - "DeviceStateChanged", - "PlaybackStarted", - "PlaybackContinuing", - "PlaybackFinished", - "RecordingStarted", - "RecordingFinished", - "RecordingFailed", - "ApplicationReplaced", - "BridgeCreated", - "BridgeDestroyed", - "BridgeMerged", - "BridgeBlindTransfer", - "BridgeAttendedTransfer", - "ChannelCreated", - "ChannelDestroyed", - "ChannelEnteredBridge", - "ChannelLeftBridge", - "ChannelStateChange", - "ChannelDtmfReceived", - "ChannelDialplan", - "ChannelCallerId", - "ChannelUserevent", - "ChannelHangupRequest", - "ChannelVarset", - "ChannelTalkingStarted", - "ChannelTalkingFinished", - "ChannelHold", - "ChannelUnhold", - "ContactStatusChange", - "EndpointStateChange", - "Dial", - "StasisEnd", - "StasisStart", - "TextMessageReceived", - "ChannelConnectedLine", - "PeerStatusChange" - ] - }, - "ContactInfo": { - "id": "ContactInfo", - "description": "Detailed information about a contact on an endpoint.", - "properties": { - "uri": { - "type": "string", - "description": "The location of the contact.", - "required": true - }, - "contact_status": { - "type": "string", - "description": "The current status of the contact.", - "required": true, - "allowableValues": { - "valueType": "LIST", - "values": [ - "Unreachable", - "Reachable", - "Unknown", - "Created", - "Removed" - ] - } - }, - "aor": { - "type": "string", - "description": "The Address of Record this contact belongs to.", - "required": true - }, - "roundtrip_usec": { - "type": "string", - "description": "Current round trip time, in microseconds, for the contact.", - "required": false - } - } - }, - "Peer": { - "id": "Peer", - "description": "Detailed information about a remote peer that communicates with Asterisk.", - "properties": { - "peer_status": { - "type": "string", - "description": "The current state of the peer. Note that the values of the status are dependent on the underlying peer technology.", - "required": true - }, - "cause": { - "type": "string", - "description": "An optional reason associated with the change in peer_status.", - "required": false - }, - "address": { - "type": "string", - "description": "The IP address of the peer.", - "required": false - }, - "port": { - "type": "string", - "description": "The port of the peer.", - "required": false - }, - "time": { - "type": "string", - "description": "The last known time the peer was contacted.", - "required": false - } - } - }, - "DeviceStateChanged": { - "id": "DeviceStateChanged", - "description": "Notification that a device state has changed.", - "properties": { - "device_state": { - "type": "DeviceState", - "description": "Device state object", - "required": true - } - } - }, - "PlaybackStarted": { - "id": "PlaybackStarted", - "description": "Event showing the start of a media playback operation.", - "properties": { - "playback": { - "type": "Playback", - "description": "Playback control object", - "required": true - } - } - }, - "PlaybackContinuing": { - "id": "PlaybackContinuing", - "description": "Event showing the continuation of a media playback operation from one media URI to the next in the list.", - "properties": { - "playback": { - "type": "Playback", - "description": "Playback control object", - "required": true - } - } - }, - "PlaybackFinished": { - "id": "PlaybackFinished", - "description": "Event showing the completion of a media playback operation.", - "properties": { - "playback": { - "type": "Playback", - "description": "Playback control object", - "required": true - } - } - }, - "RecordingStarted": { - "id": "RecordingStarted", - "description": "Event showing the start of a recording operation.", - "properties": { - "recording": { - "type": "LiveRecording", - "description": "Recording control object", - "required": true - } - } - }, - "RecordingFinished": { - "id": "RecordingFinished", - "description": "Event showing the completion of a recording operation.", - "properties": { - "recording": { - "type": "LiveRecording", - "description": "Recording control object", - "required": true - } - } - }, - "RecordingFailed": { - "id": "RecordingFailed", - "description": "Event showing failure of a recording operation.", - "properties": { - "recording": { - "type": "LiveRecording", - "description": "Recording control object", - "required": true - } - } - }, - "ApplicationReplaced": { - "id": "ApplicationReplaced", - "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.", - "properties": {} - }, - "BridgeCreated": { - "id": "BridgeCreated", - "description": "Notification that a bridge has been created.", - "properties": { - "bridge": { - "required": true, - "type": "Bridge" - } - } - }, - "BridgeDestroyed": { - "id": "BridgeDestroyed", - "description": "Notification that a bridge has been destroyed.", - "properties": { - "bridge": { - "required": true, - "type": "Bridge" - } - } - }, - "BridgeMerged": { - "id": "BridgeMerged", - "description": "Notification that one bridge has merged into another.", - "properties": { - "bridge": { - "required": true, - "type": "Bridge" - }, - "bridge_from": { - "required": true, - "type": "Bridge" - } - } - }, - "BridgeBlindTransfer": { - "id": "BridgeBlindTransfer", - "description": "Notification that a blind transfer has occurred.", - "properties": { - "channel": { - "description": "The channel performing the blind transfer", - "required": true, - "type": "Channel" - }, - "replace_channel": { - "description": "The channel that is replacing transferer when the transferee(s) can not be transferred directly", - "required": false, - "type": "Channel" - }, - "transferee": { - "description": "The channel that is being transferred", - "required": false, - "type": "Channel" - }, - "exten": { - "description": "The extension transferred to", - "required": true, - "type": "string" - }, - "context": { - "description": "The context transferred to", - "required": true, - "type": "string" - }, - "result": { - "description": "The result of the transfer attempt", - "required": true, - "type": "string" - }, - "is_external": { - "description": "Whether the transfer was externally initiated or not", - "required": true, - "type": "boolean" - }, - "bridge": { - "description": "The bridge being transferred", - "type": "Bridge" - } - } - }, - "BridgeAttendedTransfer": { - "id": "BridgeAttendedTransfer", - "description": "Notification that an attended transfer has occurred.", - "properties": { - "transferer_first_leg": { - "description": "First leg of the transferer", - "required": true, - "type": "Channel" - }, - "transferer_second_leg": { - "description": "Second leg of the transferer", - "required": true, - "type": "Channel" - }, - "replace_channel": { - "description": "The channel that is replacing transferer_first_leg in the swap", - "required": false, - "type": "Channel" - }, - "transferee": { - "description": "The channel that is being transferred", - "required": false, - "type": "Channel" - }, - "transfer_target": { - "description": "The channel that is being transferred to", - "required": false, - "type": "Channel" - }, - "result": { - "description": "The result of the transfer attempt", - "required": true, - "type": "string" - }, - "is_external": { - "description": "Whether the transfer was externally initiated or not", - "required": true, - "type": "boolean" - }, - "transferer_first_leg_bridge": { - "description": "Bridge the transferer first leg is in", - "type": "Bridge" - }, - "transferer_second_leg_bridge": { - "description": "Bridge the transferer second leg is in", - "type": "Bridge" - }, - "destination_type": { - "description": "How the transfer was accomplished", - "required": true, - "type": "string" - }, - "destination_bridge": { - "description": "Bridge that survived the merge result", - "type": "string" - }, - "destination_application": { - "description": "Application that has been transferred into", - "type": "string" - }, - "destination_link_first_leg": { - "description": "First leg of a link transfer result", - "type": "Channel" - }, - "destination_link_second_leg": { - "description": "Second leg of a link transfer result", - "type": "Channel" - }, - "destination_threeway_channel": { - "description": "Transferer channel that survived the threeway result", - "type": "Channel" - }, - "destination_threeway_bridge": { - "description": "Bridge that survived the threeway result", - "type": "Bridge" - } - } - }, - "ChannelCreated": { - "id": "ChannelCreated", - "description": "Notification that a channel has been created.", - "properties": { - "channel": { - "required": true, - "type": "Channel" - } - } - }, - "ChannelDestroyed": { - "id": "ChannelDestroyed", - "description": "Notification that a channel has been destroyed.", - "properties": { - "cause": { - "required": true, - "description": "Integer representation of the cause of the hangup", - "type": "int" - }, - "cause_txt": { - "required": true, - "description": "Text representation of the cause of the hangup", - "type": "string" - }, - "channel": { - "required": true, - "type": "Channel" - } - } - }, - "ChannelEnteredBridge": { - "id": "ChannelEnteredBridge", - "description": "Notification that a channel has entered a bridge.", - "properties": { - "bridge": { - "required": true, - "type": "Bridge" - }, - "channel": { - "type": "Channel" - } - } - }, - "ChannelLeftBridge": { - "id": "ChannelLeftBridge", - "description": "Notification that a channel has left a bridge.", - "properties": { - "bridge": { - "required": true, - "type": "Bridge" - }, - "channel": { - "required": true, - "type": "Channel" - } - } - }, - "ChannelStateChange": { - "id": "ChannelStateChange", - "description": "Notification of a channel's state change.", - "properties": { - "channel": { - "required": true, - "type": "Channel" - } - } - }, - "ChannelDtmfReceived": { - "id": "ChannelDtmfReceived", - "description": "DTMF received on a channel.\n\nThis event is sent when the DTMF ends. There is no notification about the start of DTMF", - "properties": { - "digit": { - "required": true, - "type": "string", - "description": "DTMF digit received (0-9, A-E, # or *)" - }, - "duration_ms": { - "required": true, - "type": "int", - "description": "Number of milliseconds DTMF was received" - }, - "channel": { - "required": true, - "type": "Channel", - "description": "The channel on which DTMF was received" - } - } - }, - "ChannelDialplan": { - "id": "ChannelDialplan", - "description": "Channel changed location in the dialplan.", - "properties": { - "channel": { - "required": true, - "type": "Channel", - "description": "The channel that changed dialplan location." - }, - "dialplan_app": { - "required": true, - "type": "string", - "description": "The application about to be executed." - }, - "dialplan_app_data": { - "required": true, - "type": "string", - "description": "The data to be passed to the application." - } - } - }, - "ChannelCallerId": { - "id": "ChannelCallerId", - "description": "Channel changed Caller ID.", - "properties": { - "caller_presentation": { - "required": true, - "type": "int", - "description": "The integer representation of the Caller Presentation value." - }, - "caller_presentation_txt": { - "required": true, - "type": "string", - "description": "The text representation of the Caller Presentation value." - }, - "channel": { - "required": true, - "type": "Channel", - "description": "The channel that changed Caller ID." - } - } - }, - "ChannelUserevent": { - "id": "ChannelUserevent", - "description": "User-generated event with additional user-defined fields in the object.", - "properties": { - "eventname": { - "required": true, - "type": "string", - "description": "The name of the user event." - }, - "channel": { - "required": false, - "type": "Channel", - "description": "A channel that is signaled with the user event." - }, - "bridge": { - "required": false, - "type": "Bridge", - "description": "A bridge that is signaled with the user event." - }, - "endpoint": { - "required": false, - "type": "Endpoint", - "description": "A endpoint that is signaled with the user event." - }, - "userevent": { - "required": true, - "type": "object", - "description": "Custom Userevent data" - } - } - }, - "ChannelHangupRequest": { - "id": "ChannelHangupRequest", - "description": "A hangup was requested on the channel.", - "properties": { - "cause": { - "type": "int", - "description": "Integer representation of the cause of the hangup." - }, - "soft": { - "type": "boolean", - "description": "Whether the hangup request was a soft hangup request." - }, - "channel": { - "required": true, - "type": "Channel", - "description": "The channel on which the hangup was requested." - } - } - }, - "ChannelVarset": { - "id": "ChannelVarset", - "description": "Channel variable changed.", - "properties": { - "variable": { - "required": true, - "type": "string", - "description": "The variable that changed." - }, - "value": { - "required": true, - "type": "string", - "description": "The new value of the variable." - }, - "channel": { - "required": false, - "type": "Channel", - "description": "The channel on which the variable was set.\n\nIf missing, the variable is a global variable." - } - } - }, - "ChannelHold": { - "id": "ChannelHold", - "description": "A channel initiated a media hold.", - "properties": { - "channel": { - "required": true, - "type": "Channel", - "description": "The channel that initiated the hold event." - }, - "musicclass": { - "required": false, - "type": "string", - "description": "The music on hold class that the initiator requested." - } - } - }, - "ChannelUnhold": { - "id": "ChannelUnhold", - "description": "A channel initiated a media unhold.", - "properties": { - "channel": { - "required": true, - "type": "Channel", - "description": "The channel that initiated the unhold event." - } - } - }, - "ChannelTalkingStarted": { - "id": "ChannelTalkingStarted", - "description": "Talking was detected on the channel.", - "properties": { - "channel": { - "required": true, - "type": "Channel", - "description": "The channel on which talking started." - } - } - }, - "ChannelTalkingFinished": { - "id": "ChannelTalkingFinished", - "description": "Talking is no longer detected on the channel.", - "properties": { - "channel": { - "required": true, - "type": "Channel", - "description": "The channel on which talking completed." - }, - "duration": { - "required": true, - "type": "int", - "description": "The length of time, in milliseconds, that talking was detected on the channel" - } - } - }, - "ContactStatusChange": { - "id": "ContactStatusChange", - "description": "The state of a contact on an endpoint has changed.", - "properties": { - "endpoint": { - "required": true, - "type": "Endpoint" - }, - "contact_info": { - "required": true, - "type": "ContactInfo" - } - } - }, - "PeerStatusChange": { - "id": "PeerStatusChange", - "description": "The state of a peer associated with an endpoint has changed.", - "properties": { - "endpoint": { - "required": true, - "type": "Endpoint" - }, - "peer": { - "required": true, - "type": "Peer" - } - } - }, - "EndpointStateChange": { - "id": "EndpointStateChange", - "description": "Endpoint state changed.", - "properties": { - "endpoint": { - "required": true, - "type": "Endpoint" - } - } - }, - "Dial": { - "id": "Dial", - "description": "Dialing state has changed.", - "properties": { - "caller": { - "required": false, - "type": "Channel", - "description": "The calling channel." - }, - "peer": { - "required": true, - "type": "Channel", - "description": "The dialed channel." - }, - "forward": { - "required": false, - "type": "string", - "description": "Forwarding target requested by the original dialed channel." - }, - "forwarded": { - "required": false, - "type": "Channel", - "description": "Channel that the caller has been forwarded to." - }, - "dialstring": { - "required": false, - "type": "string", - "description": "The dial string for calling the peer channel." - }, - "dialstatus": { - "required": true, - "type": "string", - "description": "Current status of the dialing attempt to the peer." - } - } - }, - "StasisEnd": { - "id": "StasisEnd", - "description": "Notification that a channel has left a Stasis application.", - "properties": { - "channel": { - "required": true, - "type": "Channel" - } - } - }, - "StasisStart": { - "id": "StasisStart", - "description": "Notification that a channel has entered a Stasis application.", - "properties": { - "args": { - "required": true, - "type": "List[string]", - "description": "Arguments to the application" - }, - "channel": { - "required": true, - "type": "Channel" - }, - "replace_channel": { - "required": false, - "type": "Channel" - } - } - }, - "TextMessageReceived": { - "id": "TextMessageReceived", - "description": "A text message was received from an endpoint.", - "properties": { - "message": { - "required": true, - "type": "TextMessage" - }, - "endpoint": { - "required": false, - "type": "Endpoint" - } - } - }, - "ChannelConnectedLine": { - "id": "ChannelConnectedLine", - "description": "Channel changed Connected Line.", - "properties": { - "channel": { - "required": true, - "type": "Channel", - "description": "The channel whose connected line has changed." - } - } - } - } -} diff --git a/codegen-data/ari_1_10_0/playbacks.json b/codegen-data/ari_1_10_0/playbacks.json deleted file mode 100644 index 9f900355..00000000 --- a/codegen-data/ari_1_10_0/playbacks.json +++ /dev/null @@ -1,161 +0,0 @@ -{ - "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", - "_author": "David M. Lee, II ", - "_svn_revision": "$Revision$", - "apiVersion": "1.7.0", - "swaggerVersion": "1.1", - "basePath": "http://localhost:8088/ari", - "resourcePath": "/api-docs/playbacks.{format}", - "apis": [ - { - "path": "/playbacks/{playbackId}", - "description": "Control object for a playback operation.", - "operations": [ - { - "httpMethod": "GET", - "summary": "Get a playback's details.", - "nickname": "get", - "responseClass": "Playback", - "parameters": [ - { - "name": "playbackId", - "description": "Playback's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "The playback cannot be found" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Stop a playback.", - "nickname": "stop", - "responseClass": "void", - "parameters": [ - { - "name": "playbackId", - "description": "Playback's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "The playback cannot be found" - } - ] - } - ] - }, - { - "path": "/playbacks/{playbackId}/control", - "description": "Control object for a playback operation.", - "operations": [ - { - "httpMethod": "POST", - "summary": "Control a playback.", - "nickname": "control", - "responseClass": "void", - "parameters": [ - { - "name": "playbackId", - "description": "Playback's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "operation", - "description": "Operation to perform on the playback.", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string", - "allowableValues": { - "valueType": "LIST", - "values": [ - "restart", - "pause", - "unpause", - "reverse", - "forward" - ] - } - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "The provided operation parameter was invalid" - }, - { - "code": 404, - "reason": "The playback cannot be found" - }, - { - "code": 409, - "reason": "The operation cannot be performed in the playback's current state" - } -] - } - ] - } - ], - "models": { - "Playback": { - "id": "Playback", - "description": "Object representing the playback of media to a channel", - "properties": { - "id": { - "type": "string", - "description": "ID for this playback operation", - "required": true - }, - "media_uri": { - "type": "string", - "description": "The URI for the media currently being played back.", - "required": true - }, - "next_media_uri": { - "type": "string", - "description": "If a list of URIs is being played, the next media URI to be played back.", - "required": false - }, - "target_uri": { - "type": "string", - "description": "URI for the channel or bridge to play the media on", - "required": true - }, - "language": { - "type": "string", - "description": "For media types that support multiple languages, the language requested for playback." - }, - "state": { - "type": "string", - "description": "Current state of the playback operation.", - "required": true, - "allowableValues": { - "valueType": "LIST", - "values": [ - "queued", - "playing", - "continuing", - "done" - ] - } - } - } - } - } -} diff --git a/codegen-data/ari_1_10_0/recordings.json b/codegen-data/ari_1_10_0/recordings.json deleted file mode 100644 index d173ac98..00000000 --- a/codegen-data/ari_1_10_0/recordings.json +++ /dev/null @@ -1,410 +0,0 @@ -{ - "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", - "_author": "David M. Lee, II ", - "_svn_revision": "$Revision$", - "apiVersion": "1.7.0", - "swaggerVersion": "1.1", - "basePath": "http://localhost:8088/ari", - "resourcePath": "/api-docs/recordings.{format}", - "apis": [ - { - "path": "/recordings/stored", - "description": "Recordings", - "operations": [ - { - "httpMethod": "GET", - "summary": "List recordings that are complete.", - "nickname": "listStored", - "responseClass": "List[StoredRecording]" - } - ] - }, - { - "path": "/recordings/stored/{recordingName}", - "description": "Individual recording", - "operations": [ - { - "httpMethod": "GET", - "summary": "Get a stored recording's details.", - "nickname": "getStored", - "responseClass": "StoredRecording", - "parameters": [ - { - "name": "recordingName", - "description": "The name of the recording", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Recording not found" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Delete a stored recording.", - "nickname": "deleteStored", - "responseClass": "void", - "parameters": [ - { - "name": "recordingName", - "description": "The name of the recording", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Recording not found" - } - ] - } - ] - }, - { - "path": "/recordings/stored/{recordingName}/file", - "description": "The actual file associated with the stored recording", - "operations": [ - { - "httpMethod": "GET", - "summary": "Get the file associated with the stored recording.", - "nickname": "getStoredFile", - "responseClass": "binary", - "parameters": [ - { - "name": "recordingName", - "description": "The name of the recording", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 403, - "reason": "The recording file could not be opened" - }, - { - "code": 404, - "reason": "Recording not found" - } - ] - } - ] - }, - { - "path": "/recordings/stored/{recordingName}/copy", - "description": "Copy an individual recording", - "operations": [ - { - "httpMethod": "POST", - "summary": "Copy a stored recording.", - "nickname": "copyStored", - "responseClass": "StoredRecording", - "parameters": [ - { - "name": "recordingName", - "description": "The name of the recording to copy", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "destinationRecordingName", - "description": "The destination name of the recording", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Recording not found" - }, - { - "code": 409, - "reason": "A recording with the same name already exists on the system" - } - ] - } - ] - }, - { - "path": "/recordings/live/{recordingName}", - "description": "A recording that is in progress", - "operations": [ - { - "httpMethod": "GET", - "summary": "List live recordings.", - "nickname": "getLive", - "responseClass": "LiveRecording", - "parameters": [ - { - "name": "recordingName", - "description": "The name of the recording", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Recording not found" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Stop a live recording and discard it.", - "nickname": "cancel", - "responseClass": "void", - "parameters": [ - { - "name": "recordingName", - "description": "The name of the recording", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Recording not found" - } - ] - } - ] - }, - { - "path": "/recordings/live/{recordingName}/stop", - "operations": [ - { - "httpMethod": "POST", - "summary": "Stop a live recording and store it.", - "nickname": "stop", - "responseClass": "void", - "parameters": [ - { - "name": "recordingName", - "description": "The name of the recording", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Recording not found" - } - ] - } - ] - }, - { - "path": "/recordings/live/{recordingName}/pause", - "operations": [ - { - "httpMethod": "POST", - "summary": "Pause a live recording.", - "notes": "Pausing a recording suspends silence detection, which will be restarted when the recording is unpaused. Paused time is not included in the accounting for maxDurationSeconds.", - "nickname": "pause", - "responseClass": "void", - "parameters": [ - { - "name": "recordingName", - "description": "The name of the recording", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Recording not found" - }, - { - "code": 409, - "reason": "Recording not in session" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Unpause a live recording.", - "nickname": "unpause", - "responseClass": "void", - "parameters": [ - { - "name": "recordingName", - "description": "The name of the recording", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Recording not found" - }, - { - "code": 409, - "reason": "Recording not in session" - } - ] - } - ] - }, - { - "path": "/recordings/live/{recordingName}/mute", - "operations": [ - { - "httpMethod": "POST", - "summary": "Mute a live recording.", - "notes": "Muting a recording suspends silence detection, which will be restarted when the recording is unmuted.", - "nickname": "mute", - "responseClass": "void", - "parameters": [ - { - "name": "recordingName", - "description": "The name of the recording", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Recording not found" - }, - { - "code": 409, - "reason": "Recording not in session" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Unmute a live recording.", - "nickname": "unmute", - "responseClass": "void", - "parameters": [ - { - "name": "recordingName", - "description": "The name of the recording", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Recording not found" - }, - { - "code": 409, - "reason": "Recording not in session" - } - ] - } - ] - } - ], - "models": { - "StoredRecording": { - "id": "StoredRecording", - "description": "A past recording that may be played back.", - "properties": { - "name": { - "required": true, - "type": "string" - }, - "format": { - "required": true, - "type": "string" - } - } - }, - "LiveRecording": { - "id": "LiveRecording", - "description": "A recording that is in progress", - "properties": { - "name": { - "required": true, - "type": "string", - "description": "Base name for the recording" - }, - "format": { - "required": true, - "type": "string", - "description": "Recording format (wav, gsm, etc.)" - }, - "target_uri": { - "required": true, - "type": "string", - "description": "URI for the channel or bridge being recorded" - }, - "state": { - "required": true, - "type": "string", - "allowableValues": { - "valueType": "LIST", - "values": [ - "queued", - "recording", - "paused", - "done", - "failed", - "canceled" - ] - } - }, - "duration": { - "required": false, - "type": "int", - "description": "Duration in seconds of the recording" - }, - "talking_duration": { - "required": false, - "type": "int", - "description": "Duration of talking, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds." - }, - "silence_duration": { - "required": false, - "type": "int", - "description": "Duration of silence, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds." - }, - "cause": { - "required": false, - "type": "string", - "description": "Cause for recording failure if failed" - } - } - } - } -} diff --git a/codegen-data/ari_1_5_0/applications.json b/codegen-data/ari_1_5_0/applications.json deleted file mode 100644 index 62f863b8..00000000 --- a/codegen-data/ari_1_5_0/applications.json +++ /dev/null @@ -1,172 +0,0 @@ -{ - "_copyright": "Copyright (C) 2013, Digium, Inc.", - "_author": "David M. Lee, II ", - "_svn_revision": "$Revision: 423618 $", - "apiVersion": "1.5.0", - "swaggerVersion": "1.1", - "basePath": "http://localhost:8088/ari", - "resourcePath": "/api-docs/applications.{format}", - "apis": [ - { - "path": "/applications", - "description": "Stasis applications", - "operations": [ - { - "httpMethod": "GET", - "summary": "List all applications.", - "nickname": "list", - "responseClass": "List[Application]" - } - ] - }, - { - "path": "/applications/{applicationName}", - "description": "Stasis application", - "operations": [ - { - "httpMethod": "GET", - "summary": "Get details of an application.", - "nickname": "get", - "responseClass": "Application", - "parameters": [ - { - "name": "applicationName", - "description": "Application's name", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Application does not exist." - } - ] - } - ] - }, - { - "path": "/applications/{applicationName}/subscription", - "description": "Stasis application", - "operations": [ - { - "httpMethod": "POST", - "summary": "Subscribe an application to a event source.", - "notes": "Returns the state of the application after the subscriptions have changed", - "nickname": "subscribe", - "responseClass": "Application", - "parameters": [ - { - "name": "applicationName", - "description": "Application's name", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "eventSource", - "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}", - "paramType": "query", - "required": true, - "allowMultiple": true, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Missing parameter." - }, - { - "code": 404, - "reason": "Application does not exist." - }, - { - "code": 422, - "reason": "Event source does not exist." - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Unsubscribe an application from an event source.", - "notes": "Returns the state of the application after the subscriptions have changed", - "nickname": "unsubscribe", - "responseClass": "Application", - "parameters": [ - { - "name": "applicationName", - "description": "Application's name", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "eventSource", - "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}", - "paramType": "query", - "required": true, - "allowMultiple": true, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Missing parameter; event source scheme not recognized." - }, - { - "code": 404, - "reason": "Application does not exist." - }, - { - "code": 409, - "reason": "Application not subscribed to event source." - }, - { - "code": 422, - "reason": "Event source does not exist." - } - ] - } - ] - } - ], - "models": { - "Application": { - "id": "Application", - "description": "Details of a Stasis application", - "properties": { - "name": { - "type": "string", - "description": "Name of this application", - "required": true - }, - "channel_ids": { - "type": "List[string]", - "description": "Id's for channels subscribed to.", - "required": true - }, - "bridge_ids": { - "type": "List[string]", - "description": "Id's for bridges subscribed to.", - "required": true - }, - "endpoint_ids": { - "type": "List[string]", - "description": "{tech}/{resource} for endpoints subscribed to.", - "required": true - }, - "device_names": { - "type": "List[string]", - "description": "Names of the devices subscribed to.", - "required": true - } - } - } - } -} diff --git a/codegen-data/ari_1_5_0/asterisk.json b/codegen-data/ari_1_5_0/asterisk.json deleted file mode 100644 index 18ba2c6f..00000000 --- a/codegen-data/ari_1_5_0/asterisk.json +++ /dev/null @@ -1,259 +0,0 @@ -{ - "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", - "_author": "David M. Lee, II ", - "_svn_revision": "$Revision: 423618 $", - "apiVersion": "1.5.0", - "swaggerVersion": "1.1", - "basePath": "http://localhost:8088/ari", - "resourcePath": "/api-docs/asterisk.{format}", - "apis": [ - { - "path": "/asterisk/info", - "description": "Asterisk system information (similar to core show settings)", - "operations": [ - { - "httpMethod": "GET", - "summary": "Gets Asterisk system information.", - "nickname": "getInfo", - "responseClass": "AsteriskInfo", - "parameters": [ - { - "name": "only", - "description": "Filter information returned", - "paramType": "query", - "required": false, - "allowMultiple": true, - "dataType": "string", - "allowableValues": { - "valueType": "LIST", - "values": [ - "build", - "system", - "config", - "status" - ] - } - } - ] - } - ] - }, - { - "path": "/asterisk/variable", - "description": "Global variables", - "operations": [ - { - "httpMethod": "GET", - "summary": "Get the value of a global variable.", - "nickname": "getGlobalVar", - "responseClass": "Variable", - "parameters": [ - { - "name": "variable", - "description": "The variable to get", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Missing variable parameter." - } - ] - }, - { - "httpMethod": "POST", - "summary": "Set the value of a global variable.", - "nickname": "setGlobalVar", - "responseClass": "void", - "parameters": [ - { - "name": "variable", - "description": "The variable to set", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "value", - "description": "The value to set the variable to", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Missing variable parameter." - } - ] - } - ] - } - ], - "models": { - "BuildInfo": { - "id": "BuildInfo", - "description": "Info about how Asterisk was built", - "properties": { - "os": { - "required": true, - "type": "string", - "description": "OS Asterisk was built on." - }, - "kernel": { - "required": true, - "type": "string", - "description": "Kernel version Asterisk was built on." - }, - "options": { - "required": true, - "type": "string", - "description": "Compile time options, or empty string if default." - }, - "machine": { - "required": true, - "type": "string", - "description": "Machine architecture (x86_64, i686, ppc, etc.)" - }, - "date": { - "required": true, - "type": "string", - "description": "Date and time when Asterisk was built." - }, - "user": { - "required": true, - "type": "string", - "description": "Username that build Asterisk" - } - } - }, - "SystemInfo": { - "id": "SystemInfo", - "description": "Info about Asterisk", - "properties": { - "version": { - "required": true, - "type": "string", - "description": "Asterisk version." - }, - "entity_id": { - "required": true, - "type": "string", - "description": "" - } - } - }, - "SetId": { - "id": "SetId", - "description": "Effective user/group id", - "properties": { - "user": { - "required": true, - "type": "string", - "description": "Effective user id." - }, - "group": { - "required": true, - "type": "string", - "description": "Effective group id." - } - } - }, - "ConfigInfo": { - "id": "ConfigInfo", - "description": "Info about Asterisk configuration", - "properties": { - "name": { - "required": true, - "type": "string", - "description": "Asterisk system name." - }, - "default_language": { - "required": true, - "type": "string", - "description": "Default language for media playback." - }, - "max_channels": { - "required": false, - "type": "int", - "description": "Maximum number of simultaneous channels." - }, - "max_open_files": { - "required": false, - "type": "int", - "description": "Maximum number of open file handles (files, sockets)." - }, - "max_load": { - "required": false, - "type": "double", - "description": "Maximum load avg on system." - }, - "setid": { - "required": true, - "type": "SetId", - "description": "Effective user/group id for running Asterisk." - } - } - }, - "StatusInfo": { - "id": "StatusInfo", - "description": "Info about Asterisk status", - "properties": { - "startup_time": { - "required": true, - "type": "Date", - "description": "Time when Asterisk was started." - }, - "last_reload_time": { - "required": true, - "type": "Date", - "description": "Time when Asterisk was last reloaded." - } - } - }, - "AsteriskInfo": { - "id": "AsteriskInfo", - "description": "Asterisk system information", - "properties": { - "build": { - "required": false, - "type": "BuildInfo", - "description": "Info about how Asterisk was built" - }, - "system": { - "required": false, - "type": "SystemInfo", - "description": "Info about the system running Asterisk" - }, - "config": { - "required": false, - "type": "ConfigInfo", - "description": "Info about Asterisk configuration" - }, - "status": { - "required": false, - "type": "StatusInfo", - "description": "Info about Asterisk status" - } - } - }, - "Variable": { - "id": "Variable", - "description": "The value of a channel variable", - "properties": { - "value": { - "required": true, - "type": "string", - "description": "The value of the variable requested" - } - } - } - } -} diff --git a/codegen-data/ari_1_5_0/bridges.json b/codegen-data/ari_1_5_0/bridges.json deleted file mode 100644 index 57dad40a..00000000 --- a/codegen-data/ari_1_5_0/bridges.json +++ /dev/null @@ -1,656 +0,0 @@ -{ - "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", - "_author": "David M. Lee, II ", - "_svn_revision": "$Revision: 423618 $", - "apiVersion": "1.5.0", - "swaggerVersion": "1.1", - "basePath": "http://localhost:8088/ari", - "resourcePath": "/api-docs/bridges.{format}", - "apis": [ - { - "path": "/bridges", - "description": "Active bridges", - "operations": [ - { - "httpMethod": "GET", - "summary": "List all active bridges in Asterisk.", - "nickname": "list", - "responseClass": "List[Bridge]" - }, - { - "httpMethod": "POST", - "summary": "Create a new bridge.", - "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", - "nickname": "create", - "responseClass": "Bridge", - "parameters": [ - { - "name": "type", - "description": "Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media).", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "bridgeId", - "description": "Unique ID to give to the bridge being created.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "name", - "description": "Name to give to the bridge being created.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ] - } - ] - }, - { - "path": "/bridges/{bridgeId}", - "description": "Individual bridge", - "operations": [ - { - "httpMethod": "POST", - "summary": "Create a new bridge or updates an existing one.", - "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", - "nickname": "create_or_update_with_id", - "responseClass": "Bridge", - "parameters": [ - { - "name": "type", - "description": "Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media) to set.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "bridgeId", - "description": "Unique ID to give to the bridge being created.", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "name", - "description": "Set the name of the bridge.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ] - }, - { - "httpMethod": "GET", - "summary": "Get bridge details.", - "nickname": "get", - "responseClass": "Bridge", - "parameters": [ - { - "name": "bridgeId", - "description": "Bridge's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Bridge not found" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Shut down a bridge.", - "notes": "If any channels are in this bridge, they will be removed and resume whatever they were doing beforehand.", - "nickname": "destroy", - "responseClass": "void", - "parameters": [ - { - "name": "bridgeId", - "description": "Bridge's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Bridge not found" - } - ] - } - ] - }, - { - "path": "/bridges/{bridgeId}/addChannel", - "description": "Add a channel to a bridge", - "operations": [ - { - "httpMethod": "POST", - "summary": "Add a channel to a bridge.", - "nickname": "addChannel", - "responseClass": "void", - "parameters": [ - { - "name": "bridgeId", - "description": "Bridge's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "channel", - "description": "Ids of channels to add to bridge", - "paramType": "query", - "required": true, - "allowMultiple": true, - "dataType": "string" - }, - { - "name": "role", - "description": "Channel's role in the bridge", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Channel not found" - }, - { - "code": 404, - "reason": "Bridge not found" - }, - { - "code": 409, - "reason": "Bridge not in Stasis application; Channel currently recording" - }, - { - "code": 422, - "reason": "Channel not in Stasis application" - } - ] - } - ] - }, - { - "path": "/bridges/{bridgeId}/removeChannel", - "description": "Remove a channel from a bridge", - "operations": [ - { - "httpMethod": "POST", - "summary": "Remove a channel from a bridge.", - "nickname": "removeChannel", - "responseClass": "void", - "parameters": [ - { - "name": "bridgeId", - "description": "Bridge's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "channel", - "description": "Ids of channels to remove from bridge", - "paramType": "query", - "required": true, - "allowMultiple": true, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Channel not found" - }, - { - "code": 404, - "reason": "Bridge not found" - }, - { - "code": 409, - "reason": "Bridge not in Stasis application" - }, - { - "code": 422, - "reason": "Channel not in this bridge" - } - ] - } - ] - }, - { - "path": "/bridges/{bridgeId}/moh", - "description": "Play music on hold to a bridge", - "operations": [ - { - "httpMethod": "POST", - "summary": "Play music on hold to a bridge or change the MOH class that is playing.", - "nickname": "startMoh", - "responseClass": "void", - "parameters": [ - { - "name": "bridgeId", - "description": "Bridge's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "mohClass", - "description": "Channel's id", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Bridge not found" - }, - { - "code": 409, - "reason": "Bridge not in Stasis application" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Stop playing music on hold to a bridge.", - "notes": "This will only stop music on hold being played via POST bridges/{bridgeId}/moh.", - "nickname": "stopMoh", - "responseClass": "void", - "parameters": [ - { - "name": "bridgeId", - "description": "Bridge's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Bridge not found" - }, - { - "code": 409, - "reason": "Bridge not in Stasis application" - } - ] - } - ] - }, - { - "path": "/bridges/{bridgeId}/play", - "description": "Play media to the participants of a bridge", - "operations": [ - { - "httpMethod": "POST", - "summary": "Start playback of media on a bridge.", - "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", - "nickname": "play", - "responseClass": "Playback", - "parameters": [ - { - "name": "bridgeId", - "description": "Bridge's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "media", - "description": "Media's URI to play.", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "lang", - "description": "For sounds, selects language for sound.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "offsetms", - "description": "Number of media to skip before playing.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 0, - "allowableValues": { - "valueType": "RANGE", - "min": 0 - } - - }, - { - "name": "skipms", - "description": "Number of milliseconds to skip for forward/reverse operations.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 3000, - "allowableValues": { - "valueType": "RANGE", - "min": 0 - } - }, - { - "name": "playbackId", - "description": "Playback Id.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Bridge not found" - }, - { - "code": 409, - "reason": "Bridge not in a Stasis application" - } - ] - } - ] - }, - { - "path": "/bridges/{bridgeId}/play/{playbackId}", - "description": "Play media to a bridge", - "operations": [ - { - "httpMethod": "POST", - "summary": "Start playback of media on a bridge.", - "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.)", - "nickname": "playWithId", - "responseClass": "Playback", - "parameters": [ - { - "name": "bridgeId", - "description": "Bridge's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "playbackId", - "description": "Playback ID.", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "media", - "description": "Media's URI to play.", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "lang", - "description": "For sounds, selects language for sound.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "offsetms", - "description": "Number of media to skip before playing.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 0, - "allowableValues": { - "valueType": "RANGE", - "min": 0 - } - }, - { - "name": "skipms", - "description": "Number of milliseconds to skip for forward/reverse operations.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 3000, - "allowableValues": { - "valueType": "RANGE", - "min": 0 - } - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Bridge not found" - }, - { - "code": 409, - "reason": "Bridge not in a Stasis application" - } - ] - - } - ] - }, - { - "path": "/bridges/{bridgeId}/record", - "description": "Record audio on a bridge", - "operations": [ - { - "httpMethod": "POST", - "summary": "Start a recording.", - "notes": "This records the mixed audio from all channels participating in this bridge.", - "nickname": "record", - "responseClass": "LiveRecording", - "parameters": [ - { - "name": "bridgeId", - "description": "Bridge's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "name", - "description": "Recording's filename", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "format", - "description": "Format to encode audio in", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "maxDurationSeconds", - "description": "Maximum duration of the recording, in seconds. 0 for no limit.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 0, - "allowableValues": { - "valueType": "RANGE", - "min": 0 - } - }, - { - "name": "maxSilenceSeconds", - "description": "Maximum duration of silence, in seconds. 0 for no limit.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 0, - "allowableValues": { - "valueType": "RANGE", - "min": 0 - } - }, - { - "name": "ifExists", - "description": "Action to take if a recording with the same name already exists.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string", - "defaultValue": "fail", - "allowableValues": { - "valueType": "LIST", - "values": [ - "fail", - "overwrite", - "append" - ] - } - }, - { - "name": "beep", - "description": "Play beep when recording begins", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "boolean", - "defaultValue": false - }, - { - "name": "terminateOn", - "description": "DTMF input to terminate recording.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string", - "defaultValue": "none", - "allowableValues": { - "valueType": "LIST", - "values": [ - "none", - "any", - "*", - "#" - ] - } - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Invalid parameters" - }, - { - "code": 404, - "reason": "Bridge not found" - }, - { - "code": 409, - "reason": "Bridge is not in a Stasis application; A recording with the same name already exists on the system and can not be overwritten because it is in progress or ifExists=fail" - }, - { - "code": 422, - "reason": "The format specified is unknown on this system" - } - ] - } - ] - } - ], - "models": { - "Bridge": { - "id": "Bridge", - "description": "The merging of media from one or more channels.\n\nEveryone on the bridge receives the same audio.", - "properties": { - "id": { - "type": "string", - "description": "Unique identifier for this bridge", - "required": true - }, - "technology": { - "type": "string", - "description": "Name of the current bridging technology", - "required": true - }, - "bridge_type": { - "type": "string", - "description": "Type of bridge technology", - "required": true, - "allowableValues": { - "valueType": "LIST", - "values": [ - "mixing", - "holding" - ] - } - }, - "bridge_class": { - "type": "string", - "description": "Bridging class", - "required": true - }, - "creator": { - "type": "string", - "description": "Entity that created the bridge", - "required": true - }, - "name": { - "type": "string", - "description": "Name the creator gave the bridge", - "required": true - }, - "channels": { - "type": "List[string]", - "description": "Ids of channels participating in this bridge", - "required": true - } - } - } - } -} diff --git a/codegen-data/ari_1_5_0/channels.json b/codegen-data/ari_1_5_0/channels.json deleted file mode 100644 index 1cc28e79..00000000 --- a/codegen-data/ari_1_5_0/channels.json +++ /dev/null @@ -1,1456 +0,0 @@ -{ - "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", - "_author": "David M. Lee, II ", - "_svn_revision": "$Revision: 423618 $", - "apiVersion": "1.5.0", - "swaggerVersion": "1.1", - "basePath": "http://localhost:8088/ari", - "resourcePath": "/api-docs/channels.{format}", - "apis": [ - { - "path": "/channels", - "description": "Active channels", - "operations": [ - { - "httpMethod": "GET", - "summary": "List all active channels in Asterisk.", - "nickname": "list", - "responseClass": "List[Channel]" - }, - { - "httpMethod": "POST", - "summary": "Create a new channel (originate).", - "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.", - "nickname": "originate", - "responseClass": "Channel", - "parameters": [ - { - "name": "endpoint", - "description": "Endpoint to call.", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "extension", - "description": "The extension to dial after the endpoint answers", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "context", - "description": "The context to dial after the endpoint answers. If omitted, uses 'default'", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "priority", - "description": "The priority to dial after the endpoint answers. If omitted, uses 1", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "long" - }, - { - "name": "app", - "description": "The application that is subscribed to the originated channel, and passed to the Stasis application.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "appArgs", - "description": "The application arguments to pass to the Stasis application.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "callerId", - "description": "CallerID to use when dialing the endpoint or extension.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "timeout", - "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 30 - }, - { - "name": "variables", - "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", - "paramType": "body", - "required": false, - "dataType": "containers", - "allowMultiple": false - }, - { - "name": "channelId", - "description": "The unique id to assign the channel on creation.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "otherChannelId", - "description": "The unique id to assign the second channel when using local channels.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Invalid parameters for originating a channel." - } - ] - } - ] - }, - { - "path": "/channels/{channelId}", - "description": "Active channel", - "operations": [ - { - "httpMethod": "GET", - "summary": "Channel details.", - "nickname": "get", - "responseClass": "Channel", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - } - ] - }, - { - "httpMethod": "POST", - "summary": "Create a new channel (originate with id).", - "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.", - "nickname": "originateWithId", - "responseClass": "Channel", - "parameters": [ - { - "name": "channelId", - "description": "The unique id to assign the channel on creation.", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "endpoint", - "description": "Endpoint to call.", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "extension", - "description": "The extension to dial after the endpoint answers", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "context", - "description": "The context to dial after the endpoint answers. If omitted, uses 'default'", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "priority", - "description": "The priority to dial after the endpoint answers. If omitted, uses 1", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "long" - }, - { - "name": "app", - "description": "The application that is subscribed to the originated channel, and passed to the Stasis application.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "appArgs", - "description": "The application arguments to pass to the Stasis application.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "callerId", - "description": "CallerID to use when dialing the endpoint or extension.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "timeout", - "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 30 - }, - { - "name": "variables", - "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", - "paramType": "body", - "required": false, - "dataType": "containers", - "allowMultiple": false - }, - { - "name": "otherChannelId", - "description": "The unique id to assign the second channel when using local channels.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Invalid parameters for originating a channel." - } - ] - - }, - { - "httpMethod": "DELETE", - "summary": "Delete (i.e. hangup) a channel.", - "nickname": "hangup", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "reason", - "description": "Reason for hanging up the channel", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string", - "defalutValue": "normal", - "allowableValues": { - "valueType": "LIST", - "values": [ - "normal", - "busy", - "congestion" - ] - } - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Invalid reason for hangup provided" - }, - { - "code": 404, - "reason": "Channel not found" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/continue", - "description": "Exit application; continue execution in the dialplan", - "operations": [ - { - "httpMethod": "POST", - "summary": "Exit application; continue execution in the dialplan.", - "nickname": "continueInDialplan", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "context", - "description": "The context to continue to.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "extension", - "description": "The extension to continue to.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "priority", - "description": "The priority to continue to.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/answer", - "description": "Answer a channel", - "operations": [ - { - "httpMethod": "POST", - "summary": "Answer a channel.", - "nickname": "answer", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/ring", - "description": "Send a ringing indication to a channel", - "operations": [ - { - "httpMethod": "POST", - "summary": "Indicate ringing to a channel.", - "nickname": "ring", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Stop ringing indication on a channel if locally generated.", - "nickname": "ringStop", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/dtmf", - "description": "Send DTMF to a channel", - "operations": [ - { - "httpMethod": "POST", - "summary": "Send provided DTMF to a given channel.", - "nickname": "sendDTMF", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "dtmf", - "description": "DTMF To send.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "before", - "description": "Amount of time to wait before DTMF digits (specified in milliseconds) start.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 0 - }, - { - "name": "between", - "description": "Amount of time in between DTMF digits (specified in milliseconds).", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 100 - }, - { - "name": "duration", - "description": "Length of each DTMF digit (specified in milliseconds).", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 100 - }, - { - "name": "after", - "description": "Amount of time to wait after DTMF digits (specified in milliseconds) end.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 0 - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "DTMF is required" - }, - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/mute", - "description": "Mute a channel", - "operations": [ - { - "httpMethod": "POST", - "summary": "Mute a channel.", - "nickname": "mute", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "direction", - "description": "Direction in which to mute audio", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string", - "defaultValue": "both", - "allowableValues": { - "valueType": "LIST", - "values": [ - "both", - "in", - "out" - ] - } - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Unmute a channel.", - "nickname": "unmute", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "direction", - "description": "Direction in which to unmute audio", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string", - "defaultValue": "both", - "allowableValues": { - "valueType": "LIST", - "values": [ - "both", - "in", - "out" - ] - } - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/hold", - "description": "Put a channel on hold", - "operations": [ - { - "httpMethod": "POST", - "summary": "Hold a channel.", - "nickname": "hold", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Remove a channel from hold.", - "nickname": "unhold", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/moh", - "description": "Play music on hold to a channel", - "operations": [ - { - "httpMethod": "POST", - "summary": "Play music on hold to a channel.", - "notes": "Using media operations such as /play on a channel playing MOH in this manner will suspend MOH without resuming automatically. If continuing music on hold is desired, the stasis application must reinitiate music on hold.", - "nickname": "startMoh", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "mohClass", - "description": "Music on hold class to use", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Stop playing music on hold to a channel.", - "nickname": "stopMoh", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/silence", - "description": "Play silence to a channel", - "operations": [ - { - "httpMethod": "POST", - "summary": "Play silence to a channel.", - "notes": "Using media operations such as /play on a channel playing silence in this manner will suspend silence without resuming automatically.", - "nickname": "startSilence", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Stop playing silence to a channel.", - "nickname": "stopSilence", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/play", - "description": "Play media to a channel", - "operations": [ - { - "httpMethod": "POST", - "summary": "Start playback of media.", - "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", - "nickname": "play", - "responseClass": "Playback", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "media", - "description": "Media's URI to play.", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "lang", - "description": "For sounds, selects language for sound.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "offsetms", - "description": "Number of media to skip before playing.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int" - }, - { - "name": "skipms", - "description": "Number of milliseconds to skip for forward/reverse operations.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 3000 - }, - { - "name": "playbackId", - "description": "Playback ID.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/play/{playbackId}", - "description": "Play media to a channel", - "operations": [ - { - "httpMethod": "POST", - "summary": "Start playback of media and specify the playbackId.", - "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.)", - "nickname": "playWithId", - "responseClass": "Playback", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "playbackId", - "description": "Playback ID.", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "media", - "description": "Media's URI to play.", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "lang", - "description": "For sounds, selects language for sound.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "offsetms", - "description": "Number of media to skip before playing.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int" - }, - { - "name": "skipms", - "description": "Number of milliseconds to skip for forward/reverse operations.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 3000 - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/record", - "description": "Record audio from a channel", - "operations": [ - { - "httpMethod": "POST", - "summary": "Start a recording.", - "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.", - "nickname": "record", - "responseClass": "LiveRecording", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "name", - "description": "Recording's filename", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "format", - "description": "Format to encode audio in", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "maxDurationSeconds", - "description": "Maximum duration of the recording, in seconds. 0 for no limit", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 0, - "allowableValues": { - "valueType": "RANGE", - "min": 0 - } - }, - { - "name": "maxSilenceSeconds", - "description": "Maximum duration of silence, in seconds. 0 for no limit", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 0, - "allowableValues": { - "valueType": "RANGE", - "min": 0 - } - }, - { - "name": "ifExists", - "description": "Action to take if a recording with the same name already exists.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string", - "defaultValue": "fail", - "allowableValues": { - "valueType": "LIST", - "values": [ - "fail", - "overwrite", - "append" - ] - } - }, - { - "name": "beep", - "description": "Play beep when recording begins", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "boolean", - "defaultValue": false - }, - { - "name": "terminateOn", - "description": "DTMF input to terminate recording", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string", - "defaultValue": "none", - "allowableValues": { - "valueType": "LIST", - "values": [ - "none", - "any", - "*", - "#" - ] - } - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Invalid parameters" - }, - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "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" - }, - { - "code": 422, - "reason": "The format specified is unknown on this system" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/variable", - "description": "Variables on a channel", - "operations": [ - { - "httpMethod": "GET", - "summary": "Get the value of a channel variable or function.", - "nickname": "getChannelVar", - "responseClass": "Variable", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "variable", - "description": "The channel variable or function to get", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Missing variable parameter." - }, - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - }, - { - "httpMethod": "POST", - "summary": "Set the value of a channel variable or function.", - "nickname": "setChannelVar", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "variable", - "description": "The channel variable or function to set", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "value", - "description": "The value to set the variable to", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Missing variable parameter." - }, - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/snoop", - "description": "Snoop (spy/whisper) on a channel", - "operations": [ - { - "httpMethod": "POST", - "summary": "Start snooping.", - "notes": "Snoop (spy/whisper) on a specific channel.", - "nickname": "snoopChannel", - "responseClass": "Channel", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "spy", - "description": "Direction of audio to spy on", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string", - "defaultValue": "none", - "allowableValues": { - "valueType": "LIST", - "values": [ - "none", - "both", - "out", - "in" - ] - } - }, - { - "name": "whisper", - "description": "Direction of audio to whisper into", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string", - "defaultValue": "none", - "allowableValues": { - "valueType": "LIST", - "values": [ - "none", - "both", - "out", - "in" - ] - } - }, - { - "name": "app", - "description": "Application the snooping channel is placed into", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "appArgs", - "description": "The application arguments to pass to the Stasis application", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "snoopId", - "description": "Unique ID to assign to snooping channel", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Invalid parameters" - }, - { - "code": 404, - "reason": "Channel not found" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/snoop/{snoopId}", - "description": "Snoop (spy/whisper) on a channel", - "operations": [ - { - "httpMethod": "POST", - "summary": "Start snooping.", - "notes": "Snoop (spy/whisper) on a specific channel.", - "nickname": "snoopChannelWithId", - "responseClass": "Channel", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "snoopId", - "description": "Unique ID to assign to snooping channel", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "spy", - "description": "Direction of audio to spy on", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string", - "defaultValue": "none", - "allowableValues": { - "valueType": "LIST", - "values": [ - "none", - "both", - "out", - "in" - ] - } - }, - { - "name": "whisper", - "description": "Direction of audio to whisper into", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string", - "defaultValue": "none", - "allowableValues": { - "valueType": "LIST", - "values": [ - "none", - "both", - "out", - "in" - ] - } - }, - { - "name": "app", - "description": "Application the snooping channel is placed into", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "appArgs", - "description": "The application arguments to pass to the Stasis application", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Invalid parameters" - }, - { - "code": 404, - "reason": "Channel not found" - } - ] - } - ] - } - ], - "models": { - "Dialed": { - "id": "Dialed", - "description": "Dialed channel information.", - "properties": {} - }, - "DialplanCEP": { - "id": "DialplanCEP", - "description": "Dialplan location (context/extension/priority)", - "properties": { - "context": { - "required": true, - "type": "string", - "description": "Context in the dialplan" - }, - "exten": { - "required": true, - "type": "string", - "description": "Extension in the dialplan" - }, - "priority": { - "required": true, - "type": "long", - "description": "Priority in the dialplan" - } - } - }, - "CallerID": { - "id": "CallerID", - "description": "Caller identification", - "properties": { - "name": { - "required": true, - "type": "string" - }, - "number": { - "required": true, - "type": "string" - } - } - }, - "Channel": { - "id": "Channel", - "description": "A specific communication connection between Asterisk and an Endpoint.", - "properties": { - "id": { - "required": true, - "type": "string", - "description": "Unique identifier of the channel.\n\nThis is the same as the Uniqueid field in AMI." - }, - "name": { - "required": true, - "type": "string", - "description": "Name of the channel (i.e. SIP/foo-0000a7e3)" - }, - "state": { - "required": true, - "type": "string", - "allowableValues": { - "valueType": "LIST", - "values": [ - "Down", - "Rsrved", - "OffHook", - "Dialing", - "Ring", - "Ringing", - "Up", - "Busy", - "Dialing Offhook", - "Pre-ring", - "Unknown" - ] - } - }, - "caller": { - "required": true, - "type": "CallerID" - }, - "connected": { - "required": true, - "type": "CallerID" - }, - "accountcode": { - "required": true, - "type": "string" - }, - "dialplan": { - "required": true, - "type": "DialplanCEP", - "description": "Current location in the dialplan" - }, - "creationtime": { - "required": true, - "type": "Date", - "description": "Timestamp when channel was created" - } - } - } - } -} diff --git a/codegen-data/ari_1_5_0/deviceStates.json b/codegen-data/ari_1_5_0/deviceStates.json deleted file mode 100644 index 6fec33f4..00000000 --- a/codegen-data/ari_1_5_0/deviceStates.json +++ /dev/null @@ -1,151 +0,0 @@ -{ - "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", - "_author": "Kevin Harwell ", - "_svn_revision": "$Revision: 423618 $", - "apiVersion": "1.5.0", - "swaggerVersion": "1.1", - "basePath": "http://localhost:8088/ari", - "resourcePath": "/api-docs/deviceStates.{format}", - "apis": [ - { - "path": "/deviceStates", - "description": "Device states", - "operations": [ - { - "httpMethod": "GET", - "summary": "List all ARI controlled device states.", - "nickname": "list", - "responseClass": "List[DeviceState]" - } - ] - }, - { - "path": "/deviceStates/{deviceName}", - "description": "Device state", - "operations": [ - { - "httpMethod": "GET", - "summary": "Retrieve the current state of a device.", - "nickname": "get", - "responseClass": "DeviceState", - "parameters": [ - { - "name": "deviceName", - "description": "Name of the device", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ] - }, - { - "httpMethod": "PUT", - "summary": "Change the state of a device controlled by ARI. (Note - implicitly creates the device state).", - "nickname": "update", - "responseClass": "void", - "parameters": [ - { - "name": "deviceName", - "description": "Name of the device", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "deviceState", - "description": "Device state value", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string", - "allowableValues": { - "valueType": "LIST", - "values": [ - "NOT_INUSE", - "INUSE", - "BUSY", - "INVALID", - "UNAVAILABLE", - "RINGING", - "RINGINUSE", - "ONHOLD" - ] - } - - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Device name is missing" - }, - { - "code": 409, - "reason": "Uncontrolled device specified" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Destroy a device-state controlled by ARI.", - "nickname": "delete", - "responseClass": "void", - "parameters": [ - { - "name": "deviceName", - "description": "Name of the device", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Device name is missing" - }, - { - "code": 409, - "reason": "Uncontrolled device specified" - } - ] - } - ] - } - ], - "models": { - "DeviceState": { - "id": "DeviceState", - "description": "Represents the state of a device.", - "properties": { - "name": { - "type": "string", - "description": "Name of the device.", - "required": true - }, - "state": { - "type": "string", - "description": "Device's state", - "required": true, - "allowableValues": { - "valueType": "LIST", - "values": [ - "UNKNOWN", - "NOT_INUSE", - "INUSE", - "BUSY", - "INVALID", - "UNAVAILABLE", - "RINGING", - "RINGINUSE", - "ONHOLD" - ] - } - } - } - } - } -} diff --git a/codegen-data/ari_1_5_0/endpoints.json b/codegen-data/ari_1_5_0/endpoints.json deleted file mode 100644 index 8c59db0b..00000000 --- a/codegen-data/ari_1_5_0/endpoints.json +++ /dev/null @@ -1,275 +0,0 @@ -{ - "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", - "_author": "David M. Lee, II ", - "_svn_revision": "$Revision: 423618 $", - "apiVersion": "1.5.0", - "swaggerVersion": "1.1", - "basePath": "http://localhost:8088/ari", - "resourcePath": "/api-docs/endpoints.{format}", - "apis": [ - { - "path": "/endpoints", - "description": "Asterisk endpoints", - "operations": [ - { - "httpMethod": "GET", - "summary": "List all endpoints.", - "nickname": "list", - "responseClass": "List[Endpoint]" - } - ] - }, - { - "path": "/endpoints/sendMessage", - "description": "Send a message to some technology URI or endpoint.", - "operations": [ - { - "httpMethod": "PUT", - "summary": "Send a message to some technology URI or endpoint.", - "nickname": "sendMessage", - "responseClass": "void", - "parameters": [ - { - "name": "to", - "description": "The endpoint resource or technology specific URI to send the message to. Valid resources are sip, pjsip, and xmpp.", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "from", - "description": "The endpoint resource or technology specific identity to send this message from. Valid resources are sip, pjsip, and xmpp.", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "body", - "description": "The body of the message", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "variables", - "descriptioni": "The \"variables\" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, pjsip and sip resource types will add the key/value pairs as SIP headers,", - "paramType": "body", - "required": false, - "dataType": "containers", - "allowMultiple": false - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Endpoint not found" - } - ] - } - ] - }, - { - "path": "/endpoints/{tech}", - "description": "Asterisk endpoints", - "operations": [ - { - "httpMethod": "GET", - "summary": "List available endoints for a given endpoint technology.", - "nickname": "listByTech", - "responseClass": "List[Endpoint]", - "parameters": [ - { - "name": "tech", - "description": "Technology of the endpoints (sip,iax2,...)", - "paramType": "path", - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Endpoints not found" - } - ] - } - ] - }, - { - "path": "/endpoints/{tech}/{resource}", - "description": "Single endpoint", - "operations": [ - { - "httpMethod": "GET", - "summary": "Details for an endpoint.", - "nickname": "get", - "responseClass": "Endpoint", - "parameters": [ - { - "name": "tech", - "description": "Technology of the endpoint", - "paramType": "path", - "dataType": "string" - }, - { - "name": "resource", - "description": "ID of the endpoint", - "paramType": "path", - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Invalid parameters for sending a message." - }, - { - "code": 404, - "reason": "Endpoints not found" - } - ] - } - ] - }, - { - "path": "/endpoints/{tech}/{resource}/sendMessage", - "description": "Send a message to some endpoint in a technology.", - "operations": [ - { - "httpMethod": "PUT", - "summary": "Send a message to some endpoint in a technology.", - "nickname": "sendMessageToEndpoint", - "responseClass": "void", - "parameters": [ - { - "name": "tech", - "description": "Technology of the endpoint", - "paramType": "path", - "dataType": "string" - }, - { - "name": "resource", - "description": "ID of the endpoint", - "paramType": "path", - "dataType": "string" - }, - { - "name": "from", - "description": "The endpoint resource or technology specific identity to send this message from. Valid resources are sip, pjsip, and xmpp.", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "body", - "description": "The body of the message", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "variables", - "descriptioni": "The \"variables\" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, pjsip and sip resource types will add the key/value pairs as SIP headers,", - "paramType": "body", - "required": false, - "dataType": "containers", - "allowMultiple": false - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Invalid parameters for sending a message." - }, - { - "code": 404, - "reason": "Endpoint not found" - } - ] - } - ] - } - ], - "models": { - "Endpoint": { - "id": "Endpoint", - "description": "An external device that may offer/accept calls to/from Asterisk.\n\nUnlike most resources, which have a single unique identifier, an endpoint is uniquely identified by the technology/resource pair.", - "properties": { - "technology": { - "type": "string", - "description": "Technology of the endpoint", - "required": true - }, - "resource": { - "type": "string", - "description": "Identifier of the endpoint, specific to the given technology.", - "required": true - }, - "state": { - "type": "string", - "description": "Endpoint's state", - "required": false, - "allowableValues": { - "valueType": "LIST", - "values": [ - "unknown", - "offline", - "online" - ] - } - }, - "channel_ids": { - "type": "List[string]", - "description": "Id's of channels associated with this endpoint", - "required": true - } - } - }, - "TextMessageVariable": { - "id": "TextMessageVariable", - "description": "A key/value pair variable in a text message.", - "properties": { - "key": { - "type": "string", - "description": "A unique key identifying the variable.", - "required": true - }, - "value": { - "type": "string", - "description": "The value of the variable.", - "required": true - } - } - }, - "TextMessage": { - "id": "TextMessage", - "description": "A text message.", - "properties": { - "from": { - "type": "string", - "description": "A technology specific URI specifying the source of the message. For sip and pjsip technologies, any SIP URI can be specified. For xmpp, the URI must correspond to the client connection being used to send the message.", - "required": true - }, - "to": { - "type": "string", - "description": "A technology specific URI specifying the destination of the message. Valid technologies include sip, pjsip, and xmp. The destination of a message should be an endpoint.", - "required": true - }, - "body": { - "type": "string", - "description": "The text of the message.", - "required": true - }, - "variables": { - "type": "List[TextMessageVariable]", - "description": "Technology specific key/value pairs associated with the message.", - "required": false - } - } - } - } -} diff --git a/codegen-data/ari_1_5_0/events.json b/codegen-data/ari_1_5_0/events.json deleted file mode 100644 index 9dd73874..00000000 --- a/codegen-data/ari_1_5_0/events.json +++ /dev/null @@ -1,717 +0,0 @@ -{ - "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", - "_author": "David M. Lee, II ", - "_svn_revision": "$Revision: 423621 $", - "apiVersion": "1.5.0", - "swaggerVersion": "1.2", - "basePath": "http://localhost:8088/ari", - "resourcePath": "/api-docs/events.{format}", - "apis": [ - { - "path": "/events", - "description": "Events from Asterisk to applications", - "operations": [ - { - "httpMethod": "GET", - "upgrade": "websocket", - "websocketProtocol": "ari", - "summary": "WebSocket connection for events.", - "nickname": "eventWebsocket", - "responseClass": "Message", - "parameters": [ - { - "name": "app", - "description": "Applications to subscribe to.", - "paramType": "query", - "required": true, - "allowMultiple": true, - "dataType": "string" - } - ] - } - ] - }, - { - "path": "/events/user/{eventName}", - "description": "Stasis application user events", - "operations": [ - { - "httpMethod": "POST", - "summary": "Generate a user event.", - "nickname": "userEvent", - "responseClass": "void", - "parameters": [ - { - "name": "eventName", - "description": "Event name", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "application", - "description": "The name of the application that will receive this event", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "source", - "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}/{resource}, deviceState:{deviceName}", - "paramType": "query", - "required": false, - "allowMultiple": true, - "dataType": "string" - }, - { - "name": "variables", - "description": "The \"variables\" key in the body object holds custom key/value pairs to add to the user event. Ex. { \"variables\": { \"key\": \"value\" } }", - "paramType": "body", - "required": false, - "allowMultiple": false, - "dataType": "containers" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Application does not exist." - }, - { - "code": 422, - "reason": "Event source not found." - }, - { - "code": 400, - "reason": "Invalid even tsource URI or userevent data." - } - ] - } - ] - } - ], - "models": { - "Message": { - "id": "Message", - "description": "Base type for errors and events", - "discriminator": "type", - "properties": { - "type": { - "type": "string", - "required": true, - "description": "Indicates the type of this message." - } - }, - "subTypes": [ - "MissingParams", - "Event" - ] - }, - "MissingParams": { - "id": "MissingParams", - "description": "Error event sent when required params are missing.", - "properties": { - "params": { - "required": true, - "type": "List[string]", - "description": "A list of the missing parameters" - } - } - }, - "Event": { - "id": "Event", - "description": "Base type for asynchronous events from Asterisk.", - "properties": { - "application": { - "type": "string", - "description": "Name of the application receiving the event.", - "required": true - }, - "timestamp": { - "type": "Date", - "description": "Time at which this event was created.", - "required": false - } - }, - "subTypes": [ - "DeviceStateChanged", - "PlaybackStarted", - "PlaybackFinished", - "RecordingStarted", - "RecordingFinished", - "RecordingFailed", - "ApplicationReplaced", - "BridgeCreated", - "BridgeDestroyed", - "BridgeMerged", - "BridgeBlindTransfer", - "BridgeAttendedTransfer", - "ChannelCreated", - "ChannelDestroyed", - "ChannelEnteredBridge", - "ChannelLeftBridge", - "ChannelStateChange", - "ChannelDtmfReceived", - "ChannelDialplan", - "ChannelCallerId", - "ChannelUserevent", - "ChannelHangupRequest", - "ChannelVarset", - "ChannelTalkingStarted", - "ChannelTalkingFinished", - "EndpointStateChange", - "Dial", - "StasisEnd", - "StasisStart", - "TextMessageReceived" - ] - }, - "DeviceStateChanged": { - "id": "DeviceStateChanged", - "description": "Notification that a device state has changed.", - "properties": { - "device_state": { - "type": "DeviceState", - "description": "Device state object", - "required": true - } - } - }, - "PlaybackStarted": { - "id": "PlaybackStarted", - "description": "Event showing the start of a media playback operation.", - "properties": { - "playback": { - "type": "Playback", - "description": "Playback control object", - "required": true - } - } - }, - "PlaybackFinished": { - "id": "PlaybackFinished", - "description": "Event showing the completion of a media playback operation.", - "properties": { - "playback": { - "type": "Playback", - "description": "Playback control object", - "required": true - } - } - }, - "RecordingStarted": { - "id": "RecordingStarted", - "description": "Event showing the start of a recording operation.", - "properties": { - "recording": { - "type": "LiveRecording", - "description": "Recording control object", - "required": true - } - } - }, - "RecordingFinished": { - "id": "RecordingFinished", - "description": "Event showing the completion of a recording operation.", - "properties": { - "recording": { - "type": "LiveRecording", - "description": "Recording control object", - "required": true - } - } - }, - "RecordingFailed": { - "id": "RecordingFailed", - "description": "Event showing failure of a recording operation.", - "properties": { - "recording": { - "type": "LiveRecording", - "description": "Recording control object", - "required": true - } - } - }, - "ApplicationReplaced": { - "id": "ApplicationReplaced", - "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.", - "properties": {} - }, - "BridgeCreated": { - "id": "BridgeCreated", - "description": "Notification that a bridge has been created.", - "properties": { - "bridge": { - "required": true, - "type": "Bridge" - } - } - }, - "BridgeDestroyed": { - "id": "BridgeDestroyed", - "description": "Notification that a bridge has been destroyed.", - "properties": { - "bridge": { - "required": true, - "type": "Bridge" - } - } - }, - "BridgeMerged": { - "id": "BridgeMerged", - "description": "Notification that one bridge has merged into another.", - "properties": { - "bridge": { - "required": true, - "type": "Bridge" - }, - "bridge_from": { - "required": true, - "type": "Bridge" - } - } - }, - "BridgeBlindTransfer": { - "id": "BridgeBlindTransfer", - "description": "Notification that a blind transfer has occurred.", - "properties": { - "channel": { - "description": "The channel performing the blind transfer", - "required": true, - "type": "Channel" - }, - "replace_channel": { - "description": "The channel that is replacing transferer when the transferee(s) can not be transferred directly", - "required": false, - "type": "Channel" - }, - "transferee": { - "description": "The channel that is being transferred", - "required": false, - "type": "Channel" - }, - "exten": { - "description": "The extension transferred to", - "required": true, - "type": "string" - }, - "context": { - "description": "The context transferred to", - "required": true, - "type": "string" - }, - "result": { - "description": "The result of the transfer attempt", - "required": true, - "type": "string" - }, - "is_external": { - "description": "Whether the transfer was externally initiated or not", - "required": true, - "type": "boolean" - }, - "bridge": { - "description": "The bridge being transferred", - "type": "Bridge" - } - } - }, - "BridgeAttendedTransfer": { - "id": "BridgeAttendedTransfer", - "description": "Notification that an attended transfer has occurred.", - "properties": { - "transferer_first_leg": { - "description": "First leg of the transferer", - "required": true, - "type": "Channel" - }, - "transferer_second_leg": { - "description": "Second leg of the transferer", - "required": true, - "type": "Channel" - }, - "replace_channel": { - "description": "The channel that is replacing transferer_first_leg in the swap", - "required": false, - "type": "Channel" - }, - "transferee": { - "description": "The channel that is being transferred", - "required": false, - "type": "Channel" - }, - "transfer_target": { - "description": "The channel that is being transferred to", - "required": false, - "type": "Channel" - }, - "result": { - "description": "The result of the transfer attempt", - "required": true, - "type": "string" - }, - "is_external": { - "description": "Whether the transfer was externally initiated or not", - "required": true, - "type": "boolean" - }, - "transferer_first_leg_bridge": { - "description": "Bridge the transferer first leg is in", - "type": "Bridge" - }, - "transferer_second_leg_bridge": { - "description": "Bridge the transferer second leg is in", - "type": "Bridge" - }, - "destination_type": { - "description": "How the transfer was accomplished", - "required": true, - "type": "string" - }, - "destination_bridge": { - "description": "Bridge that survived the merge result", - "type": "string" - }, - "destination_application": { - "description": "Application that has been transferred into", - "type": "string" - }, - "destination_link_first_leg": { - "description": "First leg of a link transfer result", - "type": "Channel" - }, - "destination_link_second_leg": { - "description": "Second leg of a link transfer result", - "type": "Channel" - }, - "destination_threeway_channel": { - "description": "Transferer channel that survived the threeway result", - "type": "Channel" - }, - "destination_threeway_bridge": { - "description": "Bridge that survived the threeway result", - "type": "Bridge" - } - } - }, - "ChannelCreated": { - "id": "ChannelCreated", - "description": "Notification that a channel has been created.", - "properties": { - "channel": { - "required": true, - "type": "Channel" - } - } - }, - "ChannelDestroyed": { - "id": "ChannelDestroyed", - "description": "Notification that a channel has been destroyed.", - "properties": { - "cause": { - "required": true, - "description": "Integer representation of the cause of the hangup", - "type": "int" - }, - "cause_txt": { - "required": true, - "description": "Text representation of the cause of the hangup", - "type": "string" - }, - "channel": { - "required": true, - "type": "Channel" - } - } - }, - "ChannelEnteredBridge": { - "id": "ChannelEnteredBridge", - "description": "Notification that a channel has entered a bridge.", - "properties": { - "bridge": { - "required": true, - "type": "Bridge" - }, - "channel": { - "type": "Channel" - } - } - }, - "ChannelLeftBridge": { - "id": "ChannelLeftBridge", - "description": "Notification that a channel has left a bridge.", - "properties": { - "bridge": { - "required": true, - "type": "Bridge" - }, - "channel": { - "required": true, - "type": "Channel" - } - } - }, - "ChannelStateChange": { - "id": "ChannelStateChange", - "description": "Notification of a channel's state change.", - "properties": { - "channel": { - "required": true, - "type": "Channel" - } - } - }, - "ChannelDtmfReceived": { - "id": "ChannelDtmfReceived", - "description": "DTMF received on a channel.\n\nThis event is sent when the DTMF ends. There is no notification about the start of DTMF", - "properties": { - "digit": { - "required": true, - "type": "string", - "description": "DTMF digit received (0-9, A-E, # or *)" - }, - "duration_ms": { - "required": true, - "type": "int", - "description": "Number of milliseconds DTMF was received" - }, - "channel": { - "required": true, - "type": "Channel", - "description": "The channel on which DTMF was received" - } - } - }, - "ChannelDialplan": { - "id": "ChannelDialplan", - "description": "Channel changed location in the dialplan.", - "properties": { - "channel": { - "required": true, - "type": "Channel", - "description": "The channel that changed dialplan location." - }, - "dialplan_app": { - "required": true, - "type": "string", - "description": "The application about to be executed." - }, - "dialplan_app_data": { - "required": true, - "type": "string", - "description": "The data to be passed to the application." - } - } - }, - "ChannelCallerId": { - "id": "ChannelCallerId", - "description": "Channel changed Caller ID.", - "properties": { - "caller_presentation": { - "required": true, - "type": "int", - "description": "The integer representation of the Caller Presentation value." - }, - "caller_presentation_txt": { - "required": true, - "type": "string", - "description": "The text representation of the Caller Presentation value." - }, - "channel": { - "required": true, - "type": "Channel", - "description": "The channel that changed Caller ID." - } - } - }, - "ChannelUserevent": { - "id": "ChannelUserevent", - "description": "User-generated event with additional user-defined fields in the object.", - "properties": { - "eventname": { - "required": true, - "type": "string", - "description": "The name of the user event." - }, - "channel": { - "required": false, - "type": "Channel", - "description": "A channel that is signaled with the user event." - }, - "bridge": { - "required": false, - "type": "Bridge", - "description": "A bridge that is signaled with the user event." - }, - "endpoint": { - "required": false, - "type": "Endpoint", - "description": "A endpoint that is signaled with the user event." - }, - "userevent": { - "required": true, - "type": "object", - "description": "Custom Userevent data" - } - } - }, - "ChannelHangupRequest": { - "id": "ChannelHangupRequest", - "description": "A hangup was requested on the channel.", - "properties": { - "cause": { - "type": "int", - "description": "Integer representation of the cause of the hangup." - }, - "soft": { - "type": "boolean", - "description": "Whether the hangup request was a soft hangup request." - }, - "channel": { - "required": true, - "type": "Channel", - "description": "The channel on which the hangup was requested." - } - } - }, - "ChannelVarset": { - "id": "ChannelVarset", - "description": "Channel variable changed.", - "properties": { - "variable": { - "required": true, - "type": "string", - "description": "The variable that changed." - }, - "value": { - "required": true, - "type": "string", - "description": "The new value of the variable." - }, - "channel": { - "required": false, - "type": "Channel", - "description": "The channel on which the variable was set.\n\nIf missing, the variable is a global variable." - } - } - }, - "ChannelTalkingStarted": { - "id": "ChannelTalkingStarted", - "description": "Talking was detected on the channel.", - "properties": { - "channel": { - "required": true, - "type": "Channel", - "description": "The channel on which talking started." - } - } - }, - "ChannelTalkingFinished": { - "id": "ChannelTalkingFinished", - "description": "Talking is no longer detected on the channel.", - "properties": { - "channel": { - "required": true, - "type": "Channel", - "description": "The channel on which talking completed." - }, - "duration": { - "required": true, - "type": "int", - "description": "The length of time, in milliseconds, that talking was detected on the channel" - } - } - }, - "EndpointStateChange": { - "id": "EndpointStateChange", - "description": "Endpoint state changed.", - "properties": { - "endpoint": { - "required": true, - "type": "Endpoint" - } - } - }, - "Dial": { - "id": "Dial", - "description": "Dialing state has changed.", - "properties": { - "caller": { - "required": false, - "type": "Channel", - "description": "The calling channel." - }, - "peer": { - "required": true, - "type": "Channel", - "description": "The dialed channel." - }, - "forward": { - "required": false, - "type": "string", - "description": "Forwarding target requested by the original dialed channel." - }, - "forwarded": { - "required": false, - "type": "Channel", - "description": "Channel that the caller has been forwarded to." - }, - "dialstring": { - "required": false, - "type": "string", - "description": "The dial string for calling the peer channel." - }, - "dialstatus": { - "required": true, - "type": "string", - "description": "Current status of the dialing attempt to the peer." - } - } - }, - "StasisEnd": { - "id": "StasisEnd", - "description": "Notification that a channel has left a Stasis application.", - "properties": { - "channel": { - "required": true, - "type": "Channel" - } - } - }, - "StasisStart": { - "id": "StasisStart", - "description": "Notification that a channel has entered a Stasis application.", - "properties": { - "args": { - "required": true, - "type": "List[string]", - "description": "Arguments to the application" - }, - "channel": { - "required": true, - "type": "Channel" - }, - "replace_channel": { - "required": false, - "type": "Channel" - } - } - }, - "TextMessageReceived": { - "id": "TextMessageReceived", - "description": "A text message was received from an endpoint.", - "properties": { - "message": { - "required": true, - "type": "TextMessage" - }, - "endpoint": { - "required": false, - "type": "Endpoint" - } - } - } - } -} diff --git a/codegen-data/ari_1_5_0/mailboxes.json b/codegen-data/ari_1_5_0/mailboxes.json deleted file mode 100644 index 1254d53e..00000000 --- a/codegen-data/ari_1_5_0/mailboxes.json +++ /dev/null @@ -1,134 +0,0 @@ -{ - "_copyright": "Copyright (C) 2013, Digium, Inc.", - "_author": "Jonathan Rose ", - "_svn_revision": "$Revision: 423618 $", - "apiVersion": "1.5.0", - "swaggerVersion": "1.1", - "basePath": "http://localhost:8088/ari", - "resourcePath": "/api-docs/mailboxes.{format}", - "apis": [ - { - "path": "/mailboxes", - "description": "Mailboxes", - "operations": [ - { - "httpMethod": "GET", - "summary": "List all mailboxes.", - "nickname": "list", - "responseClass": "List[Mailbox]" - } - ] - }, - { - "path": "/mailboxes/{mailboxName}", - "description": "Mailbox state", - "operations": [ - { - "httpMethod": "GET", - "summary": "Retrieve the current state of a mailbox.", - "nickname": "get", - "responseClass": "Mailbox", - "parameters": [ - { - "name": "mailboxName", - "description": "Name of the mailbox", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Mailbox not found" - } - ] - }, - { - "httpMethod": "PUT", - "summary": "Change the state of a mailbox. (Note - implicitly creates the mailbox).", - "nickname": "update", - "responseClass": "void", - "parameters": [ - { - "name": "mailboxName", - "description": "Name of the mailbox", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "oldMessages", - "description": "Count of old messages in the mailbox", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "int" - }, - { - "name": "newMessages", - "description": "Count of new messages in the mailbox", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "int" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Mailbox not found" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Destroy a mailbox.", - "nickname": "delete", - "responseClass": "void", - "parameters": [ - { - "name": "mailboxName", - "description": "Name of the mailbox", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Mailbox not found" - } - ] - } - ] - } - ], - "models": { - "Mailbox": { - "id": "Mailbox", - "description": "Represents the state of a mailbox.", - "properties": { - "name": { - "type": "string", - "description": "Name of the mailbox.", - "required": true - }, - "old_messages": { - "type": "int", - "description": "Count of old messages in the mailbox.", - "required": true - }, - "new_messages": { - "type": "int", - "description": "Count of new messages in the mailbox.", - "required": true - } - } - } - } -} diff --git a/codegen-data/ari_1_5_0/playbacks.json b/codegen-data/ari_1_5_0/playbacks.json deleted file mode 100644 index 3c4290b5..00000000 --- a/codegen-data/ari_1_5_0/playbacks.json +++ /dev/null @@ -1,155 +0,0 @@ -{ - "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", - "_author": "David M. Lee, II ", - "_svn_revision": "$Revision: 423618 $", - "apiVersion": "1.5.0", - "swaggerVersion": "1.1", - "basePath": "http://localhost:8088/ari", - "resourcePath": "/api-docs/playbacks.{format}", - "apis": [ - { - "path": "/playbacks/{playbackId}", - "description": "Control object for a playback operation.", - "operations": [ - { - "httpMethod": "GET", - "summary": "Get a playback's details.", - "nickname": "get", - "responseClass": "Playback", - "parameters": [ - { - "name": "playbackId", - "description": "Playback's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "The playback cannot be found" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Stop a playback.", - "nickname": "stop", - "responseClass": "void", - "parameters": [ - { - "name": "playbackId", - "description": "Playback's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "The playback cannot be found" - } - ] - } - ] - }, - { - "path": "/playbacks/{playbackId}/control", - "description": "Control object for a playback operation.", - "operations": [ - { - "httpMethod": "POST", - "summary": "Control a playback.", - "nickname": "control", - "responseClass": "void", - "parameters": [ - { - "name": "playbackId", - "description": "Playback's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "operation", - "description": "Operation to perform on the playback.", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string", - "allowableValues": { - "valueType": "LIST", - "values": [ - "restart", - "pause", - "unpause", - "reverse", - "forward" - ] - } - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "The provided operation parameter was invalid" - }, - { - "code": 404, - "reason": "The playback cannot be found" - }, - { - "code": 409, - "reason": "The operation cannot be performed in the playback's current state" - } -] - } - ] - } - ], - "models": { - "Playback": { - "id": "Playback", - "description": "Object representing the playback of media to a channel", - "properties": { - "id": { - "type": "string", - "description": "ID for this playback operation", - "required": true - }, - "media_uri": { - "type": "string", - "description": "URI for the media to play back.", - "required": true - }, - "target_uri": { - "type": "string", - "description": "URI for the channel or bridge to play the media on", - "required": true - }, - "language": { - "type": "string", - "description": "For media types that support multiple languages, the language requested for playback." - }, - "state": { - "type": "string", - "description": "Current state of the playback operation.", - "required": true, - "allowableValues": { - "valueType": "LIST", - "values": [ - "queued", - "playing", - "complete" - ] - } - } - } - } - } -} diff --git a/codegen-data/ari_1_5_0/recordings.json b/codegen-data/ari_1_5_0/recordings.json deleted file mode 100644 index 26bb2800..00000000 --- a/codegen-data/ari_1_5_0/recordings.json +++ /dev/null @@ -1,378 +0,0 @@ -{ - "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", - "_author": "David M. Lee, II ", - "_svn_revision": "$Revision: 423618 $", - "apiVersion": "1.5.0", - "swaggerVersion": "1.1", - "basePath": "http://localhost:8088/ari", - "resourcePath": "/api-docs/recordings.{format}", - "apis": [ - { - "path": "/recordings/stored", - "description": "Recordings", - "operations": [ - { - "httpMethod": "GET", - "summary": "List recordings that are complete.", - "nickname": "listStored", - "responseClass": "List[StoredRecording]" - } - ] - }, - { - "path": "/recordings/stored/{recordingName}", - "description": "Individual recording", - "operations": [ - { - "httpMethod": "GET", - "summary": "Get a stored recording's details.", - "nickname": "getStored", - "responseClass": "StoredRecording", - "parameters": [ - { - "name": "recordingName", - "description": "The name of the recording", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Recording not found" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Delete a stored recording.", - "nickname": "deleteStored", - "responseClass": "void", - "parameters": [ - { - "name": "recordingName", - "description": "The name of the recording", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Recording not found" - } - ] - } - ] - }, - { - "path": "/recordings/stored/{recordingName}/copy", - "description": "Copy an individual recording", - "operations": [ - { - "httpMethod": "POST", - "summary": "Copy a stored recording.", - "nickname": "copyStored", - "responseClass": "StoredRecording", - "parameters": [ - { - "name": "recordingName", - "description": "The name of the recording to copy", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "destinationRecordingName", - "description": "The destination name of the recording", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Recording not found" - }, - { - "code": 409, - "reason": "A recording with the same name already exists on the system" - } - ] - } - ] - }, - { - "path": "/recordings/live/{recordingName}", - "description": "A recording that is in progress", - "operations": [ - { - "httpMethod": "GET", - "summary": "List live recordings.", - "nickname": "getLive", - "responseClass": "LiveRecording", - "parameters": [ - { - "name": "recordingName", - "description": "The name of the recording", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Recording not found" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Stop a live recording and discard it.", - "nickname": "cancel", - "responseClass": "void", - "parameters": [ - { - "name": "recordingName", - "description": "The name of the recording", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Recording not found" - } - ] - } - ] - }, - { - "path": "/recordings/live/{recordingName}/stop", - "operations": [ - { - "httpMethod": "POST", - "summary": "Stop a live recording and store it.", - "nickname": "stop", - "responseClass": "void", - "parameters": [ - { - "name": "recordingName", - "description": "The name of the recording", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Recording not found" - } - ] - } - ] - }, - { - "path": "/recordings/live/{recordingName}/pause", - "operations": [ - { - "httpMethod": "POST", - "summary": "Pause a live recording.", - "notes": "Pausing a recording suspends silence detection, which will be restarted when the recording is unpaused. Paused time is not included in the accounting for maxDurationSeconds.", - "nickname": "pause", - "responseClass": "void", - "parameters": [ - { - "name": "recordingName", - "description": "The name of the recording", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Recording not found" - }, - { - "code": 409, - "reason": "Recording not in session" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Unpause a live recording.", - "nickname": "unpause", - "responseClass": "void", - "parameters": [ - { - "name": "recordingName", - "description": "The name of the recording", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Recording not found" - }, - { - "code": 409, - "reason": "Recording not in session" - } - ] - } - ] - }, - { - "path": "/recordings/live/{recordingName}/mute", - "operations": [ - { - "httpMethod": "POST", - "summary": "Mute a live recording.", - "notes": "Muting a recording suspends silence detection, which will be restarted when the recording is unmuted.", - "nickname": "mute", - "responseClass": "void", - "parameters": [ - { - "name": "recordingName", - "description": "The name of the recording", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Recording not found" - }, - { - "code": 409, - "reason": "Recording not in session" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Unmute a live recording.", - "nickname": "unmute", - "responseClass": "void", - "parameters": [ - { - "name": "recordingName", - "description": "The name of the recording", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Recording not found" - }, - { - "code": 409, - "reason": "Recording not in session" - } - ] - } - ] - } - ], - "models": { - "StoredRecording": { - "id": "StoredRecording", - "description": "A past recording that may be played back.", - "properties": { - "name": { - "required": true, - "type": "string" - }, - "format": { - "required": true, - "type": "string" - } - } - }, - "LiveRecording": { - "id": "LiveRecording", - "description": "A recording that is in progress", - "properties": { - "name": { - "required": true, - "type": "string", - "description": "Base name for the recording" - }, - "format": { - "required": true, - "type": "string", - "description": "Recording format (wav, gsm, etc.)" - }, - "target_uri": { - "required": true, - "type": "string", - "description": "URI for the channel or bridge being recorded" - }, - "state": { - "required": true, - "type": "string", - "allowableValues": { - "valueType": "LIST", - "values": [ - "queued", - "recording", - "paused", - "done", - "failed", - "canceled" - ] - } - }, - "duration": { - "required": false, - "type": "int", - "description": "Duration in seconds of the recording" - }, - "talking_duration": { - "required": false, - "type": "int", - "description": "Duration of talking, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds." - }, - "silence_duration": { - "required": false, - "type": "int", - "description": "Duration of silence, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds." - }, - "cause": { - "required": false, - "type": "string", - "description": "Cause for recording failure if failed" - } - } - } - } -} diff --git a/codegen-data/ari_1_5_0/sounds.json b/codegen-data/ari_1_5_0/sounds.json deleted file mode 100644 index c46340c0..00000000 --- a/codegen-data/ari_1_5_0/sounds.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", - "_author": "David M. Lee, II ", - "_svn_revision": "$Revision: 423618 $", - "apiVersion": "1.5.0", - "swaggerVersion": "1.1", - "basePath": "http://localhost:8088/ari", - "resourcePath": "/api-docs/sounds.{format}", - "apis": [ - { - "path": "/sounds", - "description": "Sounds", - "operations": [ - { - "httpMethod": "GET", - "summary": "List all sounds.", - "nickname": "list", - "responseClass": "List[Sound]", - "parameters": [ - { - "name": "lang", - "description": "Lookup sound for a specific language.", - "paramType": "query", - "dataType": "string", - "required": false - }, - { - "name": "format", - "description": "Lookup sound in a specific format.", - "paramType": "query", - "dataType": "string", - "required": false, - "__note": "core show translation can show translation paths between formats, along with relative costs. so this could be just installed format, or we could follow that for transcoded formats." - } - ] - } - ] - }, - { - "path": "/sounds/{soundId}", - "description": "Individual sound", - "operations": [ - { - "httpMethod": "GET", - "summary": "Get a sound's details.", - "nickname": "get", - "responseClass": "Sound", - "parameters": [ - { - "name": "soundId", - "description": "Sound's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ] - } - ] - } - ], - "models": { - "FormatLangPair": { - "id": "FormatLangPair", - "description": "Identifies the format and language of a sound file", - "properties": { - "language": { - "required": true, - "type": "string" - }, - "format": { - "required": true, - "type": "string" - } - } - }, - "Sound": { - "id": "Sound", - "description": "A media file that may be played back.", - "properties": { - "id": { - "required": true, - "description": "Sound's identifier.", - "type": "string" - }, - "text": { - "required": false, - "description": "Text description of the sound, usually the words spoken.", - "type": "string" - }, - "formats": { - "required": true, - "description": "The formats and languages in which this sound is available.", - "type": "List[FormatLangPair]" - } - } - } - } -} diff --git a/codegen-data/ari_1_6_0/applications.json b/codegen-data/ari_1_6_0/applications.json deleted file mode 100644 index db5a9ee0..00000000 --- a/codegen-data/ari_1_6_0/applications.json +++ /dev/null @@ -1,172 +0,0 @@ -{ - "_copyright": "Copyright (C) 2013, Digium, Inc.", - "_author": "David M. Lee, II ", - "_svn_revision": "$Revision: 429091 $", - "apiVersion": "1.6.0", - "swaggerVersion": "1.1", - "basePath": "http://localhost:8088/ari", - "resourcePath": "/api-docs/applications.{format}", - "apis": [ - { - "path": "/applications", - "description": "Stasis applications", - "operations": [ - { - "httpMethod": "GET", - "summary": "List all applications.", - "nickname": "list", - "responseClass": "List[Application]" - } - ] - }, - { - "path": "/applications/{applicationName}", - "description": "Stasis application", - "operations": [ - { - "httpMethod": "GET", - "summary": "Get details of an application.", - "nickname": "get", - "responseClass": "Application", - "parameters": [ - { - "name": "applicationName", - "description": "Application's name", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Application does not exist." - } - ] - } - ] - }, - { - "path": "/applications/{applicationName}/subscription", - "description": "Stasis application", - "operations": [ - { - "httpMethod": "POST", - "summary": "Subscribe an application to a event source.", - "notes": "Returns the state of the application after the subscriptions have changed", - "nickname": "subscribe", - "responseClass": "Application", - "parameters": [ - { - "name": "applicationName", - "description": "Application's name", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "eventSource", - "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}", - "paramType": "query", - "required": true, - "allowMultiple": true, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Missing parameter." - }, - { - "code": 404, - "reason": "Application does not exist." - }, - { - "code": 422, - "reason": "Event source does not exist." - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Unsubscribe an application from an event source.", - "notes": "Returns the state of the application after the subscriptions have changed", - "nickname": "unsubscribe", - "responseClass": "Application", - "parameters": [ - { - "name": "applicationName", - "description": "Application's name", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "eventSource", - "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}", - "paramType": "query", - "required": true, - "allowMultiple": true, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Missing parameter; event source scheme not recognized." - }, - { - "code": 404, - "reason": "Application does not exist." - }, - { - "code": 409, - "reason": "Application not subscribed to event source." - }, - { - "code": 422, - "reason": "Event source does not exist." - } - ] - } - ] - } - ], - "models": { - "Application": { - "id": "Application", - "description": "Details of a Stasis application", - "properties": { - "name": { - "type": "string", - "description": "Name of this application", - "required": true - }, - "channel_ids": { - "type": "List[string]", - "description": "Id's for channels subscribed to.", - "required": true - }, - "bridge_ids": { - "type": "List[string]", - "description": "Id's for bridges subscribed to.", - "required": true - }, - "endpoint_ids": { - "type": "List[string]", - "description": "{tech}/{resource} for endpoints subscribed to.", - "required": true - }, - "device_names": { - "type": "List[string]", - "description": "Names of the devices subscribed to.", - "required": true - } - } - } - } -} diff --git a/codegen-data/ari_1_6_0/asterisk.json b/codegen-data/ari_1_6_0/asterisk.json deleted file mode 100644 index 69cef054..00000000 --- a/codegen-data/ari_1_6_0/asterisk.json +++ /dev/null @@ -1,259 +0,0 @@ -{ - "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", - "_author": "David M. Lee, II ", - "_svn_revision": "$Revision: 429091 $", - "apiVersion": "1.6.0", - "swaggerVersion": "1.1", - "basePath": "http://localhost:8088/ari", - "resourcePath": "/api-docs/asterisk.{format}", - "apis": [ - { - "path": "/asterisk/info", - "description": "Asterisk system information (similar to core show settings)", - "operations": [ - { - "httpMethod": "GET", - "summary": "Gets Asterisk system information.", - "nickname": "getInfo", - "responseClass": "AsteriskInfo", - "parameters": [ - { - "name": "only", - "description": "Filter information returned", - "paramType": "query", - "required": false, - "allowMultiple": true, - "dataType": "string", - "allowableValues": { - "valueType": "LIST", - "values": [ - "build", - "system", - "config", - "status" - ] - } - } - ] - } - ] - }, - { - "path": "/asterisk/variable", - "description": "Global variables", - "operations": [ - { - "httpMethod": "GET", - "summary": "Get the value of a global variable.", - "nickname": "getGlobalVar", - "responseClass": "Variable", - "parameters": [ - { - "name": "variable", - "description": "The variable to get", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Missing variable parameter." - } - ] - }, - { - "httpMethod": "POST", - "summary": "Set the value of a global variable.", - "nickname": "setGlobalVar", - "responseClass": "void", - "parameters": [ - { - "name": "variable", - "description": "The variable to set", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "value", - "description": "The value to set the variable to", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Missing variable parameter." - } - ] - } - ] - } - ], - "models": { - "BuildInfo": { - "id": "BuildInfo", - "description": "Info about how Asterisk was built", - "properties": { - "os": { - "required": true, - "type": "string", - "description": "OS Asterisk was built on." - }, - "kernel": { - "required": true, - "type": "string", - "description": "Kernel version Asterisk was built on." - }, - "options": { - "required": true, - "type": "string", - "description": "Compile time options, or empty string if default." - }, - "machine": { - "required": true, - "type": "string", - "description": "Machine architecture (x86_64, i686, ppc, etc.)" - }, - "date": { - "required": true, - "type": "string", - "description": "Date and time when Asterisk was built." - }, - "user": { - "required": true, - "type": "string", - "description": "Username that build Asterisk" - } - } - }, - "SystemInfo": { - "id": "SystemInfo", - "description": "Info about Asterisk", - "properties": { - "version": { - "required": true, - "type": "string", - "description": "Asterisk version." - }, - "entity_id": { - "required": true, - "type": "string", - "description": "" - } - } - }, - "SetId": { - "id": "SetId", - "description": "Effective user/group id", - "properties": { - "user": { - "required": true, - "type": "string", - "description": "Effective user id." - }, - "group": { - "required": true, - "type": "string", - "description": "Effective group id." - } - } - }, - "ConfigInfo": { - "id": "ConfigInfo", - "description": "Info about Asterisk configuration", - "properties": { - "name": { - "required": true, - "type": "string", - "description": "Asterisk system name." - }, - "default_language": { - "required": true, - "type": "string", - "description": "Default language for media playback." - }, - "max_channels": { - "required": false, - "type": "int", - "description": "Maximum number of simultaneous channels." - }, - "max_open_files": { - "required": false, - "type": "int", - "description": "Maximum number of open file handles (files, sockets)." - }, - "max_load": { - "required": false, - "type": "double", - "description": "Maximum load avg on system." - }, - "setid": { - "required": true, - "type": "SetId", - "description": "Effective user/group id for running Asterisk." - } - } - }, - "StatusInfo": { - "id": "StatusInfo", - "description": "Info about Asterisk status", - "properties": { - "startup_time": { - "required": true, - "type": "Date", - "description": "Time when Asterisk was started." - }, - "last_reload_time": { - "required": true, - "type": "Date", - "description": "Time when Asterisk was last reloaded." - } - } - }, - "AsteriskInfo": { - "id": "AsteriskInfo", - "description": "Asterisk system information", - "properties": { - "build": { - "required": false, - "type": "BuildInfo", - "description": "Info about how Asterisk was built" - }, - "system": { - "required": false, - "type": "SystemInfo", - "description": "Info about the system running Asterisk" - }, - "config": { - "required": false, - "type": "ConfigInfo", - "description": "Info about Asterisk configuration" - }, - "status": { - "required": false, - "type": "StatusInfo", - "description": "Info about Asterisk status" - } - } - }, - "Variable": { - "id": "Variable", - "description": "The value of a channel variable", - "properties": { - "value": { - "required": true, - "type": "string", - "description": "The value of the variable requested" - } - } - } - } -} diff --git a/codegen-data/ari_1_6_0/bridges.json b/codegen-data/ari_1_6_0/bridges.json deleted file mode 100644 index 9545416d..00000000 --- a/codegen-data/ari_1_6_0/bridges.json +++ /dev/null @@ -1,656 +0,0 @@ -{ - "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", - "_author": "David M. Lee, II ", - "_svn_revision": "$Revision: 429091 $", - "apiVersion": "1.6.0", - "swaggerVersion": "1.1", - "basePath": "http://localhost:8088/ari", - "resourcePath": "/api-docs/bridges.{format}", - "apis": [ - { - "path": "/bridges", - "description": "Active bridges", - "operations": [ - { - "httpMethod": "GET", - "summary": "List all active bridges in Asterisk.", - "nickname": "list", - "responseClass": "List[Bridge]" - }, - { - "httpMethod": "POST", - "summary": "Create a new bridge.", - "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", - "nickname": "create", - "responseClass": "Bridge", - "parameters": [ - { - "name": "type", - "description": "Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media).", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "bridgeId", - "description": "Unique ID to give to the bridge being created.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "name", - "description": "Name to give to the bridge being created.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ] - } - ] - }, - { - "path": "/bridges/{bridgeId}", - "description": "Individual bridge", - "operations": [ - { - "httpMethod": "POST", - "summary": "Create a new bridge or updates an existing one.", - "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", - "nickname": "create_or_update_with_id", - "responseClass": "Bridge", - "parameters": [ - { - "name": "type", - "description": "Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media) to set.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "bridgeId", - "description": "Unique ID to give to the bridge being created.", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "name", - "description": "Set the name of the bridge.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ] - }, - { - "httpMethod": "GET", - "summary": "Get bridge details.", - "nickname": "get", - "responseClass": "Bridge", - "parameters": [ - { - "name": "bridgeId", - "description": "Bridge's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Bridge not found" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Shut down a bridge.", - "notes": "If any channels are in this bridge, they will be removed and resume whatever they were doing beforehand.", - "nickname": "destroy", - "responseClass": "void", - "parameters": [ - { - "name": "bridgeId", - "description": "Bridge's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Bridge not found" - } - ] - } - ] - }, - { - "path": "/bridges/{bridgeId}/addChannel", - "description": "Add a channel to a bridge", - "operations": [ - { - "httpMethod": "POST", - "summary": "Add a channel to a bridge.", - "nickname": "addChannel", - "responseClass": "void", - "parameters": [ - { - "name": "bridgeId", - "description": "Bridge's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "channel", - "description": "Ids of channels to add to bridge", - "paramType": "query", - "required": true, - "allowMultiple": true, - "dataType": "string" - }, - { - "name": "role", - "description": "Channel's role in the bridge", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Channel not found" - }, - { - "code": 404, - "reason": "Bridge not found" - }, - { - "code": 409, - "reason": "Bridge not in Stasis application; Channel currently recording" - }, - { - "code": 422, - "reason": "Channel not in Stasis application" - } - ] - } - ] - }, - { - "path": "/bridges/{bridgeId}/removeChannel", - "description": "Remove a channel from a bridge", - "operations": [ - { - "httpMethod": "POST", - "summary": "Remove a channel from a bridge.", - "nickname": "removeChannel", - "responseClass": "void", - "parameters": [ - { - "name": "bridgeId", - "description": "Bridge's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "channel", - "description": "Ids of channels to remove from bridge", - "paramType": "query", - "required": true, - "allowMultiple": true, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Channel not found" - }, - { - "code": 404, - "reason": "Bridge not found" - }, - { - "code": 409, - "reason": "Bridge not in Stasis application" - }, - { - "code": 422, - "reason": "Channel not in this bridge" - } - ] - } - ] - }, - { - "path": "/bridges/{bridgeId}/moh", - "description": "Play music on hold to a bridge", - "operations": [ - { - "httpMethod": "POST", - "summary": "Play music on hold to a bridge or change the MOH class that is playing.", - "nickname": "startMoh", - "responseClass": "void", - "parameters": [ - { - "name": "bridgeId", - "description": "Bridge's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "mohClass", - "description": "Channel's id", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Bridge not found" - }, - { - "code": 409, - "reason": "Bridge not in Stasis application" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Stop playing music on hold to a bridge.", - "notes": "This will only stop music on hold being played via POST bridges/{bridgeId}/moh.", - "nickname": "stopMoh", - "responseClass": "void", - "parameters": [ - { - "name": "bridgeId", - "description": "Bridge's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Bridge not found" - }, - { - "code": 409, - "reason": "Bridge not in Stasis application" - } - ] - } - ] - }, - { - "path": "/bridges/{bridgeId}/play", - "description": "Play media to the participants of a bridge", - "operations": [ - { - "httpMethod": "POST", - "summary": "Start playback of media on a bridge.", - "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", - "nickname": "play", - "responseClass": "Playback", - "parameters": [ - { - "name": "bridgeId", - "description": "Bridge's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "media", - "description": "Media's URI to play.", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "lang", - "description": "For sounds, selects language for sound.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "offsetms", - "description": "Number of media to skip before playing.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 0, - "allowableValues": { - "valueType": "RANGE", - "min": 0 - } - - }, - { - "name": "skipms", - "description": "Number of milliseconds to skip for forward/reverse operations.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 3000, - "allowableValues": { - "valueType": "RANGE", - "min": 0 - } - }, - { - "name": "playbackId", - "description": "Playback Id.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Bridge not found" - }, - { - "code": 409, - "reason": "Bridge not in a Stasis application" - } - ] - } - ] - }, - { - "path": "/bridges/{bridgeId}/play/{playbackId}", - "description": "Play media to a bridge", - "operations": [ - { - "httpMethod": "POST", - "summary": "Start playback of media on a bridge.", - "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.)", - "nickname": "playWithId", - "responseClass": "Playback", - "parameters": [ - { - "name": "bridgeId", - "description": "Bridge's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "playbackId", - "description": "Playback ID.", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "media", - "description": "Media's URI to play.", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "lang", - "description": "For sounds, selects language for sound.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "offsetms", - "description": "Number of media to skip before playing.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 0, - "allowableValues": { - "valueType": "RANGE", - "min": 0 - } - }, - { - "name": "skipms", - "description": "Number of milliseconds to skip for forward/reverse operations.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 3000, - "allowableValues": { - "valueType": "RANGE", - "min": 0 - } - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Bridge not found" - }, - { - "code": 409, - "reason": "Bridge not in a Stasis application" - } - ] - - } - ] - }, - { - "path": "/bridges/{bridgeId}/record", - "description": "Record audio on a bridge", - "operations": [ - { - "httpMethod": "POST", - "summary": "Start a recording.", - "notes": "This records the mixed audio from all channels participating in this bridge.", - "nickname": "record", - "responseClass": "LiveRecording", - "parameters": [ - { - "name": "bridgeId", - "description": "Bridge's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "name", - "description": "Recording's filename", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "format", - "description": "Format to encode audio in", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "maxDurationSeconds", - "description": "Maximum duration of the recording, in seconds. 0 for no limit.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 0, - "allowableValues": { - "valueType": "RANGE", - "min": 0 - } - }, - { - "name": "maxSilenceSeconds", - "description": "Maximum duration of silence, in seconds. 0 for no limit.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 0, - "allowableValues": { - "valueType": "RANGE", - "min": 0 - } - }, - { - "name": "ifExists", - "description": "Action to take if a recording with the same name already exists.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string", - "defaultValue": "fail", - "allowableValues": { - "valueType": "LIST", - "values": [ - "fail", - "overwrite", - "append" - ] - } - }, - { - "name": "beep", - "description": "Play beep when recording begins", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "boolean", - "defaultValue": false - }, - { - "name": "terminateOn", - "description": "DTMF input to terminate recording.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string", - "defaultValue": "none", - "allowableValues": { - "valueType": "LIST", - "values": [ - "none", - "any", - "*", - "#" - ] - } - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Invalid parameters" - }, - { - "code": 404, - "reason": "Bridge not found" - }, - { - "code": 409, - "reason": "Bridge is not in a Stasis application; A recording with the same name already exists on the system and can not be overwritten because it is in progress or ifExists=fail" - }, - { - "code": 422, - "reason": "The format specified is unknown on this system" - } - ] - } - ] - } - ], - "models": { - "Bridge": { - "id": "Bridge", - "description": "The merging of media from one or more channels.\n\nEveryone on the bridge receives the same audio.", - "properties": { - "id": { - "type": "string", - "description": "Unique identifier for this bridge", - "required": true - }, - "technology": { - "type": "string", - "description": "Name of the current bridging technology", - "required": true - }, - "bridge_type": { - "type": "string", - "description": "Type of bridge technology", - "required": true, - "allowableValues": { - "valueType": "LIST", - "values": [ - "mixing", - "holding" - ] - } - }, - "bridge_class": { - "type": "string", - "description": "Bridging class", - "required": true - }, - "creator": { - "type": "string", - "description": "Entity that created the bridge", - "required": true - }, - "name": { - "type": "string", - "description": "Name the creator gave the bridge", - "required": true - }, - "channels": { - "type": "List[string]", - "description": "Ids of channels participating in this bridge", - "required": true - } - } - } - } -} diff --git a/codegen-data/ari_1_6_0/channels.json b/codegen-data/ari_1_6_0/channels.json deleted file mode 100644 index ac497e9e..00000000 --- a/codegen-data/ari_1_6_0/channels.json +++ /dev/null @@ -1,1456 +0,0 @@ -{ - "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", - "_author": "David M. Lee, II ", - "_svn_revision": "$Revision: 429091 $", - "apiVersion": "1.6.0", - "swaggerVersion": "1.1", - "basePath": "http://localhost:8088/ari", - "resourcePath": "/api-docs/channels.{format}", - "apis": [ - { - "path": "/channels", - "description": "Active channels", - "operations": [ - { - "httpMethod": "GET", - "summary": "List all active channels in Asterisk.", - "nickname": "list", - "responseClass": "List[Channel]" - }, - { - "httpMethod": "POST", - "summary": "Create a new channel (originate).", - "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.", - "nickname": "originate", - "responseClass": "Channel", - "parameters": [ - { - "name": "endpoint", - "description": "Endpoint to call.", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "extension", - "description": "The extension to dial after the endpoint answers", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "context", - "description": "The context to dial after the endpoint answers. If omitted, uses 'default'", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "priority", - "description": "The priority to dial after the endpoint answers. If omitted, uses 1", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "long" - }, - { - "name": "app", - "description": "The application that is subscribed to the originated channel, and passed to the Stasis application.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "appArgs", - "description": "The application arguments to pass to the Stasis application.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "callerId", - "description": "CallerID to use when dialing the endpoint or extension.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "timeout", - "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 30 - }, - { - "name": "variables", - "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", - "paramType": "body", - "required": false, - "dataType": "containers", - "allowMultiple": false - }, - { - "name": "channelId", - "description": "The unique id to assign the channel on creation.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "otherChannelId", - "description": "The unique id to assign the second channel when using local channels.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Invalid parameters for originating a channel." - } - ] - } - ] - }, - { - "path": "/channels/{channelId}", - "description": "Active channel", - "operations": [ - { - "httpMethod": "GET", - "summary": "Channel details.", - "nickname": "get", - "responseClass": "Channel", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - } - ] - }, - { - "httpMethod": "POST", - "summary": "Create a new channel (originate with id).", - "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.", - "nickname": "originateWithId", - "responseClass": "Channel", - "parameters": [ - { - "name": "channelId", - "description": "The unique id to assign the channel on creation.", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "endpoint", - "description": "Endpoint to call.", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "extension", - "description": "The extension to dial after the endpoint answers", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "context", - "description": "The context to dial after the endpoint answers. If omitted, uses 'default'", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "priority", - "description": "The priority to dial after the endpoint answers. If omitted, uses 1", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "long" - }, - { - "name": "app", - "description": "The application that is subscribed to the originated channel, and passed to the Stasis application.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "appArgs", - "description": "The application arguments to pass to the Stasis application.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "callerId", - "description": "CallerID to use when dialing the endpoint or extension.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "timeout", - "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 30 - }, - { - "name": "variables", - "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", - "paramType": "body", - "required": false, - "dataType": "containers", - "allowMultiple": false - }, - { - "name": "otherChannelId", - "description": "The unique id to assign the second channel when using local channels.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Invalid parameters for originating a channel." - } - ] - - }, - { - "httpMethod": "DELETE", - "summary": "Delete (i.e. hangup) a channel.", - "nickname": "hangup", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "reason", - "description": "Reason for hanging up the channel", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string", - "defalutValue": "normal", - "allowableValues": { - "valueType": "LIST", - "values": [ - "normal", - "busy", - "congestion" - ] - } - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Invalid reason for hangup provided" - }, - { - "code": 404, - "reason": "Channel not found" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/continue", - "description": "Exit application; continue execution in the dialplan", - "operations": [ - { - "httpMethod": "POST", - "summary": "Exit application; continue execution in the dialplan.", - "nickname": "continueInDialplan", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "context", - "description": "The context to continue to.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "extension", - "description": "The extension to continue to.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "priority", - "description": "The priority to continue to.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/answer", - "description": "Answer a channel", - "operations": [ - { - "httpMethod": "POST", - "summary": "Answer a channel.", - "nickname": "answer", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/ring", - "description": "Send a ringing indication to a channel", - "operations": [ - { - "httpMethod": "POST", - "summary": "Indicate ringing to a channel.", - "nickname": "ring", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Stop ringing indication on a channel if locally generated.", - "nickname": "ringStop", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/dtmf", - "description": "Send DTMF to a channel", - "operations": [ - { - "httpMethod": "POST", - "summary": "Send provided DTMF to a given channel.", - "nickname": "sendDTMF", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "dtmf", - "description": "DTMF To send.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "before", - "description": "Amount of time to wait before DTMF digits (specified in milliseconds) start.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 0 - }, - { - "name": "between", - "description": "Amount of time in between DTMF digits (specified in milliseconds).", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 100 - }, - { - "name": "duration", - "description": "Length of each DTMF digit (specified in milliseconds).", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 100 - }, - { - "name": "after", - "description": "Amount of time to wait after DTMF digits (specified in milliseconds) end.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 0 - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "DTMF is required" - }, - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/mute", - "description": "Mute a channel", - "operations": [ - { - "httpMethod": "POST", - "summary": "Mute a channel.", - "nickname": "mute", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "direction", - "description": "Direction in which to mute audio", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string", - "defaultValue": "both", - "allowableValues": { - "valueType": "LIST", - "values": [ - "both", - "in", - "out" - ] - } - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Unmute a channel.", - "nickname": "unmute", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "direction", - "description": "Direction in which to unmute audio", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string", - "defaultValue": "both", - "allowableValues": { - "valueType": "LIST", - "values": [ - "both", - "in", - "out" - ] - } - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/hold", - "description": "Put a channel on hold", - "operations": [ - { - "httpMethod": "POST", - "summary": "Hold a channel.", - "nickname": "hold", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Remove a channel from hold.", - "nickname": "unhold", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/moh", - "description": "Play music on hold to a channel", - "operations": [ - { - "httpMethod": "POST", - "summary": "Play music on hold to a channel.", - "notes": "Using media operations such as /play on a channel playing MOH in this manner will suspend MOH without resuming automatically. If continuing music on hold is desired, the stasis application must reinitiate music on hold.", - "nickname": "startMoh", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "mohClass", - "description": "Music on hold class to use", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Stop playing music on hold to a channel.", - "nickname": "stopMoh", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/silence", - "description": "Play silence to a channel", - "operations": [ - { - "httpMethod": "POST", - "summary": "Play silence to a channel.", - "notes": "Using media operations such as /play on a channel playing silence in this manner will suspend silence without resuming automatically.", - "nickname": "startSilence", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Stop playing silence to a channel.", - "nickname": "stopSilence", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/play", - "description": "Play media to a channel", - "operations": [ - { - "httpMethod": "POST", - "summary": "Start playback of media.", - "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", - "nickname": "play", - "responseClass": "Playback", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "media", - "description": "Media's URI to play.", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "lang", - "description": "For sounds, selects language for sound.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "offsetms", - "description": "Number of media to skip before playing.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int" - }, - { - "name": "skipms", - "description": "Number of milliseconds to skip for forward/reverse operations.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 3000 - }, - { - "name": "playbackId", - "description": "Playback ID.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/play/{playbackId}", - "description": "Play media to a channel", - "operations": [ - { - "httpMethod": "POST", - "summary": "Start playback of media and specify the playbackId.", - "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.)", - "nickname": "playWithId", - "responseClass": "Playback", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "playbackId", - "description": "Playback ID.", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "media", - "description": "Media's URI to play.", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "lang", - "description": "For sounds, selects language for sound.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "offsetms", - "description": "Number of media to skip before playing.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int" - }, - { - "name": "skipms", - "description": "Number of milliseconds to skip for forward/reverse operations.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 3000 - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/record", - "description": "Record audio from a channel", - "operations": [ - { - "httpMethod": "POST", - "summary": "Start a recording.", - "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.", - "nickname": "record", - "responseClass": "LiveRecording", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "name", - "description": "Recording's filename", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "format", - "description": "Format to encode audio in", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "maxDurationSeconds", - "description": "Maximum duration of the recording, in seconds. 0 for no limit", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 0, - "allowableValues": { - "valueType": "RANGE", - "min": 0 - } - }, - { - "name": "maxSilenceSeconds", - "description": "Maximum duration of silence, in seconds. 0 for no limit", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 0, - "allowableValues": { - "valueType": "RANGE", - "min": 0 - } - }, - { - "name": "ifExists", - "description": "Action to take if a recording with the same name already exists.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string", - "defaultValue": "fail", - "allowableValues": { - "valueType": "LIST", - "values": [ - "fail", - "overwrite", - "append" - ] - } - }, - { - "name": "beep", - "description": "Play beep when recording begins", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "boolean", - "defaultValue": false - }, - { - "name": "terminateOn", - "description": "DTMF input to terminate recording", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string", - "defaultValue": "none", - "allowableValues": { - "valueType": "LIST", - "values": [ - "none", - "any", - "*", - "#" - ] - } - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Invalid parameters" - }, - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "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" - }, - { - "code": 422, - "reason": "The format specified is unknown on this system" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/variable", - "description": "Variables on a channel", - "operations": [ - { - "httpMethod": "GET", - "summary": "Get the value of a channel variable or function.", - "nickname": "getChannelVar", - "responseClass": "Variable", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "variable", - "description": "The channel variable or function to get", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Missing variable parameter." - }, - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - }, - { - "httpMethod": "POST", - "summary": "Set the value of a channel variable or function.", - "nickname": "setChannelVar", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "variable", - "description": "The channel variable or function to set", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "value", - "description": "The value to set the variable to", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Missing variable parameter." - }, - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/snoop", - "description": "Snoop (spy/whisper) on a channel", - "operations": [ - { - "httpMethod": "POST", - "summary": "Start snooping.", - "notes": "Snoop (spy/whisper) on a specific channel.", - "nickname": "snoopChannel", - "responseClass": "Channel", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "spy", - "description": "Direction of audio to spy on", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string", - "defaultValue": "none", - "allowableValues": { - "valueType": "LIST", - "values": [ - "none", - "both", - "out", - "in" - ] - } - }, - { - "name": "whisper", - "description": "Direction of audio to whisper into", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string", - "defaultValue": "none", - "allowableValues": { - "valueType": "LIST", - "values": [ - "none", - "both", - "out", - "in" - ] - } - }, - { - "name": "app", - "description": "Application the snooping channel is placed into", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "appArgs", - "description": "The application arguments to pass to the Stasis application", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "snoopId", - "description": "Unique ID to assign to snooping channel", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Invalid parameters" - }, - { - "code": 404, - "reason": "Channel not found" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/snoop/{snoopId}", - "description": "Snoop (spy/whisper) on a channel", - "operations": [ - { - "httpMethod": "POST", - "summary": "Start snooping.", - "notes": "Snoop (spy/whisper) on a specific channel.", - "nickname": "snoopChannelWithId", - "responseClass": "Channel", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "snoopId", - "description": "Unique ID to assign to snooping channel", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "spy", - "description": "Direction of audio to spy on", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string", - "defaultValue": "none", - "allowableValues": { - "valueType": "LIST", - "values": [ - "none", - "both", - "out", - "in" - ] - } - }, - { - "name": "whisper", - "description": "Direction of audio to whisper into", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string", - "defaultValue": "none", - "allowableValues": { - "valueType": "LIST", - "values": [ - "none", - "both", - "out", - "in" - ] - } - }, - { - "name": "app", - "description": "Application the snooping channel is placed into", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "appArgs", - "description": "The application arguments to pass to the Stasis application", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Invalid parameters" - }, - { - "code": 404, - "reason": "Channel not found" - } - ] - } - ] - } - ], - "models": { - "Dialed": { - "id": "Dialed", - "description": "Dialed channel information.", - "properties": {} - }, - "DialplanCEP": { - "id": "DialplanCEP", - "description": "Dialplan location (context/extension/priority)", - "properties": { - "context": { - "required": true, - "type": "string", - "description": "Context in the dialplan" - }, - "exten": { - "required": true, - "type": "string", - "description": "Extension in the dialplan" - }, - "priority": { - "required": true, - "type": "long", - "description": "Priority in the dialplan" - } - } - }, - "CallerID": { - "id": "CallerID", - "description": "Caller identification", - "properties": { - "name": { - "required": true, - "type": "string" - }, - "number": { - "required": true, - "type": "string" - } - } - }, - "Channel": { - "id": "Channel", - "description": "A specific communication connection between Asterisk and an Endpoint.", - "properties": { - "id": { - "required": true, - "type": "string", - "description": "Unique identifier of the channel.\n\nThis is the same as the Uniqueid field in AMI." - }, - "name": { - "required": true, - "type": "string", - "description": "Name of the channel (i.e. SIP/foo-0000a7e3)" - }, - "state": { - "required": true, - "type": "string", - "allowableValues": { - "valueType": "LIST", - "values": [ - "Down", - "Rsrved", - "OffHook", - "Dialing", - "Ring", - "Ringing", - "Up", - "Busy", - "Dialing Offhook", - "Pre-ring", - "Unknown" - ] - } - }, - "caller": { - "required": true, - "type": "CallerID" - }, - "connected": { - "required": true, - "type": "CallerID" - }, - "accountcode": { - "required": true, - "type": "string" - }, - "dialplan": { - "required": true, - "type": "DialplanCEP", - "description": "Current location in the dialplan" - }, - "creationtime": { - "required": true, - "type": "Date", - "description": "Timestamp when channel was created" - } - } - } - } -} diff --git a/codegen-data/ari_1_6_0/deviceStates.json b/codegen-data/ari_1_6_0/deviceStates.json deleted file mode 100644 index 62ecb135..00000000 --- a/codegen-data/ari_1_6_0/deviceStates.json +++ /dev/null @@ -1,151 +0,0 @@ -{ - "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", - "_author": "Kevin Harwell ", - "_svn_revision": "$Revision: 429091 $", - "apiVersion": "1.6.0", - "swaggerVersion": "1.1", - "basePath": "http://localhost:8088/ari", - "resourcePath": "/api-docs/deviceStates.{format}", - "apis": [ - { - "path": "/deviceStates", - "description": "Device states", - "operations": [ - { - "httpMethod": "GET", - "summary": "List all ARI controlled device states.", - "nickname": "list", - "responseClass": "List[DeviceState]" - } - ] - }, - { - "path": "/deviceStates/{deviceName}", - "description": "Device state", - "operations": [ - { - "httpMethod": "GET", - "summary": "Retrieve the current state of a device.", - "nickname": "get", - "responseClass": "DeviceState", - "parameters": [ - { - "name": "deviceName", - "description": "Name of the device", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ] - }, - { - "httpMethod": "PUT", - "summary": "Change the state of a device controlled by ARI. (Note - implicitly creates the device state).", - "nickname": "update", - "responseClass": "void", - "parameters": [ - { - "name": "deviceName", - "description": "Name of the device", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "deviceState", - "description": "Device state value", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string", - "allowableValues": { - "valueType": "LIST", - "values": [ - "NOT_INUSE", - "INUSE", - "BUSY", - "INVALID", - "UNAVAILABLE", - "RINGING", - "RINGINUSE", - "ONHOLD" - ] - } - - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Device name is missing" - }, - { - "code": 409, - "reason": "Uncontrolled device specified" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Destroy a device-state controlled by ARI.", - "nickname": "delete", - "responseClass": "void", - "parameters": [ - { - "name": "deviceName", - "description": "Name of the device", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Device name is missing" - }, - { - "code": 409, - "reason": "Uncontrolled device specified" - } - ] - } - ] - } - ], - "models": { - "DeviceState": { - "id": "DeviceState", - "description": "Represents the state of a device.", - "properties": { - "name": { - "type": "string", - "description": "Name of the device.", - "required": true - }, - "state": { - "type": "string", - "description": "Device's state", - "required": true, - "allowableValues": { - "valueType": "LIST", - "values": [ - "UNKNOWN", - "NOT_INUSE", - "INUSE", - "BUSY", - "INVALID", - "UNAVAILABLE", - "RINGING", - "RINGINUSE", - "ONHOLD" - ] - } - } - } - } - } -} diff --git a/codegen-data/ari_1_6_0/endpoints.json b/codegen-data/ari_1_6_0/endpoints.json deleted file mode 100644 index 8440d8b0..00000000 --- a/codegen-data/ari_1_6_0/endpoints.json +++ /dev/null @@ -1,275 +0,0 @@ -{ - "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", - "_author": "David M. Lee, II ", - "_svn_revision": "$Revision: 429091 $", - "apiVersion": "1.6.0", - "swaggerVersion": "1.1", - "basePath": "http://localhost:8088/ari", - "resourcePath": "/api-docs/endpoints.{format}", - "apis": [ - { - "path": "/endpoints", - "description": "Asterisk endpoints", - "operations": [ - { - "httpMethod": "GET", - "summary": "List all endpoints.", - "nickname": "list", - "responseClass": "List[Endpoint]" - } - ] - }, - { - "path": "/endpoints/sendMessage", - "description": "Send a message to some technology URI or endpoint.", - "operations": [ - { - "httpMethod": "PUT", - "summary": "Send a message to some technology URI or endpoint.", - "nickname": "sendMessage", - "responseClass": "void", - "parameters": [ - { - "name": "to", - "description": "The endpoint resource or technology specific URI to send the message to. Valid resources are sip, pjsip, and xmpp.", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "from", - "description": "The endpoint resource or technology specific identity to send this message from. Valid resources are sip, pjsip, and xmpp.", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "body", - "description": "The body of the message", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "variables", - "descriptioni": "The \"variables\" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, pjsip and sip resource types will add the key/value pairs as SIP headers,", - "paramType": "body", - "required": false, - "dataType": "containers", - "allowMultiple": false - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Endpoint not found" - } - ] - } - ] - }, - { - "path": "/endpoints/{tech}", - "description": "Asterisk endpoints", - "operations": [ - { - "httpMethod": "GET", - "summary": "List available endoints for a given endpoint technology.", - "nickname": "listByTech", - "responseClass": "List[Endpoint]", - "parameters": [ - { - "name": "tech", - "description": "Technology of the endpoints (sip,iax2,...)", - "paramType": "path", - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Endpoints not found" - } - ] - } - ] - }, - { - "path": "/endpoints/{tech}/{resource}", - "description": "Single endpoint", - "operations": [ - { - "httpMethod": "GET", - "summary": "Details for an endpoint.", - "nickname": "get", - "responseClass": "Endpoint", - "parameters": [ - { - "name": "tech", - "description": "Technology of the endpoint", - "paramType": "path", - "dataType": "string" - }, - { - "name": "resource", - "description": "ID of the endpoint", - "paramType": "path", - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Invalid parameters for sending a message." - }, - { - "code": 404, - "reason": "Endpoints not found" - } - ] - } - ] - }, - { - "path": "/endpoints/{tech}/{resource}/sendMessage", - "description": "Send a message to some endpoint in a technology.", - "operations": [ - { - "httpMethod": "PUT", - "summary": "Send a message to some endpoint in a technology.", - "nickname": "sendMessageToEndpoint", - "responseClass": "void", - "parameters": [ - { - "name": "tech", - "description": "Technology of the endpoint", - "paramType": "path", - "dataType": "string" - }, - { - "name": "resource", - "description": "ID of the endpoint", - "paramType": "path", - "dataType": "string" - }, - { - "name": "from", - "description": "The endpoint resource or technology specific identity to send this message from. Valid resources are sip, pjsip, and xmpp.", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "body", - "description": "The body of the message", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "variables", - "descriptioni": "The \"variables\" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, pjsip and sip resource types will add the key/value pairs as SIP headers,", - "paramType": "body", - "required": false, - "dataType": "containers", - "allowMultiple": false - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Invalid parameters for sending a message." - }, - { - "code": 404, - "reason": "Endpoint not found" - } - ] - } - ] - } - ], - "models": { - "Endpoint": { - "id": "Endpoint", - "description": "An external device that may offer/accept calls to/from Asterisk.\n\nUnlike most resources, which have a single unique identifier, an endpoint is uniquely identified by the technology/resource pair.", - "properties": { - "technology": { - "type": "string", - "description": "Technology of the endpoint", - "required": true - }, - "resource": { - "type": "string", - "description": "Identifier of the endpoint, specific to the given technology.", - "required": true - }, - "state": { - "type": "string", - "description": "Endpoint's state", - "required": false, - "allowableValues": { - "valueType": "LIST", - "values": [ - "unknown", - "offline", - "online" - ] - } - }, - "channel_ids": { - "type": "List[string]", - "description": "Id's of channels associated with this endpoint", - "required": true - } - } - }, - "TextMessageVariable": { - "id": "TextMessageVariable", - "description": "A key/value pair variable in a text message.", - "properties": { - "key": { - "type": "string", - "description": "A unique key identifying the variable.", - "required": true - }, - "value": { - "type": "string", - "description": "The value of the variable.", - "required": true - } - } - }, - "TextMessage": { - "id": "TextMessage", - "description": "A text message.", - "properties": { - "from": { - "type": "string", - "description": "A technology specific URI specifying the source of the message. For sip and pjsip technologies, any SIP URI can be specified. For xmpp, the URI must correspond to the client connection being used to send the message.", - "required": true - }, - "to": { - "type": "string", - "description": "A technology specific URI specifying the destination of the message. Valid technologies include sip, pjsip, and xmp. The destination of a message should be an endpoint.", - "required": true - }, - "body": { - "type": "string", - "description": "The text of the message.", - "required": true - }, - "variables": { - "type": "List[TextMessageVariable]", - "description": "Technology specific key/value pairs associated with the message.", - "required": false - } - } - } - } -} diff --git a/codegen-data/ari_1_6_0/events.json b/codegen-data/ari_1_6_0/events.json deleted file mode 100644 index 9c24dbdc..00000000 --- a/codegen-data/ari_1_6_0/events.json +++ /dev/null @@ -1,729 +0,0 @@ -{ - "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", - "_author": "David M. Lee, II ", - "_svn_revision": "$Revision: 429091 $", - "apiVersion": "1.6.0", - "swaggerVersion": "1.2", - "basePath": "http://localhost:8088/ari", - "resourcePath": "/api-docs/events.{format}", - "apis": [ - { - "path": "/events", - "description": "Events from Asterisk to applications", - "operations": [ - { - "httpMethod": "GET", - "upgrade": "websocket", - "websocketProtocol": "ari", - "summary": "WebSocket connection for events.", - "nickname": "eventWebsocket", - "responseClass": "Message", - "parameters": [ - { - "name": "app", - "description": "Applications to subscribe to.", - "paramType": "query", - "required": true, - "allowMultiple": true, - "dataType": "string" - } - ] - } - ] - }, - { - "path": "/events/user/{eventName}", - "description": "Stasis application user events", - "operations": [ - { - "httpMethod": "POST", - "summary": "Generate a user event.", - "nickname": "userEvent", - "responseClass": "void", - "parameters": [ - { - "name": "eventName", - "description": "Event name", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "application", - "description": "The name of the application that will receive this event", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "source", - "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}/{resource}, deviceState:{deviceName}", - "paramType": "query", - "required": false, - "allowMultiple": true, - "dataType": "string" - }, - { - "name": "variables", - "description": "The \"variables\" key in the body object holds custom key/value pairs to add to the user event. Ex. { \"variables\": { \"key\": \"value\" } }", - "paramType": "body", - "required": false, - "allowMultiple": false, - "dataType": "containers" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Application does not exist." - }, - { - "code": 422, - "reason": "Event source not found." - }, - { - "code": 400, - "reason": "Invalid even tsource URI or userevent data." - } - ] - } - ] - } - ], - "models": { - "Message": { - "id": "Message", - "description": "Base type for errors and events", - "discriminator": "type", - "properties": { - "type": { - "type": "string", - "required": true, - "description": "Indicates the type of this message." - } - }, - "subTypes": [ - "MissingParams", - "Event" - ] - }, - "MissingParams": { - "id": "MissingParams", - "description": "Error event sent when required params are missing.", - "properties": { - "params": { - "required": true, - "type": "List[string]", - "description": "A list of the missing parameters" - } - } - }, - "Event": { - "id": "Event", - "description": "Base type for asynchronous events from Asterisk.", - "properties": { - "application": { - "type": "string", - "description": "Name of the application receiving the event.", - "required": true - }, - "timestamp": { - "type": "Date", - "description": "Time at which this event was created.", - "required": false - } - }, - "subTypes": [ - "DeviceStateChanged", - "PlaybackStarted", - "PlaybackFinished", - "RecordingStarted", - "RecordingFinished", - "RecordingFailed", - "ApplicationReplaced", - "BridgeCreated", - "BridgeDestroyed", - "BridgeMerged", - "BridgeBlindTransfer", - "BridgeAttendedTransfer", - "ChannelCreated", - "ChannelDestroyed", - "ChannelEnteredBridge", - "ChannelLeftBridge", - "ChannelStateChange", - "ChannelDtmfReceived", - "ChannelDialplan", - "ChannelCallerId", - "ChannelUserevent", - "ChannelHangupRequest", - "ChannelVarset", - "ChannelTalkingStarted", - "ChannelTalkingFinished", - "EndpointStateChange", - "Dial", - "StasisEnd", - "StasisStart", - "TextMessageReceived", - "ChannelConnectedLine" - ] - }, - "DeviceStateChanged": { - "id": "DeviceStateChanged", - "description": "Notification that a device state has changed.", - "properties": { - "device_state": { - "type": "DeviceState", - "description": "Device state object", - "required": true - } - } - }, - "PlaybackStarted": { - "id": "PlaybackStarted", - "description": "Event showing the start of a media playback operation.", - "properties": { - "playback": { - "type": "Playback", - "description": "Playback control object", - "required": true - } - } - }, - "PlaybackFinished": { - "id": "PlaybackFinished", - "description": "Event showing the completion of a media playback operation.", - "properties": { - "playback": { - "type": "Playback", - "description": "Playback control object", - "required": true - } - } - }, - "RecordingStarted": { - "id": "RecordingStarted", - "description": "Event showing the start of a recording operation.", - "properties": { - "recording": { - "type": "LiveRecording", - "description": "Recording control object", - "required": true - } - } - }, - "RecordingFinished": { - "id": "RecordingFinished", - "description": "Event showing the completion of a recording operation.", - "properties": { - "recording": { - "type": "LiveRecording", - "description": "Recording control object", - "required": true - } - } - }, - "RecordingFailed": { - "id": "RecordingFailed", - "description": "Event showing failure of a recording operation.", - "properties": { - "recording": { - "type": "LiveRecording", - "description": "Recording control object", - "required": true - } - } - }, - "ApplicationReplaced": { - "id": "ApplicationReplaced", - "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.", - "properties": {} - }, - "BridgeCreated": { - "id": "BridgeCreated", - "description": "Notification that a bridge has been created.", - "properties": { - "bridge": { - "required": true, - "type": "Bridge" - } - } - }, - "BridgeDestroyed": { - "id": "BridgeDestroyed", - "description": "Notification that a bridge has been destroyed.", - "properties": { - "bridge": { - "required": true, - "type": "Bridge" - } - } - }, - "BridgeMerged": { - "id": "BridgeMerged", - "description": "Notification that one bridge has merged into another.", - "properties": { - "bridge": { - "required": true, - "type": "Bridge" - }, - "bridge_from": { - "required": true, - "type": "Bridge" - } - } - }, - "BridgeBlindTransfer": { - "id": "BridgeBlindTransfer", - "description": "Notification that a blind transfer has occurred.", - "properties": { - "channel": { - "description": "The channel performing the blind transfer", - "required": true, - "type": "Channel" - }, - "replace_channel": { - "description": "The channel that is replacing transferer when the transferee(s) can not be transferred directly", - "required": false, - "type": "Channel" - }, - "transferee": { - "description": "The channel that is being transferred", - "required": false, - "type": "Channel" - }, - "exten": { - "description": "The extension transferred to", - "required": true, - "type": "string" - }, - "context": { - "description": "The context transferred to", - "required": true, - "type": "string" - }, - "result": { - "description": "The result of the transfer attempt", - "required": true, - "type": "string" - }, - "is_external": { - "description": "Whether the transfer was externally initiated or not", - "required": true, - "type": "boolean" - }, - "bridge": { - "description": "The bridge being transferred", - "type": "Bridge" - } - } - }, - "BridgeAttendedTransfer": { - "id": "BridgeAttendedTransfer", - "description": "Notification that an attended transfer has occurred.", - "properties": { - "transferer_first_leg": { - "description": "First leg of the transferer", - "required": true, - "type": "Channel" - }, - "transferer_second_leg": { - "description": "Second leg of the transferer", - "required": true, - "type": "Channel" - }, - "replace_channel": { - "description": "The channel that is replacing transferer_first_leg in the swap", - "required": false, - "type": "Channel" - }, - "transferee": { - "description": "The channel that is being transferred", - "required": false, - "type": "Channel" - }, - "transfer_target": { - "description": "The channel that is being transferred to", - "required": false, - "type": "Channel" - }, - "result": { - "description": "The result of the transfer attempt", - "required": true, - "type": "string" - }, - "is_external": { - "description": "Whether the transfer was externally initiated or not", - "required": true, - "type": "boolean" - }, - "transferer_first_leg_bridge": { - "description": "Bridge the transferer first leg is in", - "type": "Bridge" - }, - "transferer_second_leg_bridge": { - "description": "Bridge the transferer second leg is in", - "type": "Bridge" - }, - "destination_type": { - "description": "How the transfer was accomplished", - "required": true, - "type": "string" - }, - "destination_bridge": { - "description": "Bridge that survived the merge result", - "type": "string" - }, - "destination_application": { - "description": "Application that has been transferred into", - "type": "string" - }, - "destination_link_first_leg": { - "description": "First leg of a link transfer result", - "type": "Channel" - }, - "destination_link_second_leg": { - "description": "Second leg of a link transfer result", - "type": "Channel" - }, - "destination_threeway_channel": { - "description": "Transferer channel that survived the threeway result", - "type": "Channel" - }, - "destination_threeway_bridge": { - "description": "Bridge that survived the threeway result", - "type": "Bridge" - } - } - }, - "ChannelCreated": { - "id": "ChannelCreated", - "description": "Notification that a channel has been created.", - "properties": { - "channel": { - "required": true, - "type": "Channel" - } - } - }, - "ChannelDestroyed": { - "id": "ChannelDestroyed", - "description": "Notification that a channel has been destroyed.", - "properties": { - "cause": { - "required": true, - "description": "Integer representation of the cause of the hangup", - "type": "int" - }, - "cause_txt": { - "required": true, - "description": "Text representation of the cause of the hangup", - "type": "string" - }, - "channel": { - "required": true, - "type": "Channel" - } - } - }, - "ChannelEnteredBridge": { - "id": "ChannelEnteredBridge", - "description": "Notification that a channel has entered a bridge.", - "properties": { - "bridge": { - "required": true, - "type": "Bridge" - }, - "channel": { - "type": "Channel" - } - } - }, - "ChannelLeftBridge": { - "id": "ChannelLeftBridge", - "description": "Notification that a channel has left a bridge.", - "properties": { - "bridge": { - "required": true, - "type": "Bridge" - }, - "channel": { - "required": true, - "type": "Channel" - } - } - }, - "ChannelStateChange": { - "id": "ChannelStateChange", - "description": "Notification of a channel's state change.", - "properties": { - "channel": { - "required": true, - "type": "Channel" - } - } - }, - "ChannelDtmfReceived": { - "id": "ChannelDtmfReceived", - "description": "DTMF received on a channel.\n\nThis event is sent when the DTMF ends. There is no notification about the start of DTMF", - "properties": { - "digit": { - "required": true, - "type": "string", - "description": "DTMF digit received (0-9, A-E, # or *)" - }, - "duration_ms": { - "required": true, - "type": "int", - "description": "Number of milliseconds DTMF was received" - }, - "channel": { - "required": true, - "type": "Channel", - "description": "The channel on which DTMF was received" - } - } - }, - "ChannelDialplan": { - "id": "ChannelDialplan", - "description": "Channel changed location in the dialplan.", - "properties": { - "channel": { - "required": true, - "type": "Channel", - "description": "The channel that changed dialplan location." - }, - "dialplan_app": { - "required": true, - "type": "string", - "description": "The application about to be executed." - }, - "dialplan_app_data": { - "required": true, - "type": "string", - "description": "The data to be passed to the application." - } - } - }, - "ChannelCallerId": { - "id": "ChannelCallerId", - "description": "Channel changed Caller ID.", - "properties": { - "caller_presentation": { - "required": true, - "type": "int", - "description": "The integer representation of the Caller Presentation value." - }, - "caller_presentation_txt": { - "required": true, - "type": "string", - "description": "The text representation of the Caller Presentation value." - }, - "channel": { - "required": true, - "type": "Channel", - "description": "The channel that changed Caller ID." - } - } - }, - "ChannelUserevent": { - "id": "ChannelUserevent", - "description": "User-generated event with additional user-defined fields in the object.", - "properties": { - "eventname": { - "required": true, - "type": "string", - "description": "The name of the user event." - }, - "channel": { - "required": false, - "type": "Channel", - "description": "A channel that is signaled with the user event." - }, - "bridge": { - "required": false, - "type": "Bridge", - "description": "A bridge that is signaled with the user event." - }, - "endpoint": { - "required": false, - "type": "Endpoint", - "description": "A endpoint that is signaled with the user event." - }, - "userevent": { - "required": true, - "type": "object", - "description": "Custom Userevent data" - } - } - }, - "ChannelHangupRequest": { - "id": "ChannelHangupRequest", - "description": "A hangup was requested on the channel.", - "properties": { - "cause": { - "type": "int", - "description": "Integer representation of the cause of the hangup." - }, - "soft": { - "type": "boolean", - "description": "Whether the hangup request was a soft hangup request." - }, - "channel": { - "required": true, - "type": "Channel", - "description": "The channel on which the hangup was requested." - } - } - }, - "ChannelVarset": { - "id": "ChannelVarset", - "description": "Channel variable changed.", - "properties": { - "variable": { - "required": true, - "type": "string", - "description": "The variable that changed." - }, - "value": { - "required": true, - "type": "string", - "description": "The new value of the variable." - }, - "channel": { - "required": false, - "type": "Channel", - "description": "The channel on which the variable was set.\n\nIf missing, the variable is a global variable." - } - } - }, - "ChannelTalkingStarted": { - "id": "ChannelTalkingStarted", - "description": "Talking was detected on the channel.", - "properties": { - "channel": { - "required": true, - "type": "Channel", - "description": "The channel on which talking started." - } - } - }, - "ChannelTalkingFinished": { - "id": "ChannelTalkingFinished", - "description": "Talking is no longer detected on the channel.", - "properties": { - "channel": { - "required": true, - "type": "Channel", - "description": "The channel on which talking completed." - }, - "duration": { - "required": true, - "type": "int", - "description": "The length of time, in milliseconds, that talking was detected on the channel" - } - } - }, - "EndpointStateChange": { - "id": "EndpointStateChange", - "description": "Endpoint state changed.", - "properties": { - "endpoint": { - "required": true, - "type": "Endpoint" - } - } - }, - "Dial": { - "id": "Dial", - "description": "Dialing state has changed.", - "properties": { - "caller": { - "required": false, - "type": "Channel", - "description": "The calling channel." - }, - "peer": { - "required": true, - "type": "Channel", - "description": "The dialed channel." - }, - "forward": { - "required": false, - "type": "string", - "description": "Forwarding target requested by the original dialed channel." - }, - "forwarded": { - "required": false, - "type": "Channel", - "description": "Channel that the caller has been forwarded to." - }, - "dialstring": { - "required": false, - "type": "string", - "description": "The dial string for calling the peer channel." - }, - "dialstatus": { - "required": true, - "type": "string", - "description": "Current status of the dialing attempt to the peer." - } - } - }, - "StasisEnd": { - "id": "StasisEnd", - "description": "Notification that a channel has left a Stasis application.", - "properties": { - "channel": { - "required": true, - "type": "Channel" - } - } - }, - "StasisStart": { - "id": "StasisStart", - "description": "Notification that a channel has entered a Stasis application.", - "properties": { - "args": { - "required": true, - "type": "List[string]", - "description": "Arguments to the application" - }, - "channel": { - "required": true, - "type": "Channel" - }, - "replace_channel": { - "required": false, - "type": "Channel" - } - } - }, - "TextMessageReceived": { - "id": "TextMessageReceived", - "description": "A text message was received from an endpoint.", - "properties": { - "message": { - "required": true, - "type": "TextMessage" - }, - "endpoint": { - "required": false, - "type": "Endpoint" - } - } - }, - "ChannelConnectedLine": { - "id": "ChannelConnectedLine", - "description": "Channel changed Connected Line.", - "properties": { - "channel": { - "required": true, - "type": "Channel", - "description": "The channel whose connected line has changed." - } - } - } - } -} diff --git a/codegen-data/ari_1_6_0/mailboxes.json b/codegen-data/ari_1_6_0/mailboxes.json deleted file mode 100644 index b348106e..00000000 --- a/codegen-data/ari_1_6_0/mailboxes.json +++ /dev/null @@ -1,134 +0,0 @@ -{ - "_copyright": "Copyright (C) 2013, Digium, Inc.", - "_author": "Jonathan Rose ", - "_svn_revision": "$Revision: 429091 $", - "apiVersion": "1.6.0", - "swaggerVersion": "1.1", - "basePath": "http://localhost:8088/ari", - "resourcePath": "/api-docs/mailboxes.{format}", - "apis": [ - { - "path": "/mailboxes", - "description": "Mailboxes", - "operations": [ - { - "httpMethod": "GET", - "summary": "List all mailboxes.", - "nickname": "list", - "responseClass": "List[Mailbox]" - } - ] - }, - { - "path": "/mailboxes/{mailboxName}", - "description": "Mailbox state", - "operations": [ - { - "httpMethod": "GET", - "summary": "Retrieve the current state of a mailbox.", - "nickname": "get", - "responseClass": "Mailbox", - "parameters": [ - { - "name": "mailboxName", - "description": "Name of the mailbox", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Mailbox not found" - } - ] - }, - { - "httpMethod": "PUT", - "summary": "Change the state of a mailbox. (Note - implicitly creates the mailbox).", - "nickname": "update", - "responseClass": "void", - "parameters": [ - { - "name": "mailboxName", - "description": "Name of the mailbox", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "oldMessages", - "description": "Count of old messages in the mailbox", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "int" - }, - { - "name": "newMessages", - "description": "Count of new messages in the mailbox", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "int" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Mailbox not found" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Destroy a mailbox.", - "nickname": "delete", - "responseClass": "void", - "parameters": [ - { - "name": "mailboxName", - "description": "Name of the mailbox", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Mailbox not found" - } - ] - } - ] - } - ], - "models": { - "Mailbox": { - "id": "Mailbox", - "description": "Represents the state of a mailbox.", - "properties": { - "name": { - "type": "string", - "description": "Name of the mailbox.", - "required": true - }, - "old_messages": { - "type": "int", - "description": "Count of old messages in the mailbox.", - "required": true - }, - "new_messages": { - "type": "int", - "description": "Count of new messages in the mailbox.", - "required": true - } - } - } - } -} diff --git a/codegen-data/ari_1_6_0/playbacks.json b/codegen-data/ari_1_6_0/playbacks.json deleted file mode 100644 index 98b511a0..00000000 --- a/codegen-data/ari_1_6_0/playbacks.json +++ /dev/null @@ -1,155 +0,0 @@ -{ - "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", - "_author": "David M. Lee, II ", - "_svn_revision": "$Revision: 429091 $", - "apiVersion": "1.6.0", - "swaggerVersion": "1.1", - "basePath": "http://localhost:8088/ari", - "resourcePath": "/api-docs/playbacks.{format}", - "apis": [ - { - "path": "/playbacks/{playbackId}", - "description": "Control object for a playback operation.", - "operations": [ - { - "httpMethod": "GET", - "summary": "Get a playback's details.", - "nickname": "get", - "responseClass": "Playback", - "parameters": [ - { - "name": "playbackId", - "description": "Playback's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "The playback cannot be found" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Stop a playback.", - "nickname": "stop", - "responseClass": "void", - "parameters": [ - { - "name": "playbackId", - "description": "Playback's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "The playback cannot be found" - } - ] - } - ] - }, - { - "path": "/playbacks/{playbackId}/control", - "description": "Control object for a playback operation.", - "operations": [ - { - "httpMethod": "POST", - "summary": "Control a playback.", - "nickname": "control", - "responseClass": "void", - "parameters": [ - { - "name": "playbackId", - "description": "Playback's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "operation", - "description": "Operation to perform on the playback.", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string", - "allowableValues": { - "valueType": "LIST", - "values": [ - "restart", - "pause", - "unpause", - "reverse", - "forward" - ] - } - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "The provided operation parameter was invalid" - }, - { - "code": 404, - "reason": "The playback cannot be found" - }, - { - "code": 409, - "reason": "The operation cannot be performed in the playback's current state" - } -] - } - ] - } - ], - "models": { - "Playback": { - "id": "Playback", - "description": "Object representing the playback of media to a channel", - "properties": { - "id": { - "type": "string", - "description": "ID for this playback operation", - "required": true - }, - "media_uri": { - "type": "string", - "description": "URI for the media to play back.", - "required": true - }, - "target_uri": { - "type": "string", - "description": "URI for the channel or bridge to play the media on", - "required": true - }, - "language": { - "type": "string", - "description": "For media types that support multiple languages, the language requested for playback." - }, - "state": { - "type": "string", - "description": "Current state of the playback operation.", - "required": true, - "allowableValues": { - "valueType": "LIST", - "values": [ - "queued", - "playing", - "complete" - ] - } - } - } - } - } -} diff --git a/codegen-data/ari_1_6_0/recordings.json b/codegen-data/ari_1_6_0/recordings.json deleted file mode 100644 index a4a096f1..00000000 --- a/codegen-data/ari_1_6_0/recordings.json +++ /dev/null @@ -1,378 +0,0 @@ -{ - "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", - "_author": "David M. Lee, II ", - "_svn_revision": "$Revision: 429091 $", - "apiVersion": "1.6.0", - "swaggerVersion": "1.1", - "basePath": "http://localhost:8088/ari", - "resourcePath": "/api-docs/recordings.{format}", - "apis": [ - { - "path": "/recordings/stored", - "description": "Recordings", - "operations": [ - { - "httpMethod": "GET", - "summary": "List recordings that are complete.", - "nickname": "listStored", - "responseClass": "List[StoredRecording]" - } - ] - }, - { - "path": "/recordings/stored/{recordingName}", - "description": "Individual recording", - "operations": [ - { - "httpMethod": "GET", - "summary": "Get a stored recording's details.", - "nickname": "getStored", - "responseClass": "StoredRecording", - "parameters": [ - { - "name": "recordingName", - "description": "The name of the recording", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Recording not found" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Delete a stored recording.", - "nickname": "deleteStored", - "responseClass": "void", - "parameters": [ - { - "name": "recordingName", - "description": "The name of the recording", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Recording not found" - } - ] - } - ] - }, - { - "path": "/recordings/stored/{recordingName}/copy", - "description": "Copy an individual recording", - "operations": [ - { - "httpMethod": "POST", - "summary": "Copy a stored recording.", - "nickname": "copyStored", - "responseClass": "StoredRecording", - "parameters": [ - { - "name": "recordingName", - "description": "The name of the recording to copy", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "destinationRecordingName", - "description": "The destination name of the recording", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Recording not found" - }, - { - "code": 409, - "reason": "A recording with the same name already exists on the system" - } - ] - } - ] - }, - { - "path": "/recordings/live/{recordingName}", - "description": "A recording that is in progress", - "operations": [ - { - "httpMethod": "GET", - "summary": "List live recordings.", - "nickname": "getLive", - "responseClass": "LiveRecording", - "parameters": [ - { - "name": "recordingName", - "description": "The name of the recording", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Recording not found" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Stop a live recording and discard it.", - "nickname": "cancel", - "responseClass": "void", - "parameters": [ - { - "name": "recordingName", - "description": "The name of the recording", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Recording not found" - } - ] - } - ] - }, - { - "path": "/recordings/live/{recordingName}/stop", - "operations": [ - { - "httpMethod": "POST", - "summary": "Stop a live recording and store it.", - "nickname": "stop", - "responseClass": "void", - "parameters": [ - { - "name": "recordingName", - "description": "The name of the recording", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Recording not found" - } - ] - } - ] - }, - { - "path": "/recordings/live/{recordingName}/pause", - "operations": [ - { - "httpMethod": "POST", - "summary": "Pause a live recording.", - "notes": "Pausing a recording suspends silence detection, which will be restarted when the recording is unpaused. Paused time is not included in the accounting for maxDurationSeconds.", - "nickname": "pause", - "responseClass": "void", - "parameters": [ - { - "name": "recordingName", - "description": "The name of the recording", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Recording not found" - }, - { - "code": 409, - "reason": "Recording not in session" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Unpause a live recording.", - "nickname": "unpause", - "responseClass": "void", - "parameters": [ - { - "name": "recordingName", - "description": "The name of the recording", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Recording not found" - }, - { - "code": 409, - "reason": "Recording not in session" - } - ] - } - ] - }, - { - "path": "/recordings/live/{recordingName}/mute", - "operations": [ - { - "httpMethod": "POST", - "summary": "Mute a live recording.", - "notes": "Muting a recording suspends silence detection, which will be restarted when the recording is unmuted.", - "nickname": "mute", - "responseClass": "void", - "parameters": [ - { - "name": "recordingName", - "description": "The name of the recording", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Recording not found" - }, - { - "code": 409, - "reason": "Recording not in session" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Unmute a live recording.", - "nickname": "unmute", - "responseClass": "void", - "parameters": [ - { - "name": "recordingName", - "description": "The name of the recording", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Recording not found" - }, - { - "code": 409, - "reason": "Recording not in session" - } - ] - } - ] - } - ], - "models": { - "StoredRecording": { - "id": "StoredRecording", - "description": "A past recording that may be played back.", - "properties": { - "name": { - "required": true, - "type": "string" - }, - "format": { - "required": true, - "type": "string" - } - } - }, - "LiveRecording": { - "id": "LiveRecording", - "description": "A recording that is in progress", - "properties": { - "name": { - "required": true, - "type": "string", - "description": "Base name for the recording" - }, - "format": { - "required": true, - "type": "string", - "description": "Recording format (wav, gsm, etc.)" - }, - "target_uri": { - "required": true, - "type": "string", - "description": "URI for the channel or bridge being recorded" - }, - "state": { - "required": true, - "type": "string", - "allowableValues": { - "valueType": "LIST", - "values": [ - "queued", - "recording", - "paused", - "done", - "failed", - "canceled" - ] - } - }, - "duration": { - "required": false, - "type": "int", - "description": "Duration in seconds of the recording" - }, - "talking_duration": { - "required": false, - "type": "int", - "description": "Duration of talking, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds." - }, - "silence_duration": { - "required": false, - "type": "int", - "description": "Duration of silence, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds." - }, - "cause": { - "required": false, - "type": "string", - "description": "Cause for recording failure if failed" - } - } - } - } -} diff --git a/codegen-data/ari_1_6_0/sounds.json b/codegen-data/ari_1_6_0/sounds.json deleted file mode 100644 index 5ed6de7a..00000000 --- a/codegen-data/ari_1_6_0/sounds.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", - "_author": "David M. Lee, II ", - "_svn_revision": "$Revision: 429091 $", - "apiVersion": "1.6.0", - "swaggerVersion": "1.1", - "basePath": "http://localhost:8088/ari", - "resourcePath": "/api-docs/sounds.{format}", - "apis": [ - { - "path": "/sounds", - "description": "Sounds", - "operations": [ - { - "httpMethod": "GET", - "summary": "List all sounds.", - "nickname": "list", - "responseClass": "List[Sound]", - "parameters": [ - { - "name": "lang", - "description": "Lookup sound for a specific language.", - "paramType": "query", - "dataType": "string", - "required": false - }, - { - "name": "format", - "description": "Lookup sound in a specific format.", - "paramType": "query", - "dataType": "string", - "required": false, - "__note": "core show translation can show translation paths between formats, along with relative costs. so this could be just installed format, or we could follow that for transcoded formats." - } - ] - } - ] - }, - { - "path": "/sounds/{soundId}", - "description": "Individual sound", - "operations": [ - { - "httpMethod": "GET", - "summary": "Get a sound's details.", - "nickname": "get", - "responseClass": "Sound", - "parameters": [ - { - "name": "soundId", - "description": "Sound's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ] - } - ] - } - ], - "models": { - "FormatLangPair": { - "id": "FormatLangPair", - "description": "Identifies the format and language of a sound file", - "properties": { - "language": { - "required": true, - "type": "string" - }, - "format": { - "required": true, - "type": "string" - } - } - }, - "Sound": { - "id": "Sound", - "description": "A media file that may be played back.", - "properties": { - "id": { - "required": true, - "description": "Sound's identifier.", - "type": "string" - }, - "text": { - "required": false, - "description": "Text description of the sound, usually the words spoken.", - "type": "string" - }, - "formats": { - "required": true, - "description": "The formats and languages in which this sound is available.", - "type": "List[FormatLangPair]" - } - } - } - } -} diff --git a/codegen-data/ari_1_7_0/applications.json b/codegen-data/ari_1_7_0/applications.json deleted file mode 100644 index db5a9ee0..00000000 --- a/codegen-data/ari_1_7_0/applications.json +++ /dev/null @@ -1,172 +0,0 @@ -{ - "_copyright": "Copyright (C) 2013, Digium, Inc.", - "_author": "David M. Lee, II ", - "_svn_revision": "$Revision: 429091 $", - "apiVersion": "1.6.0", - "swaggerVersion": "1.1", - "basePath": "http://localhost:8088/ari", - "resourcePath": "/api-docs/applications.{format}", - "apis": [ - { - "path": "/applications", - "description": "Stasis applications", - "operations": [ - { - "httpMethod": "GET", - "summary": "List all applications.", - "nickname": "list", - "responseClass": "List[Application]" - } - ] - }, - { - "path": "/applications/{applicationName}", - "description": "Stasis application", - "operations": [ - { - "httpMethod": "GET", - "summary": "Get details of an application.", - "nickname": "get", - "responseClass": "Application", - "parameters": [ - { - "name": "applicationName", - "description": "Application's name", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Application does not exist." - } - ] - } - ] - }, - { - "path": "/applications/{applicationName}/subscription", - "description": "Stasis application", - "operations": [ - { - "httpMethod": "POST", - "summary": "Subscribe an application to a event source.", - "notes": "Returns the state of the application after the subscriptions have changed", - "nickname": "subscribe", - "responseClass": "Application", - "parameters": [ - { - "name": "applicationName", - "description": "Application's name", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "eventSource", - "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}", - "paramType": "query", - "required": true, - "allowMultiple": true, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Missing parameter." - }, - { - "code": 404, - "reason": "Application does not exist." - }, - { - "code": 422, - "reason": "Event source does not exist." - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Unsubscribe an application from an event source.", - "notes": "Returns the state of the application after the subscriptions have changed", - "nickname": "unsubscribe", - "responseClass": "Application", - "parameters": [ - { - "name": "applicationName", - "description": "Application's name", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "eventSource", - "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}", - "paramType": "query", - "required": true, - "allowMultiple": true, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Missing parameter; event source scheme not recognized." - }, - { - "code": 404, - "reason": "Application does not exist." - }, - { - "code": 409, - "reason": "Application not subscribed to event source." - }, - { - "code": 422, - "reason": "Event source does not exist." - } - ] - } - ] - } - ], - "models": { - "Application": { - "id": "Application", - "description": "Details of a Stasis application", - "properties": { - "name": { - "type": "string", - "description": "Name of this application", - "required": true - }, - "channel_ids": { - "type": "List[string]", - "description": "Id's for channels subscribed to.", - "required": true - }, - "bridge_ids": { - "type": "List[string]", - "description": "Id's for bridges subscribed to.", - "required": true - }, - "endpoint_ids": { - "type": "List[string]", - "description": "{tech}/{resource} for endpoints subscribed to.", - "required": true - }, - "device_names": { - "type": "List[string]", - "description": "Names of the devices subscribed to.", - "required": true - } - } - } - } -} diff --git a/codegen-data/ari_1_7_0/asterisk.json b/codegen-data/ari_1_7_0/asterisk.json deleted file mode 100644 index 69cef054..00000000 --- a/codegen-data/ari_1_7_0/asterisk.json +++ /dev/null @@ -1,259 +0,0 @@ -{ - "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", - "_author": "David M. Lee, II ", - "_svn_revision": "$Revision: 429091 $", - "apiVersion": "1.6.0", - "swaggerVersion": "1.1", - "basePath": "http://localhost:8088/ari", - "resourcePath": "/api-docs/asterisk.{format}", - "apis": [ - { - "path": "/asterisk/info", - "description": "Asterisk system information (similar to core show settings)", - "operations": [ - { - "httpMethod": "GET", - "summary": "Gets Asterisk system information.", - "nickname": "getInfo", - "responseClass": "AsteriskInfo", - "parameters": [ - { - "name": "only", - "description": "Filter information returned", - "paramType": "query", - "required": false, - "allowMultiple": true, - "dataType": "string", - "allowableValues": { - "valueType": "LIST", - "values": [ - "build", - "system", - "config", - "status" - ] - } - } - ] - } - ] - }, - { - "path": "/asterisk/variable", - "description": "Global variables", - "operations": [ - { - "httpMethod": "GET", - "summary": "Get the value of a global variable.", - "nickname": "getGlobalVar", - "responseClass": "Variable", - "parameters": [ - { - "name": "variable", - "description": "The variable to get", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Missing variable parameter." - } - ] - }, - { - "httpMethod": "POST", - "summary": "Set the value of a global variable.", - "nickname": "setGlobalVar", - "responseClass": "void", - "parameters": [ - { - "name": "variable", - "description": "The variable to set", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "value", - "description": "The value to set the variable to", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Missing variable parameter." - } - ] - } - ] - } - ], - "models": { - "BuildInfo": { - "id": "BuildInfo", - "description": "Info about how Asterisk was built", - "properties": { - "os": { - "required": true, - "type": "string", - "description": "OS Asterisk was built on." - }, - "kernel": { - "required": true, - "type": "string", - "description": "Kernel version Asterisk was built on." - }, - "options": { - "required": true, - "type": "string", - "description": "Compile time options, or empty string if default." - }, - "machine": { - "required": true, - "type": "string", - "description": "Machine architecture (x86_64, i686, ppc, etc.)" - }, - "date": { - "required": true, - "type": "string", - "description": "Date and time when Asterisk was built." - }, - "user": { - "required": true, - "type": "string", - "description": "Username that build Asterisk" - } - } - }, - "SystemInfo": { - "id": "SystemInfo", - "description": "Info about Asterisk", - "properties": { - "version": { - "required": true, - "type": "string", - "description": "Asterisk version." - }, - "entity_id": { - "required": true, - "type": "string", - "description": "" - } - } - }, - "SetId": { - "id": "SetId", - "description": "Effective user/group id", - "properties": { - "user": { - "required": true, - "type": "string", - "description": "Effective user id." - }, - "group": { - "required": true, - "type": "string", - "description": "Effective group id." - } - } - }, - "ConfigInfo": { - "id": "ConfigInfo", - "description": "Info about Asterisk configuration", - "properties": { - "name": { - "required": true, - "type": "string", - "description": "Asterisk system name." - }, - "default_language": { - "required": true, - "type": "string", - "description": "Default language for media playback." - }, - "max_channels": { - "required": false, - "type": "int", - "description": "Maximum number of simultaneous channels." - }, - "max_open_files": { - "required": false, - "type": "int", - "description": "Maximum number of open file handles (files, sockets)." - }, - "max_load": { - "required": false, - "type": "double", - "description": "Maximum load avg on system." - }, - "setid": { - "required": true, - "type": "SetId", - "description": "Effective user/group id for running Asterisk." - } - } - }, - "StatusInfo": { - "id": "StatusInfo", - "description": "Info about Asterisk status", - "properties": { - "startup_time": { - "required": true, - "type": "Date", - "description": "Time when Asterisk was started." - }, - "last_reload_time": { - "required": true, - "type": "Date", - "description": "Time when Asterisk was last reloaded." - } - } - }, - "AsteriskInfo": { - "id": "AsteriskInfo", - "description": "Asterisk system information", - "properties": { - "build": { - "required": false, - "type": "BuildInfo", - "description": "Info about how Asterisk was built" - }, - "system": { - "required": false, - "type": "SystemInfo", - "description": "Info about the system running Asterisk" - }, - "config": { - "required": false, - "type": "ConfigInfo", - "description": "Info about Asterisk configuration" - }, - "status": { - "required": false, - "type": "StatusInfo", - "description": "Info about Asterisk status" - } - } - }, - "Variable": { - "id": "Variable", - "description": "The value of a channel variable", - "properties": { - "value": { - "required": true, - "type": "string", - "description": "The value of the variable requested" - } - } - } - } -} diff --git a/codegen-data/ari_1_7_0/bridges.json b/codegen-data/ari_1_7_0/bridges.json deleted file mode 100644 index 9ff8ed3c..00000000 --- a/codegen-data/ari_1_7_0/bridges.json +++ /dev/null @@ -1,656 +0,0 @@ -{ - "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", - "_author": "David M. Lee, II ", - "_svn_revision": "$Revision: 431145 $", - "apiVersion": "1.6.0", - "swaggerVersion": "1.1", - "basePath": "http://localhost:8088/ari", - "resourcePath": "/api-docs/bridges.{format}", - "apis": [ - { - "path": "/bridges", - "description": "Active bridges", - "operations": [ - { - "httpMethod": "GET", - "summary": "List all active bridges in Asterisk.", - "nickname": "list", - "responseClass": "List[Bridge]" - }, - { - "httpMethod": "POST", - "summary": "Create a new bridge.", - "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", - "nickname": "create", - "responseClass": "Bridge", - "parameters": [ - { - "name": "type", - "description": "Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media).", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "bridgeId", - "description": "Unique ID to give to the bridge being created.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "name", - "description": "Name to give to the bridge being created.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ] - } - ] - }, - { - "path": "/bridges/{bridgeId}", - "description": "Individual bridge", - "operations": [ - { - "httpMethod": "POST", - "summary": "Create a new bridge or updates an existing one.", - "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", - "nickname": "createWithId", - "responseClass": "Bridge", - "parameters": [ - { - "name": "type", - "description": "Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media) to set.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "bridgeId", - "description": "Unique ID to give to the bridge being created.", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "name", - "description": "Set the name of the bridge.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ] - }, - { - "httpMethod": "GET", - "summary": "Get bridge details.", - "nickname": "get", - "responseClass": "Bridge", - "parameters": [ - { - "name": "bridgeId", - "description": "Bridge's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Bridge not found" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Shut down a bridge.", - "notes": "If any channels are in this bridge, they will be removed and resume whatever they were doing beforehand.", - "nickname": "destroy", - "responseClass": "void", - "parameters": [ - { - "name": "bridgeId", - "description": "Bridge's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Bridge not found" - } - ] - } - ] - }, - { - "path": "/bridges/{bridgeId}/addChannel", - "description": "Add a channel to a bridge", - "operations": [ - { - "httpMethod": "POST", - "summary": "Add a channel to a bridge.", - "nickname": "addChannel", - "responseClass": "void", - "parameters": [ - { - "name": "bridgeId", - "description": "Bridge's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "channel", - "description": "Ids of channels to add to bridge", - "paramType": "query", - "required": true, - "allowMultiple": true, - "dataType": "string" - }, - { - "name": "role", - "description": "Channel's role in the bridge", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Channel not found" - }, - { - "code": 404, - "reason": "Bridge not found" - }, - { - "code": 409, - "reason": "Bridge not in Stasis application; Channel currently recording" - }, - { - "code": 422, - "reason": "Channel not in Stasis application" - } - ] - } - ] - }, - { - "path": "/bridges/{bridgeId}/removeChannel", - "description": "Remove a channel from a bridge", - "operations": [ - { - "httpMethod": "POST", - "summary": "Remove a channel from a bridge.", - "nickname": "removeChannel", - "responseClass": "void", - "parameters": [ - { - "name": "bridgeId", - "description": "Bridge's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "channel", - "description": "Ids of channels to remove from bridge", - "paramType": "query", - "required": true, - "allowMultiple": true, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Channel not found" - }, - { - "code": 404, - "reason": "Bridge not found" - }, - { - "code": 409, - "reason": "Bridge not in Stasis application" - }, - { - "code": 422, - "reason": "Channel not in this bridge" - } - ] - } - ] - }, - { - "path": "/bridges/{bridgeId}/moh", - "description": "Play music on hold to a bridge", - "operations": [ - { - "httpMethod": "POST", - "summary": "Play music on hold to a bridge or change the MOH class that is playing.", - "nickname": "startMoh", - "responseClass": "void", - "parameters": [ - { - "name": "bridgeId", - "description": "Bridge's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "mohClass", - "description": "Channel's id", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Bridge not found" - }, - { - "code": 409, - "reason": "Bridge not in Stasis application" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Stop playing music on hold to a bridge.", - "notes": "This will only stop music on hold being played via POST bridges/{bridgeId}/moh.", - "nickname": "stopMoh", - "responseClass": "void", - "parameters": [ - { - "name": "bridgeId", - "description": "Bridge's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Bridge not found" - }, - { - "code": 409, - "reason": "Bridge not in Stasis application" - } - ] - } - ] - }, - { - "path": "/bridges/{bridgeId}/play", - "description": "Play media to the participants of a bridge", - "operations": [ - { - "httpMethod": "POST", - "summary": "Start playback of media on a bridge.", - "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", - "nickname": "play", - "responseClass": "Playback", - "parameters": [ - { - "name": "bridgeId", - "description": "Bridge's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "media", - "description": "Media's URI to play.", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "lang", - "description": "For sounds, selects language for sound.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "offsetms", - "description": "Number of media to skip before playing.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 0, - "allowableValues": { - "valueType": "RANGE", - "min": 0 - } - - }, - { - "name": "skipms", - "description": "Number of milliseconds to skip for forward/reverse operations.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 3000, - "allowableValues": { - "valueType": "RANGE", - "min": 0 - } - }, - { - "name": "playbackId", - "description": "Playback Id.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Bridge not found" - }, - { - "code": 409, - "reason": "Bridge not in a Stasis application" - } - ] - } - ] - }, - { - "path": "/bridges/{bridgeId}/play/{playbackId}", - "description": "Play media to a bridge", - "operations": [ - { - "httpMethod": "POST", - "summary": "Start playback of media on a bridge.", - "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", - "nickname": "playWithId", - "responseClass": "Playback", - "parameters": [ - { - "name": "bridgeId", - "description": "Bridge's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "playbackId", - "description": "Playback ID.", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "media", - "description": "Media's URI to play.", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "lang", - "description": "For sounds, selects language for sound.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "offsetms", - "description": "Number of media to skip before playing.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 0, - "allowableValues": { - "valueType": "RANGE", - "min": 0 - } - }, - { - "name": "skipms", - "description": "Number of milliseconds to skip for forward/reverse operations.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 3000, - "allowableValues": { - "valueType": "RANGE", - "min": 0 - } - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Bridge not found" - }, - { - "code": 409, - "reason": "Bridge not in a Stasis application" - } - ] - - } - ] - }, - { - "path": "/bridges/{bridgeId}/record", - "description": "Record audio on a bridge", - "operations": [ - { - "httpMethod": "POST", - "summary": "Start a recording.", - "notes": "This records the mixed audio from all channels participating in this bridge.", - "nickname": "record", - "responseClass": "LiveRecording", - "parameters": [ - { - "name": "bridgeId", - "description": "Bridge's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "name", - "description": "Recording's filename", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "format", - "description": "Format to encode audio in", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "maxDurationSeconds", - "description": "Maximum duration of the recording, in seconds. 0 for no limit.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 0, - "allowableValues": { - "valueType": "RANGE", - "min": 0 - } - }, - { - "name": "maxSilenceSeconds", - "description": "Maximum duration of silence, in seconds. 0 for no limit.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 0, - "allowableValues": { - "valueType": "RANGE", - "min": 0 - } - }, - { - "name": "ifExists", - "description": "Action to take if a recording with the same name already exists.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string", - "defaultValue": "fail", - "allowableValues": { - "valueType": "LIST", - "values": [ - "fail", - "overwrite", - "append" - ] - } - }, - { - "name": "beep", - "description": "Play beep when recording begins", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "boolean", - "defaultValue": false - }, - { - "name": "terminateOn", - "description": "DTMF input to terminate recording.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string", - "defaultValue": "none", - "allowableValues": { - "valueType": "LIST", - "values": [ - "none", - "any", - "*", - "#" - ] - } - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Invalid parameters" - }, - { - "code": 404, - "reason": "Bridge not found" - }, - { - "code": 409, - "reason": "Bridge is not in a Stasis application; A recording with the same name already exists on the system and can not be overwritten because it is in progress or ifExists=fail" - }, - { - "code": 422, - "reason": "The format specified is unknown on this system" - } - ] - } - ] - } - ], - "models": { - "Bridge": { - "id": "Bridge", - "description": "The merging of media from one or more channels.\n\nEveryone on the bridge receives the same audio.", - "properties": { - "id": { - "type": "string", - "description": "Unique identifier for this bridge", - "required": true - }, - "technology": { - "type": "string", - "description": "Name of the current bridging technology", - "required": true - }, - "bridge_type": { - "type": "string", - "description": "Type of bridge technology", - "required": true, - "allowableValues": { - "valueType": "LIST", - "values": [ - "mixing", - "holding" - ] - } - }, - "bridge_class": { - "type": "string", - "description": "Bridging class", - "required": true - }, - "creator": { - "type": "string", - "description": "Entity that created the bridge", - "required": true - }, - "name": { - "type": "string", - "description": "Name the creator gave the bridge", - "required": true - }, - "channels": { - "type": "List[string]", - "description": "Ids of channels participating in this bridge", - "required": true - } - } - } - } -} diff --git a/codegen-data/ari_1_7_0/channels.json b/codegen-data/ari_1_7_0/channels.json deleted file mode 100644 index dd81a23e..00000000 --- a/codegen-data/ari_1_7_0/channels.json +++ /dev/null @@ -1,1501 +0,0 @@ -{ - "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", - "_author": "David M. Lee, II ", - "_svn_revision": "$Revision: 431145 $", - "apiVersion": "1.6.0", - "swaggerVersion": "1.1", - "basePath": "http://localhost:8088/ari", - "resourcePath": "/api-docs/channels.{format}", - "apis": [ - { - "path": "/channels", - "description": "Active channels", - "operations": [ - { - "httpMethod": "GET", - "summary": "List all active channels in Asterisk.", - "nickname": "list", - "responseClass": "List[Channel]" - }, - { - "httpMethod": "POST", - "summary": "Create a new channel (originate).", - "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.", - "nickname": "originate", - "responseClass": "Channel", - "parameters": [ - { - "name": "endpoint", - "description": "Endpoint to call.", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "extension", - "description": "The extension to dial after the endpoint answers. Mutually exclusive with 'app'.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "context", - "description": "The context to dial after the endpoint answers. If omitted, uses 'default'. Mutually exclusive with 'app'.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "priority", - "description": "The priority to dial after the endpoint answers. If omitted, uses 1. Mutually exclusive with 'app'.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "long" - }, - { - "name": "label", - "description": "The label to dial after the endpoint answers. Will supersede 'priority' if provided. Mutually exclusive with 'app'.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "app", - "description": "The application that is subscribed to the originated channel. When the channel is answered, it will be passed to this Stasis application. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "appArgs", - "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "callerId", - "description": "CallerID to use when dialing the endpoint or extension.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "timeout", - "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 30 - }, - { - "name": "variables", - "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", - "paramType": "body", - "required": false, - "dataType": "containers", - "allowMultiple": false - }, - { - "name": "channelId", - "description": "The unique id to assign the channel on creation.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "otherChannelId", - "description": "The unique id to assign the second channel when using local channels.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "originator", - "description": "The unique id of the channel which is originating this one.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Invalid parameters for originating a channel." - } - ] - } - ] - }, - { - "path": "/channels/{channelId}", - "description": "Active channel", - "operations": [ - { - "httpMethod": "GET", - "summary": "Channel details.", - "nickname": "get", - "responseClass": "Channel", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - } - ] - }, - { - "httpMethod": "POST", - "summary": "Create a new channel (originate with id).", - "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.", - "nickname": "originateWithId", - "responseClass": "Channel", - "parameters": [ - { - "name": "channelId", - "description": "The unique id to assign the channel on creation.", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "endpoint", - "description": "Endpoint to call.", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "extension", - "description": "The extension to dial after the endpoint answers. Mutually exclusive with 'app'.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "context", - "description": "The context to dial after the endpoint answers. If omitted, uses 'default'. Mutually exclusive with 'app'.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "priority", - "description": "The priority to dial after the endpoint answers. If omitted, uses 1. Mutually exclusive with 'app'.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "long" - }, - { - "name": "label", - "description": "The label to dial after the endpoint answers. Will supersede 'priority' if provided. Mutually exclusive with 'app'.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "app", - "description": "The application that is subscribed to the originated channel. When the channel is answered, it will be passed to this Stasis application. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "appArgs", - "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "callerId", - "description": "CallerID to use when dialing the endpoint or extension.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "timeout", - "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 30 - }, - { - "name": "variables", - "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", - "paramType": "body", - "required": false, - "dataType": "containers", - "allowMultiple": false - }, - { - "name": "otherChannelId", - "description": "The unique id to assign the second channel when using local channels.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "originator", - "description": "The unique id of the channel which is originating this one.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Invalid parameters for originating a channel." - } - ] - - }, - { - "httpMethod": "DELETE", - "summary": "Delete (i.e. hangup) a channel.", - "nickname": "hangup", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "reason", - "description": "Reason for hanging up the channel", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string", - "defalutValue": "normal", - "allowableValues": { - "valueType": "LIST", - "values": [ - "normal", - "busy", - "congestion" - ] - } - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Invalid reason for hangup provided" - }, - { - "code": 404, - "reason": "Channel not found" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/continue", - "description": "Exit application; continue execution in the dialplan", - "operations": [ - { - "httpMethod": "POST", - "summary": "Exit application; continue execution in the dialplan.", - "nickname": "continueInDialplan", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "context", - "description": "The context to continue to.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "extension", - "description": "The extension to continue to.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "priority", - "description": "The priority to continue to.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int" - }, - { - "name": "label", - "description": "The label to continue to - will supersede 'priority' if both are provided.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/answer", - "description": "Answer a channel", - "operations": [ - { - "httpMethod": "POST", - "summary": "Answer a channel.", - "nickname": "answer", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/ring", - "description": "Send a ringing indication to a channel", - "operations": [ - { - "httpMethod": "POST", - "summary": "Indicate ringing to a channel.", - "nickname": "ring", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Stop ringing indication on a channel if locally generated.", - "nickname": "ringStop", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/dtmf", - "description": "Send DTMF to a channel", - "operations": [ - { - "httpMethod": "POST", - "summary": "Send provided DTMF to a given channel.", - "nickname": "sendDTMF", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "dtmf", - "description": "DTMF To send.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "before", - "description": "Amount of time to wait before DTMF digits (specified in milliseconds) start.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 0 - }, - { - "name": "between", - "description": "Amount of time in between DTMF digits (specified in milliseconds).", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 100 - }, - { - "name": "duration", - "description": "Length of each DTMF digit (specified in milliseconds).", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 100 - }, - { - "name": "after", - "description": "Amount of time to wait after DTMF digits (specified in milliseconds) end.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 0 - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "DTMF is required" - }, - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/mute", - "description": "Mute a channel", - "operations": [ - { - "httpMethod": "POST", - "summary": "Mute a channel.", - "nickname": "mute", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "direction", - "description": "Direction in which to mute audio", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string", - "defaultValue": "both", - "allowableValues": { - "valueType": "LIST", - "values": [ - "both", - "in", - "out" - ] - } - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Unmute a channel.", - "nickname": "unmute", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "direction", - "description": "Direction in which to unmute audio", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string", - "defaultValue": "both", - "allowableValues": { - "valueType": "LIST", - "values": [ - "both", - "in", - "out" - ] - } - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/hold", - "description": "Put a channel on hold", - "operations": [ - { - "httpMethod": "POST", - "summary": "Hold a channel.", - "nickname": "hold", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Remove a channel from hold.", - "nickname": "unhold", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/moh", - "description": "Play music on hold to a channel", - "operations": [ - { - "httpMethod": "POST", - "summary": "Play music on hold to a channel.", - "notes": "Using media operations such as /play on a channel playing MOH in this manner will suspend MOH without resuming automatically. If continuing music on hold is desired, the stasis application must reinitiate music on hold.", - "nickname": "startMoh", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "mohClass", - "description": "Music on hold class to use", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Stop playing music on hold to a channel.", - "nickname": "stopMoh", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/silence", - "description": "Play silence to a channel", - "operations": [ - { - "httpMethod": "POST", - "summary": "Play silence to a channel.", - "notes": "Using media operations such as /play on a channel playing silence in this manner will suspend silence without resuming automatically.", - "nickname": "startSilence", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Stop playing silence to a channel.", - "nickname": "stopSilence", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/play", - "description": "Play media to a channel", - "operations": [ - { - "httpMethod": "POST", - "summary": "Start playback of media.", - "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", - "nickname": "play", - "responseClass": "Playback", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "media", - "description": "Media's URI to play.", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "lang", - "description": "For sounds, selects language for sound.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "offsetms", - "description": "Number of media to skip before playing.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int" - }, - { - "name": "skipms", - "description": "Number of milliseconds to skip for forward/reverse operations.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 3000 - }, - { - "name": "playbackId", - "description": "Playback ID.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/play/{playbackId}", - "description": "Play media to a channel", - "operations": [ - { - "httpMethod": "POST", - "summary": "Start playback of media and specify the playbackId.", - "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", - "nickname": "playWithId", - "responseClass": "Playback", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "playbackId", - "description": "Playback ID.", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "media", - "description": "Media's URI to play.", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "lang", - "description": "For sounds, selects language for sound.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "offsetms", - "description": "Number of media to skip before playing.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int" - }, - { - "name": "skipms", - "description": "Number of milliseconds to skip for forward/reverse operations.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 3000 - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/record", - "description": "Record audio from a channel", - "operations": [ - { - "httpMethod": "POST", - "summary": "Start a recording.", - "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.", - "nickname": "record", - "responseClass": "LiveRecording", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "name", - "description": "Recording's filename", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "format", - "description": "Format to encode audio in", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "maxDurationSeconds", - "description": "Maximum duration of the recording, in seconds. 0 for no limit", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 0, - "allowableValues": { - "valueType": "RANGE", - "min": 0 - } - }, - { - "name": "maxSilenceSeconds", - "description": "Maximum duration of silence, in seconds. 0 for no limit", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "int", - "defaultValue": 0, - "allowableValues": { - "valueType": "RANGE", - "min": 0 - } - }, - { - "name": "ifExists", - "description": "Action to take if a recording with the same name already exists.", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string", - "defaultValue": "fail", - "allowableValues": { - "valueType": "LIST", - "values": [ - "fail", - "overwrite", - "append" - ] - } - }, - { - "name": "beep", - "description": "Play beep when recording begins", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "boolean", - "defaultValue": false - }, - { - "name": "terminateOn", - "description": "DTMF input to terminate recording", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string", - "defaultValue": "none", - "allowableValues": { - "valueType": "LIST", - "values": [ - "none", - "any", - "*", - "#" - ] - } - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Invalid parameters" - }, - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "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" - }, - { - "code": 422, - "reason": "The format specified is unknown on this system" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/variable", - "description": "Variables on a channel", - "operations": [ - { - "httpMethod": "GET", - "summary": "Get the value of a channel variable or function.", - "nickname": "getChannelVar", - "responseClass": "Variable", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "variable", - "description": "The channel variable or function to get", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Missing variable parameter." - }, - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - }, - { - "httpMethod": "POST", - "summary": "Set the value of a channel variable or function.", - "nickname": "setChannelVar", - "responseClass": "void", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "variable", - "description": "The channel variable or function to set", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "value", - "description": "The value to set the variable to", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Missing variable parameter." - }, - { - "code": 404, - "reason": "Channel not found" - }, - { - "code": 409, - "reason": "Channel not in a Stasis application" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/snoop", - "description": "Snoop (spy/whisper) on a channel", - "operations": [ - { - "httpMethod": "POST", - "summary": "Start snooping.", - "notes": "Snoop (spy/whisper) on a specific channel.", - "nickname": "snoopChannel", - "responseClass": "Channel", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "spy", - "description": "Direction of audio to spy on", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string", - "defaultValue": "none", - "allowableValues": { - "valueType": "LIST", - "values": [ - "none", - "both", - "out", - "in" - ] - } - }, - { - "name": "whisper", - "description": "Direction of audio to whisper into", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string", - "defaultValue": "none", - "allowableValues": { - "valueType": "LIST", - "values": [ - "none", - "both", - "out", - "in" - ] - } - }, - { - "name": "app", - "description": "Application the snooping channel is placed into", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "appArgs", - "description": "The application arguments to pass to the Stasis application", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "snoopId", - "description": "Unique ID to assign to snooping channel", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Invalid parameters" - }, - { - "code": 404, - "reason": "Channel not found" - } - ] - } - ] - }, - { - "path": "/channels/{channelId}/snoop/{snoopId}", - "description": "Snoop (spy/whisper) on a channel", - "operations": [ - { - "httpMethod": "POST", - "summary": "Start snooping.", - "notes": "Snoop (spy/whisper) on a specific channel.", - "nickname": "snoopChannelWithId", - "responseClass": "Channel", - "parameters": [ - { - "name": "channelId", - "description": "Channel's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "snoopId", - "description": "Unique ID to assign to snooping channel", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "spy", - "description": "Direction of audio to spy on", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string", - "defaultValue": "none", - "allowableValues": { - "valueType": "LIST", - "values": [ - "none", - "both", - "out", - "in" - ] - } - }, - { - "name": "whisper", - "description": "Direction of audio to whisper into", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string", - "defaultValue": "none", - "allowableValues": { - "valueType": "LIST", - "values": [ - "none", - "both", - "out", - "in" - ] - } - }, - { - "name": "app", - "description": "Application the snooping channel is placed into", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "appArgs", - "description": "The application arguments to pass to the Stasis application", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Invalid parameters" - }, - { - "code": 404, - "reason": "Channel not found" - } - ] - } - ] - } - ], - "models": { - "Dialed": { - "id": "Dialed", - "description": "Dialed channel information.", - "properties": {} - }, - "DialplanCEP": { - "id": "DialplanCEP", - "description": "Dialplan location (context/extension/priority)", - "properties": { - "context": { - "required": true, - "type": "string", - "description": "Context in the dialplan" - }, - "exten": { - "required": true, - "type": "string", - "description": "Extension in the dialplan" - }, - "priority": { - "required": true, - "type": "long", - "description": "Priority in the dialplan" - } - } - }, - "CallerID": { - "id": "CallerID", - "description": "Caller identification", - "properties": { - "name": { - "required": true, - "type": "string" - }, - "number": { - "required": true, - "type": "string" - } - } - }, - "Channel": { - "id": "Channel", - "description": "A specific communication connection between Asterisk and an Endpoint.", - "properties": { - "id": { - "required": true, - "type": "string", - "description": "Unique identifier of the channel.\n\nThis is the same as the Uniqueid field in AMI." - }, - "name": { - "required": true, - "type": "string", - "description": "Name of the channel (i.e. SIP/foo-0000a7e3)" - }, - "state": { - "required": true, - "type": "string", - "allowableValues": { - "valueType": "LIST", - "values": [ - "Down", - "Rsrved", - "OffHook", - "Dialing", - "Ring", - "Ringing", - "Up", - "Busy", - "Dialing Offhook", - "Pre-ring", - "Unknown" - ] - } - }, - "caller": { - "required": true, - "type": "CallerID" - }, - "connected": { - "required": true, - "type": "CallerID" - }, - "accountcode": { - "required": true, - "type": "string" - }, - "dialplan": { - "required": true, - "type": "DialplanCEP", - "description": "Current location in the dialplan" - }, - "creationtime": { - "required": true, - "type": "Date", - "description": "Timestamp when channel was created" - }, - "language": { - "required": true, - "type": "string", - "description": "The default spoken language" - } - } - } - } -} diff --git a/codegen-data/ari_1_7_0/deviceStates.json b/codegen-data/ari_1_7_0/deviceStates.json deleted file mode 100644 index 62ecb135..00000000 --- a/codegen-data/ari_1_7_0/deviceStates.json +++ /dev/null @@ -1,151 +0,0 @@ -{ - "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", - "_author": "Kevin Harwell ", - "_svn_revision": "$Revision: 429091 $", - "apiVersion": "1.6.0", - "swaggerVersion": "1.1", - "basePath": "http://localhost:8088/ari", - "resourcePath": "/api-docs/deviceStates.{format}", - "apis": [ - { - "path": "/deviceStates", - "description": "Device states", - "operations": [ - { - "httpMethod": "GET", - "summary": "List all ARI controlled device states.", - "nickname": "list", - "responseClass": "List[DeviceState]" - } - ] - }, - { - "path": "/deviceStates/{deviceName}", - "description": "Device state", - "operations": [ - { - "httpMethod": "GET", - "summary": "Retrieve the current state of a device.", - "nickname": "get", - "responseClass": "DeviceState", - "parameters": [ - { - "name": "deviceName", - "description": "Name of the device", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ] - }, - { - "httpMethod": "PUT", - "summary": "Change the state of a device controlled by ARI. (Note - implicitly creates the device state).", - "nickname": "update", - "responseClass": "void", - "parameters": [ - { - "name": "deviceName", - "description": "Name of the device", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "deviceState", - "description": "Device state value", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string", - "allowableValues": { - "valueType": "LIST", - "values": [ - "NOT_INUSE", - "INUSE", - "BUSY", - "INVALID", - "UNAVAILABLE", - "RINGING", - "RINGINUSE", - "ONHOLD" - ] - } - - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Device name is missing" - }, - { - "code": 409, - "reason": "Uncontrolled device specified" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Destroy a device-state controlled by ARI.", - "nickname": "delete", - "responseClass": "void", - "parameters": [ - { - "name": "deviceName", - "description": "Name of the device", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Device name is missing" - }, - { - "code": 409, - "reason": "Uncontrolled device specified" - } - ] - } - ] - } - ], - "models": { - "DeviceState": { - "id": "DeviceState", - "description": "Represents the state of a device.", - "properties": { - "name": { - "type": "string", - "description": "Name of the device.", - "required": true - }, - "state": { - "type": "string", - "description": "Device's state", - "required": true, - "allowableValues": { - "valueType": "LIST", - "values": [ - "UNKNOWN", - "NOT_INUSE", - "INUSE", - "BUSY", - "INVALID", - "UNAVAILABLE", - "RINGING", - "RINGINUSE", - "ONHOLD" - ] - } - } - } - } - } -} diff --git a/codegen-data/ari_1_7_0/endpoints.json b/codegen-data/ari_1_7_0/endpoints.json deleted file mode 100644 index 8440d8b0..00000000 --- a/codegen-data/ari_1_7_0/endpoints.json +++ /dev/null @@ -1,275 +0,0 @@ -{ - "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", - "_author": "David M. Lee, II ", - "_svn_revision": "$Revision: 429091 $", - "apiVersion": "1.6.0", - "swaggerVersion": "1.1", - "basePath": "http://localhost:8088/ari", - "resourcePath": "/api-docs/endpoints.{format}", - "apis": [ - { - "path": "/endpoints", - "description": "Asterisk endpoints", - "operations": [ - { - "httpMethod": "GET", - "summary": "List all endpoints.", - "nickname": "list", - "responseClass": "List[Endpoint]" - } - ] - }, - { - "path": "/endpoints/sendMessage", - "description": "Send a message to some technology URI or endpoint.", - "operations": [ - { - "httpMethod": "PUT", - "summary": "Send a message to some technology URI or endpoint.", - "nickname": "sendMessage", - "responseClass": "void", - "parameters": [ - { - "name": "to", - "description": "The endpoint resource or technology specific URI to send the message to. Valid resources are sip, pjsip, and xmpp.", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "from", - "description": "The endpoint resource or technology specific identity to send this message from. Valid resources are sip, pjsip, and xmpp.", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "body", - "description": "The body of the message", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "variables", - "descriptioni": "The \"variables\" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, pjsip and sip resource types will add the key/value pairs as SIP headers,", - "paramType": "body", - "required": false, - "dataType": "containers", - "allowMultiple": false - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Endpoint not found" - } - ] - } - ] - }, - { - "path": "/endpoints/{tech}", - "description": "Asterisk endpoints", - "operations": [ - { - "httpMethod": "GET", - "summary": "List available endoints for a given endpoint technology.", - "nickname": "listByTech", - "responseClass": "List[Endpoint]", - "parameters": [ - { - "name": "tech", - "description": "Technology of the endpoints (sip,iax2,...)", - "paramType": "path", - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Endpoints not found" - } - ] - } - ] - }, - { - "path": "/endpoints/{tech}/{resource}", - "description": "Single endpoint", - "operations": [ - { - "httpMethod": "GET", - "summary": "Details for an endpoint.", - "nickname": "get", - "responseClass": "Endpoint", - "parameters": [ - { - "name": "tech", - "description": "Technology of the endpoint", - "paramType": "path", - "dataType": "string" - }, - { - "name": "resource", - "description": "ID of the endpoint", - "paramType": "path", - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Invalid parameters for sending a message." - }, - { - "code": 404, - "reason": "Endpoints not found" - } - ] - } - ] - }, - { - "path": "/endpoints/{tech}/{resource}/sendMessage", - "description": "Send a message to some endpoint in a technology.", - "operations": [ - { - "httpMethod": "PUT", - "summary": "Send a message to some endpoint in a technology.", - "nickname": "sendMessageToEndpoint", - "responseClass": "void", - "parameters": [ - { - "name": "tech", - "description": "Technology of the endpoint", - "paramType": "path", - "dataType": "string" - }, - { - "name": "resource", - "description": "ID of the endpoint", - "paramType": "path", - "dataType": "string" - }, - { - "name": "from", - "description": "The endpoint resource or technology specific identity to send this message from. Valid resources are sip, pjsip, and xmpp.", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "body", - "description": "The body of the message", - "paramType": "query", - "required": false, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "variables", - "descriptioni": "The \"variables\" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, pjsip and sip resource types will add the key/value pairs as SIP headers,", - "paramType": "body", - "required": false, - "dataType": "containers", - "allowMultiple": false - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "Invalid parameters for sending a message." - }, - { - "code": 404, - "reason": "Endpoint not found" - } - ] - } - ] - } - ], - "models": { - "Endpoint": { - "id": "Endpoint", - "description": "An external device that may offer/accept calls to/from Asterisk.\n\nUnlike most resources, which have a single unique identifier, an endpoint is uniquely identified by the technology/resource pair.", - "properties": { - "technology": { - "type": "string", - "description": "Technology of the endpoint", - "required": true - }, - "resource": { - "type": "string", - "description": "Identifier of the endpoint, specific to the given technology.", - "required": true - }, - "state": { - "type": "string", - "description": "Endpoint's state", - "required": false, - "allowableValues": { - "valueType": "LIST", - "values": [ - "unknown", - "offline", - "online" - ] - } - }, - "channel_ids": { - "type": "List[string]", - "description": "Id's of channels associated with this endpoint", - "required": true - } - } - }, - "TextMessageVariable": { - "id": "TextMessageVariable", - "description": "A key/value pair variable in a text message.", - "properties": { - "key": { - "type": "string", - "description": "A unique key identifying the variable.", - "required": true - }, - "value": { - "type": "string", - "description": "The value of the variable.", - "required": true - } - } - }, - "TextMessage": { - "id": "TextMessage", - "description": "A text message.", - "properties": { - "from": { - "type": "string", - "description": "A technology specific URI specifying the source of the message. For sip and pjsip technologies, any SIP URI can be specified. For xmpp, the URI must correspond to the client connection being used to send the message.", - "required": true - }, - "to": { - "type": "string", - "description": "A technology specific URI specifying the destination of the message. Valid technologies include sip, pjsip, and xmp. The destination of a message should be an endpoint.", - "required": true - }, - "body": { - "type": "string", - "description": "The text of the message.", - "required": true - }, - "variables": { - "type": "List[TextMessageVariable]", - "description": "Technology specific key/value pairs associated with the message.", - "required": false - } - } - } - } -} diff --git a/codegen-data/ari_1_7_0/events.json b/codegen-data/ari_1_7_0/events.json deleted file mode 100644 index 9c24dbdc..00000000 --- a/codegen-data/ari_1_7_0/events.json +++ /dev/null @@ -1,729 +0,0 @@ -{ - "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", - "_author": "David M. Lee, II ", - "_svn_revision": "$Revision: 429091 $", - "apiVersion": "1.6.0", - "swaggerVersion": "1.2", - "basePath": "http://localhost:8088/ari", - "resourcePath": "/api-docs/events.{format}", - "apis": [ - { - "path": "/events", - "description": "Events from Asterisk to applications", - "operations": [ - { - "httpMethod": "GET", - "upgrade": "websocket", - "websocketProtocol": "ari", - "summary": "WebSocket connection for events.", - "nickname": "eventWebsocket", - "responseClass": "Message", - "parameters": [ - { - "name": "app", - "description": "Applications to subscribe to.", - "paramType": "query", - "required": true, - "allowMultiple": true, - "dataType": "string" - } - ] - } - ] - }, - { - "path": "/events/user/{eventName}", - "description": "Stasis application user events", - "operations": [ - { - "httpMethod": "POST", - "summary": "Generate a user event.", - "nickname": "userEvent", - "responseClass": "void", - "parameters": [ - { - "name": "eventName", - "description": "Event name", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "application", - "description": "The name of the application that will receive this event", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "source", - "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}/{resource}, deviceState:{deviceName}", - "paramType": "query", - "required": false, - "allowMultiple": true, - "dataType": "string" - }, - { - "name": "variables", - "description": "The \"variables\" key in the body object holds custom key/value pairs to add to the user event. Ex. { \"variables\": { \"key\": \"value\" } }", - "paramType": "body", - "required": false, - "allowMultiple": false, - "dataType": "containers" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Application does not exist." - }, - { - "code": 422, - "reason": "Event source not found." - }, - { - "code": 400, - "reason": "Invalid even tsource URI or userevent data." - } - ] - } - ] - } - ], - "models": { - "Message": { - "id": "Message", - "description": "Base type for errors and events", - "discriminator": "type", - "properties": { - "type": { - "type": "string", - "required": true, - "description": "Indicates the type of this message." - } - }, - "subTypes": [ - "MissingParams", - "Event" - ] - }, - "MissingParams": { - "id": "MissingParams", - "description": "Error event sent when required params are missing.", - "properties": { - "params": { - "required": true, - "type": "List[string]", - "description": "A list of the missing parameters" - } - } - }, - "Event": { - "id": "Event", - "description": "Base type for asynchronous events from Asterisk.", - "properties": { - "application": { - "type": "string", - "description": "Name of the application receiving the event.", - "required": true - }, - "timestamp": { - "type": "Date", - "description": "Time at which this event was created.", - "required": false - } - }, - "subTypes": [ - "DeviceStateChanged", - "PlaybackStarted", - "PlaybackFinished", - "RecordingStarted", - "RecordingFinished", - "RecordingFailed", - "ApplicationReplaced", - "BridgeCreated", - "BridgeDestroyed", - "BridgeMerged", - "BridgeBlindTransfer", - "BridgeAttendedTransfer", - "ChannelCreated", - "ChannelDestroyed", - "ChannelEnteredBridge", - "ChannelLeftBridge", - "ChannelStateChange", - "ChannelDtmfReceived", - "ChannelDialplan", - "ChannelCallerId", - "ChannelUserevent", - "ChannelHangupRequest", - "ChannelVarset", - "ChannelTalkingStarted", - "ChannelTalkingFinished", - "EndpointStateChange", - "Dial", - "StasisEnd", - "StasisStart", - "TextMessageReceived", - "ChannelConnectedLine" - ] - }, - "DeviceStateChanged": { - "id": "DeviceStateChanged", - "description": "Notification that a device state has changed.", - "properties": { - "device_state": { - "type": "DeviceState", - "description": "Device state object", - "required": true - } - } - }, - "PlaybackStarted": { - "id": "PlaybackStarted", - "description": "Event showing the start of a media playback operation.", - "properties": { - "playback": { - "type": "Playback", - "description": "Playback control object", - "required": true - } - } - }, - "PlaybackFinished": { - "id": "PlaybackFinished", - "description": "Event showing the completion of a media playback operation.", - "properties": { - "playback": { - "type": "Playback", - "description": "Playback control object", - "required": true - } - } - }, - "RecordingStarted": { - "id": "RecordingStarted", - "description": "Event showing the start of a recording operation.", - "properties": { - "recording": { - "type": "LiveRecording", - "description": "Recording control object", - "required": true - } - } - }, - "RecordingFinished": { - "id": "RecordingFinished", - "description": "Event showing the completion of a recording operation.", - "properties": { - "recording": { - "type": "LiveRecording", - "description": "Recording control object", - "required": true - } - } - }, - "RecordingFailed": { - "id": "RecordingFailed", - "description": "Event showing failure of a recording operation.", - "properties": { - "recording": { - "type": "LiveRecording", - "description": "Recording control object", - "required": true - } - } - }, - "ApplicationReplaced": { - "id": "ApplicationReplaced", - "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.", - "properties": {} - }, - "BridgeCreated": { - "id": "BridgeCreated", - "description": "Notification that a bridge has been created.", - "properties": { - "bridge": { - "required": true, - "type": "Bridge" - } - } - }, - "BridgeDestroyed": { - "id": "BridgeDestroyed", - "description": "Notification that a bridge has been destroyed.", - "properties": { - "bridge": { - "required": true, - "type": "Bridge" - } - } - }, - "BridgeMerged": { - "id": "BridgeMerged", - "description": "Notification that one bridge has merged into another.", - "properties": { - "bridge": { - "required": true, - "type": "Bridge" - }, - "bridge_from": { - "required": true, - "type": "Bridge" - } - } - }, - "BridgeBlindTransfer": { - "id": "BridgeBlindTransfer", - "description": "Notification that a blind transfer has occurred.", - "properties": { - "channel": { - "description": "The channel performing the blind transfer", - "required": true, - "type": "Channel" - }, - "replace_channel": { - "description": "The channel that is replacing transferer when the transferee(s) can not be transferred directly", - "required": false, - "type": "Channel" - }, - "transferee": { - "description": "The channel that is being transferred", - "required": false, - "type": "Channel" - }, - "exten": { - "description": "The extension transferred to", - "required": true, - "type": "string" - }, - "context": { - "description": "The context transferred to", - "required": true, - "type": "string" - }, - "result": { - "description": "The result of the transfer attempt", - "required": true, - "type": "string" - }, - "is_external": { - "description": "Whether the transfer was externally initiated or not", - "required": true, - "type": "boolean" - }, - "bridge": { - "description": "The bridge being transferred", - "type": "Bridge" - } - } - }, - "BridgeAttendedTransfer": { - "id": "BridgeAttendedTransfer", - "description": "Notification that an attended transfer has occurred.", - "properties": { - "transferer_first_leg": { - "description": "First leg of the transferer", - "required": true, - "type": "Channel" - }, - "transferer_second_leg": { - "description": "Second leg of the transferer", - "required": true, - "type": "Channel" - }, - "replace_channel": { - "description": "The channel that is replacing transferer_first_leg in the swap", - "required": false, - "type": "Channel" - }, - "transferee": { - "description": "The channel that is being transferred", - "required": false, - "type": "Channel" - }, - "transfer_target": { - "description": "The channel that is being transferred to", - "required": false, - "type": "Channel" - }, - "result": { - "description": "The result of the transfer attempt", - "required": true, - "type": "string" - }, - "is_external": { - "description": "Whether the transfer was externally initiated or not", - "required": true, - "type": "boolean" - }, - "transferer_first_leg_bridge": { - "description": "Bridge the transferer first leg is in", - "type": "Bridge" - }, - "transferer_second_leg_bridge": { - "description": "Bridge the transferer second leg is in", - "type": "Bridge" - }, - "destination_type": { - "description": "How the transfer was accomplished", - "required": true, - "type": "string" - }, - "destination_bridge": { - "description": "Bridge that survived the merge result", - "type": "string" - }, - "destination_application": { - "description": "Application that has been transferred into", - "type": "string" - }, - "destination_link_first_leg": { - "description": "First leg of a link transfer result", - "type": "Channel" - }, - "destination_link_second_leg": { - "description": "Second leg of a link transfer result", - "type": "Channel" - }, - "destination_threeway_channel": { - "description": "Transferer channel that survived the threeway result", - "type": "Channel" - }, - "destination_threeway_bridge": { - "description": "Bridge that survived the threeway result", - "type": "Bridge" - } - } - }, - "ChannelCreated": { - "id": "ChannelCreated", - "description": "Notification that a channel has been created.", - "properties": { - "channel": { - "required": true, - "type": "Channel" - } - } - }, - "ChannelDestroyed": { - "id": "ChannelDestroyed", - "description": "Notification that a channel has been destroyed.", - "properties": { - "cause": { - "required": true, - "description": "Integer representation of the cause of the hangup", - "type": "int" - }, - "cause_txt": { - "required": true, - "description": "Text representation of the cause of the hangup", - "type": "string" - }, - "channel": { - "required": true, - "type": "Channel" - } - } - }, - "ChannelEnteredBridge": { - "id": "ChannelEnteredBridge", - "description": "Notification that a channel has entered a bridge.", - "properties": { - "bridge": { - "required": true, - "type": "Bridge" - }, - "channel": { - "type": "Channel" - } - } - }, - "ChannelLeftBridge": { - "id": "ChannelLeftBridge", - "description": "Notification that a channel has left a bridge.", - "properties": { - "bridge": { - "required": true, - "type": "Bridge" - }, - "channel": { - "required": true, - "type": "Channel" - } - } - }, - "ChannelStateChange": { - "id": "ChannelStateChange", - "description": "Notification of a channel's state change.", - "properties": { - "channel": { - "required": true, - "type": "Channel" - } - } - }, - "ChannelDtmfReceived": { - "id": "ChannelDtmfReceived", - "description": "DTMF received on a channel.\n\nThis event is sent when the DTMF ends. There is no notification about the start of DTMF", - "properties": { - "digit": { - "required": true, - "type": "string", - "description": "DTMF digit received (0-9, A-E, # or *)" - }, - "duration_ms": { - "required": true, - "type": "int", - "description": "Number of milliseconds DTMF was received" - }, - "channel": { - "required": true, - "type": "Channel", - "description": "The channel on which DTMF was received" - } - } - }, - "ChannelDialplan": { - "id": "ChannelDialplan", - "description": "Channel changed location in the dialplan.", - "properties": { - "channel": { - "required": true, - "type": "Channel", - "description": "The channel that changed dialplan location." - }, - "dialplan_app": { - "required": true, - "type": "string", - "description": "The application about to be executed." - }, - "dialplan_app_data": { - "required": true, - "type": "string", - "description": "The data to be passed to the application." - } - } - }, - "ChannelCallerId": { - "id": "ChannelCallerId", - "description": "Channel changed Caller ID.", - "properties": { - "caller_presentation": { - "required": true, - "type": "int", - "description": "The integer representation of the Caller Presentation value." - }, - "caller_presentation_txt": { - "required": true, - "type": "string", - "description": "The text representation of the Caller Presentation value." - }, - "channel": { - "required": true, - "type": "Channel", - "description": "The channel that changed Caller ID." - } - } - }, - "ChannelUserevent": { - "id": "ChannelUserevent", - "description": "User-generated event with additional user-defined fields in the object.", - "properties": { - "eventname": { - "required": true, - "type": "string", - "description": "The name of the user event." - }, - "channel": { - "required": false, - "type": "Channel", - "description": "A channel that is signaled with the user event." - }, - "bridge": { - "required": false, - "type": "Bridge", - "description": "A bridge that is signaled with the user event." - }, - "endpoint": { - "required": false, - "type": "Endpoint", - "description": "A endpoint that is signaled with the user event." - }, - "userevent": { - "required": true, - "type": "object", - "description": "Custom Userevent data" - } - } - }, - "ChannelHangupRequest": { - "id": "ChannelHangupRequest", - "description": "A hangup was requested on the channel.", - "properties": { - "cause": { - "type": "int", - "description": "Integer representation of the cause of the hangup." - }, - "soft": { - "type": "boolean", - "description": "Whether the hangup request was a soft hangup request." - }, - "channel": { - "required": true, - "type": "Channel", - "description": "The channel on which the hangup was requested." - } - } - }, - "ChannelVarset": { - "id": "ChannelVarset", - "description": "Channel variable changed.", - "properties": { - "variable": { - "required": true, - "type": "string", - "description": "The variable that changed." - }, - "value": { - "required": true, - "type": "string", - "description": "The new value of the variable." - }, - "channel": { - "required": false, - "type": "Channel", - "description": "The channel on which the variable was set.\n\nIf missing, the variable is a global variable." - } - } - }, - "ChannelTalkingStarted": { - "id": "ChannelTalkingStarted", - "description": "Talking was detected on the channel.", - "properties": { - "channel": { - "required": true, - "type": "Channel", - "description": "The channel on which talking started." - } - } - }, - "ChannelTalkingFinished": { - "id": "ChannelTalkingFinished", - "description": "Talking is no longer detected on the channel.", - "properties": { - "channel": { - "required": true, - "type": "Channel", - "description": "The channel on which talking completed." - }, - "duration": { - "required": true, - "type": "int", - "description": "The length of time, in milliseconds, that talking was detected on the channel" - } - } - }, - "EndpointStateChange": { - "id": "EndpointStateChange", - "description": "Endpoint state changed.", - "properties": { - "endpoint": { - "required": true, - "type": "Endpoint" - } - } - }, - "Dial": { - "id": "Dial", - "description": "Dialing state has changed.", - "properties": { - "caller": { - "required": false, - "type": "Channel", - "description": "The calling channel." - }, - "peer": { - "required": true, - "type": "Channel", - "description": "The dialed channel." - }, - "forward": { - "required": false, - "type": "string", - "description": "Forwarding target requested by the original dialed channel." - }, - "forwarded": { - "required": false, - "type": "Channel", - "description": "Channel that the caller has been forwarded to." - }, - "dialstring": { - "required": false, - "type": "string", - "description": "The dial string for calling the peer channel." - }, - "dialstatus": { - "required": true, - "type": "string", - "description": "Current status of the dialing attempt to the peer." - } - } - }, - "StasisEnd": { - "id": "StasisEnd", - "description": "Notification that a channel has left a Stasis application.", - "properties": { - "channel": { - "required": true, - "type": "Channel" - } - } - }, - "StasisStart": { - "id": "StasisStart", - "description": "Notification that a channel has entered a Stasis application.", - "properties": { - "args": { - "required": true, - "type": "List[string]", - "description": "Arguments to the application" - }, - "channel": { - "required": true, - "type": "Channel" - }, - "replace_channel": { - "required": false, - "type": "Channel" - } - } - }, - "TextMessageReceived": { - "id": "TextMessageReceived", - "description": "A text message was received from an endpoint.", - "properties": { - "message": { - "required": true, - "type": "TextMessage" - }, - "endpoint": { - "required": false, - "type": "Endpoint" - } - } - }, - "ChannelConnectedLine": { - "id": "ChannelConnectedLine", - "description": "Channel changed Connected Line.", - "properties": { - "channel": { - "required": true, - "type": "Channel", - "description": "The channel whose connected line has changed." - } - } - } - } -} diff --git a/codegen-data/ari_1_7_0/mailboxes.json b/codegen-data/ari_1_7_0/mailboxes.json deleted file mode 100644 index b348106e..00000000 --- a/codegen-data/ari_1_7_0/mailboxes.json +++ /dev/null @@ -1,134 +0,0 @@ -{ - "_copyright": "Copyright (C) 2013, Digium, Inc.", - "_author": "Jonathan Rose ", - "_svn_revision": "$Revision: 429091 $", - "apiVersion": "1.6.0", - "swaggerVersion": "1.1", - "basePath": "http://localhost:8088/ari", - "resourcePath": "/api-docs/mailboxes.{format}", - "apis": [ - { - "path": "/mailboxes", - "description": "Mailboxes", - "operations": [ - { - "httpMethod": "GET", - "summary": "List all mailboxes.", - "nickname": "list", - "responseClass": "List[Mailbox]" - } - ] - }, - { - "path": "/mailboxes/{mailboxName}", - "description": "Mailbox state", - "operations": [ - { - "httpMethod": "GET", - "summary": "Retrieve the current state of a mailbox.", - "nickname": "get", - "responseClass": "Mailbox", - "parameters": [ - { - "name": "mailboxName", - "description": "Name of the mailbox", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Mailbox not found" - } - ] - }, - { - "httpMethod": "PUT", - "summary": "Change the state of a mailbox. (Note - implicitly creates the mailbox).", - "nickname": "update", - "responseClass": "void", - "parameters": [ - { - "name": "mailboxName", - "description": "Name of the mailbox", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "oldMessages", - "description": "Count of old messages in the mailbox", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "int" - }, - { - "name": "newMessages", - "description": "Count of new messages in the mailbox", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "int" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Mailbox not found" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Destroy a mailbox.", - "nickname": "delete", - "responseClass": "void", - "parameters": [ - { - "name": "mailboxName", - "description": "Name of the mailbox", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Mailbox not found" - } - ] - } - ] - } - ], - "models": { - "Mailbox": { - "id": "Mailbox", - "description": "Represents the state of a mailbox.", - "properties": { - "name": { - "type": "string", - "description": "Name of the mailbox.", - "required": true - }, - "old_messages": { - "type": "int", - "description": "Count of old messages in the mailbox.", - "required": true - }, - "new_messages": { - "type": "int", - "description": "Count of new messages in the mailbox.", - "required": true - } - } - } - } -} diff --git a/codegen-data/ari_1_7_0/playbacks.json b/codegen-data/ari_1_7_0/playbacks.json deleted file mode 100644 index 98b511a0..00000000 --- a/codegen-data/ari_1_7_0/playbacks.json +++ /dev/null @@ -1,155 +0,0 @@ -{ - "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", - "_author": "David M. Lee, II ", - "_svn_revision": "$Revision: 429091 $", - "apiVersion": "1.6.0", - "swaggerVersion": "1.1", - "basePath": "http://localhost:8088/ari", - "resourcePath": "/api-docs/playbacks.{format}", - "apis": [ - { - "path": "/playbacks/{playbackId}", - "description": "Control object for a playback operation.", - "operations": [ - { - "httpMethod": "GET", - "summary": "Get a playback's details.", - "nickname": "get", - "responseClass": "Playback", - "parameters": [ - { - "name": "playbackId", - "description": "Playback's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "The playback cannot be found" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Stop a playback.", - "nickname": "stop", - "responseClass": "void", - "parameters": [ - { - "name": "playbackId", - "description": "Playback's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "The playback cannot be found" - } - ] - } - ] - }, - { - "path": "/playbacks/{playbackId}/control", - "description": "Control object for a playback operation.", - "operations": [ - { - "httpMethod": "POST", - "summary": "Control a playback.", - "nickname": "control", - "responseClass": "void", - "parameters": [ - { - "name": "playbackId", - "description": "Playback's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "operation", - "description": "Operation to perform on the playback.", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string", - "allowableValues": { - "valueType": "LIST", - "values": [ - "restart", - "pause", - "unpause", - "reverse", - "forward" - ] - } - } - ], - "errorResponses": [ - { - "code": 400, - "reason": "The provided operation parameter was invalid" - }, - { - "code": 404, - "reason": "The playback cannot be found" - }, - { - "code": 409, - "reason": "The operation cannot be performed in the playback's current state" - } -] - } - ] - } - ], - "models": { - "Playback": { - "id": "Playback", - "description": "Object representing the playback of media to a channel", - "properties": { - "id": { - "type": "string", - "description": "ID for this playback operation", - "required": true - }, - "media_uri": { - "type": "string", - "description": "URI for the media to play back.", - "required": true - }, - "target_uri": { - "type": "string", - "description": "URI for the channel or bridge to play the media on", - "required": true - }, - "language": { - "type": "string", - "description": "For media types that support multiple languages, the language requested for playback." - }, - "state": { - "type": "string", - "description": "Current state of the playback operation.", - "required": true, - "allowableValues": { - "valueType": "LIST", - "values": [ - "queued", - "playing", - "complete" - ] - } - } - } - } - } -} diff --git a/codegen-data/ari_1_7_0/recordings.json b/codegen-data/ari_1_7_0/recordings.json deleted file mode 100644 index a4a096f1..00000000 --- a/codegen-data/ari_1_7_0/recordings.json +++ /dev/null @@ -1,378 +0,0 @@ -{ - "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", - "_author": "David M. Lee, II ", - "_svn_revision": "$Revision: 429091 $", - "apiVersion": "1.6.0", - "swaggerVersion": "1.1", - "basePath": "http://localhost:8088/ari", - "resourcePath": "/api-docs/recordings.{format}", - "apis": [ - { - "path": "/recordings/stored", - "description": "Recordings", - "operations": [ - { - "httpMethod": "GET", - "summary": "List recordings that are complete.", - "nickname": "listStored", - "responseClass": "List[StoredRecording]" - } - ] - }, - { - "path": "/recordings/stored/{recordingName}", - "description": "Individual recording", - "operations": [ - { - "httpMethod": "GET", - "summary": "Get a stored recording's details.", - "nickname": "getStored", - "responseClass": "StoredRecording", - "parameters": [ - { - "name": "recordingName", - "description": "The name of the recording", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Recording not found" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Delete a stored recording.", - "nickname": "deleteStored", - "responseClass": "void", - "parameters": [ - { - "name": "recordingName", - "description": "The name of the recording", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Recording not found" - } - ] - } - ] - }, - { - "path": "/recordings/stored/{recordingName}/copy", - "description": "Copy an individual recording", - "operations": [ - { - "httpMethod": "POST", - "summary": "Copy a stored recording.", - "nickname": "copyStored", - "responseClass": "StoredRecording", - "parameters": [ - { - "name": "recordingName", - "description": "The name of the recording to copy", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - }, - { - "name": "destinationRecordingName", - "description": "The destination name of the recording", - "paramType": "query", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Recording not found" - }, - { - "code": 409, - "reason": "A recording with the same name already exists on the system" - } - ] - } - ] - }, - { - "path": "/recordings/live/{recordingName}", - "description": "A recording that is in progress", - "operations": [ - { - "httpMethod": "GET", - "summary": "List live recordings.", - "nickname": "getLive", - "responseClass": "LiveRecording", - "parameters": [ - { - "name": "recordingName", - "description": "The name of the recording", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Recording not found" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Stop a live recording and discard it.", - "nickname": "cancel", - "responseClass": "void", - "parameters": [ - { - "name": "recordingName", - "description": "The name of the recording", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Recording not found" - } - ] - } - ] - }, - { - "path": "/recordings/live/{recordingName}/stop", - "operations": [ - { - "httpMethod": "POST", - "summary": "Stop a live recording and store it.", - "nickname": "stop", - "responseClass": "void", - "parameters": [ - { - "name": "recordingName", - "description": "The name of the recording", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Recording not found" - } - ] - } - ] - }, - { - "path": "/recordings/live/{recordingName}/pause", - "operations": [ - { - "httpMethod": "POST", - "summary": "Pause a live recording.", - "notes": "Pausing a recording suspends silence detection, which will be restarted when the recording is unpaused. Paused time is not included in the accounting for maxDurationSeconds.", - "nickname": "pause", - "responseClass": "void", - "parameters": [ - { - "name": "recordingName", - "description": "The name of the recording", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Recording not found" - }, - { - "code": 409, - "reason": "Recording not in session" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Unpause a live recording.", - "nickname": "unpause", - "responseClass": "void", - "parameters": [ - { - "name": "recordingName", - "description": "The name of the recording", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Recording not found" - }, - { - "code": 409, - "reason": "Recording not in session" - } - ] - } - ] - }, - { - "path": "/recordings/live/{recordingName}/mute", - "operations": [ - { - "httpMethod": "POST", - "summary": "Mute a live recording.", - "notes": "Muting a recording suspends silence detection, which will be restarted when the recording is unmuted.", - "nickname": "mute", - "responseClass": "void", - "parameters": [ - { - "name": "recordingName", - "description": "The name of the recording", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Recording not found" - }, - { - "code": 409, - "reason": "Recording not in session" - } - ] - }, - { - "httpMethod": "DELETE", - "summary": "Unmute a live recording.", - "nickname": "unmute", - "responseClass": "void", - "parameters": [ - { - "name": "recordingName", - "description": "The name of the recording", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ], - "errorResponses": [ - { - "code": 404, - "reason": "Recording not found" - }, - { - "code": 409, - "reason": "Recording not in session" - } - ] - } - ] - } - ], - "models": { - "StoredRecording": { - "id": "StoredRecording", - "description": "A past recording that may be played back.", - "properties": { - "name": { - "required": true, - "type": "string" - }, - "format": { - "required": true, - "type": "string" - } - } - }, - "LiveRecording": { - "id": "LiveRecording", - "description": "A recording that is in progress", - "properties": { - "name": { - "required": true, - "type": "string", - "description": "Base name for the recording" - }, - "format": { - "required": true, - "type": "string", - "description": "Recording format (wav, gsm, etc.)" - }, - "target_uri": { - "required": true, - "type": "string", - "description": "URI for the channel or bridge being recorded" - }, - "state": { - "required": true, - "type": "string", - "allowableValues": { - "valueType": "LIST", - "values": [ - "queued", - "recording", - "paused", - "done", - "failed", - "canceled" - ] - } - }, - "duration": { - "required": false, - "type": "int", - "description": "Duration in seconds of the recording" - }, - "talking_duration": { - "required": false, - "type": "int", - "description": "Duration of talking, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds." - }, - "silence_duration": { - "required": false, - "type": "int", - "description": "Duration of silence, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds." - }, - "cause": { - "required": false, - "type": "string", - "description": "Cause for recording failure if failed" - } - } - } - } -} diff --git a/codegen-data/ari_1_7_0/sounds.json b/codegen-data/ari_1_7_0/sounds.json deleted file mode 100644 index 5ed6de7a..00000000 --- a/codegen-data/ari_1_7_0/sounds.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", - "_author": "David M. Lee, II ", - "_svn_revision": "$Revision: 429091 $", - "apiVersion": "1.6.0", - "swaggerVersion": "1.1", - "basePath": "http://localhost:8088/ari", - "resourcePath": "/api-docs/sounds.{format}", - "apis": [ - { - "path": "/sounds", - "description": "Sounds", - "operations": [ - { - "httpMethod": "GET", - "summary": "List all sounds.", - "nickname": "list", - "responseClass": "List[Sound]", - "parameters": [ - { - "name": "lang", - "description": "Lookup sound for a specific language.", - "paramType": "query", - "dataType": "string", - "required": false - }, - { - "name": "format", - "description": "Lookup sound in a specific format.", - "paramType": "query", - "dataType": "string", - "required": false, - "__note": "core show translation can show translation paths between formats, along with relative costs. so this could be just installed format, or we could follow that for transcoded formats." - } - ] - } - ] - }, - { - "path": "/sounds/{soundId}", - "description": "Individual sound", - "operations": [ - { - "httpMethod": "GET", - "summary": "Get a sound's details.", - "nickname": "get", - "responseClass": "Sound", - "parameters": [ - { - "name": "soundId", - "description": "Sound's id", - "paramType": "path", - "required": true, - "allowMultiple": false, - "dataType": "string" - } - ] - } - ] - } - ], - "models": { - "FormatLangPair": { - "id": "FormatLangPair", - "description": "Identifies the format and language of a sound file", - "properties": { - "language": { - "required": true, - "type": "string" - }, - "format": { - "required": true, - "type": "string" - } - } - }, - "Sound": { - "id": "Sound", - "description": "A media file that may be played back.", - "properties": { - "id": { - "required": true, - "description": "Sound's identifier.", - "type": "string" - }, - "text": { - "required": false, - "description": "Text description of the sound, usually the words spoken.", - "type": "string" - }, - "formats": { - "required": true, - "description": "The formats and languages in which this sound is available.", - "type": "List[FormatLangPair]" - } - } - } - } -} diff --git a/codegen/build.gradle b/codegen/build.gradle new file mode 100755 index 00000000..eafcdd58 --- /dev/null +++ b/codegen/build.gradle @@ -0,0 +1,24 @@ +plugins { + id 'java' +} + +repositories { + mavenCentral() +} + +dependencies { + implementation 'com.fasterxml.jackson.core:jackson-core:2.20.0' + implementation 'com.fasterxml.jackson.core:jackson-databind:2.20.0' + implementation 'com.fasterxml.jackson.core:jackson-annotations:2.20' + implementation 'com.google.googlejavaformat:google-java-format:1.7' +} + +java { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 +} + +task runCodegen(type: JavaExec) { + classpath = sourceSets.main.runtimeClasspath + main = 'ch.loway.oss.ari4java.codegen.run' +} diff --git a/codegen/ch/loway/oss/ari4java/codegen/DefMapper.java b/codegen/ch/loway/oss/ari4java/codegen/DefMapper.java deleted file mode 100644 index 84b2919c..00000000 --- a/codegen/ch/loway/oss/ari4java/codegen/DefMapper.java +++ /dev/null @@ -1,600 +0,0 @@ - -package ch.loway.oss.ari4java.codegen; - -import ch.loway.oss.ari4java.codegen.genJava.JavaGen; -import ch.loway.oss.ari4java.codegen.genJava.JavaInterface; -import ch.loway.oss.ari4java.codegen.genJava.JavaPkgInfo; -import ch.loway.oss.ari4java.codegen.models.Action; -import ch.loway.oss.ari4java.codegen.models.Apis; -import ch.loway.oss.ari4java.codegen.models.AriBuilderInterface; -import ch.loway.oss.ari4java.codegen.models.ClassTranslator; -import ch.loway.oss.ari4java.codegen.models.Operation; -import ch.loway.oss.ari4java.codegen.models.Model; -import ch.loway.oss.ari4java.codegen.models.ModelField; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.node.ArrayNode; - -import java.io.File; -import java.io.FileWriter; -import java.io.IOException; -import java.io.PrintWriter; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Set; - -/** - * The model mapper keeps a list of interfaces and actual implementations. - * - * $Id$ - * @author lenz - */ -public class DefMapper { - - List mymodels = new ArrayList(); - List knownModels = new ArrayList(); - - List myAPIs = new ArrayList(); - - Map interfaces = new HashMap(); - String myAbsoluteProjectFolder = "."; - - - /** - * Loads definitions from a module. - * - * @param f The source .json file - * @param apiVersion The version of the API we are working with - * @param modelHasEvents whether this file generates WS events - * @throws IOException - */ - - - public void parseJsonDefinition( File f, String apiVersion, boolean modelHasEvents ) throws IOException { - - ObjectMapper om = new ObjectMapper(); - System.out.println( "Loading as: " + f.getAbsolutePath() ); - - JsonNode rootNode = om.readTree(f); - List lModels = loadModels(rootNode.get("models"), f, apiVersion ); - Apis api1 = loadApis( rootNode.get("apis"), f, apiVersion ); - - mymodels.addAll(lModels); - myAPIs.add(api1); - - if ( modelHasEvents ) { - - Model typeMessage = null; - List otherModels = new ArrayList(); - - for ( Model m: lModels ) { - if ( m.className.equalsIgnoreCase("Message") ) { - typeMessage = m; - } else { - otherModels.add(m); - } - } - - String defs = ""; - for ( Model m: otherModels ) { - if ( defs.length() > 0 ) { - defs += ", "; - } - defs += "@Type(value = " + m.getImplName() + ".class, name = \"" + m.getInterfaceName() + "\")\n"; - } - - typeMessage.additionalPreambleText = "" - + " @JsonTypeInfo( " - + " use = JsonTypeInfo.Id.NAME, " - + " include = JsonTypeInfo.As.PROPERTY, " - + " property = \"type\") \n " - + " @JsonSubTypes({ " - + defs - + " }) \n\n"; - - typeMessage.imports.add("com.fasterxml.jackson.annotation.JsonSubTypes"); - typeMessage.imports.add("com.fasterxml.jackson.annotation.JsonSubTypes.Type"); - typeMessage.imports.add("com.fasterxml.jackson.annotation.JsonTypeInfo"); - - } - - // Now generate the interface - for ( Model m: mymodels ) { - JavaInterface j = interfaces.get(m.getInterfaceName()); - if ( j == null ) { - j = new JavaInterface(); - j.pkgName = "ch.loway.oss.ari4java.generated"; - j.className = m.getInterfaceName(); - interfaces.put(m.getInterfaceName(), j); - } - - m.registerInterfaces(j, apiVersion); - } - - //for ( Apis api: myAPIs ) { - JavaInterface j = interfaces.get(api1.getInterfaceName()); - if ( j == null ) { - j = new JavaInterface(); - j.pkgName = "ch.loway.oss.ari4java.generated"; - j.className = api1.getInterfaceName(); - interfaces.put(api1.getInterfaceName(), j); - } - - api1.registerInterfaces(j, apiVersion); - //} - -// // -// for ( String ifName: interfaces.keySet() ) { -// JavaInterface ji = interfaces.get(ifName); -//// saveToDisk(ji); -// } - - } - - /** - * Generate all files. - * - * - * @throws IOException - */ - - public void generateAllClasses() throws IOException { - AriBuilderInterface abi = generateInterfaces(); - generateModels(); - generateApis(); - generateProperties( abi ); - generateImplementationClasses( abi ); - } - - /** - * Generate all interfaces. - * - * @throws IOException - */ - - public AriBuilderInterface generateInterfaces() throws IOException { - // - AriBuilderInterface abi = new AriBuilderInterface(); - for ( String ifName: interfaces.keySet() ) { - JavaInterface ji = interfaces.get(ifName); - abi.knownInterfaces.add(ifName); - saveToDisk(ji); - } - - // generate the AriBuilder class - saveToDisk( "classes/", "ch.loway.oss.ari4java.generated", "AriBuilder", abi.toString() ); - return abi; - } - - /** - * Generates a model. - * For each model. let's find out the minimal interface it should implement. - * - * @throws IOException - */ - - public void generateModels() throws IOException { - for (Model m : mymodels) { - String minIf = m.getInterfaceName(); - JavaInterface ji = interfaces.get(minIf); - - m.setMinimalInterface(ji); - saveToDisk(m); - } - } - - /** - * Save APIs to disk. - * - * @throws IOException - */ - - public void generateApis() throws IOException { - for ( Apis api: myAPIs ) { - String minIf = api.getInterfaceName(); - JavaInterface ji = interfaces.get(minIf); - - api.setMinimalInterface(ji); - saveToDisk(api); - } - } - - /** - * Write a properties file for each API version. - * - * @throws IOException - */ - - public void generateProperties( AriBuilderInterface abi ) throws IOException { - - Map> mM = new HashMap>(); - Map> mA = new HashMap>(); - - for ( Apis api: myAPIs ) { - String ver = api.apiVersion; - if ( !mA.containsKey(ver) ) { - mA.put( ver, new HashSet() ); - } - - mA.get(ver).add(api); - } - - for ( Model mod: mymodels ) { - String ver = mod.apiVersion; - if ( !mM.containsKey(ver) ) { - mM.put( ver, new HashSet() ); - } - - mM.get(ver).add(mod); - } - - for ( String ver: mM.keySet() ) { - //writeProperties(ver, mA.get(ver), mM.get(ver)); - writeAriBuilder(ver, abi, mA.get(ver), mM.get(ver)); - } - - } - - /** - * Generates the translators from the abstract class to the concrete one. - * - * @param abi - * @throws IOException - */ - - public void generateImplementationClasses( AriBuilderInterface abi ) throws IOException { - - Map mTranslators = new HashMap(); - - for ( Apis api: myAPIs ) { - String ver = api.apiVersion; - ClassTranslator ct = getClassTranslator(mTranslators, ver); - ct.setClass( api.className, api.className + "_impl_" + ver ); - } - - for ( Model mod: mymodels ) { - String ver = mod.apiVersion; - ClassTranslator ct = getClassTranslator(mTranslators, ver); - ct.setClass( mod.className, mod.className + "_impl_" + ver ); - } - - for ( ClassTranslator ct: mTranslators.values() ) { - saveToDisk(ct); - } - } - - - - private ClassTranslator getClassTranslator( Map mTranslators, String apiVer ) { - if ( !mTranslators.containsKey( apiVer ) ) { - ClassTranslator ct = new ClassTranslator(); - ct.apiVersion = apiVer; - mTranslators.put( apiVer, ct ); - } - return mTranslators.get( apiVer); - } - - - /** - * - * @param f - * @return - */ - - private String genActionClassName(File f) { - String fileName = f.getName().replace(".json", ""); - return JavaGen.addPrefixAndCapitalize( "Action", fileName ); - } - - private List loadModels(JsonNode models, File f, String apiVersion) throws IOException { - - List lModelsAdded = new ArrayList(); - - for (JsonNode modelName : models) { - // Creazione di un modello - Model currentModel = new Model(); - String thisModel = txt(modelName.get("id")); - String thisModelDesc = txt(modelName.get("description")); - - currentModel.setPackageInfo(thisModel, apiVersion); - currentModel.description = thisModelDesc; - currentModel.comesFromFile = f.getName(); - currentModel.extendsModel = extendsObject(modelName); - currentModel.subTypes = subTypes(modelName); - knownModels.add(thisModel); - - JsonNode properties = modelName.get("properties"); - Iterator propNames = properties.fieldNames(); - while (propNames.hasNext()) { - String field = propNames.next(); - JsonNode property = properties.get(field); - - String javaType = remapAbstractType(txt(property.get("type"))); - String javaConcreteType = remapConcreteType(txt(property.get("type")), apiVersion); - - String comment = txt(property.get("description")); - ModelField mf = new ModelField(); - mf.field = field; - mf.typeInterface = javaType; - mf.typeConcrete = javaConcreteType; - mf.comment = comment; - currentModel.fields.add(mf); - } - - lModelsAdded.add(currentModel); - - } - for (Model m : lModelsAdded) { - if (m.subTypes != null) { - for (Model mm : lModelsAdded) { - if (m.subTypes.contains(mm.className)) { - mm.extendsModel = remapAbstractType(m.className); - } - } - } - } - - return lModelsAdded; - } - - - private Apis loadApis(JsonNode apis, File f, String apiVersion ) throws IOException { - - Apis api = new Apis(); - - api.setPackageInfo( genActionClassName(f), apiVersion); - - - for (JsonNode apiEntry : apis) { - - Action action = new Action(); - action.path = txt(apiEntry.get("path")); - action.description = txt(apiEntry.get("description")); - action.javaFile = f.getName(); - - for (JsonNode operation : apiEntry.get("operations")) { - Operation op = new Operation(); - action.operations.add(op); - op.method = txt(operation.get("httpMethod")); - if ("websocket".equalsIgnoreCase(txt(operation.get("upgrade")))) { - op.wsUpgrade = true; - } - op.nickname = txt(operation.get("nickname")); - op.responseInterface = remapAbstractType(txt(operation.get("responseClass"))); - op.responseConcreteClass = remapConcreteType(txt(operation.get("responseClass")), apiVersion); - op.description = txt(operation.get("summary") ) + "\n" + txt(operation.get("notes") ); - - JsonNode parameters = operation.get("parameters"); - if (parameters != null) { - for (JsonNode parameter : parameters) { - Operation.Param p = new Operation.Param(); - p.javaType = remapAbstractType(txt(parameter.get("dataType"))); - p.name = txt(parameter.get("name")); - p.required = txt(parameter.get("required")).equalsIgnoreCase("true"); - p.type = Operation.ParamType.build( txt(parameter.get("paramType"))); - - op.parms.add(p); - - } - } - - JsonNode errorResponses = operation.get("errorResponses"); - if (errorResponses != null) { - for (JsonNode errorResponse : errorResponses) { - Operation.ErrorResp err = new Operation.ErrorResp(); - err.code = errorResponse.get("code").asInt(); - err.reason = errorResponse.get("reason").asText(); - op.errorCodes.add(err); - } - } - - - } - - //System.out.println( action.toString() ); - api.actions.add(action); - } - - myAPIs.add(api); - - return api; - - } - - public void saveToDisk( String baseJavaClasses, String pkgName, String className, String classText ) throws IOException { - - String fName = myAbsoluteProjectFolder + "/" - + baseJavaClasses - + pkgName.replace(".", "/" ) - + "/" - + className + ".java"; - - FileWriter outFile = new FileWriter( fName ); - PrintWriter out = new PrintWriter(outFile); - out.println( classText ); - out.close(); - - } - - public void saveToDisk( Model model ) throws IOException { - saveToDisk( "classes/", model.getModelPackage(), model.getImplName(), model.toString() ); - } - - public void saveToDisk( Apis api ) throws IOException { - saveToDisk( "classes/", api.getActionsPackage(), api.getImplName(), api.toString() ); - } - - public void saveToDisk( JavaInterface ji ) throws IOException { - saveToDisk( "classes/", "ch.loway.oss.ari4java.generated", ji.className, ji.toString() ); - } - - public void saveToDisk( ClassTranslator ct ) throws IOException { - saveToDisk( "classes/", ct.getBaseApiPackage(), ct.getImplName(), ct.toString() ); - } - - - public void clean(String apiVersion) throws IOException { - String base = "classes/ch/loway/oss/ari4java/generated"; - cleanPath(base+"/"+apiVersion+"/actions"); - cleanPath(base+"/"+apiVersion+"/models"); - } - - private void cleanPath(String path) throws IOException { - System.out.println("clean: "+path); - File p = new File(path); - p.mkdirs(); - for (File f : p.listFiles()) { - if (f.isFile()) { - f.delete(); - } - } - } - - - private String txt( JsonNode n ) { - if ( n == null ) { - return ""; - } else { - return n.asText(); - } - } - - public String extendsObject( JsonNode model ) { - if ( model.get( "extends" ) != null ) { - return remapAbstractType( model.get("extends").asText() ); - } - return ""; - } - - public Set subTypes( JsonNode model ) { - Set result = new HashSet(); - if (model.get("subTypes") != null) { - JsonNode st = model.get("subTypes"); - if (st instanceof ArrayNode) { - ArrayNode sta = (ArrayNode) st; - for (int i = 0; i < sta.size(); i++) { - result.add(sta.get(i).asText()); - } - } - } - return result; - } - - public String remapAbstractType( String jsonType ) { - return innerRemapType(jsonType, false, ""); - } - - public String remapConcreteType( String jsonType, String apiVersion ) { - return innerRemapType(jsonType, true, apiVersion); - } - - - public String innerRemapType( String jsonType, boolean concrete, String apiVersion ) { - - String listAry = "List["; - - if ( jsonType.startsWith( listAry ) ) { - return (concrete ? "List<" : "List<") + innerRemapType( jsonType.substring(listAry.length(), jsonType.length()-1 ), concrete, apiVersion ) + ">"; - } - else - if ( JavaPkgInfo.TypeMap.containsKey( jsonType.toLowerCase() ) ) { - return JavaPkgInfo.TypeMap.get( jsonType.toLowerCase() ); - } - else - { - return jsonType + ( concrete ? "_impl_" + apiVersion : "" ); - } - } - -// /** -// * Writes implemenattion mappings. -// * -// * -// * @param apiVersion -// * @throws IOException -// */ -// -// private void writeProperties( String apiVersion, Collection apis, Collection models ) throws IOException { -// String base = myAbsoluteProjectFolder -// + "/classes" -// + "/ch/loway/oss/ari4java/generated"; -// String fName = base + "/" + apiVersion + ".properties"; -// FileWriter outFile = new FileWriter(fName); -// PrintWriter out = new PrintWriter(outFile); -// out.println("# Implementation mapping for "+apiVersion); -// for (Apis api : apis) { -// String prop = "ch.loway.oss.ari4java.generated." -// + api.getInterfaceName() -// + " = " + api.getActionsPackage()+"."+api.getImplName(); -// out.println(prop); -// } -// for (Model m : models) { -// String prop = "ch.loway.oss.ari4java.generated." -// + m.getInterfaceName() -// + " = " + m.getModelPackage()+"."+m.getImplName(); -// out.println(prop); -// } -// out.close(); -// } - - - private void writeAriBuilder( String apiVersion, AriBuilderInterface abi, Collection apis, Collection models ) throws IOException { - - String thisClass = "AriBuilder_impl_" + apiVersion; - List ifToImplement = new ArrayList( abi.knownInterfaces ); - - StringBuilder sb = new StringBuilder(); - JavaGen.importClasses(sb, "ch.loway.oss.ari4java.generated." + apiVersion, - Arrays.asList( new String[] { - "ch.loway.oss.ari4java.generated." + apiVersion + ".models.*" , - "ch.loway.oss.ari4java.generated." + apiVersion + ".actions.*", - "ch.loway.oss.ari4java.generated.*", - "ch.loway.oss.ari4java.ARI" - })); - - sb.append("public class ").append( thisClass ).append( " implements AriBuilder {\n\n"); - - for (Apis api : apis) { - String ifc = api.getInterfaceName(); - ifToImplement.remove(ifc); - sb.append( AriBuilderInterface.getMethod( ifc, apiVersion) ); - } - - for (Model m : models) { - String ifc = m.getInterfaceName(); - ifToImplement.remove(ifc); - sb.append( AriBuilderInterface.getMethod( ifc, apiVersion) ); - } - - // do we have any unimplemented interface? - for ( String ifc: ifToImplement ) { - sb.append( AriBuilderInterface.getUnimplemented(ifc) ); - } - - sb.append( "public ARI.ClassFactory getClassFactory() {\n" - + " return new ClassTranslator_impl_" + apiVersion + "();\n" - + "};\n\n" - ); - - sb.append( "};"); - - saveToDisk( "classes/", "ch.loway.oss.ari4java.generated." + apiVersion, thisClass, sb.toString() ); - - } - - /** - * Where the ari4java project resides. - * - * @param baseProjectFolder - */ - void setProjectFolder(String baseProjectFolder) { - myAbsoluteProjectFolder =baseProjectFolder; - } - -} diff --git a/codegen/ch/loway/oss/ari4java/codegen/VERSION.java b/codegen/ch/loway/oss/ari4java/codegen/VERSION.java deleted file mode 100644 index 372f6dc1..00000000 --- a/codegen/ch/loway/oss/ari4java/codegen/VERSION.java +++ /dev/null @@ -1,12 +0,0 @@ - -package ch.loway.oss.ari4java.codegen; - -/** - * - * - * @author lenz - */ -public class VERSION { - public static final String VER = "0.2"; -} - diff --git a/codegen/ch/loway/oss/ari4java/codegen/genJava/JavaGen.java b/codegen/ch/loway/oss/ari4java/codegen/genJava/JavaGen.java deleted file mode 100644 index ea48198c..00000000 --- a/codegen/ch/loway/oss/ari4java/codegen/genJava/JavaGen.java +++ /dev/null @@ -1,76 +0,0 @@ - -package ch.loway.oss.ari4java.codegen.genJava; - -import java.util.Date; -import java.util.List; - -/** - * A set of static methods to generate Java sources. - * - * @author lenz - */ -public class JavaGen { - - public static void importClasses( StringBuilder sb, String myPackage, List imports ) { - - sb.append( "package " ).append(myPackage).append( ";\n\n"); - - sb.append( "// ----------------------------------------------------\n") - .append( "// THIS CLASS WAS GENERATED AUTOMATICALLY \n") - .append( "// PLEASE DO NOT EDIT \n") - .append( "// Generated on: ").append( (new Date()).toString() ).append( "\n") - .append( "// ----------------------------------------------------\n\n"); - - - for ( String pkg: imports ) { - sb.append( "import " ).append( pkg ).append(";\n"); - } - sb.append( "\n" ); - - } - - public static void addBanner( StringBuilder sb, String multiLineBanner ) { - - String[] rows = multiLineBanner.split("\n"); - - sb.append( "/**********************************************************\n"); - - for (String row: rows ) { - sb.append( " * " ).append(row).append( "\n"); - } - sb.append( " *********************************************************/\n"); - - } - - public static void addBanner( StringBuilder sb, String multilineBanner, String sinceVersion ) { - multilineBanner += "\n\n@since " + sinceVersion; - addBanner(sb, multilineBanner); - } - - - public static String addPrefixAndCapitalize( String prefix, String field ) { - - return prefix + field.substring(0,1).toUpperCase() + field.substring(1); - - - } - - public static String addAsyncCallback(String response) { - return "AriCallback<"+response.replaceAll("^void$", "Void")+"> callback"; - } - - public static void emptyLines( StringBuilder sb, int nLines ) { - for ( int i =0; i< nLines; i++ ) { - sb.append( "\n" ); - } - } - - public static void emptyLine( StringBuilder sb ) { - emptyLines(sb, 1); - } - - -} - -// $Log$ -// diff --git a/codegen/ch/loway/oss/ari4java/codegen/genJava/JavaInterface.java b/codegen/ch/loway/oss/ari4java/codegen/genJava/JavaInterface.java deleted file mode 100644 index f0a6f7c5..00000000 --- a/codegen/ch/loway/oss/ari4java/codegen/genJava/JavaInterface.java +++ /dev/null @@ -1,141 +0,0 @@ - -package ch.loway.oss.ari4java.codegen.genJava; - -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * - * - * @author lenz - */ -public class JavaInterface { - - public final List eventSources = Arrays.asList( new String[] { - "Bridge", - "Channel", - "Endpoint", - "DeviceState" - }); - - - - public String pkgName = ""; - public String className = ""; - public String since = ""; - - Map definitions = new HashMap(); - - public void iKnow( String signature, String method, String comment, String sinceVersion ) { - - StringBuilder sb = new StringBuilder(); - JavaGen.addBanner(sb, comment, sinceVersion); - sb.append( method ).append(";\n\n"); - - if ( !definitions.containsKey(signature) ) { - definitions.put( signature, sb.toString() ); - } - } - - - public JavaInterface createScratchCopy() { - JavaInterface ji = new JavaInterface(); - ji.pkgName = pkgName; - ji.className = className; - ji.since = since; - ji.definitions = new HashMap(definitions); - return ji; - } - - - - - - @Override - public String toString() { - - StringBuilder sb = new StringBuilder(); - - JavaGen.importClasses(sb, pkgName, Arrays.asList( new String[] { - "java.util.Date", - "java.util.List", - "java.util.Map", - "java.util.ArrayList", - "ch.loway.oss.ari4java.tools.RestException", - "ch.loway.oss.ari4java.tools.AriCallback", - "ch.loway.oss.ari4java.tools.tags.*" - })); - - - JavaGen.addBanner(sb, "\n" - + "Generated by: " + this.getClass().getSimpleName() + "\n" - ); - - JavaGen.emptyLines(sb, 2); - - - sb.append( "public interface ").append(className); - - if ( eventSources.contains( className )) { - sb.append( " extends EventSource " ); - } - - - sb.append(" {\n"); - - for ( String signature: definitions.keySet() ) { - sb.append( "\n// ").append( signature ).append("\n"); - sb.append( definitions.get( signature) ); - sb.append( "\n" ); - } - - - sb.append( "}\n;"); - return sb.toString(); - - } - - /** - * Removes a signature. - * When you serialize an object, you remove all required signatures. - * - * @param signature - */ - - public void removeSignature( String signature ) { - if ( definitions.containsKey(signature) ) { - definitions.remove(signature); - } else { - throw new IllegalArgumentException( "Signature not found: " + signature ); - } - } - - - public String getCodeToImplementMissingSignatures() { - if ( definitions.isEmpty() ) { - return "/** No missing signatures from interface */\n"; - } else { - - StringBuilder sb = new StringBuilder(); - - // generate empty methods that just throw an UnsupportedOperationException - for ( String s: definitions.values() ) { - - String replaceTo = "{\n" - + " throw new UnsupportedOperationException(\"Method availble from ...\");\n" - + "};"; - - s = s.replace(";", replaceTo); - - sb.append( s ); - } - - return sb.toString(); - - } - } - -} - diff --git a/codegen/ch/loway/oss/ari4java/codegen/genJava/JavaPkgInfo.java b/codegen/ch/loway/oss/ari4java/codegen/genJava/JavaPkgInfo.java deleted file mode 100644 index 71965408..00000000 --- a/codegen/ch/loway/oss/ari4java/codegen/genJava/JavaPkgInfo.java +++ /dev/null @@ -1,95 +0,0 @@ - -package ch.loway.oss.ari4java.codegen.genJava; - -import java.util.HashMap; -import java.util.Map; - -/** - * - * - * @author lenz - */ -public class JavaPkgInfo { - - public final static Map TypeMap; - - static { - TypeMap = new HashMap(); - - TypeMap.put( "string", "String" ); - TypeMap.put( "long", "long" ); - TypeMap.put( "int", "int" ); - TypeMap.put( "double", "double" ); - TypeMap.put( "date", "Date" ); - TypeMap.put( "object", "String" ); - TypeMap.put( "boolean", "boolean" ); - TypeMap.put( "binary", "byte[]" ); - TypeMap.put( "containers", "Map" ); - - - } - - - String base = "ch.loway.oss.ari4java.generated"; - - public String className = ""; - public String apiVersion = ""; - public JavaInterface minimalIf = null; - - public void setPackageInfo( String classN, String apiV ) { - className = classN; - apiVersion = apiV; - } - - - public String getInterfacePackage() { - return base + "." + className; - } - - public String getBaseApiPackage() { - return base + "." + apiVersion; - } - - public String getModelPackage() { - return getBaseApiPackage() + "." + "models"; - } - - public String getActionsPackage() { - return getBaseApiPackage() + "." + "actions"; - } - - public String getInterfaceName() { - String s = className.substring(0, 1).toUpperCase() + className.substring(1); - return s; - } - - public String getImplName() { - return className + "_impl_" + apiVersion; - } - - /** - * This is a "minimal" interface that has to be implemented at all costs. - * - * @param i - */ - - public void setMinimalInterface( JavaInterface i ) { - minimalIf = i; - } - - /** - * Gets a copy of the current base interface. - * This is meant to have signatures removed as they are written. - * - * @return - */ - - public JavaInterface getBaseInterface() { - if ( minimalIf == null ) { - return new JavaInterface(); - } else { - return minimalIf.createScratchCopy(); - } - } - -} diff --git a/codegen/ch/loway/oss/ari4java/codegen/models/Action.java b/codegen/ch/loway/oss/ari4java/codegen/models/Action.java deleted file mode 100644 index 0e01d339..00000000 --- a/codegen/ch/loway/oss/ari4java/codegen/models/Action.java +++ /dev/null @@ -1,61 +0,0 @@ - -package ch.loway.oss.ari4java.codegen.models; - -import ch.loway.oss.ari4java.codegen.genJava.JavaInterface; -import java.util.ArrayList; -import java.util.List; - -/** - * - * - * @author lenz - */ -public class Action implements Comparable { - - public String path = ""; - public String description = ""; - public List operations = new ArrayList(); - public String javaFile = ""; - - @Override - public String toString() { - - StringBuilder sb = new StringBuilder(); - - for ( Operation o: operations ) { - sb.append( o.toJava(this) ); - } - - return sb.toString(); - - } - - void registerInterfaces(JavaInterface j, String apiVersion) { - for ( Operation o: operations ) { - String javaSignature = o.getSignature(); - String definition = o.getDefinition(); - - j.iKnow(javaSignature, definition, o.description, apiVersion ); - j.iKnow(o.getSignatureAsync(), o.getDefinitionAsync(), "", apiVersion); - } - } - - /** - * Per ordine alfabetico. - * - * @param o - * @return - */ - - @Override - public int compareTo(Action o) { - return path.compareToIgnoreCase( o.path ); - } - - - - - - -} - diff --git a/codegen/ch/loway/oss/ari4java/codegen/models/Apis.java b/codegen/ch/loway/oss/ari4java/codegen/models/Apis.java deleted file mode 100644 index 656396ea..00000000 --- a/codegen/ch/loway/oss/ari4java/codegen/models/Apis.java +++ /dev/null @@ -1,85 +0,0 @@ - -package ch.loway.oss.ari4java.codegen.models; - -import ch.loway.oss.ari4java.codegen.genJava.JavaGen; -import ch.loway.oss.ari4java.codegen.genJava.JavaInterface; -import ch.loway.oss.ari4java.codegen.genJava.JavaPkgInfo; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.List; - -/** - * - * - * @author lenz - */ -public class Apis extends JavaPkgInfo { - - public List actions = new ArrayList(); - - @Override - public String toString() { - - StringBuilder sb = new StringBuilder(); - JavaInterface ji = getBaseInterface(); - - JavaGen.importClasses(sb, getActionsPackage(), Arrays.asList( new String[] { - "ch.loway.oss.ari4java.generated.*", - "java.util.Date", - "java.util.List", - "java.util.Map", - "java.util.ArrayList", - "ch.loway.oss.ari4java.tools.BaseAriAction", - "ch.loway.oss.ari4java.tools.RestException", - "ch.loway.oss.ari4java.tools.AriCallback", - "ch.loway.oss.ari4java.tools.HttpParam", - "ch.loway.oss.ari4java.tools.HttpResponse", - "com.fasterxml.jackson.core.type.TypeReference", - getModelPackage() + ".*" - } )); - - JavaGen.addBanner(sb, "\n" - + "Generated by: " + this.getClass().getSimpleName() + "\n" - ); - - JavaGen.emptyLines(sb, 2); - - sb.append( "public class " ).append( getImplName() ) - .append(" extends BaseAriAction ") - .append(" implements ") - .append( getInterfaceName() ) - .append( " {\n" ); - - Collections.sort(actions); - - for ( Action a: actions ) { - - for ( Operation o: a.operations ) { - ji.removeSignature( o.getSignature() ); - ji.removeSignature( o.getSignatureAsync() ); - } - - sb.append( a.toString() ); - } - - sb.append( ji.getCodeToImplementMissingSignatures() ); - - sb.append( "};\n"); - return sb.toString(); - - } - - public void registerInterfaces(JavaInterface j, String interfaceVersion) { - for ( Action a: actions ) { - a.registerInterfaces( j, interfaceVersion ); - } - } - - - - -} - -// $Log$ -// diff --git a/codegen/ch/loway/oss/ari4java/codegen/models/AriBuilderInterface.java b/codegen/ch/loway/oss/ari4java/codegen/models/AriBuilderInterface.java deleted file mode 100644 index d93091ff..00000000 --- a/codegen/ch/loway/oss/ari4java/codegen/models/AriBuilderInterface.java +++ /dev/null @@ -1,90 +0,0 @@ - -package ch.loway.oss.ari4java.codegen.models; - -import ch.loway.oss.ari4java.codegen.genJava.JavaGen; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.List; - -/** - * The interface AriBuilder - it builds ARI objects of the required type. - * - * @author lenz - */ -public class AriBuilderInterface { - - public List knownInterfaces = new ArrayList(); - - - @Override - public String toString() { - - StringBuilder sb = new StringBuilder(); - JavaGen.importClasses(sb, "ch.loway.oss.ari4java.generated", - Arrays.asList( new String[] { - "ch.loway.oss.ari4java.ARI" - } ) - ); - - - sb.append( "public interface AriBuilder {\n" ); - - Collections.sort(knownInterfaces); - - for ( String iface: knownInterfaces ) { - sb.append( " public abstract ").append( iface ) - .append( " " ).append( lcFirst(iface) ).append("();\n"); - } - - - sb.append( "\n\n" - + "\tpublic abstract ARI.ClassFactory getClassFactory();\n\n"); - - - sb.append( "\n}\n"); - - return sb.toString(); - - } - - - /** - * Rende minuscolo il primo carattere. - * - * @param s - * @return - */ - - private static String lcFirst( String s ) { - if ( s.length() > 1 ) { - - String s1 = s.substring(0,1); - String s2 = s.substring(1); - - return s1.toLowerCase() + s2; - - } else { - return s; - } - } - - public static String getMethod( String ifName, String apiVer ) { - - String s = "public " + ifName + " " + lcFirst(ifName) + "() {\n" - + " return new " + ifName + "_impl_" + apiVer + "();\n };\n\n"; - - return s; - } - - public static String getUnimplemented( String ifName ) { - String s = "public " + ifName + " " + lcFirst(ifName) + "() {\n" - + " throw new UnsupportedOperationException();\n };\n\n"; - - return s; - } - -} - -// $Log$ -// diff --git a/codegen/ch/loway/oss/ari4java/codegen/models/ClassTranslator.java b/codegen/ch/loway/oss/ari4java/codegen/models/ClassTranslator.java deleted file mode 100644 index 22cb8b8a..00000000 --- a/codegen/ch/loway/oss/ari4java/codegen/models/ClassTranslator.java +++ /dev/null @@ -1,103 +0,0 @@ -package ch.loway.oss.ari4java.codegen.models; - -import ch.loway.oss.ari4java.codegen.genJava.JavaGen; -import ch.loway.oss.ari4java.codegen.genJava.JavaPkgInfo; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * This class models a ClassTranslator. - * - * @author lenz - */ -public class ClassTranslator extends JavaPkgInfo { - - public Map mInterfaces; - public List imports; - - public ClassTranslator() { - super(); - mInterfaces = new HashMap(); - imports = new ArrayList(); - className = "ClassTranslator"; - imports.add("ch.loway.oss.ari4java.ARI" ); - imports.add( "ch.loway.oss.ari4java.generated.*" ); - } - - - - public void setClass( String ifName, String implementation ) { - mInterfaces.put(ifName, implementation); - } - - /** - * Writes an interface translator. - * - * public class SampleClassFactory implements ARI.ClassFactory { - * - * @Override - * public Class getImplementationFor(Class interfaceClass) { - * - * if ( interfaceClass.equals(ActionBridges.class) ) { - ** return ActionBridges_impl_ari_0_0_1.class; - * } else - * { - * return null; - * } - * } - * } - * - * - * @return - */ - - @Override - public String toString() { - - imports.add("ch.loway.oss.ari4java.generated." + apiVersion +".models.*"); - imports.add("ch.loway.oss.ari4java.generated." + apiVersion +".actions.*"); - - StringBuilder sb = new StringBuilder(); - - JavaGen.importClasses(sb, getBaseApiPackage(), imports); - - JavaGen.addBanner(sb, "This is a class translator." + "\n\n" ); - - //sb.append(additionalPreambleText).append( "\n" ); - - List ifNames = new ArrayList(mInterfaces.keySet()); - Collections.sort( ifNames ); - - sb.append( - "public class " + getImplName() + " implements ARI.ClassFactory {\n" + - "\n" + - " @Override\n" + - " public Class getImplementationFor(Class interfaceClass) { \n" ); - - for ( String ifName: ifNames ) { - String impl = mInterfaces.get(ifName); - - sb.append( "\n" - + "\tif ( interfaceClass.equals(") - .append( ifName ) - .append( ".class) ) {\n" - + "\t return (" ) - .append( impl ) - .append(".class);\n" - + "\t} else \n" ); - } - - sb.append( - " {\n" + - " return null;\n" + - " }\n" + - " }\n" + - "}\n\n" ); - return sb.toString(); - } - - -} diff --git a/codegen/ch/loway/oss/ari4java/codegen/models/Model.java b/codegen/ch/loway/oss/ari4java/codegen/models/Model.java deleted file mode 100644 index fca78bc7..00000000 --- a/codegen/ch/loway/oss/ari4java/codegen/models/Model.java +++ /dev/null @@ -1,128 +0,0 @@ - -package ch.loway.oss.ari4java.codegen.models; - -import ch.loway.oss.ari4java.codegen.genJava.JavaGen; -import ch.loway.oss.ari4java.codegen.genJava.JavaInterface; -import ch.loway.oss.ari4java.codegen.genJava.JavaPkgInfo; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.Set; - -/** - * - * - * $Id$ - * @author lenz - */ -public class Model extends JavaPkgInfo { - - public String description = ""; - public String extendsModel = ""; - public Set subTypes; - public String comesFromFile = ""; - public List implementsInterafaces = new ArrayList(); - - public List imports = new ArrayList(); - public List fields = new ArrayList(); - - public String additionalPreambleText = ""; - - - public Model() { - imports.add( "java.util.Date" ); - imports.add( "java.util.List" ); - imports.add( "java.util.Map" ); - imports.add( "ch.loway.oss.ari4java.generated.*"); - imports.add( "com.fasterxml.jackson.databind.annotation.JsonDeserialize" ); - } - - - - @Override - public String toString() { - - Collections.sort(imports); - Collections.sort( fields ); - Collections.sort( implementsInterafaces ); - - JavaInterface ji = getBaseInterface(); - - StringBuilder sb = new StringBuilder(); - - JavaGen.importClasses(sb, getModelPackage(), imports); - - JavaGen.addBanner(sb, description + "\n\n" - + "Defined in file: " + comesFromFile + "\n" - + "Generated by: " + this.getClass().getSimpleName() - ); - - sb.append(additionalPreambleText).append( "\n" ); - - sb.append( "public class " ).append( getImplName() ); - - // concrete implementation for the model to be extended - if ( extendsModel.length() > 0 ) { - - JavaPkgInfo jpi = new JavaPkgInfo(); - jpi.setPackageInfo(extendsModel, apiVersion); - - sb.append( " extends " ).append( jpi.getImplName() ); - } - - sb.append( " implements " ); - - - for ( String inf: implementsInterafaces ) { - sb.append( inf ).append( ", " ); - } - - sb.append( getInterfaceName() ).append( ", "); - sb.append( "java.io.Serializable {\n" ); - sb.append( "private static final long serialVersionUID = 1L;\n"); - - for ( ModelField mf: fields) { - ji.removeSignature( mf.getSignatureGet() ); - ji.removeSignature( mf.getSignatureSet() ); - - sb.append( mf.toString() ); - } - - sb.append( ji.getCodeToImplementMissingSignatures() ); - - sb.append( "}\n" ); - return sb.toString(); - - - } - - - public void registerInterfaces( JavaInterface j, String apiVersion ) { - - for ( ModelField mf: fields) { - String signature = mf.getSignatureGet(); - String declaration = mf.getDeclarationGet(); - String comment = mf.comment; - - j.iKnow(signature, declaration, comment, apiVersion); - } - - for ( ModelField mf: fields) { - String signature = mf.getSignatureSet(); - String declaration = mf.getDeclarationSet(); - String comment = mf.comment; - - j.iKnow(signature, declaration, comment, apiVersion); - } - - - - - - } - - -} - -// $Log$ -// diff --git a/codegen/ch/loway/oss/ari4java/codegen/models/ModelField.java b/codegen/ch/loway/oss/ari4java/codegen/models/ModelField.java deleted file mode 100644 index 256516f1..00000000 --- a/codegen/ch/loway/oss/ari4java/codegen/models/ModelField.java +++ /dev/null @@ -1,91 +0,0 @@ - -package ch.loway.oss.ari4java.codegen.models; - -import ch.loway.oss.ari4java.codegen.genJava.JavaGen; - -/** - * - * - * $Id$ - * @author lenz - */ -public class ModelField implements Comparable { - - public String field = ""; - public String typeInterface = ""; - public String typeConcrete = ""; - public boolean required = false; - public String comment = ""; - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - - sb.append( " /** " ) - .append( comment ) - .append(" */\n"); - sb.append( " private ").append( typeInterface ).append( " ").append( field ).append( ";\n" ); - - sb.append( getDeclarationGet() ).append(" {\n"); - sb.append( " return ").append(field).append(";\n }\n\n"); - - if ( typeConcrete.startsWith("List") ) { - String innerType = typeConcrete.substring(5, typeConcrete.length()-1); - sb.append(" @JsonDeserialize( contentAs=").append(innerType).append(".class )\n"); - } else { - sb.append(" @JsonDeserialize( as=").append(typeConcrete).append(".class )\n"); - } - sb.append( getDeclarationSet() ).append( " {\n"); - sb.append( " ").append( field).append(" = val;\n }\n\n"); - - return sb.toString(); - } - - - - - - - private String getterName( String field ) { - return JavaGen.addPrefixAndCapitalize( "get", field ); - } - - private String setterName( String field ) { - return JavaGen.addPrefixAndCapitalize( "set", field ); - } - - - - - - - public String getSignatureGet() { - return typeInterface + " " + getterName(field); - } - - public String getSignatureSet() { - return "void " + setterName(field) + " " + typeInterface; - } - - public String getDeclarationGet() { - StringBuilder sb = new StringBuilder(); - sb.append( " public ").append(typeInterface).append(" ").append( getterName(field) ).append("()" ); - return sb.toString(); - } - - public String getDeclarationSet() { - StringBuilder sb = new StringBuilder(); - sb.append( " public void ").append( setterName(field) ).append("(") .append( typeInterface ).append(" val )" ); - return sb.toString(); - } - - @Override - public int compareTo(ModelField o) { - ModelField mf2 = o; - return field.compareTo( mf2.field ); - } - - - -} - diff --git a/codegen/ch/loway/oss/ari4java/codegen/models/Operation.java b/codegen/ch/loway/oss/ari4java/codegen/models/Operation.java deleted file mode 100644 index 7db4af3b..00000000 --- a/codegen/ch/loway/oss/ari4java/codegen/models/Operation.java +++ /dev/null @@ -1,295 +0,0 @@ - -package ch.loway.oss.ari4java.codegen.models; - -import ch.loway.oss.ari4java.codegen.genJava.JavaGen; -import java.util.ArrayList; -import java.util.List; - -/** - * - * - * $Id$ - * @author lenz - */ -public class Operation { - - public String method = ""; - public boolean wsUpgrade = false; - public String nickname = ""; - public String responseConcreteClass = ""; - public String responseInterface = ""; - - public String description = ""; - - public List parms = new ArrayList(); - public List errorCodes = new ArrayList(); - - private String toParmList(boolean withType) { - StringBuilder sb = new StringBuilder(); - boolean firstItem = true; - for ( Param p: parms ) { - if ( firstItem ) { - firstItem = false; - } else { - sb.append( ", "); - } - if (withType) - sb.append( p.javaType ).append( " " ); - sb.append( p.name ); - } - return sb.toString(); - } - - public String toJava( Action parent ) { - - StringBuilder sb = new StringBuilder(); - - JavaGen.addBanner(sb, parent.description + "\n\n" + description ); - - // search and replace URI parameters - String stUri = parent.path; - for ( Param p: parms ) { - if ( p.type == ParamType.PATH ) { - stUri = stUri.replace("{" + p.name + "}", "\" + " + p.name + " + \"" ); - } - } - // 1. Private helper method - String helperName = JavaGen.addPrefixAndCapitalize("build", nickname); - sb.append( "private void "); - sb.append(helperName); - sb.append("("+toParmList(true)+") {\n"); - sb.append( "reset();\n"); - sb.append( "url = \"").append( stUri ).append( "\";\n"); - sb.append( "method = \"").append( method ).append( "\";\n"); - for ( Param p: parms ) { - if ( p.type == ParamType.QUERY ) { - sb.append( "lParamQuery.add( HttpParam.build( \"").append( p.name) - .append( "\", ").append( p.name ).append( ") );\n"); - } else if ( p.type == ParamType.FORM ) { - sb.append( "lParamForm.add( HttpParam.build( \"").append( p.name) - .append( "\", ").append( p.name ).append( ") );\n"); - } else if ( p.type == ParamType.BODY ) { - sb.append("lParamBody.addAll( HttpParam.build( \"").append( p.name) - .append( "\", ").append( p.name ).append( ") );\n"); - }; - } - for ( ErrorResp er: errorCodes ) { - sb.append( "lE.add( HttpResponse.build( ").append( er.code) - .append( ", \"").append( er.reason ).append( "\") );\n"); - } - if (wsUpgrade) { - sb.append( "wsUpgrade = true;\n"); - } - sb.append( "}\n\n"); - - if (!wsUpgrade) { - // 2. Synchronous method - sb.append( "@Override\n"); - sb.append( getDefinition() ); - sb.append( " {\n"); - // call helper - sb.append( helperName+"("+toParmList(false)+");\n"); - sb.append( "String json = httpActionSync();\n"); - if ( !responseInterface.equalsIgnoreCase("void")) { - - String deserializationType = responseConcreteClass + ".class"; - - if (responseConcreteClass.startsWith("List<") ) { - // (List) mapper.readValue( string, new TypeReference>() {}); - deserializationType = "new TypeReference<" + responseConcreteClass + ">() {}"; - sb.append( "return deserializeJsonAsAbstractList( json,\n ") - .append( deserializationType ) - .append(" ); \n"); - } else { - sb.append( "return deserializeJson( json, ") - .append( deserializationType ) - .append(" ); \n"); - } - - - - } - sb.append( "}\n\n"); - } else { - // Websocket dummy sync method - sb.append( "@Override\n"); - sb.append( getDefinition() ); - sb.append( " {\n"); - sb.append( "throw new RestException(\"No synchronous operation on WebSocket\");\n"); - sb.append( "}\n\n"); - } - - if (!wsUpgrade) { - // 3. Asynchronous method - sb.append( "@Override\n"); - sb.append( getDefinitionAsync() ); - sb.append( " {\n"); - // call helper - sb.append( helperName+"("+toParmList(false)+");\n"); - sb.append( "httpActionAsync(callback"); - - if (responseInterface.equalsIgnoreCase("void")) { - - } else { - String deserializationType = responseConcreteClass + ".class"; - if (responseConcreteClass.startsWith("List<") ) { - // (List) mapper.readValue( string, new TypeReference>() {}); - deserializationType = "new TypeReference<" + responseConcreteClass + ">() {}"; - } - sb.append( ", "+deserializationType ); - } - sb.append( ");\n"); - } else { - // Websocket async method - sb.append( "@Override\n"); - sb.append( getDefinitionAsync() ); - sb.append( " {\n"); - // call helper - sb.append( helperName+"("+toParmList(false)+");\n"); - sb.append( "httpActionAsync(callback"); - - if (responseInterface.equalsIgnoreCase("void")) { - - } else { - String deserializationType = responseConcreteClass + ".class"; - if (responseConcreteClass.startsWith("List<") ) { - // (List) mapper.readValue( string, new TypeReference>() {}); - deserializationType = "new TypeReference<" + responseConcreteClass + ">() {}"; - } - sb.append( ", "+deserializationType ); - } - sb.append( ");\n"); - } - - // String url = "/aaa/" + bbb + "/ccc"; - // List lP = new ArrayList(); - // addParm( lP, "name", value ); - // List lErr = new ArrayList(); - // addParm( lErr, val, "attr"); - // String json = service.do( url, Service.POST, params, errors ); - // return (myName) jsonBuilder( json, myName.class ) - - - sb.append( "}\n\n"); - - return sb.toString(); - } - - - public String getSignature() { - StringBuilder sb = new StringBuilder(); - sb.append( responseInterface ) - .append( " ") - .append( nickname ); - - for ( Param p: parms ) { - sb.append( " " ) - .append( p.javaType ); - } - - return sb.toString(); - - } - - public String getSignatureAsync() { - StringBuilder sb = new StringBuilder(); - sb.append("void ") - .append( nickname ); - - for ( Param p: parms ) { - sb.append( " " ) - .append( p.javaType ); - } - - sb.append(" "+JavaGen.addAsyncCallback(responseInterface)); - - return sb.toString(); - } - - public String getDefinition() { - StringBuilder sb = new StringBuilder(); - - sb.append( "public " ).append( responseInterface ) - .append( " " ).append( nickname ) - .append( "("); - - sb.append(toParmList(true)); - - sb.append( ") throws RestException" ); - return sb.toString(); - } - - public String getDefinitionAsync() { - StringBuilder sb = new StringBuilder(); - - sb.append( "public void " ) - .append( nickname ) - .append( "(" ); - - boolean firstItem = true; - for ( Param p: parms ) { - if ( firstItem ) { - firstItem = false; - } else { - sb.append( ", "); - } - sb.append( p.javaType ).append( " " ).append( p.name ); - } - if (!firstItem) - sb.append(", "); - sb.append(JavaGen.addAsyncCallback(responseInterface)); - - sb.append( ")" ); - return sb.toString(); - } - - - - /** - * A parameter as defined in Swagger - */ - - public static class Param { - public String name = ""; - public ParamType type = ParamType.PATH; - public String javaType = ""; - public boolean required = true; - } - - public static enum ParamType { - PATH, - QUERY, - BODY, - HEADER, - FORM; - - public static ParamType build( String s ) { - if ( s.equalsIgnoreCase("path") ) { - return PATH; - } else - if ( s.equalsIgnoreCase("query") ) { - return QUERY; - } else - if ( s.equalsIgnoreCase("form") ) { - return FORM; - } else - if ( s.equalsIgnoreCase("body") ) { - return BODY; - } else - { - throw new IllegalArgumentException("Would not know how to handle parameter of type " + s); - } - } - - } - - - public static class ErrorResp { - public int code = 0; - public String reason = ""; - } - -} - -// $Log$ -// diff --git a/codegen/ch/loway/oss/ari4java/codegen/run.java b/codegen/ch/loway/oss/ari4java/codegen/run.java deleted file mode 100644 index bc13bdd7..00000000 --- a/codegen/ch/loway/oss/ari4java/codegen/run.java +++ /dev/null @@ -1,72 +0,0 @@ - -package ch.loway.oss.ari4java.codegen; - -import java.io.File; -import java.io.IOException; - -/** - * - * - * $Id$ - * @author lenz - */ -public class run { - - //public static String SOURCES = "codegen-data/"; - - public static String PROJECT = "/Users/lenz/dev/github/ari4java"; - - public static String SOURCES = PROJECT + "/codegen-data/"; - - - public static String SRC_001 = SOURCES + "ari_0_0_1/"; - // D:\git\ari4java\codegen-data\ari_0_0_1 - - - public static void main( String [] argv ) throws IOException { - System.out.println("This is ARI4JAVA Code Generator version " + VERSION.VER ); - - DefMapper dm = new DefMapper(); - dm.setProjectFolder(PROJECT); - - loadAsteriskDefs( dm, "ari_0_0_1" ); - loadAsteriskDefs( dm, "ari_1_0_0" ); - loadAsteriskDefs( dm, "ari_1_5_0" ); - loadAsteriskDefs( dm, "ari_1_6_0" ); - loadAsteriskDefs( dm, "ari_1_7_0" ); - loadAsteriskDefs( dm, "ari_1_8_0" ); - loadAsteriskDefs( dm, "ari_1_9_0" ); - loadAsteriskDefs( dm, "ari_1_10_0" ); - - dm.generateAllClasses(); - - -// dm.writeProperties("ari_0_0_1"); - - } - - - private static void loadAsteriskDefs( DefMapper dm, String srcVer ) throws IOException { - - String srcDir = SOURCES + srcVer + "/"; - - dm.clean( srcVer ); - dm.parseJsonDefinition( new File(srcDir + "applications.json"), srcVer, false ); - dm.parseJsonDefinition( new File(srcDir + "asterisk.json"), srcVer, false ); - dm.parseJsonDefinition( new File(srcDir + "bridges.json"), srcVer, false ); - dm.parseJsonDefinition( new File(srcDir + "channels.json"), srcVer, false ); - dm.parseJsonDefinition( new File(srcDir + "endpoints.json"), srcVer, false ); - dm.parseJsonDefinition( new File(srcDir + "playbacks.json"), srcVer, false ); - dm.parseJsonDefinition( new File(srcDir + "recordings.json"), srcVer, false ); - dm.parseJsonDefinition( new File(srcDir + "sounds.json"), srcVer, false ); - dm.parseJsonDefinition( new File(srcDir + "deviceStates.json"), srcVer, false ); - dm.parseJsonDefinition( new File(srcDir + "events.json"), srcVer, true ); - - } - - - -} - -// $Log$ -// diff --git a/codegen/getApis.sh b/codegen/getApis.sh new file mode 100755 index 00000000..10413e09 --- /dev/null +++ b/codegen/getApis.sh @@ -0,0 +1,39 @@ +#!/usr/bin/env bash + +START_DIR=`pwd` + +if [ ! -d "tmp/asterisk" ] +then + mkdir tmp + cd tmp + git clone "https://github.com/asterisk/asterisk" + cd asterisk +else + cd tmp/asterisk + git checkout master --force + git pull origin +fi + +git log --tags --no-walk --reverse --pretty='%H %D' | while read log +do + IFS=' ' read -r -a array <<< "$log" + # skip 0.x 1.x, 10.x and 11.x + if [ "${array[2]:0:2}" = "0." ] || [ "${array[2]:0:2}" = "1." ] || \ + [ "${array[2]:0:3}" = "10." ] || [ "${array[2]:0:3}" = "11." ] || \ + [ "${array[2]:0:12}" = "certified/1." ] || [ "${array[2]:0:13}" = "certified/11." ]; then + continue + fi + # skip any -alpha -beta & -rc + if [[ "${array[2]}" == "-alpha" ]] || [[ "${array[2]}" == "-beta" ]] || [[ "${array[2]}" == "-rc" ]]; then + continue + fi + git checkout ${array[0]} --force > /dev/null + VER=`cat rest-api/resources.json | jq -r '.apiVersion'` + FOLDER="${VER//./_}" + echo $FOLDER + rm -rf ${START_DIR}/src/main/resources/codegen-data/ari_${FOLDER} + mkdir -p ${START_DIR}/src/main/resources/codegen-data/ari_${FOLDER} + cp rest-api/api-docs/*.json ${START_DIR}/src/main/resources/codegen-data/ari_${FOLDER} +done + +cd ${START_DIR} diff --git a/codegen/getVersions.sh b/codegen/getVersions.sh new file mode 100755 index 00000000..6755e779 --- /dev/null +++ b/codegen/getVersions.sh @@ -0,0 +1,42 @@ +#!/usr/bin/env bash + +START_DIR=`pwd` + +if [ ! -d "tmp/wiki" ] +then + mkdir -p ${START_DIR}/tmp/wiki +fi + +if [ ! -d "tmp/asterisk" ] +then + mkdir tmp + cd tmp + git clone "https://github.com/asterisk/asterisk" + cd asterisk +else + cd tmp/asterisk + git checkout master --force + git pull origin +fi + +cat ${START_DIR}/versions-template.md > ${START_DIR}/tmp/wiki/Asterisk-Version-to-ARI-Version.md + +git show-ref --tags | while read tags +do + IFS=' ' read -r -a array <<< "$tags" + # skip 0.x 1.x, 10.x and 11.x + if [ "${array[1]:0:12}" = "refs/tags/0." ] || [ "${array[1]:0:12}" = "refs/tags/1." ] || \ + [ "${array[1]:0:13}" = "refs/tags/10." ] || [ "${array[1]:0:13}" = "refs/tags/11." ] || \ + [ "${array[1]:0:22}" = "refs/tags/certified/1." ] || [ "${array[1]:0:23}" = "refs/tags/certified/11." ]; then + continue + fi + git checkout ${array[0]} --force > /dev/null 2>&1 + echo ${array[1]} + if [ -f "rest-api/resources.json" ]; then + VER=`cat rest-api/resources.json | jq -r '.apiVersion'` + echo ${VER} + echo "| ${array[1]:10} | ${VER} |" >> ${START_DIR}/tmp/wiki/Asterisk-Version-to-ARI-Version.md + fi +done + +cd ${START_DIR} diff --git a/codegen/src/main/java/ch/loway/oss/ari4java/codegen/DefMapper.java b/codegen/src/main/java/ch/loway/oss/ari4java/codegen/DefMapper.java new file mode 100755 index 00000000..05db620c --- /dev/null +++ b/codegen/src/main/java/ch/loway/oss/ari4java/codegen/DefMapper.java @@ -0,0 +1,692 @@ + +package ch.loway.oss.ari4java.codegen; + +import ch.loway.oss.ari4java.codegen.gen.JavaGen; +import ch.loway.oss.ari4java.codegen.gen.JavaInterface; +import ch.loway.oss.ari4java.codegen.gen.JavaPkgInfo; +import ch.loway.oss.ari4java.codegen.models.Action; +import ch.loway.oss.ari4java.codegen.models.Apis; +import ch.loway.oss.ari4java.codegen.models.AriBuilderInterface; +import ch.loway.oss.ari4java.codegen.models.ClassTranslator; +import ch.loway.oss.ari4java.codegen.models.Operation; +import ch.loway.oss.ari4java.codegen.models.Model; +import ch.loway.oss.ari4java.codegen.models.ModelField; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.node.ArrayNode; +import com.google.googlejavaformat.java.Formatter; +import com.google.googlejavaformat.java.FormatterException; + +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; +import java.io.PrintWriter; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.concurrent.atomic.AtomicBoolean; + +/** + * The model mapper keeps a list of interfaces and actual implementations. + *

+ * $Id$ + * + * @author lenz + */ +public class DefMapper { + + private final List vers = new ArrayList<>(); + private final List myModels = new ArrayList<>(); + private final List myAPIs = new ArrayList<>(); + private final Map interfaces = new HashMap<>(); + private final ObjectMapper om = new ObjectMapper(); + private final Formatter codeFormatter = new Formatter(); + private final Set messageInterfaces = new HashSet<>(); + private String outputFolder; + + /** + * Loads definitions from a module. + * + * @param f The source .json file + * @param apiVersion The version of the API we are working with + * @throws IOException when parse error + */ + public void parseJsonDefinition(File f, String apiVersion) throws IOException { + + if (!vers.contains(apiVersion)) { + vers.add(apiVersion); + } + + JsonNode rootNode = om.readTree(f); + + // check swagger version as the parser, Asterisk is currently using 1.1 + String currentVer = rootNode.get("swaggerVersion").asText(); + if (!"1.1".equalsIgnoreCase(currentVer) && !"1.2".equalsIgnoreCase(currentVer)) { + throw new RuntimeException("Unsupported Swagger Version: " + rootNode.get("swaggerVersion").asText() + + " for file " + f.getAbsolutePath()); + } + + List lModels = loadModels(rootNode.get("models"), f, apiVersion); + Apis api1 = loadApis(rootNode.get("apis"), f, apiVersion); + myModels.addAll(lModels); + myAPIs.add(api1); + + if ("events.json".equals(f.getName())) { + extractEvents(lModels); + } + extractModels(apiVersion); + extractActions(apiVersion, api1); + extractActionOperations(apiVersion, api1); + + } + + private void extractActionOperations(String apiVersion, Apis api1) { + for (Action a : api1.actions) { + for (Operation o : a.operations) { + JavaInterface jio = interfaces.get(o.getInterfaceName()); + if (jio == null) { + jio = new JavaInterface(); + jio.pkgName = JavaPkgInfo.GENERATED_PKG_NAME + ".actions.requests"; + jio.className = o.getInterfaceName(); + interfaces.put(o.getInterfaceName(), jio); + } + o.registerInterfaces(jio, apiVersion); + } + } + } + + private void extractActions(String apiVersion, Apis api1) { + JavaInterface jia = interfaces.get(api1.getInterfaceName()); + if (jia == null) { + jia = new JavaInterface(); + jia.pkgName = JavaPkgInfo.GENERATED_PKG_NAME + ".actions"; + jia.className = api1.getInterfaceName(); + interfaces.put(api1.getInterfaceName(), jia); + } + api1.registerInterfaces(jia, apiVersion); + } + + private void extractModels(String apiVersion) { + for (Model m : myModels) { + JavaInterface jim = interfaces.get(m.getInterfaceName()); + if (jim == null) { + jim = new JavaInterface(); + jim.pkgName = JavaPkgInfo.GENERATED_PKG_NAME + ".models"; + jim.className = m.getInterfaceName(); + jim.parent = m.extendsModel; + interfaces.put(m.getInterfaceName(), jim); + } + m.registerInterfaces(jim, apiVersion); + } + } + + private void extractEvents(List lModels) { + Model typeMessage = null; + List otherModels = new ArrayList<>(); + + for (Model m : lModels) { + if (m.className.equalsIgnoreCase("Message")) { + typeMessage = m; + } else { + otherModels.add(m); + } + } + + if (typeMessage != null) { + + StringBuilder defs = new StringBuilder(); + for (Model m : otherModels) { + if (defs.length() > 0) { + defs.append(",\n"); + } + defs.append(" @Type(value = ") + .append(m.getImplName()) + .append(".class, name = \"") + .append(m.getInterfaceName()) + .append("\")"); + messageInterfaces.add(m.getInterfaceName()); + } + + typeMessage.additionalPreambleText = " @JsonTypeInfo(use = JsonTypeInfo.Id.NAME," + + " property = \"type\", visible = true)\n " + + "@JsonSubTypes({\n" + + defs + + "\n})\n"; + typeMessage.imports.add("com.fasterxml.jackson.annotation.JsonSubTypes"); + typeMessage.imports.add("com.fasterxml.jackson.annotation.JsonSubTypes.Type"); + typeMessage.imports.add("com.fasterxml.jackson.annotation.JsonTypeInfo"); + } + } + + /** + * Generate all files. + * @throws IOException when error saving + * @throws FormatterException when error formatting + */ + public void generateAllClasses() throws IOException, FormatterException { + AriBuilderInterface abi = generateInterfaces(); + generateModels(); + generateApis(); + generateProperties(abi); + generateImplementationClasses(); + generateAriWSCallback(); + } + + /** + * Generate all interfaces. + * @return AriBuilderInterface + * @throws IOException when error saving + * @throws FormatterException when error formatting + */ + public AriBuilderInterface generateInterfaces() throws IOException, FormatterException { + AriBuilderInterface abi = new AriBuilderInterface(); + for (Map.Entry entry : interfaces.entrySet()) { + if (entry.getKey().startsWith("Action")) { + abi.knownInterfaces.add(entry.getKey()); + } + saveToDisk(entry.getValue()); + } + + // generate the AriBuilder class + saveToDisk(JavaPkgInfo.GENERATED_PKG_NAME, "AriBuilder", abi.toString()); + return abi; + } + + /** + * Generates a model. + * For each model. let's find out the minimal interface it should implement. + * @throws IOException when error saving + * @throws FormatterException when error formatting + */ + public void generateModels() throws IOException, FormatterException { + for (Model m : myModels) { + String minIf = m.getInterfaceName(); + JavaInterface ji = interfaces.get(minIf); + + m.setMinimalInterface(ji); + saveToDisk(m); + } + } + + /** + * Save APIs to disk. + * @throws IOException when error saving + * @throws FormatterException when error formatting + */ + public void generateApis() throws IOException, FormatterException { + for (Apis api : myAPIs) { + String minIf = api.getInterfaceName(); + JavaInterface ji = interfaces.get(minIf); + api.setMinimalInterface(ji); + saveToDisk(api); + for (Action a : api.actions) { + for (Operation o : a.operations) { + saveToDisk(o); + } + } + } + } + + /** + * Write a properties file for each API version. + * @param abi the builder interface + * @throws IOException when error saving + * @throws FormatterException when error formatting + */ + public void generateProperties(AriBuilderInterface abi) throws IOException, FormatterException { + Map> mM = new HashMap<>(); + Map> mA = new HashMap<>(); + + for (Apis api : myAPIs) { + String ver = api.apiVersion; + if (!mA.containsKey(ver)) { + mA.put(ver, new HashSet<>()); + } + mA.get(ver).add(api); + } + + for (Model mod : myModels) { + String ver = mod.apiVersion; + if (!mM.containsKey(ver)) { + mM.put(ver, new HashSet<>()); + } + mM.get(ver).add(mod); + } + + StringBuilder sbVerEnums = new StringBuilder(); + StringBuilder sbVerEnum = new StringBuilder(); + JavaGen.addPackage(sbVerEnum, JavaPkgInfo.BASE_PKG_NAME); + sbVerEnum.append("import ").append(JavaPkgInfo.BASE_PKG_NAME).append(".tools.ARIException;\n"); + sbVerEnum.append("import ").append(JavaPkgInfo.GENERATED_PKG_NAME).append(".AriBuilder;\n"); + + for (String ver : vers) { + writeAriBuilder(ver, abi, mA.get(ver)); + builderEnum(sbVerEnums, ver); + sbVerEnum.append("import ").append(JavaPkgInfo.GENERATED_PKG_NAME).append(".").append(ver) + .append(".AriBuilder").append(JavaPkgInfo.CLAZZ_IMPL_STRING).append(ver).append(";\n"); + } + + String doubleNewLine = "\n\n"; + sbVerEnums.append(" IM_FEELING_LUCKY(null, null);"); + sbVerEnum.append("\npublic enum AriVersion {"); + sbVerEnum.append(doubleNewLine); + sbVerEnum.append(sbVerEnums); + sbVerEnum.append(doubleNewLine); + sbVerEnum.append(" final String versionString;\n"); + sbVerEnum.append(" final AriBuilder builder;"); + sbVerEnum.append(doubleNewLine); + sbVerEnum.append(" AriVersion(String versionString, AriBuilder builder) {\n"); + sbVerEnum.append(" this.versionString = versionString;\n"); + sbVerEnum.append(" this.builder = builder;\n"); + sbVerEnum.append(" }"); + sbVerEnum.append(doubleNewLine); + sbVerEnum.append(" public AriBuilder builder() {\n"); + sbVerEnum.append(" if (builder == null) {\n"); + sbVerEnum.append(" throw new IllegalArgumentException(\"This version has no builder. "); + sbVerEnum.append("Library error for \" + this.name());\n"); + sbVerEnum.append(" } else {\n"); + sbVerEnum.append(" return builder;\n"); + sbVerEnum.append(" }\n"); + sbVerEnum.append(" }"); + sbVerEnum.append(doubleNewLine); + sbVerEnum.append(" public String version() {\n"); + sbVerEnum.append(" return versionString;\n"); + sbVerEnum.append(" }"); + sbVerEnum.append(doubleNewLine); + sbVerEnum.append(" public static AriVersion fromVersionString(String version) throws ARIException {\n"); + sbVerEnum.append(" for (AriVersion av: AriVersion.values()) {\n"); + sbVerEnum.append(" if (av.builder != null) {\n"); + sbVerEnum.append(" if (av.versionString.equalsIgnoreCase(version)) {\n"); + sbVerEnum.append(" return av;\n"); + sbVerEnum.append(" }\n"); + sbVerEnum.append(" }\n"); + sbVerEnum.append(" }\n"); + sbVerEnum.append(" throw new ARIException(\"Unknown ARI Version object for \" + version );\n"); + sbVerEnum.append(" }"); + sbVerEnum.append(doubleNewLine); + sbVerEnum.append("}\n"); + + saveToDisk(JavaPkgInfo.BASE_PKG_NAME, "AriVersion", sbVerEnum.toString()); + + } + + private void builderEnum(StringBuilder sbVerEnum, String ver) { + String verNum = ver.replace("ari_", "").replace("_", "."); + sbVerEnum.append(" ") + .append(ver.toUpperCase()) + .append("(") + .append("\"") + .append(verNum) + .append("\", new AriBuilder") + .append(JavaPkgInfo.CLAZZ_IMPL_STRING) + .append(ver) + .append("()),\n"); + } + + /** + * Generates the translators from the abstract class to the concrete one. + * @throws IOException when error saving + * @throws FormatterException when error formatting + */ + public void generateImplementationClasses() throws IOException, FormatterException { + List lTranslators = new ArrayList<>(); + + for (Apis api : myAPIs) { + String ver = api.apiVersion; + ClassTranslator ct = getClassTranslator(lTranslators, ver); + ct.setClass(api.className, api.className + JavaPkgInfo.CLAZZ_IMPL_STRING + ver); + } + + for (Model mod : myModels) { + String ver = mod.apiVersion; + ClassTranslator ct = getClassTranslator(lTranslators, ver); + ct.setClass(mod.className, mod.className + JavaPkgInfo.CLAZZ_IMPL_STRING + ver); + } + + for (ClassTranslator ct : lTranslators) { + saveToDisk(ct); + } + } + + private ClassTranslator getClassTranslator(List lTranslators, String apiVer) { + int idx = lTranslators.indexOf(new ClassTranslator(apiVer)); + if (idx != -1) { + return lTranslators.get(idx); + } + ClassTranslator ct = new ClassTranslator(apiVer); + ct.apiVersion = apiVer; + lTranslators.add(ct); + return ct; + } + + /** + * @param f the file + * @return an action class name + */ + private String genActionClassName(File f) { + String fileName = f.getName().replace(".json", ""); + return JavaGen.addPrefixAndCapitalize("Action", fileName); + } + + private List loadModels(JsonNode models, File f, String apiVersion) { + + List lModelsAdded = new ArrayList<>(); + + for (JsonNode modelName : models) { + // Creazione di un modello + Model currentModel = new Model(); + String thisModel = txt(modelName.get("id")); + String thisModelDesc = txt(modelName.get("description")); + + currentModel.setPackageInfo(thisModel, apiVersion); + currentModel.description = thisModelDesc; + currentModel.comesFromFile = f.getName(); + currentModel.extendsModel = extendsObject(modelName); + currentModel.subTypes = subTypes(modelName); + + JsonNode properties = modelName.get("properties"); + Iterator propNames = properties.fieldNames(); + while (propNames.hasNext()) { + String field = propNames.next(); + JsonNode property = properties.get(field); + + String type = txt(property.get("type")); + // BUG #180 RTPStat map int to long for local_ssrc & remote_ssrc + if ("channels.json".equals(currentModel.comesFromFile) && "RTPstat".equals(thisModel) && + ("local_ssrc".equals(field) || "remote_ssrc".equals(field)) && + "int".equalsIgnoreCase(type)) { + type = "long"; + } + String javaType = remapAbstractType(type); + String javaConcreteType = remapConcreteType(type, apiVersion); + + String comment = txt(property.get("description")); + ModelField mf = new ModelField(); + mf.field = field; + mf.typeInterface = javaType; + mf.typeConcrete = javaConcreteType; + mf.comment = comment; + // the API for TextMessage changed from returning an object to a list + if ("endpoints.json".equals(currentModel.comesFromFile) && "TextMessage".equals(thisModel) && + "variables".equals(field) && javaType.startsWith("List")) { + mf.field = field + "List"; + } + currentModel.fields.add(mf); + } + + lModelsAdded.add(currentModel); + + } + for (Model m : lModelsAdded) { + if (m.subTypes != null) { + for (Model mm : lModelsAdded) { + if (m.subTypes.contains(mm.className)) { + mm.extendsModel = remapAbstractType(m.className); + } + } + } + } + + return lModelsAdded; + } + + private Apis loadApis(JsonNode apis, File f, String apiVersion) { + Apis api = new Apis(); + api.setPackageInfo(genActionClassName(f), apiVersion); + + for (JsonNode apiEntry : apis) { + + Action action = new Action(); + action.path = txt(apiEntry.get("path")); + action.description = txt(apiEntry.get("description")); + action.javaFile = f.getName(); + action.api = api; + + loadApiOperations(apiVersion, apiEntry, action); + + api.actions.add(action); + } + + myAPIs.add(api); + + return api; + + } + + private void loadApiOperations(String apiVersion, JsonNode apiEntry, Action action) { + for (JsonNode operation : apiEntry.get("operations")) { + Operation op = new Operation(); + action.operations.add(op); + op.action = action; + op.method = txt(operation.get("httpMethod")); + if ("websocket".equalsIgnoreCase(txt(operation.get("upgrade")))) { + op.wsUpgrade = true; + } + op.nickname = txt(operation.get("nickname")); + op.responseInterface = remapAbstractType(txt(operation.get("responseClass"))); + op.responseConcreteClass = remapConcreteType(txt(operation.get("responseClass")), apiVersion); + op.description = txt(operation.get("summary")) + "\n" + txt(operation.get("notes")); + op.apiVersion = apiVersion; + + loadApiOperationParams(operation, op); + loadApiOperationErrors(operation, op); + + } + } + + private void loadApiOperationErrors(JsonNode operation, Operation op) { + JsonNode errorResponses = operation.get("errorResponses"); + if (errorResponses != null) { + for (JsonNode errorResponse : errorResponses) { + Operation.ErrorResp err = new Operation.ErrorResp(); + err.code = errorResponse.get("code").asInt(); + err.reason = errorResponse.get("reason").asText(); + op.errorCodes.add(err); + } + } + } + + private void loadApiOperationParams(JsonNode operation, Operation op) { + JsonNode parameters = operation.get("parameters"); + if (parameters != null) { + for (JsonNode parameter : parameters) { + Operation.Param p = new Operation.Param(); + p.javaType = remapAbstractType(txt(parameter.get("dataType"))); + p.methodArgumentType = JavaPkgInfo.primitiveSignature.containsKey(p.javaType) ? + JavaPkgInfo.primitiveSignature.get(p.javaType) : p.javaType; + p.name = txt(parameter.get("name")); + p.description = txt(parameter.get("description")); + p.required = txt(parameter.get("required")).equalsIgnoreCase("true"); + p.type = Operation.ParamType.build(txt(parameter.get("paramType"))); + op.params.add(p); + } + } + } + + public void saveToDisk(String pkgName, String className, String classText) throws IOException, FormatterException { + String fName = outputFolder + + pkgName.replace(".", "/") + + "/" + + className + ".java"; + + File f = new File(fName); + //noinspection ResultOfMethodCallIgnored + f.getParentFile().mkdirs(); //NOSONAR + FileWriter outFile = new FileWriter(f); + try (PrintWriter out = new PrintWriter(outFile)) { + out.println(codeFormatter.formatSource(classText)); + } + } + + public void saveToDisk(Model model) throws IOException, FormatterException { + saveToDisk(model.getModelPackage(), model.getImplName(), model.toString()); + } + + public void saveToDisk(Apis api) throws IOException, FormatterException { + saveToDisk(api.getActionsPackage(), api.getImplName(), api.toString()); + } + + public void saveToDisk(Operation operation) throws IOException, FormatterException { + saveToDisk(operation.getPackage(), operation.getImplName(), operation.toString()); + } + + public void saveToDisk(JavaInterface ji) throws IOException, FormatterException { + saveToDisk(ji.pkgName, ji.className, ji.toString()); + } + + public void saveToDisk(ClassTranslator ct) throws IOException, FormatterException { + saveToDisk(ct.getBaseApiPackage(), ct.getImplName(), ct.toString()); + } + + public void clean() { + deleteFolder(new File(outputFolder)); + } + + private void deleteFolder(File folder) { + File[] files = folder.listFiles(); + if(files != null) { + for(File f: files) { + if(f.isDirectory()) { + deleteFolder(f); + } else { + //noinspection ResultOfMethodCallIgnored + f.delete(); //NOSONAR + } + } + } + //noinspection ResultOfMethodCallIgnored + folder.delete(); //NOSONAR + } + + private String txt(JsonNode n) { + if (n == null) { + return ""; + } else { + return n.asText(); + } + } + + public String extendsObject(JsonNode model) { + if (model.get("extends") != null) { + return remapAbstractType(model.get("extends").asText()); + } + return ""; + } + + public Set subTypes(JsonNode model) { + Set result = new HashSet<>(); + if (model.get("subTypes") != null) { + JsonNode st = model.get("subTypes"); + if (st instanceof ArrayNode) { + ArrayNode sta = (ArrayNode) st; + for (int i = 0; i < sta.size(); i++) { + result.add(sta.get(i).asText()); + } + } + } + return result; + } + + public String remapAbstractType(String jsonType) { + return innerRemapType(jsonType, false, ""); + } + + public String remapConcreteType(String jsonType, String apiVersion) { + return innerRemapType(jsonType, true, apiVersion); + } + + public String innerRemapType(String jsonType, boolean concrete, String apiVersion) { + String listAry = "List["; + if (jsonType.startsWith(listAry)) { + return "List<" + innerRemapType(jsonType.substring(listAry.length(), + jsonType.length() - 1), concrete, apiVersion) + ">"; + } else if (JavaPkgInfo.TypeMap.containsKey(jsonType.toLowerCase())) { + return JavaPkgInfo.TypeMap.get(jsonType.toLowerCase()); + } else { + return jsonType + (concrete ? JavaPkgInfo.CLAZZ_IMPL_STRING + apiVersion : ""); + } + } + + private void writeAriBuilder(String apiVersion, AriBuilderInterface abi, Collection apis) throws IOException, FormatterException { + + String thisClass = "AriBuilder" + JavaPkgInfo.CLAZZ_IMPL_STRING + apiVersion; + List ifToImplement = new ArrayList<>(abi.knownInterfaces); + + StringBuilder sb = new StringBuilder(); + JavaGen.importClasses(sb, JavaPkgInfo.GENERATED_PKG_NAME + "." + apiVersion, + Arrays.asList(JavaPkgInfo.BASE_PKG_NAME + ".ARI", + JavaPkgInfo.GENERATED_PKG_NAME + ".AriBuilder", + JavaPkgInfo.GENERATED_PKG_NAME + ".actions.*", + JavaPkgInfo.GENERATED_PKG_NAME + "." + apiVersion + ".actions.*")); + sb.append("public class ").append(thisClass).append(" implements AriBuilder {\n\n"); + + for (Apis api : apis) { + String ifc = api.getInterfaceName(); + ifToImplement.remove(ifc); + sb.append(AriBuilderInterface.getMethod(ifc, apiVersion)); + } + + // do we have any unimplemented interface? + for (String ifc : ifToImplement) { + sb.append(AriBuilderInterface.getUnimplemented(ifc)); + } + + sb.append("public ARI.ClassFactory getClassFactory() {\n return new ClassTranslator" + JavaPkgInfo.CLAZZ_IMPL_STRING); + sb.append(apiVersion); + sb.append("();\n};\n\n};"); + + saveToDisk(JavaPkgInfo.GENERATED_PKG_NAME + "." + apiVersion, thisClass, sb.toString()); + + } + + private void generateAriWSCallback() throws IOException, FormatterException { + StringBuilder sb = new StringBuilder(); + StringBuilder methods = new StringBuilder(); + JavaGen.importClasses(sb, JavaPkgInfo.GENERATED_PKG_NAME, + Arrays.asList( + JavaPkgInfo.BASE_PKG_NAME + ".tools.AriConnectionEvent", + JavaPkgInfo.BASE_PKG_NAME + ".tools.AriWSCallback", + JavaPkgInfo.BASE_PKG_NAME + ".tools.RestException", + JavaPkgInfo.GENERATED_PKG_NAME + ".models.*", + "org.slf4j.Logger", + "org.slf4j.LoggerFactory")); + sb.append("public abstract class AriWSHelper implements AriWSCallback {\n\n"); + sb.append("private Logger logger = LoggerFactory.getLogger(AriWSHelper.class);\n\n"); + sb.append("@Override\npublic void onSuccess(Message message) {\n"); + AtomicBoolean first = new AtomicBoolean(true); + messageInterfaces.forEach(i -> { + if (!i.equals("Event")) { + if (first.get()) { + first.set(false); + } else { + sb.append(" else "); + } + sb.append("if (message instanceof ").append(i).append(") {\non").append(i).append("((").append(i).append(") message);\n}"); + methods.append("protected void on").append(i).append("(final ").append(i).append(" message) {\n"); + methods.append("logger.warn(\"Event ").append(i).append(" Unhandled\");\n"); + methods.append("}\n\n"); + } + }); + sb.append(" else {\nlogger.error(\"Unknown Event - \" + message.getClass());\n}\n}\n\n"); + sb.append("@Override\npublic void onFailure(RestException e) {\nlogger.error(\"Error: {}\", e.getMessage(), e);\n}\n\n"); + sb.append("@Override\npublic void onConnectionEvent(AriConnectionEvent event) {\nlogger.debug(event.name());\n}\n\n"); + sb.append(methods); + sb.append("\n}"); + + saveToDisk(JavaPkgInfo.GENERATED_PKG_NAME, "AriWSHelper", sb.toString()); + } + + /** + * @param outputFolder the folder + */ + void setOutputFolder(String outputFolder) { + this.outputFolder = outputFolder; + } + +} diff --git a/codegen/src/main/java/ch/loway/oss/ari4java/codegen/VERSION.java b/codegen/src/main/java/ch/loway/oss/ari4java/codegen/VERSION.java new file mode 100755 index 00000000..e5cdba51 --- /dev/null +++ b/codegen/src/main/java/ch/loway/oss/ari4java/codegen/VERSION.java @@ -0,0 +1,16 @@ + +package ch.loway.oss.ari4java.codegen; + +/** + * + * @author lenz + */ +public class VERSION { + + private VERSION() { + throw new IllegalStateException("Utility class"); + } + + public static final String VER = "0.7"; +} + diff --git a/codegen/src/main/java/ch/loway/oss/ari4java/codegen/gen/JavaGen.java b/codegen/src/main/java/ch/loway/oss/ari4java/codegen/gen/JavaGen.java new file mode 100755 index 00000000..10a61310 --- /dev/null +++ b/codegen/src/main/java/ch/loway/oss/ari4java/codegen/gen/JavaGen.java @@ -0,0 +1,69 @@ + +package ch.loway.oss.ari4java.codegen.gen; + +import java.util.Date; +import java.util.List; + +/** + * A set of static methods to generate Java sources. + * + * @author lenz + */ +public class JavaGen { + + private JavaGen() { + throw new IllegalStateException("Utility class"); + } + + public static void addPackage(StringBuilder sb, String myPackage) { + sb.append("package ").append(myPackage).append(";\n\n"); + sb.append("// ----------------------------------------------------\n") + .append("// THIS CLASS WAS GENERATED AUTOMATICALLY \n") + .append("// PLEASE DO NOT EDIT \n") + .append("// Generated on: ").append((new Date()).toString()).append("\n") + .append("// ----------------------------------------------------\n\n"); + } + + public static void importClasses(StringBuilder sb, String myPackage, List imports) { + addPackage(sb, myPackage); + for (String pkg : imports) { + sb.append("import ").append(pkg).append(";\n"); + } + sb.append("\n"); + } + + public static void addBanner(StringBuilder sb, String multiLineBanner) { + String[] rows = multiLineBanner.split("\n"); + sb.append("/**\n"); + for (String row : rows) { + if (!row.isEmpty()) { + row = row.replace("

", "\n * "); + row = row.replace("
", "\n * "); + row = row.replace("<", ">"); + row = row.replace(">", "<"); + sb.append(" * ").append(row).append("\n"); + } + } + sb.append(" */\n"); + } + + public static void addBanner(StringBuilder sb, String multilineBanner, String sinceVersion) { + multilineBanner += "\n@since " + sinceVersion.toUpperCase(); + addBanner(sb, multilineBanner); + } + + public static String addPrefixAndCapitalize(String prefix, String field) { + return prefix + field.substring(0, 1).toUpperCase() + field.substring(1); + } + + public static String addAsyncCallback(String response) { + return "AriCallback<" + response.replaceAll("^void$", "Void") + "> callback"; + } + + public static void emptyLines(StringBuilder sb, int nLines) { + for (int i = 0; i < nLines; i++) { + sb.append("\n"); + } + } + +} diff --git a/codegen/src/main/java/ch/loway/oss/ari4java/codegen/gen/JavaInterface.java b/codegen/src/main/java/ch/loway/oss/ari4java/codegen/gen/JavaInterface.java new file mode 100755 index 00000000..7251421d --- /dev/null +++ b/codegen/src/main/java/ch/loway/oss/ari4java/codegen/gen/JavaInterface.java @@ -0,0 +1,126 @@ + +package ch.loway.oss.ari4java.codegen.gen; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * @author lenz + */ +public class JavaInterface { + + public final List eventSources = Arrays.asList("Bridge", + "Channel", + "Endpoint", + "DeviceState"); + + public String pkgName = ""; + public String className = ""; + public String since = ""; + public String parent = ""; + + private static class Definition { + String method; + String comment; + String sinceVersion; + public Definition(String method, String comment, String sinceVersion) { + this.method = method; + this.comment = comment; + this.sinceVersion = sinceVersion; + } + + public String toInterfaceString() { + StringBuilder sb = new StringBuilder(); + JavaGen.addBanner(sb, comment, sinceVersion); + sb.append(method).append(";"); + return sb.toString(); + } + + public String toUnsupportedString(boolean addJsonIgnore) { + return (addJsonIgnore ? " @JsonIgnore\n " : " ") + method + "{\n" + + " throw new UnsupportedOperationException(\"Method available from " + sinceVersion + "\");\n" + + " }\n\n"; + } + } + + private Map definitions = new HashMap<>(); + + public void iKnow(String signature, String method, String comment, String sinceVersion) { + if (!definitions.containsKey(signature)) { + definitions.put(signature, new Definition(method, comment, sinceVersion)); + } + } + + public JavaInterface createScratchCopy() { + JavaInterface ji = new JavaInterface(); + ji.pkgName = pkgName; + ji.className = className; + ji.since = since; + ji.definitions = new HashMap<>(definitions); + return ji; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + JavaGen.importClasses(sb, pkgName, Arrays.asList("java.util.Date", + "java.util.List", + "java.util.Map", + "java.util.ArrayList", + JavaPkgInfo.BASE_PKG_NAME + ".tools.*", + JavaPkgInfo.BASE_PKG_NAME + ".tools.tags.EventSource", + JavaPkgInfo.GENERATED_PKG_NAME + ".actions.requests.*", + JavaPkgInfo.GENERATED_PKG_NAME + ".models.Module", + JavaPkgInfo.GENERATED_PKG_NAME + ".models.*")); + JavaGen.addBanner(sb, "\n" + + "Generated by: " + this.getClass().getSimpleName() + "\n" + ); + JavaGen.emptyLines(sb, 2); + sb.append("public interface ").append(className); + if (eventSources.contains(className)) { + sb.append(" extends EventSource "); + } else if (!parent.isEmpty()) { + sb.append(" extends ").append(parent).append(" "); + } + sb.append(" {\n"); + for (Definition definition : definitions.values()) { + sb.append(definition.toInterfaceString()).append("\n"); + } + sb.append("}\n"); + return sb.toString(); + } + + /** + * Removes a signature. + * When you serialize an object, you remove all required signatures. + * @param signature the method signature + */ + public void removeSignature(String signature) { + if (definitions.containsKey(signature)) { + definitions.remove(signature); + } else { + throw new IllegalArgumentException("Signature not found: " + signature); + } + } + + public String getCodeToImplementMissingSignatures() { + return getCodeToImplementMissingSignatures(false); + } + + public String getCodeToImplementMissingSignatures(boolean addJsonIgnore) { + if (definitions.isEmpty()) { + return " /* No missing signatures from interface */\n\n"; + } else { + StringBuilder sb = new StringBuilder(); + // generate empty methods that throw an UnsupportedOperationException + for (Definition d : definitions.values()) { + sb.append(d.toUnsupportedString(addJsonIgnore)); + } + return sb.toString(); + } + } + +} + diff --git a/codegen/src/main/java/ch/loway/oss/ari4java/codegen/gen/JavaPkgInfo.java b/codegen/src/main/java/ch/loway/oss/ari4java/codegen/gen/JavaPkgInfo.java new file mode 100755 index 00000000..26f81bd2 --- /dev/null +++ b/codegen/src/main/java/ch/loway/oss/ari4java/codegen/gen/JavaPkgInfo.java @@ -0,0 +1,87 @@ + +package ch.loway.oss.ari4java.codegen.gen; + +import java.util.HashMap; +import java.util.Map; + +/** + * @author lenz + */ +public class JavaPkgInfo { + + public static final Map TypeMap; + public static final Map primitiveSignature; + public static final String BASE_PKG_NAME = "ch.loway.oss.ari4java"; + public static final String GENERATED_PKG_NAME = BASE_PKG_NAME + ".generated"; + public static final String CLAZZ_IMPL_STRING = "_impl_"; + + static { + TypeMap = new HashMap<>(); + TypeMap.put("string", "String"); + TypeMap.put("long", "Long"); + TypeMap.put("int", "Integer"); + TypeMap.put("double", "Double"); + TypeMap.put("date", "Date"); + TypeMap.put("object", "Object"); + TypeMap.put("boolean", "Boolean"); + TypeMap.put("binary", "byte[]"); + TypeMap.put("containers", "Map"); + + primitiveSignature = new HashMap<>(); + primitiveSignature.put("Boolean", "boolean"); + primitiveSignature.put("Integer", "int"); + primitiveSignature.put("Long", "long"); + primitiveSignature.put("Double", "double"); + } + + public String className = ""; + public String apiVersion = ""; + public JavaInterface minimalIf = null; + + public void setPackageInfo(String classN, String apiV) { + className = classN; + apiVersion = apiV; + } + + public String getBaseApiPackage() { + return GENERATED_PKG_NAME + "." + apiVersion; + } + + public String getModelPackage() { + return getBaseApiPackage() + "." + "models"; + } + + public String getActionsPackage() { + return getBaseApiPackage() + "." + "actions"; + } + + public String getInterfaceName() { + return className.substring(0, 1).toUpperCase() + className.substring(1); + } + + public String getImplName() { + return className + CLAZZ_IMPL_STRING + apiVersion; + } + + /** + * This is a "minimal" interface that has to be implemented at all costs. + * @param i interface + */ + public void setMinimalInterface(JavaInterface i) { + minimalIf = i; + } + + /** + * Gets a copy of the current base interface. + * This is meant to have signatures removed as they are written. + * @return JavaInterface + */ + public JavaInterface getBaseInterface() { + if (minimalIf == null) { + return new JavaInterface(); + } else { + return minimalIf.createScratchCopy(); + } + } + +} diff --git a/codegen/src/main/java/ch/loway/oss/ari4java/codegen/models/Action.java b/codegen/src/main/java/ch/loway/oss/ari4java/codegen/models/Action.java new file mode 100755 index 00000000..84364d9d --- /dev/null +++ b/codegen/src/main/java/ch/loway/oss/ari4java/codegen/models/Action.java @@ -0,0 +1,61 @@ + +package ch.loway.oss.ari4java.codegen.models; + +import ch.loway.oss.ari4java.codegen.gen.JavaInterface; + +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * @author lenz + */ +public class Action implements Comparable { + + public String path = ""; + public String description = ""; + public List operations = new ArrayList<>(); + public String javaFile = ""; + public Apis api; + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + for (Operation o : operations) { + sb.append(o.toJava()); + } + return sb.toString(); + } + + void registerInterfaces(JavaInterface j, String apiVersion) { + for (Operation o : operations) { + String javaSignature = o.getSignature(); + String definition = o.getDefinition(); + j.iKnow(javaSignature, definition, o.getComment(), apiVersion); + } + } + + @Override + public int compareTo(Action o) { + return path.compareToIgnoreCase(o.path); + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Action action = (Action) o; + return Objects.equals(path, action.path) && + Objects.equals(description, action.description) && + Objects.equals(operations, action.operations) && + Objects.equals(javaFile, action.javaFile) && + Objects.equals(api, action.api); + } + + @Override + public int hashCode() { + return Objects.hash(path, description, operations, javaFile, api); + } + +} + diff --git a/codegen/src/main/java/ch/loway/oss/ari4java/codegen/models/Apis.java b/codegen/src/main/java/ch/loway/oss/ari4java/codegen/models/Apis.java new file mode 100755 index 00000000..2c40cd54 --- /dev/null +++ b/codegen/src/main/java/ch/loway/oss/ari4java/codegen/models/Apis.java @@ -0,0 +1,65 @@ + +package ch.loway.oss.ari4java.codegen.models; + +import ch.loway.oss.ari4java.codegen.gen.JavaGen; +import ch.loway.oss.ari4java.codegen.gen.JavaInterface; +import ch.loway.oss.ari4java.codegen.gen.JavaPkgInfo; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +/** + * @author lenz + */ +public class Apis extends JavaPkgInfo { + + public List actions = new ArrayList<>(); + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + JavaInterface ji = getBaseInterface(); + JavaGen.importClasses(sb, getActionsPackage(), Arrays.asList("java.util.Date", + "java.util.List", + "java.util.Map", + "java.util.ArrayList", + "java.net.URLEncoder", + JavaPkgInfo.BASE_PKG_NAME + ".ARI", + JavaPkgInfo.BASE_PKG_NAME + ".tools.*", + JavaPkgInfo.GENERATED_PKG_NAME + ".actions.*", + JavaPkgInfo.GENERATED_PKG_NAME + ".actions.requests.*", + JavaPkgInfo.GENERATED_PKG_NAME + ".models.Module", + JavaPkgInfo.GENERATED_PKG_NAME + ".models.*", + getActionsPackage() + ".requests.*", + getModelPackage() + ".*", + "com.fasterxml.jackson.core.type.TypeReference")); + JavaGen.addBanner(sb, "\n" + + "Generated by: " + this.getClass().getSimpleName() + "\n" + ); + JavaGen.emptyLines(sb, 2); + sb.append("public class ").append(getImplName()) + .append(" extends BaseAriAction ") + .append(" implements ") + .append(getInterfaceName()) + .append(" {\n"); + Collections.sort(actions); + for (Action a : actions) { + for (Operation o : a.operations) { + ji.removeSignature(o.getSignature()); + } + sb.append(a.toString()); + } + sb.append(ji.getCodeToImplementMissingSignatures()); + sb.append("}\n"); + return sb.toString(); + } + + public void registerInterfaces(JavaInterface j, String interfaceVersion) { + for (Action a : actions) { + a.registerInterfaces(j, interfaceVersion); + } + } + +} diff --git a/codegen/src/main/java/ch/loway/oss/ari4java/codegen/models/AriBuilderInterface.java b/codegen/src/main/java/ch/loway/oss/ari4java/codegen/models/AriBuilderInterface.java new file mode 100755 index 00000000..f06e54a2 --- /dev/null +++ b/codegen/src/main/java/ch/loway/oss/ari4java/codegen/models/AriBuilderInterface.java @@ -0,0 +1,60 @@ + +package ch.loway.oss.ari4java.codegen.models; + +import ch.loway.oss.ari4java.codegen.gen.JavaGen; +import ch.loway.oss.ari4java.codegen.gen.JavaPkgInfo; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +/** + * The interface AriBuilder - it builds ARI objects of the required type. + * + * @author lenz + */ +public class AriBuilderInterface { + + public List knownInterfaces = new ArrayList<>(); + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + JavaGen.importClasses(sb, "ch.loway.oss.ari4java.generated", + Arrays.asList(JavaPkgInfo.BASE_PKG_NAME + ".ARI", + JavaPkgInfo.GENERATED_PKG_NAME + ".actions.*") + ); + sb.append("public interface AriBuilder {\n"); + Collections.sort(knownInterfaces); + for (String iface : knownInterfaces) { + sb.append(" public abstract ").append(iface) + .append(" ").append(lcFirst(iface)).append("();\n"); + } + sb.append("\n\n" + + " public abstract ARI.ClassFactory getClassFactory();\n\n"); + sb.append("\n}\n"); + return sb.toString(); + } + + private static String lcFirst(String s) { + if (s.length() > 1) { + String s1 = s.substring(0, 1); + String s2 = s.substring(1); + return s1.toLowerCase() + s2; + } else { + return s; + } + } + + public static String getMethod(String ifName, String apiVer) { + return "public " + ifName + " " + lcFirst(ifName) + "() {\n" + + " return new " + ifName + "_impl_" + apiVer + "();\n };\n\n"; + } + + public static String getUnimplemented(String ifName) { + return "public " + ifName + " " + lcFirst(ifName) + "() {\n" + + " throw new UnsupportedOperationException();\n };\n\n"; + } + +} diff --git a/codegen/src/main/java/ch/loway/oss/ari4java/codegen/models/ClassTranslator.java b/codegen/src/main/java/ch/loway/oss/ari4java/codegen/models/ClassTranslator.java new file mode 100755 index 00000000..1aa1c9b4 --- /dev/null +++ b/codegen/src/main/java/ch/loway/oss/ari4java/codegen/models/ClassTranslator.java @@ -0,0 +1,85 @@ +package ch.loway.oss.ari4java.codegen.models; + +import ch.loway.oss.ari4java.codegen.gen.JavaGen; +import ch.loway.oss.ari4java.codegen.gen.JavaPkgInfo; + +import java.util.*; + +/** + * This class models a ClassTranslator. + * + * @author lenz + */ +public class ClassTranslator extends JavaPkgInfo { + + public Map mInterfaces; + public List imports; + + public ClassTranslator(String version) { + super(); + apiVersion = version; + mInterfaces = new HashMap<>(); + imports = new ArrayList<>(); + className = "ClassTranslator"; + imports.add(JavaPkgInfo.BASE_PKG_NAME + ".ARI"); + imports.add(JavaPkgInfo.GENERATED_PKG_NAME + ".actions.*"); + imports.add(JavaPkgInfo.GENERATED_PKG_NAME + ".models.Module"); + imports.add(JavaPkgInfo.GENERATED_PKG_NAME + ".models.*"); + imports.add(JavaPkgInfo.GENERATED_PKG_NAME + "." + apiVersion + ".actions.*"); + imports.add(JavaPkgInfo.GENERATED_PKG_NAME + "." + apiVersion + ".models.*"); + } + + public void setClass(String ifName, String implementation) { + mInterfaces.put(ifName, implementation); + } + + @Override + public String toString() { + + StringBuilder sb = new StringBuilder(); + JavaGen.importClasses(sb, getBaseApiPackage(), imports); + JavaGen.addBanner(sb, "This is a class translator." + "\n\n"); + + List ifNames = new ArrayList<>(mInterfaces.keySet()); + Collections.sort(ifNames); + + sb.append("public class ").append(getImplName()).append(" implements ARI.ClassFactory {\n\n"); + sb.append(" @Override\n" + + " public Class getImplementationFor(Class interfaceClass) {\n"); + + for (String ifName : ifNames) { + String impl = mInterfaces.get(ifName); + + sb.append("\n" + + "\tif ( interfaceClass.equals(") + .append(ifName) + .append(".class) ) {\n" + + " return (") + .append(impl) + .append(".class);\n" + + " } else \n"); + } + + sb.append(" {\n" + + " return null;\n" + + " }\n" + + " }\n" + + "}\n\n"); + return sb.toString(); + } + + @Override + public boolean equals(Object obj) { + if (obj instanceof String) { + return this.apiVersion.equals(obj); + } else if (obj instanceof ClassTranslator) { + return this.apiVersion.equals(((ClassTranslator) obj).apiVersion); + } + return super.equals(obj); + } + + @Override + public int hashCode() { + return this.apiVersion.hashCode(); + } +} diff --git a/codegen/src/main/java/ch/loway/oss/ari4java/codegen/models/Model.java b/codegen/src/main/java/ch/loway/oss/ari4java/codegen/models/Model.java new file mode 100755 index 00000000..4e8c710d --- /dev/null +++ b/codegen/src/main/java/ch/loway/oss/ari4java/codegen/models/Model.java @@ -0,0 +1,113 @@ + +package ch.loway.oss.ari4java.codegen.models; + +import ch.loway.oss.ari4java.codegen.gen.JavaGen; +import ch.loway.oss.ari4java.codegen.gen.JavaInterface; +import ch.loway.oss.ari4java.codegen.gen.JavaPkgInfo; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.Set; + +/** + * $Id$ + * + * @author lenz + */ +public class Model extends JavaPkgInfo { + + public String description = ""; + public String extendsModel = ""; + public Set subTypes; + public String comesFromFile = ""; + public List implementsInterfaces = new ArrayList<>(); + public List imports = new ArrayList<>(); + public List fields = new ArrayList<>(); + public String additionalPreambleText = ""; + + public Model() { + imports.add("java.util.Date"); + imports.add("java.util.List"); + imports.add("java.util.Map"); + imports.add(JavaPkgInfo.GENERATED_PKG_NAME + ".models.Module"); + imports.add(JavaPkgInfo.GENERATED_PKG_NAME + ".models.*"); + imports.add("com.fasterxml.jackson.databind.annotation.JsonDeserialize"); + imports.add("com.fasterxml.jackson.annotation.JsonIgnore"); + } + + @Override + public String toString() { + Collections.sort(imports); + Collections.sort(fields); + Collections.sort(implementsInterfaces); + JavaInterface ji = getBaseInterface(); + StringBuilder sb = new StringBuilder(); + JavaGen.importClasses(sb, getModelPackage(), imports); + JavaGen.addBanner(sb, description + "\n\n" + + "Defined in file: " + comesFromFile + "\n" + + "Generated by: " + this.getClass().getSimpleName() + ); + sb.append(additionalPreambleText); + sb.append("public class ").append(getImplName()); + // concrete implementation for the model to be extended + if (extendsModel.length() > 0) { + JavaPkgInfo jpi = new JavaPkgInfo(); + jpi.setPackageInfo(extendsModel, apiVersion); + sb.append(" extends ").append(jpi.getImplName()); + } + sb.append(" implements "); + for (String inf : implementsInterfaces) { + sb.append(inf).append(", "); + } + sb.append(getInterfaceName()).append(", "); + sb.append("java.io.Serializable {\n"); + sb.append(" private static final long serialVersionUID = 1L;\n"); + boolean hasId = false; + boolean hasName = false; + for (ModelField mf : fields) { + ji.removeSignature(mf.getSignatureGet()); + ji.removeSignature(mf.getSignatureSet()); + sb.append(mf.toString()); + if ("id".equalsIgnoreCase(mf.field)) { + hasId = true; + } else if ("name".equalsIgnoreCase(mf.field)) { + hasName = true; + } + } + sb.append(ji.getCodeToImplementMissingSignatures(true)); + if (hasId || hasName) { + sb.append(" public String toString() {\n return "); + sb.append("\"").append(getInterfaceName()).append("["); + if (hasId) { + sb.append("id=\" + id + \""); + } + if (hasId && hasName) { + sb.append(", "); + } + if (hasName) { + sb.append("name=\" + name + \""); + } + sb.append("]\""); + sb.append(";\n }\n\n"); + } + sb.append("}\n"); + return sb.toString(); + } + + public void registerInterfaces(JavaInterface j, String apiVersion) { + for (ModelField mf : fields) { + // getter + String signature = mf.getSignatureGet(); + String declaration = mf.getDeclarationGet(); + String comment = mf.comment + "\n@return " + mf.typeInterface; + j.iKnow(signature, declaration, comment, apiVersion); + // setter + signature = mf.getSignatureSet(); + declaration = mf.getDeclarationSet(); + comment = "@param val " + (mf.comment.trim().isEmpty() ? "the value" : mf.comment); + j.iKnow(signature, declaration, comment, apiVersion); + } + } + +} diff --git a/codegen/src/main/java/ch/loway/oss/ari4java/codegen/models/ModelField.java b/codegen/src/main/java/ch/loway/oss/ari4java/codegen/models/ModelField.java new file mode 100755 index 00000000..4e077c95 --- /dev/null +++ b/codegen/src/main/java/ch/loway/oss/ari4java/codegen/models/ModelField.java @@ -0,0 +1,98 @@ + +package ch.loway.oss.ari4java.codegen.models; + +import ch.loway.oss.ari4java.codegen.gen.JavaGen; + +import java.util.Objects; + +/** + * $Id$ + * + * @author lenz + */ +public class ModelField implements Comparable { + + public String field = ""; + public String typeInterface = ""; + public String typeConcrete = ""; + public boolean required = false; + public String comment = ""; + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(" private ").append(typeInterface).append(" ").append(field).append(";\n"); + sb.append(" ").append(getDeclarationGet()).append(" {\n"); + sb.append(" return "); + if ("Date".equals(typeConcrete)) { + sb.append("new Date(").append(field).append(".getTime())"); + } else { + sb.append(field); + } + sb.append(";\n }\n\n"); + if (typeConcrete.startsWith("List")) { + String innerType = typeConcrete.substring(5, typeConcrete.length() - 1); + sb.append(" @JsonDeserialize( contentAs=").append(innerType).append(".class )\n"); + } else if ("Object".equals(typeConcrete)) { + sb.append(" @JsonDeserialize( using=com.fasterxml.jackson.databind.deser.std.UntypedObjectDeserializer.class").append(" )\n"); + } else { + sb.append(" @JsonDeserialize( as=").append(typeConcrete).append(".class )\n"); + } + sb.append(" ").append(getDeclarationSet()).append(" {\n"); + sb.append(" ").append(field); + if ("Date".equals(typeConcrete)) { + sb.append(" = new Date(val.getTime())"); + } else { + sb.append(" = val"); + } + sb.append(";\n }\n\n"); + return sb.toString(); + } + + private String getterName(String field) { + return JavaGen.addPrefixAndCapitalize("get", field); + } + + private String setterName(String field) { + return JavaGen.addPrefixAndCapitalize("set", field); + } + + public String getSignatureGet() { + return typeInterface + " " + getterName(field); + } + + public String getSignatureSet() { + return "void " + setterName(field) + " " + typeInterface; + } + + public String getDeclarationGet() { + return "public " + typeInterface + " " + getterName(field) + "()"; + } + + public String getDeclarationSet() { + return "public void " + setterName(field) + "(" + typeInterface + " val)"; + } + + @Override + public int compareTo(ModelField o) { + return field.compareTo(o.field); + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ModelField that = (ModelField) o; + return required == that.required && + Objects.equals(field, that.field) && + Objects.equals(typeInterface, that.typeInterface) && + Objects.equals(typeConcrete, that.typeConcrete) && + Objects.equals(comment, that.comment); + } + + @Override + public int hashCode() { + return Objects.hash(field, typeInterface, typeConcrete, required, comment); + } + +} diff --git a/codegen/src/main/java/ch/loway/oss/ari4java/codegen/models/Operation.java b/codegen/src/main/java/ch/loway/oss/ari4java/codegen/models/Operation.java new file mode 100755 index 00000000..60e358fb --- /dev/null +++ b/codegen/src/main/java/ch/loway/oss/ari4java/codegen/models/Operation.java @@ -0,0 +1,383 @@ + +package ch.loway.oss.ari4java.codegen.models; + +import ch.loway.oss.ari4java.codegen.gen.JavaGen; +import ch.loway.oss.ari4java.codegen.gen.JavaInterface; +import ch.loway.oss.ari4java.codegen.gen.JavaPkgInfo; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +/** + * $Id$ + * + * @author lenz + */ +public class Operation { + + public String method = ""; + public boolean wsUpgrade = false; + public String nickname = ""; + public String responseConcreteClass = ""; + public String responseInterface = ""; + public String description = ""; + public List params = new ArrayList<>(); + public List errorCodes = new ArrayList<>(); + public String apiVersion; + public Action action; + private JavaInterface ji; + + private String toParmList(boolean withType, boolean forComment) { + StringBuilder sb = new StringBuilder(); + boolean firstItem = true; + for (Param p : params) { + if (p.required) { + if (forComment) { + sb.append(p.getParamComment(null)); + } else { + if (firstItem) { + firstItem = false; + } else { + sb.append(", "); + } + if (withType) + sb.append(p.javaType).append(" "); + sb.append(p.name); + } + } + } + if (forComment) { + sb.append("@return ").append(getInterfaceName()).append("\n"); + } + return sb.toString(); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + + JavaGen.importClasses(sb, getPackage(), Arrays.asList("java.util.Date", + "java.util.List", + "java.util.Map", + "java.util.HashMap", + "java.util.ArrayList", + "java.net.URLEncoder", + "com.fasterxml.jackson.core.type.TypeReference", + JavaPkgInfo.BASE_PKG_NAME + ".ARI", + JavaPkgInfo.BASE_PKG_NAME + ".tools.*", + JavaPkgInfo.GENERATED_PKG_NAME + ".*", + JavaPkgInfo.GENERATED_PKG_NAME + ".actions.*", + JavaPkgInfo.GENERATED_PKG_NAME + ".actions.requests.*", + JavaPkgInfo.GENERATED_PKG_NAME + ".models.Module", + JavaPkgInfo.GENERATED_PKG_NAME + ".models.*", + JavaPkgInfo.GENERATED_PKG_NAME + "." + apiVersion + ".actions.*", + JavaPkgInfo.GENERATED_PKG_NAME + "." + apiVersion + ".actions.requests.*", + JavaPkgInfo.GENERATED_PKG_NAME + "." + apiVersion + ".models.*")); + + JavaGen.emptyLines(sb, 2); + + JavaInterface interfaces = ji.createScratchCopy(); + + sb.append("public class ").append(getImplName()) + .append(" extends BaseAriAction ") + .append(" implements ").append(getInterfaceName()).append(" {\n"); + for (Param p : params) { + sb.append(" private ").append(p.javaType).append(" ").append(p.name).append(";\n"); + } + generateConstructor(sb); + generateParams(sb, interfaces); + + // 1. Private build method + generateBuildMethod(sb); + // 2. Synchronous execute method + generateActionSync(sb, interfaces); + // 3. Asynchronous execute method + generateActionAsync(sb, interfaces); + // 4. Missing methods + sb.append(interfaces.getCodeToImplementMissingSignatures()); + + sb.append("}\n"); + return sb.toString(); + + } + + private void generateActionAsync(StringBuilder sb, JavaInterface interfaces) { + sb.append(" ").append(getAsyncExecuteDefinition()).append(" {\n"); + sb.append(" httpActionAsync(build(), callback"); + if (!responseInterface.equalsIgnoreCase("void")) { + String deserializationType = responseConcreteClass + ".class"; + if (responseConcreteClass.startsWith("List<")) { + deserializationType = "new TypeReference<" + responseConcreteClass + ">() {}"; + } + sb.append(", "); + sb.append(deserializationType); + } + sb.append(");\n"); + sb.append(" }\n\n"); + interfaces.removeSignature(getAsyncExecuteSignature()); + } + + private void generateActionSync(StringBuilder sb, JavaInterface interfaces) { + sb.append(" ").append(getSyncExecuteDefinition()).append(" {\n"); + if (wsUpgrade) { + // Websocket dummy sync method + sb.append(" throw new RestException(\"No synchronous operation on WebSocket\");\n"); + } else if (responseInterface.equalsIgnoreCase("byte[]")) { + sb.append(" return httpActionSyncAsBytes(build());\n"); + } else if (responseInterface.equalsIgnoreCase("void")) { + sb.append(" httpActionSync(build());\n"); + } else { + sb.append(" String json = httpActionSync(build());\n"); + String deserializationType = responseConcreteClass + ".class"; + if (responseConcreteClass.startsWith("List<")) { + deserializationType = "new TypeReference<" + responseConcreteClass + ">() {}"; + sb.append(" return deserializeJsonAsAbstractList(json, ") + .append(deserializationType) + .append(");\n"); + } else { + sb.append(" return deserializeJson(json, ") + .append(deserializationType) + .append(");\n"); + } + } + sb.append(" }\n\n"); + interfaces.removeSignature(getSyncExecuteSignature()); + } + + private void generateBuildMethod(StringBuilder sb) { + // search and replace URI parameters + String stUri = action.path; + for (Param p : params) { + if (p.type == ParamType.PATH) { + stUri = stUri.replace("{" + p.name + "}", "\" + encodeUrlPart(" + p.name + ") + \""); + } + } + sb.append(" private AriRequest build() {\n"); + sb.append(" AriRequest ariRequest = new AriRequest(\"").append(stUri).append("\", \"").append(method).append("\");\n"); + for (Param p : params) { + if (p.type == ParamType.QUERY) { + sb.append(" ariRequest.addParamQuery(HttpParam.build( \"").append(p.name) + .append("\", ").append(p.name).append("));\n"); + } else if (p.type == ParamType.BODY) { + sb.append(" ariRequest.setBodyField(\"").append(p.name) + .append("\", ").append(p.name).append(");\n"); + } + } + for (ErrorResp er : errorCodes) { + sb.append(" ariRequest.addErrorResponse(HttpResponse.build(").append(er.code) + .append(", \"").append(er.reason).append("\"));\n"); + } + if (wsUpgrade) { + sb.append(" ariRequest.setWsUpgrade(true);\n"); + } + sb.append(" return ariRequest;\n"); + sb.append(" }\n\n"); + } + + private void generateParams(StringBuilder sb, JavaInterface interfaces) { + for (Param p : params) { + sb.append(p.getDefinition(getInterfaceName())).append(" {\n") + .append(" this.").append(p.name).append(" = ").append(p.name).append(";\n") + .append(" return this;\n") + .append(" }\n\n"); + interfaces.removeSignature(p.getSignature(getInterfaceName())); + if (p.javaType.equals("Map")) { + sb.append(p.getDefinitionForAddToMap(getInterfaceName())).append(" {\n") + .append(" if (this.").append(p.name).append(" == null) {\n") + .append(" this.").append(p.name).append(" = new HashMap<>();\n") + .append(" }\n") + .append(" this.").append(p.name).append(".put(key, value);\n") + .append(" return this;\n") + .append(" }\n\n"); + interfaces.removeSignature(p.getSignatureForAddToMap(getInterfaceName())); + } + } + } + + private void generateConstructor(StringBuilder sb) { + sb.append("\n ").append(getConstructorDefinition()).append(" {\n"); + for (Param p : params) { + if (p.required) { + sb.append(" this.").append(p.name).append(" = ").append(p.name).append(";\n"); + } + } + sb.append(" }\n\n"); + } + + private String getSyncExecuteSignature() { + return responseInterface + " execute"; + } + + private String getSyncExecuteDefinition() { + return "public " + responseInterface + " execute() throws RestException"; + } + + private String getAsyncExecuteSignature() { + return "void execute " + JavaGen.addAsyncCallback(responseInterface); + } + + private String getAsyncExecuteDefinition() { + return "public void execute(" + JavaGen.addAsyncCallback(responseInterface) + ")"; + } + + public String getPackage() { + return "ch.loway.oss.ari4java.generated." + apiVersion + ".actions.requests"; + } + + public String toJava() { + + StringBuilder sb = new StringBuilder(); + JavaGen.addBanner(sb, action.description + "\n" + description); + + sb.append("@Override\n"); + sb.append(getDefinition()); + sb.append(" {\n "); + sb.append(getImplName()).append(" request = new ").append(getImplName()).append("("); + sb.append(toParmList(false, false)).append(");\n"); + sb.append(" request.setHttpClient(this.getHttpClient());\n"); + sb.append(" request.setWsClient(this.getWsClient());\n"); + sb.append(" request.setLiveActionList(this.getLiveActionList());\n"); + sb.append(" request.setForcedResponse(this.getForcedResponse());\n"); + sb.append(" return request;\n"); + sb.append("}\n\n"); + + return sb.toString(); + } + + public String getSignature() { + StringBuilder sb = new StringBuilder(); + sb.append(getInterfaceName()) + .append(" ") + .append(nickname); + + for (Param p : params) { + if (p.required) { + sb.append(" ").append(p.javaType); + } + } + return sb.toString(); + } + + public String getConstructorDefinition() { + return "public " + getImplName() + "(" + toParmList(true, false) + ")"; + } + + public String getDefinition() { + return "public " + getInterfaceName() + " " + nickname + "(" + toParmList(true, false) + + ") throws RestException"; + } + + public String getInterfaceName() { + String s = action.api.getInterfaceName().substring(6); + s += nickname.substring(0, 1).toUpperCase() + nickname.substring(1); + if (!nickname.equalsIgnoreCase(method)) { + s += method.substring(0, 1).toUpperCase() + method.substring(1).toLowerCase(); + } + s += "Request"; + return s; + } + + public String getImplName() { + return getInterfaceName() + "_impl_" + apiVersion; + } + + public void registerInterfaces(JavaInterface j, String apiVersion) { + ji = j; + for (Param p : params) { + String javaSignature = p.getSignature(getInterfaceName()); + String definition = p.getDefinition(getInterfaceName()); + j.iKnow(javaSignature, definition,p.getParamComment(getInterfaceName()), apiVersion); + if (p.javaType.equals("Map")) { + javaSignature = p.getSignatureForAddToMap(getInterfaceName()); + definition = p.getDefinitionForAddToMap(getInterfaceName()); + j.iKnow(javaSignature, definition, "@param key the attribute name\n" + + "@param value the attribute value\n" + + "@return " + getInterfaceName() + "\n", apiVersion); + } + } + String returnComment = "\n@return " + responseInterface; + if ("void".equalsIgnoreCase(responseInterface)) { + returnComment = ""; + } + j.iKnow(getSyncExecuteSignature(), getSyncExecuteDefinition(), "@throws RestException an error" + returnComment, apiVersion); + j.iKnow(getAsyncExecuteSignature(), getAsyncExecuteDefinition(), "@param callback AriCallback>" + responseInterface.replaceAll("^void$", "Void") + "<", apiVersion); + } + + public String getComment() { + return description + "\n" + toParmList(false, true) + "\n@throws RestException an error"; + } + + /** + * A parameter as defined in Swagger + */ + public static class Param { + public String name = ""; + public String description = ""; + public ParamType type = ParamType.PATH; + public String javaType = ""; + public String methodArgumentType = ""; + public boolean required = true; + + public String getSignature(String returnType) { + return returnType + " " + JavaGen.addPrefixAndCapitalize("set", name) + " " + javaType; + } + + public String getDefinition(String returnType) { + return " public " + returnType + " " + JavaGen.addPrefixAndCapitalize("set", name) + + "(" + methodArgumentType + " " + name + ")"; + } + + public String getSignatureForAddToMap(String returnType) { + return returnType + " " + JavaGen.addPrefixAndCapitalize("add", name) + " " + javaType; + } + + public String getDefinitionForAddToMap(String returnType) { + return " public " + returnType + " " + JavaGen.addPrefixAndCapitalize("add", name) + + "(String key, String value)"; + } + + public String getParamComment(String returnType) { + StringBuilder sb = new StringBuilder(); + sb.append("@param ").append(name).append(" "); + if (description == null || description.trim().isEmpty()) { + sb.append(name); + } else { + sb.append(description); + } + sb.append("\n"); + if (returnType != null) { + sb.append("@return ").append(returnType).append("\n"); + } + return sb.toString(); + } + } + + public enum ParamType { + PATH, + QUERY, + BODY, + HEADER, + FORM; + + public static ParamType build(String s) { + if (s.equalsIgnoreCase("path")) { + return PATH; + } else if (s.equalsIgnoreCase("query")) { + return QUERY; + } else if (s.equalsIgnoreCase("form")) { + return FORM; + } else if (s.equalsIgnoreCase("body")) { + return BODY; + } else { + throw new IllegalArgumentException("Would not know how to handle parameter of type " + s); + } + } + + } + + public static class ErrorResp { + public int code = 0; + public String reason = ""; + } + +} diff --git a/codegen/src/main/java/ch/loway/oss/ari4java/codegen/run.java b/codegen/src/main/java/ch/loway/oss/ari4java/codegen/run.java new file mode 100755 index 00000000..6e9d376c --- /dev/null +++ b/codegen/src/main/java/ch/loway/oss/ari4java/codegen/run.java @@ -0,0 +1,62 @@ + +package ch.loway.oss.ari4java.codegen; + +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.stream.Stream; + +/** + * $Id$ + * + * @author lenz + */ +public class run { + + public static void main(String[] argv) throws Exception { + System.out.println("This is ARI4JAVA Code Generator version " + VERSION.VER); + String sourceFolder = "./src/main/resources/codegen-data/"; + String outputFolder = "../src/main/generated/"; + DefMapper dm = new DefMapper(); + dm.setOutputFolder(outputFolder); + dm.clean(); + Files.list(Paths.get(sourceFolder)); + try (Stream list = Files.list(Paths.get(sourceFolder))) { + list.filter(p -> p.toFile().isDirectory()).sorted((p1, p2) -> { + // break up folder into version parts and sort as numbers + String[] items1 = p1.getFileName().toString().split("_"); + String[] items2 = p2.getFileName().toString().split("_"); + if (items1.length == 4 && items2.length == 4) { + if (items1[1].equals(items2[1])) { + if (items1[2].equals(items2[2])) { + return Integer.valueOf(items1[3]).compareTo(Integer.valueOf(items2[3])); + } + return Integer.valueOf(items1[2]).compareTo(Integer.valueOf(items2[2])); + } + return Integer.valueOf(items1[1]).compareTo(Integer.valueOf(items2[1])); + } + return p1.compareTo(p2); + }).forEach(p -> loadAsteriskDefs(dm, p.toFile())); + } + dm.generateAllClasses(); + } + + private static void loadAsteriskDefs(DefMapper dm, File folder) { + try { + String srcVer = folder.getName(); + File[] files = folder.listFiles(); + if (files != null) { + for (File definition : files) { + if (definition.getName().endsWith(".json")) { + dm.parseJsonDefinition(definition, srcVer); + } + } + } + } catch (Exception e) { + throw new RuntimeException(e.toString(), e); + } + } + +} + diff --git a/codegen-data/COPYING.asterisk b/codegen/src/main/resources/codegen-data/COPYING.asterisk old mode 100644 new mode 100755 similarity index 100% rename from codegen-data/COPYING.asterisk rename to codegen/src/main/resources/codegen-data/COPYING.asterisk diff --git a/codegen-data/LICENSE.asterisk b/codegen/src/main/resources/codegen-data/LICENSE.asterisk old mode 100644 new mode 100755 similarity index 100% rename from codegen-data/LICENSE.asterisk rename to codegen/src/main/resources/codegen-data/LICENSE.asterisk diff --git a/codegen/src/main/resources/codegen-data/ari_0_0_1/applications.json b/codegen/src/main/resources/codegen-data/ari_0_0_1/applications.json new file mode 100644 index 00000000..cd27d586 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_0_0_1/applications.json @@ -0,0 +1,172 @@ +{ + "_copyright": "Copyright (C) 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "0.0.1", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/stasis", + "resourcePath": "/api-docs/applications.{format}", + "apis": [ + { + "path": "/applications", + "description": "Stasis applications", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all applications.", + "nickname": "list", + "responseClass": "List[Application]" + } + ] + }, + { + "path": "/applications/{applicationName}", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get details of an application.", + "nickname": "get", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Application does not exist." + } + ] + } + ] + }, + { + "path": "/applications/{applicationName}/subscription", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "POST", + "summary": "Subscribe an application to a event source.", + "notes": "Returns the state of the application after the subscriptions have changed", + "nickname": "subscribe", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "eventSource", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}/{resource}, deviceState:{deviceName}", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing parameter." + }, + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 422, + "reason": "Event source does not exist." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unsubscribe an application from an event source.", + "notes": "Returns the state of the application after the subscriptions have changed", + "nickname": "unsubscribe", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "eventSource", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}/{resource}, device_state:{deviceName}", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing parameter; event source scheme not recognized." + }, + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 409, + "reason": "Application not subscribed to event source." + }, + { + "code": 422, + "reason": "Event source does not exist." + } + ] + } + ] + } + ], + "models": { + "Application": { + "id": "Application", + "description": "Details of a Stasis application", + "properties": { + "name": { + "type": "string", + "description": "Name of this application", + "required": true + }, + "channel_ids": { + "type": "List[string]", + "description": "Id's for channels subscribed to.", + "required": true + }, + "bridge_ids": { + "type": "List[string]", + "description": "Id's for bridges subscribed to.", + "required": true + }, + "endpoint_ids": { + "type": "List[string]", + "description": "{tech}/{resource} for endpoints subscribed to.", + "required": true + }, + "device_names": { + "type": "List[string]", + "description": "Names of the devices subscribed to.", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_0_0_1/asterisk.json b/codegen/src/main/resources/codegen-data/ari_0_0_1/asterisk.json new file mode 100644 index 00000000..8b448327 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_0_0_1/asterisk.json @@ -0,0 +1,259 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "0.0.1", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/stasis", + "resourcePath": "/api-docs/asterisk.{format}", + "apis": [ + { + "path": "/asterisk/info", + "description": "Asterisk system information (similar to core show settings)", + "operations": [ + { + "httpMethod": "GET", + "summary": "Gets Asterisk system information.", + "nickname": "getInfo", + "responseClass": "AsteriskInfo", + "parameters": [ + { + "name": "only", + "description": "Filter information returned", + "paramType": "query", + "required": false, + "allowMultiple": true, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "build", + "system", + "config", + "status" + ] + } + } + ] + } + ] + }, + { + "path": "/asterisk/variable", + "description": "Global variables", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the value of a global variable.", + "nickname": "getGlobalVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "variable", + "description": "The variable to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + } + ] + }, + { + "httpMethod": "POST", + "summary": "Set the value of a global variable.", + "nickname": "setGlobalVar", + "responseClass": "void", + "parameters": [ + { + "name": "variable", + "description": "The variable to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + } + ] + } + ] + } + ], + "models": { + "BuildInfo": { + "id": "BuildInfo", + "description": "Info about how Asterisk was built", + "properties": { + "os": { + "required": true, + "type": "string", + "description": "OS Asterisk was built on." + }, + "kernel": { + "required": true, + "type": "string", + "description": "Kernel version Asterisk was built on." + }, + "options": { + "required": true, + "type": "string", + "description": "Compile time options, or empty string if default." + }, + "machine": { + "required": true, + "type": "string", + "description": "Machine architecture (x86_64, i686, ppc, etc.)" + }, + "date": { + "required": true, + "type": "string", + "description": "Date and time when Asterisk was built." + }, + "user": { + "required": true, + "type": "string", + "description": "Username that build Asterisk" + } + } + }, + "SystemInfo": { + "id": "SystemInfo", + "description": "Info about Asterisk", + "properties": { + "version": { + "required": true, + "type": "string", + "description": "Asterisk version." + }, + "entity_id": { + "required": true, + "type": "string", + "description": "" + } + } + }, + "SetId": { + "id": "SetId", + "description": "Effective user/group id", + "properties": { + "user": { + "required": true, + "type": "string", + "description": "Effective user id." + }, + "group": { + "required": true, + "type": "string", + "description": "Effective group id." + } + } + }, + "ConfigInfo": { + "id": "ConfigInfo", + "description": "Info about Asterisk configuration", + "properties": { + "name": { + "required": true, + "type": "string", + "description": "Asterisk system name." + }, + "default_language": { + "required": true, + "type": "string", + "description": "Default language for media playback." + }, + "max_channels": { + "required": false, + "type": "int", + "description": "Maximum number of simultaneous channels." + }, + "max_open_files": { + "required": false, + "type": "int", + "description": "Maximum number of open file handles (files, sockets)." + }, + "max_load": { + "required": false, + "type": "double", + "description": "Maximum load avg on system." + }, + "setid": { + "required": true, + "type": "SetId", + "description": "Effective user/group id for running Asterisk." + } + } + }, + "StatusInfo": { + "id": "StatusInfo", + "description": "Info about Asterisk status", + "properties": { + "startup_time": { + "required": true, + "type": "Date", + "description": "Time when Asterisk was started." + }, + "last_reload_time": { + "required": true, + "type": "Date", + "description": "Time when Asterisk was last reloaded." + } + } + }, + "AsteriskInfo": { + "id": "AsteriskInfo", + "description": "Asterisk system information", + "properties": { + "build": { + "required": false, + "type": "BuildInfo", + "description": "Info about how Asterisk was built" + }, + "system": { + "required": false, + "type": "SystemInfo", + "description": "Info about the system running Asterisk" + }, + "config": { + "required": false, + "type": "ConfigInfo", + "description": "Info about Asterisk configuration" + }, + "status": { + "required": false, + "type": "StatusInfo", + "description": "Info about Asterisk status" + } + } + }, + "Variable": { + "id": "Variable", + "description": "The value of a channel variable", + "properties": { + "value": { + "required": true, + "type": "string", + "description": "The value of the variable requested" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_0_0_1/bridges.json b/codegen/src/main/resources/codegen-data/ari_0_0_1/bridges.json new file mode 100644 index 00000000..2339a967 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_0_0_1/bridges.json @@ -0,0 +1,513 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "0.0.1", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/stasis", + "resourcePath": "/api-docs/bridges.{format}", + "apis": [ + { + "path": "/bridges", + "description": "Active bridges", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all active bridges in Asterisk.", + "nickname": "list", + "responseClass": "List[Bridge]" + }, + { + "httpMethod": "POST", + "summary": "Create a new bridge.", + "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", + "nickname": "create", + "responseClass": "Bridge", + "parameters": [ + { + "name": "type", + "description": "Type of bridge to create.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "mixing", + "holding" + ] + } + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}", + "description": "Individual bridge", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get bridge details.", + "nickname": "get", + "responseClass": "Bridge", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Shut down a bridge.", + "notes": "If any channels are in this bridge, they will be removed and resume whatever they were doing beforehand.", + "nickname": "destroy", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/addChannel", + "description": "Add a channel to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Add a channel to a bridge.", + "nickname": "addChannel", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channel", + "description": "Ids of channels to add to bridge", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "role", + "description": "Channel's role in the bridge", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Channel not found" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + }, + { + "code": 422, + "reason": "Channel not in Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/removeChannel", + "description": "Remove a channel from a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Remove a channel from a bridge.", + "nickname": "removeChannel", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channel", + "description": "Ids of channels to remove from bridge", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Channel not found" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + }, + { + "code": 422, + "reason": "Channel not in this bridge" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/moh", + "description": "Play music on hold to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play music on hold to a bridge or change the MOH class that is playing.", + "nickname": "startMoh", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "mohClass", + "description": "Channel's id", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing music on hold to a bridge.", + "notes": "This will only stop music on hold being played via POST bridges/{bridgeId}/moh.", + "nickname": "stopMoh", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/play", + "description": "Play media to the participants of a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media on a bridge.", + "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.)", + "nickname": "play", + "responseClass": "Playback", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media's URI to play.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of media to skip before playing.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/record", + "description": "Record audio on a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start a recording.", + "notes": "This records the mixed audio from all channels participating in this bridge.", + "nickname": "record", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Recording's filename", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "maxDurationSeconds", + "description": "Maximum duration of the recording, in seconds. 0 for no limit.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "maxSilenceSeconds", + "description": "Maximum duration of silence, in seconds. 0 for no limit.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "ifExists", + "description": "Action to take if a recording with the same name already exists.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "fail", + "allowableValues": { + "valueType": "LIST", + "values": [ + "fail", + "overwrite", + "append" + ] + } + }, + { + "name": "beep", + "description": "Play beep when recording begins", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "terminateOn", + "description": "DTMF input to terminate recording.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "any", + "*", + "#" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge is not in a Stasis application; A recording with the same name already exists on the system and can not be overwritten because it is in progress or ifExists=fail" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + } + ], + "models": { + "Bridge": { + "id": "Bridge", + "description": "The merging of media from one or more channels.\n\nEveryone on the bridge receives the same audio.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for this bridge", + "required": true + }, + "technology": { + "type": "string", + "description": "Name of the current bridging technology", + "required": true + }, + "bridge_type": { + "type": "string", + "description": "Type of bridge technology", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "mixing", + "holding" + ] + } + }, + "bridge_class": { + "type": "string", + "description": "Bridging class", + "required": true + }, + "channels": { + "type": "List[string]", + "description": "Ids of channels participating in this bridge", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_0_0_1/channels.json b/codegen/src/main/resources/codegen-data/ari_0_0_1/channels.json new file mode 100644 index 00000000..39586689 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_0_0_1/channels.json @@ -0,0 +1,1144 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "0.0.1", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/stasis", + "resourcePath": "/api-docs/channels.{format}", + "apis": [ + { + "path": "/channels", + "description": "Active channels", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all active channels in Asterisk.", + "nickname": "list", + "responseClass": "List[Channel]" + }, + { + "httpMethod": "POST", + "summary": "Create a new channel (originate).", + "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.", + "nickname": "originate", + "responseClass": "Channel", + "parameters": [ + { + "name": "endpoint", + "description": "Endpoint to call.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to dial after the endpoint answers", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to dial after the endpoint answers. If omitted, uses 'default'", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to dial after the endpoint answers. If omitted, uses 1", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "long" + }, + { + "name": "app", + "description": "The application that is subscribed to the originated channel, and passed to the Stasis application.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "callerId", + "description": "CallerID to use when dialing the endpoint or extension.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 30 + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for originating a channel." + } + ] + } + ] + }, + { + "path": "/channels/{channelId}", + "description": "Active channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "Channel details.", + "nickname": "get", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Delete (i.e. hangup) a channel.", + "nickname": "hangup", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "reason", + "description": "Reason for hanging up the channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defalutValue": "normal", + "allowableValues": { + "valueType": "LIST", + "values": [ + "normal", + "busy", + "congestion" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid reason for hangup provided" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/continue", + "description": "Exit application; continue execution in the dialplan", + "operations": [ + { + "httpMethod": "POST", + "summary": "Exit application; continue execution in the dialplan.", + "nickname": "continueInDialplan", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/answer", + "description": "Answer a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Answer a channel.", + "nickname": "answer", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/ring", + "description": "Send a ringing indication to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Indicate ringing to a channel.", + "nickname": "ring", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop ringing indication on a channel if locally generated.", + "nickname": "ringStop", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/dtmf", + "description": "Send DTMF to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Send provided DTMF to a given channel.", + "nickname": "sendDTMF", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "dtmf", + "description": "DTMF To send.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "before", + "description": "Amount of time to wait before DTMF digits (specified in milliseconds) start.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0 + }, + { + "name": "between", + "description": "Amount of time in between DTMF digits (specified in milliseconds).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 100 + }, + { + "name": "duration", + "description": "Length of each DTMF digit (specified in milliseconds).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 100 + }, + { + "name": "after", + "description": "Amount of time to wait after DTMF digits (specified in milliseconds) end.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0 + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "DTMF is required" + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/mute", + "description": "Mute a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Mute a channel.", + "nickname": "mute", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "Direction in which to mute audio", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both", + "in", + "out" + ] + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unmute a channel.", + "nickname": "unmute", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "Direction in which to unmute audio", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both", + "in", + "out" + ] + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/hold", + "description": "Put a channel on hold", + "operations": [ + { + "httpMethod": "POST", + "summary": "Hold a channel.", + "nickname": "hold", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Remove a channel from hold.", + "nickname": "unhold", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/moh", + "description": "Play music on hold to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play music on hold to a channel.", + "notes": "Using media operations such as /play on a channel playing MOH in this manner will suspend MOH without resuming automatically. If continuing music on hold is desired, the stasis application must reinitiate music on hold.", + "nickname": "startMoh", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "mohClass", + "description": "Music on hold class to use", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing music on hold to a channel.", + "nickname": "stopMoh", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/silence", + "description": "Play silence to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play silence to a channel.", + "notes": "Using media operations such as /play on a channel playing silence in this manner will suspend silence without resuming automatically.", + "nickname": "startSilence", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing silence to a channel.", + "nickname": "stopSilence", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/play", + "description": "Play media to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media.", + "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.)", + "nickname": "play", + "responseClass": "Playback", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media's URI to play.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of media to skip before playing.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000 + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/record", + "description": "Record audio from a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start a recording.", + "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.", + "nickname": "record", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Recording's filename", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "maxDurationSeconds", + "description": "Maximum duration of the recording, in seconds. 0 for no limit", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "maxSilenceSeconds", + "description": "Maximum duration of silence, in seconds. 0 for no limit", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "ifExists", + "description": "Action to take if a recording with the same name already exists.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "fail", + "allowableValues": { + "valueType": "LIST", + "values": [ + "fail", + "overwrite", + "append" + ] + } + }, + { + "name": "beep", + "description": "Play beep when recording begins", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "terminateOn", + "description": "DTMF input to terminate recording", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "any", + "*", + "#" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "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" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/variable", + "description": "Variables on a channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the value of a channel variable or function.", + "nickname": "getChannelVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The channel variable or function to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "POST", + "summary": "Set the value of a channel variable or function.", + "nickname": "setChannelVar", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The channel variable or function to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/snoop", + "description": "Snoop (spy/whisper) on a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start snooping.", + "notes": "Snoop (spy/whisper) on a specific channel.", + "nickname": "snoopChannel", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "spy", + "description": "Direction of audio to spy on", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "whisper", + "description": "Direction of audio to whisper into", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "app", + "description": "Application the snooping channel is placed into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + } + ], + "models": { + "Dialed": { + "id": "Dialed", + "description": "Dialed channel information.", + "properties": {} + }, + "DialplanCEP": { + "id": "DialplanCEP", + "description": "Dialplan location (context/extension/priority)", + "properties": { + "context": { + "required": true, + "type": "string", + "description": "Context in the dialplan" + }, + "exten": { + "required": true, + "type": "string", + "description": "Extension in the dialplan" + }, + "priority": { + "required": true, + "type": "long", + "description": "Priority in the dialplan" + } + } + }, + "CallerID": { + "id": "CallerID", + "description": "Caller identification", + "properties": { + "name": { + "required": true, + "type": "string" + }, + "number": { + "required": true, + "type": "string" + } + } + }, + "Channel": { + "id": "Channel", + "description": "A specific communication connection between Asterisk and an Endpoint.", + "properties": { + "id": { + "required": true, + "type": "string", + "description": "Unique identifier of the channel.\n\nThis is the same as the Uniqueid field in AMI." + }, + "name": { + "required": true, + "type": "string", + "description": "Name of the channel (i.e. SIP/foo-0000a7e3)" + }, + "state": { + "required": true, + "type": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "Down", + "Rsrved", + "OffHook", + "Dialing", + "Ring", + "Ringing", + "Up", + "Busy", + "Dialing Offhook", + "Pre-ring", + "Unknown" + ] + } + }, + "caller": { + "required": true, + "type": "CallerID" + }, + "connected": { + "required": true, + "type": "CallerID" + }, + "accountcode": { + "required": true, + "type": "string" + }, + "dialplan": { + "required": true, + "type": "DialplanCEP", + "description": "Current location in the dialplan" + }, + "creationtime": { + "required": true, + "type": "Date", + "description": "Timestamp when channel was created" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_0_0_1/deviceStates.json b/codegen/src/main/resources/codegen-data/ari_0_0_1/deviceStates.json new file mode 100644 index 00000000..529bc70d --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_0_0_1/deviceStates.json @@ -0,0 +1,151 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "Kevin Harwell ", + "_svn_revision": "$Revision$", + "apiVersion": "0.0.1", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/stasis", + "resourcePath": "/api-docs/deviceStates.{format}", + "apis": [ + { + "path": "/deviceStates", + "description": "Device states", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all ARI controlled device states.", + "nickname": "list", + "responseClass": "List[DeviceState]" + } + ] + }, + { + "path": "/deviceStates/{deviceName}", + "description": "Device state", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve the current state of a device.", + "nickname": "get", + "responseClass": "DeviceState", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Change the state of a device controlled by ARI. (Note - implicitly creates the device state).", + "nickname": "update", + "responseClass": "void", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "deviceState", + "description": "Device state value", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "NOT_INUSE", + "INUSE", + "BUSY", + "INVALID", + "UNAVAILABLE", + "RINGING", + "RINGINUSE", + "ONHOLD" + ] + } + + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Device name is missing" + }, + { + "code": 409, + "reason": "Uncontrolled device specified" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Destroy a device-state controlled by ARI.", + "nickname": "delete", + "responseClass": "void", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Device name is missing" + }, + { + "code": 409, + "reason": "Uncontrolled device specified" + } + ] + } + ] + } + ], + "models": { + "DeviceState": { + "id": "DeviceState", + "description": "Represents the state of a device.", + "properties": { + "name": { + "type": "string", + "description": "Name of the device.", + "required": true + }, + "state": { + "type": "string", + "description": "Device's state", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "UNKNOWN", + "NOT_INUSE", + "INUSE", + "BUSY", + "INVALID", + "UNAVAILABLE", + "RINGING", + "RINGINUSE", + "ONHOLD" + ] + } + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_0_0_1/endpoints.json b/codegen/src/main/resources/codegen-data/ari_0_0_1/endpoints.json new file mode 100644 index 00000000..fb66357a --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_0_0_1/endpoints.json @@ -0,0 +1,117 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "0.0.1", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/stasis", + "resourcePath": "/api-docs/endpoints.{format}", + "apis": [ + { + "path": "/endpoints", + "description": "Asterisk endpoints", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all endpoints.", + "nickname": "list", + "responseClass": "List[Endpoint]" + } + ] + }, + { + "path": "/endpoints/{tech}", + "description": "Asterisk endpoints", + "operations": [ + { + "httpMethod": "GET", + "summary": "List available endoints for a given endpoint technology.", + "nickname": "listByTech", + "responseClass": "List[Endpoint]", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoints (sip,iax2,...)", + "paramType": "path", + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Endpoints not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}/{resource}", + "description": "Single endpoint", + "operations": [ + { + "httpMethod": "GET", + "summary": "Details for an endpoint.", + "nickname": "get", + "responseClass": "Endpoint", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "resource", + "description": "ID of the endpoint", + "paramType": "path", + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Endpoints not found" + } + ] + } + ] + } + ], + "models": { + "Endpoint": { + "id": "Endpoint", + "description": "An external device that may offer/accept calls to/from Asterisk.\n\nUnlike most resources, which have a single unique identifier, an endpoint is uniquely identified by the technology/resource pair.", + "properties": { + "technology": { + "type": "string", + "description": "Technology of the endpoint", + "required": true + }, + "resource": { + "type": "string", + "description": "Identifier of the endpoint, specific to the given technology.", + "required": true + }, + "state": { + "type": "string", + "description": "Endpoint's state", + "required": false, + "allowableValues": { + "valueType": "LIST", + "values": [ + "unknown", + "offline", + "online" + ] + } + }, + "channel_ids": { + "type": "List[string]", + "description": "Id's of channels associated with this endpoint", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_0_0_1/events.json b/codegen/src/main/resources/codegen-data/ari_0_0_1/events.json new file mode 100644 index 00000000..a342099a --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_0_0_1/events.json @@ -0,0 +1,437 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "0.0.1", + "swaggerVersion": "1.2", + "basePath": "http://localhost:8088/stasis", + "resourcePath": "/api-docs/events.{format}", + "apis": [ + { + "path": "/events", + "description": "Events from Asterisk to applications", + "operations": [ + { + "httpMethod": "GET", + "upgrade": "websocket", + "websocketProtocol": "ari", + "summary": "WebSocket connection for events.", + "nickname": "eventWebsocket", + "responseClass": "Message", + "parameters": [ + { + "name": "app", + "description": "Applications to subscribe to.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ] + } + ] + } + ], + "models": { + "Message": { + "id": "Message", + "description": "Base type for errors and events", + "discriminator": "type", + "properties": { + "type": { + "type": "string", + "required": true, + "description": "Indicates the type of this message." + } + }, + "subTypes": [ + "MissingParams", + "Event" + ] + }, + "MissingParams": { + "id": "MissingParams", + "description": "Error event sent when required params are missing.", + "properties": { + "params": { + "required": true, + "type": "List[string]", + "description": "A list of the missing parameters" + } + } + }, + "Event": { + "id": "Event", + "description": "Base type for asynchronous events from Asterisk.", + "properties": { + "application": { + "type": "string", + "description": "Name of the application receiving the event.", + "required": true + }, + "timestamp": { + "type": "Date", + "description": "Time at which this event was created.", + "required": false + } + }, + "subTypes": [ + "DeviceStateChanged", + "PlaybackStarted", + "PlaybackFinished", + "ApplicationReplaced", + "BridgeCreated", + "BridgeDestroyed", + "BridgeMerged", + "ChannelCreated", + "ChannelDestroyed", + "ChannelEnteredBridge", + "ChannelLeftBridge", + "ChannelStateChange", + "ChannelDtmfReceived", + "ChannelDialplan", + "ChannelCallerId", + "ChannelUserevent", + "ChannelHangupRequest", + "ChannelVarset", + "EndpointStateChange", + "StasisEnd", + "StasisStart" + ] + }, + "DeviceStateChanged": { + "id": "DeviceStateChanged", + "description": "Notification that a device state has changed.", + "properties": { + "device_state": { + "type": "DeviceState", + "description": "Device state object", + "required": true + } + } + }, + "PlaybackStarted": { + "id": "PlaybackStarted", + "description": "Event showing the start of a media playback operation.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "PlaybackFinished": { + "id": "PlaybackFinished", + "description": "Event showing the completion of a media playback operation.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "RecordingStarted": { + "id": "RecordingStarted", + "extends": "Event", + "description": "Event showing the start of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "RecordingFinished": { + "id": "RecordingFinished", + "extends": "Event", + "description": "Event showing the completion of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "RecordingFailed": { + "id": "RecordingFailed", + "extends": "Event", + "description": "Event showing failure of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "ApplicationReplaced": { + "id": "ApplicationReplaced", + "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.", + "properties": {} + }, + "BridgeCreated": { + "id": "BridgeCreated", + "description": "Notification that a bridge has been created.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeDestroyed": { + "id": "BridgeDestroyed", + "description": "Notification that a bridge has been destroyed.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeMerged": { + "id": "BridgeMerged", + "description": "Notification that one bridge has merged into another.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "bridge_from": { + "required": true, + "type": "Bridge" + } + } + }, + "ChannelCreated": { + "id": "ChannelCreated", + "description": "Notification that a channel has been created.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelDestroyed": { + "id": "ChannelDestroyed", + "description": "Notification that a channel has been destroyed.", + "properties": { + "cause": { + "required": true, + "description": "Integer representation of the cause of the hangup", + "type": "int" + }, + "cause_txt": { + "required": true, + "description": "Text representation of the cause of the hangup", + "type": "string" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelEnteredBridge": { + "id": "ChannelEnteredBridge", + "description": "Notification that a channel has entered a bridge.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "channel": { + "type": "Channel" + } + } + }, + "ChannelLeftBridge": { + "id": "ChannelLeftBridge", + "description": "Notification that a channel has left a bridge.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelStateChange": { + "id": "ChannelStateChange", + "description": "Notification of a channel's state change.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelDtmfReceived": { + "id": "ChannelDtmfReceived", + "description": "DTMF received on a channel.\n\nThis event is sent when the DTMF ends. There is no notification about the start of DTMF", + "properties": { + "digit": { + "required": true, + "type": "string", + "description": "DTMF digit received (0-9, A-E, # or *)" + }, + "duration_ms": { + "required": true, + "type": "int", + "description": "Number of milliseconds DTMF was received" + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which DTMF was received" + } + } + }, + "ChannelDialplan": { + "id": "ChannelDialplan", + "description": "Channel changed location in the dialplan.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that changed dialplan location." + }, + "dialplan_app": { + "required": true, + "type": "string", + "description": "The application about to be executed." + }, + "dialplan_app_data": { + "required": true, + "type": "string", + "description": "The data to be passed to the application." + } + } + }, + "ChannelCallerId": { + "id": "ChannelCallerId", + "description": "Channel changed Caller ID.", + "properties": { + "caller_presentation": { + "required": true, + "type": "int", + "description": "The integer representation of the Caller Presentation value." + }, + "caller_presentation_txt": { + "required": true, + "type": "string", + "description": "The text representation of the Caller Presentation value." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that changed Caller ID." + } + } + }, + "ChannelUserevent": { + "id": "ChannelUserevent", + "description": "User-generated event with additional user-defined fields in the object.", + "properties": { + "eventname": { + "required": true, + "type": "string", + "description": "The name of the user event." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that signaled the user event." + }, + "userevent": { + "required": true, + "type": "object", + "description": "Custom Userevent data" + } + } + }, + "ChannelHangupRequest": { + "id": "ChannelHangupRequest", + "description": "A hangup was requested on the channel.", + "properties": { + "cause": { + "type": "int", + "description": "Integer representation of the cause of the hangup." + }, + "soft": { + "type": "boolean", + "description": "Whether the hangup request was a soft hangup request." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which the hangup was requested." + } + } + }, + "ChannelVarset": { + "id": "ChannelVarset", + "description": "Channel variable changed.", + "properties": { + "variable": { + "required": true, + "type": "string", + "description": "The variable that changed." + }, + "value": { + "required": true, + "type": "string", + "description": "The new value of the variable." + }, + "channel": { + "required": false, + "type": "Channel", + "description": "The channel on which the variable was set.\n\nIf missing, the variable is a global variable." + } + } + }, + "EndpointStateChange": { + "id": "EndpointStateChange", + "description": "Endpoint state changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + } + } + }, + "StasisEnd": { + "id": "StasisEnd", + "description": "Notification that a channel has left a Stasis application.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "StasisStart": { + "id": "StasisStart", + "description": "Notification that a channel has entered a Stasis application.", + "properties": { + "args": { + "required": true, + "type": "List[string]", + "description": "Arguments to the application" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_0_0_1/playbacks.json b/codegen/src/main/resources/codegen-data/ari_0_0_1/playbacks.json new file mode 100644 index 00000000..2c621cf8 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_0_0_1/playbacks.json @@ -0,0 +1,155 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "0.0.1", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/stasis", + "resourcePath": "/api-docs/playbacks.{format}", + "apis": [ + { + "path": "/playbacks/{playbackId}", + "description": "Control object for a playback operation.", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a playback's details.", + "nickname": "get", + "responseClass": "Playback", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "The playback cannot be found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop a playback.", + "nickname": "stop", + "responseClass": "void", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "The playback cannot be found" + } + ] + } + ] + }, + { + "path": "/playbacks/{playbackId}/control", + "description": "Control object for a playback operation.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Control a playback.", + "nickname": "control", + "responseClass": "void", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "operation", + "description": "Operation to perform on the playback.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "restart", + "pause", + "unpause", + "reverse", + "forward" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "The provided operation parameter was invalid" + }, + { + "code": 404, + "reason": "The playback cannot be found" + }, + { + "code": 409, + "reason": "The operation cannot be performed in the playback's current state" + } +] + } + ] + } + ], + "models": { + "Playback": { + "id": "Playback", + "description": "Object representing the playback of media to a channel", + "properties": { + "id": { + "type": "string", + "description": "ID for this playback operation", + "required": true + }, + "media_uri": { + "type": "string", + "description": "URI for the media to play back.", + "required": true + }, + "target_uri": { + "type": "string", + "description": "URI for the channel or bridge to play the media on", + "required": true + }, + "language": { + "type": "string", + "description": "For media types that support multiple languages, the language requested for playback." + }, + "state": { + "type": "string", + "description": "Current state of the playback operation.", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "queued", + "playing", + "complete" + ] + } + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_0_0_1/recordings.json b/codegen/src/main/resources/codegen-data/ari_0_0_1/recordings.json new file mode 100644 index 00000000..8e25da58 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_0_0_1/recordings.json @@ -0,0 +1,326 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "0.0.1", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/stasis", + "resourcePath": "/api-docs/recordings.{format}", + "apis": [ + { + "path": "/recordings/stored", + "description": "Recordings", + "operations": [ + { + "httpMethod": "GET", + "summary": "List recordings that are complete.", + "nickname": "listStored", + "responseClass": "List[StoredRecording]" + } + ] + }, + { + "path": "/recordings/stored/{recordingName}", + "description": "Individual recording", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a stored recording's details.", + "nickname": "getStored", + "responseClass": "StoredRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Delete a stored recording.", + "nickname": "deleteStored", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}", + "description": "A recording that is in progress", + "operations": [ + { + "httpMethod": "GET", + "summary": "List live recordings.", + "nickname": "getLive", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop a live recording and discard it.", + "nickname": "cancel", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/stop", + "operations": [ + { + "httpMethod": "POST", + "summary": "Stop a live recording and store it.", + "nickname": "stop", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/pause", + "operations": [ + { + "httpMethod": "POST", + "summary": "Pause a live recording.", + "notes": "Pausing a recording suspends silence detection, which will be restarted when the recording is unpaused. Paused time is not included in the accounting for maxDurationSeconds.", + "nickname": "pause", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unpause a live recording.", + "nickname": "unpause", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/mute", + "operations": [ + { + "httpMethod": "POST", + "summary": "Mute a live recording.", + "notes": "Muting a recording suspends silence detection, which will be restarted when the recording is unmuted.", + "nickname": "mute", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unmute a live recording.", + "nickname": "unmute", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + } + ] + } + ], + "models": { + "StoredRecording": { + "id": "StoredRecording", + "description": "A past recording that may be played back.", + "properties": { + "name": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + }, + "LiveRecording": { + "id": "LiveRecording", + "description": "A recording that is in progress", + "properties": { + "name": { + "required": true, + "type": "string", + "description": "Base name for the recording" + }, + "format": { + "required": true, + "type": "string", + "description": "Recording format (wav, gsm, etc.)" + }, + "state": { + "required": false, + "type": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "queued", + "recording", + "paused", + "done", + "failed", + "canceled" + ] + } + }, + "cause": { + "required": false, + "type": "string", + "description": "Cause for recording failure if failed" + }, + "state": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_0_0_1/sounds.json b/codegen/src/main/resources/codegen-data/ari_0_0_1/sounds.json new file mode 100644 index 00000000..1de71c3a --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_0_0_1/sounds.json @@ -0,0 +1,99 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "0.0.1", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/stasis", + "resourcePath": "/api-docs/sounds.{format}", + "apis": [ + { + "path": "/sounds", + "description": "Sounds", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all sounds.", + "nickname": "list", + "responseClass": "List[Sound]", + "parameters": [ + { + "name": "lang", + "description": "Lookup sound for a specific language.", + "paramType": "query", + "dataType": "string", + "required": false + }, + { + "name": "format", + "description": "Lookup sound in a specific format.", + "paramType": "query", + "dataType": "string", + "required": false, + "__note": "core show translation can show translation paths between formats, along with relative costs. so this could be just installed format, or we could follow that for transcoded formats." + } + ] + } + ] + }, + { + "path": "/sounds/{soundId}", + "description": "Individual sound", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a sound's details.", + "nickname": "get", + "responseClass": "Sound", + "parameters": [ + { + "name": "soundId", + "description": "Sound's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ] + } + ] + } + ], + "models": { + "FormatLangPair": { + "id": "FormatLangPair", + "description": "Identifies the format and language of a sound file", + "properties": { + "language": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + }, + "Sound": { + "id": "Sound", + "description": "A media file that may be played back.", + "properties": { + "id": { + "required": true, + "description": "Sound's identifier.", + "type": "string" + }, + "text": { + "required": false, + "description": "Text description of the sound, usually the words spoken.", + "type": "string" + }, + "formats": { + "required": true, + "description": "The formats and languages in which this sound is available.", + "type": "List[FormatLangPair]" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_10_0_0/applications.json b/codegen/src/main/resources/codegen-data/ari_10_0_0/applications.json new file mode 100644 index 00000000..8ad9f36d --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_10_0_0/applications.json @@ -0,0 +1,242 @@ +{ + "_copyright": "Copyright (C) 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/applications.{format}", + "since": [ + "13.0.0" + ], + "apis": [ + { + "path": "/applications", + "description": "Stasis applications", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "13.0.0" + ], + "summary": "List all applications.", + "nickname": "list", + "responseClass": "List[Application]" + } + ] + }, + { + "path": "/applications/{applicationName}", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "13.0.0" + ], + "summary": "Get details of an application.", + "nickname": "get", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Application does not exist." + } + ] + } + ] + }, + { + "path": "/applications/{applicationName}/subscription", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "13.0.0" + ], + "summary": "Subscribe an application to a event source.", + "notes": "Returns the state of the application after the subscriptions have changed", + "nickname": "subscribe", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "eventSource", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing parameter." + }, + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 422, + "reason": "Event source does not exist." + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "13.0.0" + ], + "summary": "Unsubscribe an application from an event source.", + "notes": "Returns the state of the application after the subscriptions have changed", + "nickname": "unsubscribe", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "eventSource", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing parameter; event source scheme not recognized." + }, + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 409, + "reason": "Application not subscribed to event source." + }, + { + "code": 422, + "reason": "Event source does not exist." + } + ] + } + ] + }, + { + "path": "/applications/{applicationName}/eventFilter", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "PUT", + "since": [ + "13.26.0", + "16.3.0" + ], + "summary": "Filter application events types.", + "notes": "Allowed and/or disallowed event type filtering can be done. The body (parameter) should specify a JSON key/value object that describes the type of event filtering needed. One, or both of the following keys can be designated:

\"allowed\" - Specifies an allowed list of event types
\"disallowed\" - Specifies a disallowed list of event types

Further, each of those key's value should be a JSON array that holds zero, or more JSON key/value objects. Each of these objects must contain the following key with an associated value:

\"type\" - The type name of the event to filter

The value must be the string name (case sensitive) of the event type that needs filtering. For example:

{ \"allowed\": [ { \"type\": \"StasisStart\" }, { \"type\": \"StasisEnd\" } ] }

As this specifies only an allowed list, then only those two event type messages are sent to the application. No other event messages are sent.

The following rules apply:

* If the body is empty, both the allowed and disallowed filters are set empty.
* If both list types are given then both are set to their respective values (note, specifying an empty array for a given type sets that type to empty).
* If only one list type is given then only that type is set. The other type is not updated.
* An empty \"allowed\" list means all events are allowed.
* An empty \"disallowed\" list means no events are disallowed.
* Disallowed events take precedence over allowed events if the event type is specified in both lists.", + "nickname": "filter", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "filter", + "description": "Specify which event types to allow/disallow", + "paramType": "body", + "required": false, + "dataType": "object", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Bad request." + }, + { + "code": 404, + "reason": "Application does not exist." + } + ] + } + ] + } + ], + "models": { + "Application": { + "id": "Application", + "description": "Details of a Stasis application", + "properties": { + "name": { + "type": "string", + "description": "Name of this application", + "required": true + }, + "channel_ids": { + "type": "List[string]", + "description": "Id's for channels subscribed to.", + "required": true + }, + "bridge_ids": { + "type": "List[string]", + "description": "Id's for bridges subscribed to.", + "required": true + }, + "endpoint_ids": { + "type": "List[string]", + "description": "{tech}/{resource} for endpoints subscribed to.", + "required": true + }, + "device_names": { + "type": "List[string]", + "description": "Names of the devices subscribed to.", + "required": true + }, + "events_allowed": { + "type": "List[object]", + "description": "Event types sent to the application.", + "required": true + }, + "events_disallowed": { + "type": "List[object]", + "description": "Event types not sent to the application.", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_10_0_0/asterisk.json b/codegen/src/main/resources/codegen-data/ari_10_0_0/asterisk.json new file mode 100644 index 00000000..83fef8b7 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_10_0_0/asterisk.json @@ -0,0 +1,777 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/asterisk.{format}", + "since": [ + "12.0.0" + ], + "apis": [ + { + "path": "/asterisk/config/dynamic/{configClass}/{objectType}/{id}", + "description": "Asterisk dynamic configuration", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "13.5.0" + ], + "summary": "Retrieve a dynamic configuration object.", + "nickname": "getObject", + "responseClass": "List[ConfigTuple]", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to retrieve.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to retrieve.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "{configClass|objectType|id} not found" + } + ] + }, + { + "httpMethod": "PUT", + "since": [ + "13.5.0" + ], + "summary": "Create or update a dynamic configuration object.", + "nickname": "updateObject", + "responseClass": "List[ConfigTuple]", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to create or update.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to create or update.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "fields", + "description": "The body object should have a value that is a list of ConfigTuples, which provide the fields to update. Ex. [ { \"attribute\": \"directmedia\", \"value\": \"false\" } ]", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Bad request body" + }, + { + "code": 403, + "reason": "Could not create or update object" + }, + { + "code": 404, + "reason": "{configClass|objectType} not found" + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "13.5.0" + ], + "summary": "Delete a dynamic configuration object.", + "nickname": "deleteObject", + "responseClass": "void", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to delete.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to delete.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 403, + "reason": "Could not delete object" + }, + { + "code": 404, + "reason": "{configClass|objectType|id} not found" + } + ] + } + ] + }, + { + "path": "/asterisk/info", + "description": "Asterisk system information (similar to core show settings)", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "Gets Asterisk system information.", + "nickname": "getInfo", + "responseClass": "AsteriskInfo", + "parameters": [ + { + "name": "only", + "description": "Filter information returned", + "paramType": "query", + "required": false, + "allowMultiple": true, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "build", + "system", + "config", + "status" + ] + } + } + ] + } + ] + }, + { + "path": "/asterisk/ping", + "description": "Asterisk ping", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "13.25.0", + "16.2.0" + ], + "summary": "Response pong message.", + "nickname": "ping", + "responseClass": "AsteriskPing" + } + ] + }, + { + "path": "/asterisk/modules", + "description": "Asterisk modules", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "13.5.0" + ], + "summary": "List Asterisk modules.", + "nickname": "listModules", + "responseClass": "List[Module]" + } + ] + }, + { + "path": "/asterisk/modules/{moduleName}", + "description": "Asterisk module", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "13.5.0" + ], + "summary": "Get Asterisk module information.", + "nickname": "getModule", + "responseClass": "Module", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module could not be found in running modules." + }, + { + "code": 409, + "reason": "Module information could not be retrieved." + } + ] + }, + { + "httpMethod": "POST", + "since": [ + "13.5.0" + ], + "summary": "Load an Asterisk module.", + "nickname": "loadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 409, + "reason": "Module could not be loaded." + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "13.5.0" + ], + "summary": "Unload an Asterisk module.", + "nickname": "unloadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module not found in running modules." + }, + { + "code": 409, + "reason": "Module could not be unloaded." + } + ] + }, + { + "httpMethod": "PUT", + "since": [ + "13.5.0" + ], + "summary": "Reload an Asterisk module.", + "nickname": "reloadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module not found in running modules." + }, + { + "code": 409, + "reason": "Module could not be reloaded." + } + ] + } + ] + }, + { + "path": "/asterisk/logging", + "description": "Asterisk log channels", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "13.6.0" + ], + "summary": "Gets Asterisk log channel information.", + "nickname": "listLogChannels", + "responseClass": "List[LogChannel]" + } + ] + }, + { + "path": "/asterisk/logging/{logChannelName}", + "description": "Asterisk log channel", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "13.6.0" + ], + "summary": "Adds a log channel.", + "nickname": "addLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "The log channel to add", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "configuration", + "description": "levels of the log channel", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Bad request body" + }, + { + "code": 409, + "reason": "Log channel could not be created." + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "13.6.0" + ], + "summary": "Deletes a log channel.", + "nickname": "deleteLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "Log channels name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Log channel does not exist." + } + ] + } + ] + }, + { + "path": "/asterisk/logging/{logChannelName}/rotate", + "description": "Asterisk log channel", + "operations": [ + { + "httpMethod": "PUT", + "since": [ + "13.6.0" + ], + "summary": "Rotates a log channel.", + "nickname": "rotateLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "Log channel's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Log channel does not exist." + } + ] + } + ] + }, + { + "path": "/asterisk/variable", + "description": "Global variables", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "Get the value of a global variable.", + "nickname": "getGlobalVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "variable", + "description": "The variable to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + } + ] + }, + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Set the value of a global variable.", + "nickname": "setGlobalVar", + "responseClass": "void", + "parameters": [ + { + "name": "variable", + "description": "The variable to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + } + ] + } + ] + } + ], + "models": { + "BuildInfo": { + "id": "BuildInfo", + "description": "Info about how Asterisk was built", + "properties": { + "os": { + "required": true, + "type": "string", + "description": "OS Asterisk was built on." + }, + "kernel": { + "required": true, + "type": "string", + "description": "Kernel version Asterisk was built on." + }, + "options": { + "required": true, + "type": "string", + "description": "Compile time options, or empty string if default." + }, + "machine": { + "required": true, + "type": "string", + "description": "Machine architecture (x86_64, i686, ppc, etc.)" + }, + "date": { + "required": true, + "type": "string", + "description": "Date and time when Asterisk was built." + }, + "user": { + "required": true, + "type": "string", + "description": "Username that build Asterisk" + } + } + }, + "SystemInfo": { + "id": "SystemInfo", + "description": "Info about Asterisk", + "properties": { + "version": { + "required": true, + "type": "string", + "description": "Asterisk version." + }, + "entity_id": { + "required": true, + "type": "string", + "description": "" + } + } + }, + "SetId": { + "id": "SetId", + "description": "Effective user/group id", + "properties": { + "user": { + "required": true, + "type": "string", + "description": "Effective user id." + }, + "group": { + "required": true, + "type": "string", + "description": "Effective group id." + } + } + }, + "ConfigInfo": { + "id": "ConfigInfo", + "description": "Info about Asterisk configuration", + "properties": { + "name": { + "required": true, + "type": "string", + "description": "Asterisk system name." + }, + "default_language": { + "required": true, + "type": "string", + "description": "Default language for media playback." + }, + "max_channels": { + "required": false, + "type": "int", + "description": "Maximum number of simultaneous channels." + }, + "max_open_files": { + "required": false, + "type": "int", + "description": "Maximum number of open file handles (files, sockets)." + }, + "max_load": { + "required": false, + "type": "double", + "description": "Maximum load avg on system." + }, + "setid": { + "required": true, + "type": "SetId", + "description": "Effective user/group id for running Asterisk." + } + } + }, + "StatusInfo": { + "id": "StatusInfo", + "description": "Info about Asterisk status", + "properties": { + "startup_time": { + "required": true, + "type": "Date", + "description": "Time when Asterisk was started." + }, + "last_reload_time": { + "required": true, + "type": "Date", + "description": "Time when Asterisk was last reloaded." + } + } + }, + "AsteriskInfo": { + "id": "AsteriskInfo", + "description": "Asterisk system information", + "properties": { + "build": { + "required": false, + "type": "BuildInfo", + "description": "Info about how Asterisk was built" + }, + "system": { + "required": false, + "type": "SystemInfo", + "description": "Info about the system running Asterisk" + }, + "config": { + "required": false, + "type": "ConfigInfo", + "description": "Info about Asterisk configuration" + }, + "status": { + "required": false, + "type": "StatusInfo", + "description": "Info about Asterisk status" + } + } + }, + "AsteriskPing": { + "id": "AsteriskPing", + "description": "Asterisk ping information", + "properties": { + "asterisk_id": { + "required": true, + "type": "string", + "description": "Asterisk id info" + }, + "ping": { + "required": true, + "type": "string", + "description": "Always string value is pong" + }, + "timestamp": { + "required": true, + "type": "string", + "description": "The timestamp string of request received time" + } + } + }, + "Module": { + "id": "Module", + "description": "Details of an Asterisk module", + "properties": { + "name": { + "type": "string", + "description": "The name of this module", + "required": true + }, + "description": { + "type": "string", + "description": "The description of this module", + "required": true + }, + "use_count": { + "type": "int", + "description": "The number of times this module is being used", + "required": true + }, + "status": { + "type": "string", + "description": "The running status of this module", + "required": true + }, + "support_level": { + "type": "string", + "description": "The support state of this module", + "required": true + } + } + }, + "LogChannel": { + "id": "LogChannel", + "description": "Details of an Asterisk log channel", + "properties": { + "channel": { + "type": "string", + "description": "The log channel path", + "required": true + }, + "type": { + "type": "string", + "description": "Types of logs for the log channel", + "required": true + }, + "status": { + "type": "string", + "description": "Whether or not a log type is enabled", + "required": true + }, + "configuration": { + "type": "string", + "description": "The various log levels", + "required": true + } + } + }, + "Variable": { + "id": "Variable", + "description": "The value of a channel variable", + "properties": { + "value": { + "required": true, + "type": "string", + "description": "The value of the variable requested" + } + } + }, + "ConfigTuple": { + "id": "ConfigTuple", + "description": "A key/value pair that makes up part of a configuration object.", + "properties": { + "attribute": { + "required": true, + "type": "string", + "description": "A configuration object attribute." + }, + "value": { + "required": true, + "type": "string", + "description": "The value for the attribute." + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_10_0_0/bridges.json b/codegen/src/main/resources/codegen-data/ari_10_0_0/bridges.json new file mode 100644 index 00000000..ae5ee56f --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_10_0_0/bridges.json @@ -0,0 +1,864 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/bridges.{format}", + "since": [ + "12.0.0" + ], + "requiresModules": [ + "res_stasis_recording", + "res_stasis_playback" + ], + "apis": [ + { + "path": "/bridges", + "description": "Active bridges", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "List all active bridges in Asterisk.", + "nickname": "list", + "responseClass": "List[Bridge]" + }, + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Create a new bridge.", + "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", + "nickname": "create", + "responseClass": "Bridge", + "parameters": [ + { + "name": "type", + "description": "Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media, video_sfu, video_single, sdp_label).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "bridgeId", + "description": "Unique ID to give to the bridge being created.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Name to give to the bridge being created.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 409, + "reason": "Bridge with the same bridgeId already exists" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}", + "description": "Individual bridge", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.2.0" + ], + "summary": "Create a new bridge.", + "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", + "nickname": "createWithId", + "responseClass": "Bridge", + "parameters": [ + { + "name": "type", + "description": "Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media, video_sfu, video_single, sdp_label) to set.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "bridgeId", + "description": "Unique ID to give to the bridge being created.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Set the name of the bridge.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 409, + "reason": "Bridge with the same bridgeId already exists" + } + ] + }, + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "Get bridge details.", + "nickname": "get", + "responseClass": "Bridge", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "12.0.0" + ], + "summary": "Shut down a bridge.", + "notes": "If any channels are in this bridge, they will be removed and resume whatever they were doing beforehand.", + "nickname": "destroy", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/addChannel", + "description": "Add a channel to a bridge", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Add a channel to a bridge.", + "nickname": "addChannel", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channel", + "description": "Ids of channels to add to bridge", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "role", + "description": "Channel's role in the bridge", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "absorbDTMF", + "description": "Absorb DTMF coming from this channel, preventing it to pass through to the bridge", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "mute", + "description": "Mute audio from this channel, preventing it to pass through to the bridge", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "inhibitConnectedLineUpdates", + "description": "Do not present the identity of the newly connected channel to other bridge members", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Channel not found" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application; Channel currently recording" + }, + { + "code": 422, + "reason": "Channel not in Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/removeChannel", + "description": "Remove a channel from a bridge", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Remove a channel from a bridge.", + "nickname": "removeChannel", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channel", + "description": "Ids of channels to remove from bridge", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Channel not found" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + }, + { + "code": 422, + "reason": "Channel not in this bridge" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/videoSource/{channelId}", + "description": "Set a channel as the video source in a multi-party bridge", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "13.13.0", + "14.2.0" + ], + "summary": "Set a channel as the video source in a multi-party mixing bridge. This operation has no effect on bridges with two or fewer participants.", + "nickname": "setVideoSource", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge or Channel not found" + }, + { + "code": 409, + "reason": "Channel not in Stasis application" + }, + { + "code": 422, + "reason": "Channel not in this Bridge" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/videoSource", + "description": "Removes any explicit video source", + "operations": [ + { + "httpMethod": "DELETE", + "since": [ + "13.13.0", + "14.2.0" + ], + "summary": "Removes any explicit video source in a multi-party mixing bridge. This operation has no effect on bridges with two or fewer participants. When no explicit video source is set, talk detection will be used to determine the active video stream.", + "nickname": "clearVideoSource", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/moh", + "description": "Play music on hold to a bridge", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Play music on hold to a bridge or change the MOH class that is playing.", + "nickname": "startMoh", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "mohClass", + "description": "Channel's id", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "12.0.0" + ], + "summary": "Stop playing music on hold to a bridge.", + "notes": "This will only stop music on hold being played via POST bridges/{bridgeId}/moh.", + "nickname": "stopMoh", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/play", + "description": "Play media to the participants of a bridge", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Start playback of media on a bridge.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "play", + "responseClass": "Playback", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "announcer_format", + "description": "Format of the 'Anouncer' channel attached to the bridge. Defaults to the format of the channel in the bridge with the highest sampe rate.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "playbackId", + "description": "Playback Id.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/play/{playbackId}", + "description": "Play media to a bridge", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.3.0" + ], + "summary": "Start playback of media on a bridge.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "playWithId", + "responseClass": "Playback", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "announcer_format", + "description": "Format of the 'Anouncer' channel attached to the bridge. Defaults to the format of the channel in the bridge with the highest sampe rate.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + + } + ] + }, + { + "path": "/bridges/{bridgeId}/record", + "description": "Record audio on a bridge", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Start a recording.", + "notes": "This records the mixed audio from all channels participating in this bridge.", + "nickname": "record", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Recording's filename", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "recorder_format", + "description": "Format of the 'Recorder' channel attached to the bridge. Defaults to the same format as the 'format' parameter.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "maxDurationSeconds", + "description": "Maximum duration of the recording, in seconds. 0 for no limit.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "maxSilenceSeconds", + "description": "Maximum duration of silence, in seconds. 0 for no limit.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "ifExists", + "description": "Action to take if a recording with the same name already exists.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "fail", + "allowableValues": { + "valueType": "LIST", + "values": [ + "fail", + "overwrite", + "append" + ] + } + }, + { + "name": "beep", + "description": "Play beep when recording begins", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "terminateOn", + "description": "DTMF input to terminate recording.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "any", + "*", + "#" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge is not in a Stasis application; A recording with the same name already exists on the system and can not be overwritten because it is in progress or ifExists=fail" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + } + ], + "models": { + "Bridge": { + "id": "Bridge", + "description": "The merging of media from one or more channels.\n\nEveryone on the bridge receives the same audio.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for this bridge", + "required": true + }, + "technology": { + "type": "string", + "description": "Name of the current bridging technology", + "required": true + }, + "bridge_type": { + "type": "string", + "description": "Type of bridge technology", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "mixing", + "holding" + ] + } + }, + "bridge_class": { + "type": "string", + "description": "Bridging class", + "required": true + }, + "creator": { + "type": "string", + "description": "Entity that created the bridge", + "required": true + }, + "name": { + "type": "string", + "description": "Name the creator gave the bridge", + "required": true + }, + "channels": { + "type": "List[string]", + "description": "Ids of channels participating in this bridge", + "required": true + }, + "video_mode": { + "type": "string", + "description": "The video mode the bridge is using. One of 'none', 'talker', 'sfu', or 'single'.", + "required": false + }, + "video_source_id": { + "type": "string", + "description": "The ID of the channel that is the source of video in this bridge, if one exists.", + "required": false + }, + "creationtime": { + "required": true, + "type": "Date", + "description": "Timestamp when bridge was created" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_10_0_0/channels.json b/codegen/src/main/resources/codegen-data/ari_10_0_0/channels.json new file mode 100644 index 00000000..f7ea634d --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_10_0_0/channels.json @@ -0,0 +1,2407 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/channels.{format}", + "since": [ + "12.0.0" + ], + "requiresModules": [ + "res_stasis_answer", + "res_stasis_playback", + "res_stasis_recording", + "res_stasis_snoop" + ], + "apis": [ + { + "path": "/channels", + "description": "Active channels", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "List all active channels in Asterisk.", + "nickname": "list", + "responseClass": "List[Channel]" + }, + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Create a new channel (originate).", + "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.", + "nickname": "originate", + "responseClass": "Channel", + "parameters": [ + { + "name": "endpoint", + "description": "Endpoint to call.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to dial after the endpoint answers. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to dial after the endpoint answers. If omitted, uses 'default'. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to dial after the endpoint answers. If omitted, uses 1. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "long" + }, + { + "name": "label", + "description": "The label to dial after the endpoint answers. Will supersede 'priority' if provided. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The application that is subscribed to the originated channel. When the channel is answered, it will be passed to this Stasis application. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "callerId", + "description": "CallerID to use when dialing the endpoint or extension.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 30 + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "The unique id of the channel which is originating this one.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "formats", + "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for originating a channel." + }, + { + "code": 409, + "reason": "Channel with given unique ID already exists." + } + ] + } + ] + }, + { + "path": "/channels/create", + "description": "Create a channel and place it in a Stasis app, but do not dial the channel yet.", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "14.0.0" + ], + "summary": "Create channel.", + "nickname": "create", + "responseClass": "Channel", + "parameters": [ + { + "name": "endpoint", + "description": "Endpoint for channel communication", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "Stasis Application to place channel into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "Unique ID of the calling channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "formats", + "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 409, + "reason": "Channel with given unique ID already exists." + } + ] + } + ] + }, + { + "path": "/channels/{channelId}", + "description": "Active channel", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "Channel details.", + "nickname": "get", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + } + ] + }, + { + "httpMethod": "POST", + "since": [ + "12.2.0" + ], + "summary": "Create a new channel (originate with id).", + "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.", + "nickname": "originateWithId", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "endpoint", + "description": "Endpoint to call.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to dial after the endpoint answers. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to dial after the endpoint answers. If omitted, uses 'default'. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to dial after the endpoint answers. If omitted, uses 1. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "long" + }, + { + "name": "label", + "description": "The label to dial after the endpoint answers. Will supersede 'priority' if provided. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The application that is subscribed to the originated channel. When the channel is answered, it will be passed to this Stasis application. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "callerId", + "description": "CallerID to use when dialing the endpoint or extension.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 30 + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "The unique id of the channel which is originating this one.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "formats", + "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for originating a channel." + }, + { + "code": 409, + "reason": "Channel with given unique ID already exists." + } + ] + + }, + { + "httpMethod": "DELETE", + "since": [ + "12.0.0" + ], + "summary": "Delete (i.e. hangup) a channel.", + "nickname": "hangup", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "reason_code", + "description": "The reason code for hanging up the channel for detail use. Mutually exclusive with 'reason'. See detail hangup codes at here. https://docs.asterisk.org/Configuration/Miscellaneous/Hangup-Cause-Mappings/", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "reason", + "description": "Reason for hanging up the channel for simple use. Mutually exclusive with 'reason_code'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "normal", + "busy", + "congestion", + "no_answer", + "timeout", + "rejected", + "unallocated", + "normal_unspecified", + "number_incomplete", + "codec_mismatch", + "interworking", + "failure", + "answered_elsewhere" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid reason for hangup provided" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/continue", + "description": "Exit application; continue execution in the dialplan", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Exit application; continue execution in the dialplan.", + "nickname": "continueInDialplan", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "label", + "description": "The label to continue to - will supersede 'priority' if both are provided.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/move", + "description": "Move the channel from one Stasis application to another.", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "13.26.0", + "16.3.0" + ], + "summary": "Move the channel from one Stasis application to another.", + "nickname": "move", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The channel will be passed to this Stasis application.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": "404", + "reason": "Channel not found" + }, + { + "code": "409", + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/redirect", + "description": "Inform the channel that it should redirect itself to a different location. Note that this will almost certainly cause the channel to exit the application.", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "13.3.0" + ], + "summary": "Redirect the channel to a different location.", + "nickname": "redirect", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "endpoint", + "description": "The endpoint to redirect the channel to", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Endpoint parameter not provided" + }, + { + "code": 404, + "reason": "Channel or endpoint not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 422, + "reason": "Endpoint is not the same type as the channel" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/answer", + "description": "Answer a channel", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Answer a channel.", + "nickname": "answer", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/ring", + "description": "Send a ringing indication to a channel", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Indicate ringing to a channel.", + "nickname": "ring", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "12.0.0" + ], + "summary": "Stop ringing indication on a channel if locally generated.", + "nickname": "ringStop", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/progress", + "description": "Indicate progress on a channel", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "22.6.0", + "21.11.0", + "20.16.0" + ], + "summary": "Indicate progress on a channel.", + "nickname": "progress", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/dtmf", + "description": "Send DTMF to a channel", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Send provided DTMF to a given channel.", + "nickname": "sendDTMF", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "dtmf", + "description": "DTMF To send.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "before", + "description": "Amount of time to wait before DTMF digits (specified in milliseconds) start.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0 + }, + { + "name": "between", + "description": "Amount of time in between DTMF digits (specified in milliseconds).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 100 + }, + { + "name": "duration", + "description": "Length of each DTMF digit (specified in milliseconds).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 100 + }, + { + "name": "after", + "description": "Amount of time to wait after DTMF digits (specified in milliseconds) end.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0 + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "DTMF is required" + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/mute", + "description": "Mute a channel", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Mute a channel.", + "nickname": "mute", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "Direction in which to mute audio", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both", + "in", + "out" + ] + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "12.0.0" + ], + "summary": "Unmute a channel.", + "nickname": "unmute", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "Direction in which to unmute audio", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both", + "in", + "out" + ] + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/hold", + "description": "Put a channel on hold", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Hold a channel.", + "nickname": "hold", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "12.0.0" + ], + "summary": "Remove a channel from hold.", + "nickname": "unhold", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/moh", + "description": "Play music on hold to a channel", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Play music on hold to a channel.", + "notes": "Using media operations such as /play on a channel playing MOH in this manner will suspend MOH without resuming automatically. If continuing music on hold is desired, the stasis application must reinitiate music on hold.", + "nickname": "startMoh", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "mohClass", + "description": "Music on hold class to use", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "12.0.0" + ], + "summary": "Stop playing music on hold to a channel.", + "nickname": "stopMoh", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/silence", + "description": "Play silence to a channel", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Play silence to a channel.", + "notes": "Using media operations such as /play on a channel playing silence in this manner will suspend silence without resuming automatically.", + "nickname": "startSilence", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "12.0.0" + ], + "summary": "Stop playing silence to a channel.", + "nickname": "stopSilence", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/play", + "description": "Play media to a channel", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Start playback of media.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "play", + "responseClass": "Playback", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000 + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/play/{playbackId}", + "description": "Play media to a channel", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.2.0" + ], + "summary": "Start playback of media and specify the playbackId.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "playWithId", + "responseClass": "Playback", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000 + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/record", + "description": "Record audio from a channel", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Start a recording.", + "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.", + "nickname": "record", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Recording's filename", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "maxDurationSeconds", + "description": "Maximum duration of the recording, in seconds. 0 for no limit", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "maxSilenceSeconds", + "description": "Maximum duration of silence, in seconds. 0 for no limit", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "ifExists", + "description": "Action to take if a recording with the same name already exists.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "fail", + "allowableValues": { + "valueType": "LIST", + "values": [ + "fail", + "overwrite", + "append" + ] + } + }, + { + "name": "beep", + "description": "Play beep when recording begins", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "terminateOn", + "description": "DTMF input to terminate recording", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "any", + "*", + "#" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel is not in a Stasis application; the channel is currently bridged with other channels; A recording with the same name already exists on the system and can not be overwritten because it is in progress or ifExists=fail" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/variable", + "description": "Variables on a channel", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "Get the value of a channel variable or function.", + "nickname": "getChannelVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The channel variable or function to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Channel or variable not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Set the value of a channel variable or function.", + "nickname": "setChannelVar", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The channel variable or function to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/snoop", + "description": "Snoop (spy/whisper) on a channel", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Start snooping.", + "notes": "Snoop (spy/whisper) on a specific channel.", + "nickname": "snoopChannel", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "spy", + "description": "Direction of audio to spy on", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "whisper", + "description": "Direction of audio to whisper into", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "app", + "description": "Application the snooping channel is placed into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "snoopId", + "description": "Unique ID to assign to snooping channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/snoop/{snoopId}", + "description": "Snoop (spy/whisper) on a channel", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.2.0" + ], + "summary": "Start snooping.", + "notes": "Snoop (spy/whisper) on a specific channel.", + "nickname": "snoopChannelWithId", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "snoopId", + "description": "Unique ID to assign to snooping channel", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "spy", + "description": "Direction of audio to spy on", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "whisper", + "description": "Direction of audio to whisper into", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "app", + "description": "Application the snooping channel is placed into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/dial", + "description": "Dial a channel", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "14.0.0" + ], + "summary": "Dial a created channel.", + "nickname": "dial", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "caller", + "description": "Channel ID of caller", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Dial timeout", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel cannot be found." + }, + { + "code": 409, + "reason": "Channel cannot be dialed." + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/rtp_statistics", + "description": "Get RTP statistics information for RTP on a channel", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "13.27.0", + "16.4.0" + ], + "summary": "RTP stats on a channel.", + "nickname": "rtpstatistics", + "responseClass": "RTPstat", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel cannot be found." + } + ] + } + ] + }, + { + "path": "/channels/externalMedia", + "description": "Create a channel to an External Media source/sink.", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "16.6.0", + "17.1.0" + ], + "summary": "Start an External Media session.", + "notes": "Create a channel to an External Media source/sink. The combination of transport and encapsulation will select one of chan_rtp(udp/rtp), chan_audiosocket(tcp/audiosocket) or chan_websocket(websocket/none) channel drivers.", + "nickname": "externalMedia", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "Stasis Application to place channel into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "external_host", + "description": "Hostname/ip:port or websocket_client connection ID of external host. May be empty for a websocket server connection.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "encapsulation", + "description": "Payload encapsulation protocol. Must be 'none' for the websocket transport.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "rtp", + "allowableValues": { + "valueType": "LIST", + "values": [ + "rtp", + "audiosocket", + "none" + ] + } + }, + { + "name": "transport", + "description": "Transport protocol", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "udp", + "allowableValues": { + "valueType": "LIST", + "values": [ + "udp", + "tcp", + "websocket" + ] + } + }, + { + "name": "connection_type", + "description": "Connection type (client/server). 'server' is only valid for the websocket transport.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "client", + "allowableValues": { + "valueType": "LIST", + "values": [ + "client", + "server" + ] + } + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "External media direction", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both" + ] + } + }, + { + "name": "data", + "description": "An arbitrary data field", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "transport_data", + "description": "Transport-specific data. For websocket this is appended to the dialstring.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 409, + "reason": "Channel is not in a Stasis application; Channel is already bridged" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/transfer_progress", + "description": "Inform the channel that the transfer is in progress.", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "22.3.0", + "21.8.0", + "20.13.0" + ], + "summary": "Inform the channel about the progress of the attended/blind transfer.", + "nickname": "transfer_progress", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "states", + "description": "The state of the progress", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Endpoint parameter not provided" + }, + { + "code": 404, + "reason": "Channel or endpoint not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + } + ], + "models": { + "Dialed": { + "id": "Dialed", + "description": "Dialed channel information.", + "properties": {} + }, + "DialplanCEP": { + "id": "DialplanCEP", + "description": "Dialplan location (context/extension/priority)", + "properties": { + "context": { + "required": true, + "type": "string", + "description": "Context in the dialplan" + }, + "exten": { + "required": true, + "type": "string", + "description": "Extension in the dialplan" + }, + "priority": { + "required": true, + "type": "long", + "description": "Priority in the dialplan" + }, + "app_name": { + "required": true, + "type": "string", + "description": "Name of current dialplan application" + }, + "app_data": { + "required": true, + "type": "string", + "description": "Parameter of current dialplan application" + } + } + }, + "CallerID": { + "id": "CallerID", + "description": "Caller identification", + "properties": { + "name": { + "required": true, + "type": "string" + }, + "number": { + "required": true, + "type": "string" + } + } + }, + "RTPstat": { + "id": "RTPstat", + "description": "A statistics of a RTP.", + "properties": { + "txcount": { + "required": true, + "type": "int", + "description": "Number of packets transmitted." + }, + "rxcount": { + "required": true, + "type": "int", + "description": "Number of packets received." + }, + "txjitter": { + "required": false, + "type": "double", + "description": "Jitter on transmitted packets." + }, + "rxjitter": { + "required": false, + "type": "double", + "description": "Jitter on received packets." + }, + "remote_maxjitter": { + "required": false, + "type": "double", + "description": "Maximum jitter on remote side." + }, + "remote_minjitter": { + "required": false, + "type": "double", + "description": "Minimum jitter on remote side." + }, + "remote_normdevjitter": { + "required": false, + "type": "double", + "description": "Average jitter on remote side." + }, + "remote_stdevjitter": { + "required": false, + "type": "double", + "description": "Standard deviation jitter on remote side." + }, + "local_maxjitter": { + "required": false, + "type": "double", + "description": "Maximum jitter on local side." + }, + "local_minjitter": { + "required": false, + "type": "double", + "description": "Minimum jitter on local side." + }, + "local_normdevjitter": { + "required": false, + "type": "double", + "description": "Average jitter on local side." + }, + "local_stdevjitter": { + "required": false, + "type": "double", + "description": "Standard deviation jitter on local side." + }, + "txploss": { + "required": true, + "type": "int", + "description": "Number of transmitted packets lost." + }, + "rxploss": { + "required": true, + "type": "int", + "description": "Number of received packets lost." + }, + "remote_maxrxploss": { + "required": false, + "type": "double", + "description": "Maximum number of packets lost on remote side." + }, + "remote_minrxploss": { + "required": false, + "type": "double", + "description": "Minimum number of packets lost on remote side." + }, + "remote_normdevrxploss": { + "required": false, + "type": "double", + "description": "Average number of packets lost on remote side." + }, + "remote_stdevrxploss": { + "required": false, + "type": "double", + "description": "Standard deviation packets lost on remote side." + }, + "local_maxrxploss": { + "required": false, + "type": "double", + "description": "Maximum number of packets lost on local side." + }, + "local_minrxploss": { + "required": false, + "type": "double", + "description": "Minimum number of packets lost on local side." + }, + "local_normdevrxploss": { + "required": false, + "type": "double", + "description": "Average number of packets lost on local side." + }, + "local_stdevrxploss": { + "required": false, + "type": "double", + "description": "Standard deviation packets lost on local side." + }, + "rtt": { + "required": false, + "type": "double", + "description": "Total round trip time." + }, + "maxrtt": { + "required": false, + "type": "double", + "description": "Maximum round trip time." + }, + "minrtt": { + "required": false, + "type": "double", + "description": "Minimum round trip time." + }, + "normdevrtt": { + "required": false, + "type": "double", + "description": "Average round trip time." + }, + "stdevrtt": { + "required": false, + "type": "double", + "description": "Standard deviation round trip time." + }, + "local_ssrc": { + "required": true, + "type": "int", + "description": "Our SSRC." + }, + "remote_ssrc": { + "required": true, + "type": "int", + "description": "Their SSRC." + }, + "txoctetcount": { + "required": true, + "type": "int", + "description": "Number of octets transmitted." + }, + "rxoctetcount": { + "required": true, + "type": "int", + "description": "Number of octets received." + }, + "channel_uniqueid": { + "required": true, + "type": "string", + "description": "The Asterisk channel's unique ID that owns this instance." + } + } + }, + "Channel": { + "id": "Channel", + "description": "A specific communication connection between Asterisk and an Endpoint.", + "properties": { + "id": { + "required": true, + "type": "string", + "description": "Unique identifier of the channel.\n\nThis is the same as the Uniqueid field in AMI." + }, + "protocol_id": { + "required": true, + "type": "string", + "description": "Protocol id from underlying channel driver (i.e. Call-ID for chan_pjsip; will be empty if not applicable or not implemented by driver)." + }, + "name": { + "required": true, + "type": "string", + "description": "Name of the channel (i.e. SIP/foo-0000a7e3)" + }, + "state": { + "required": true, + "type": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "Down", + "Rsrved", + "OffHook", + "Dialing", + "Ring", + "Ringing", + "Up", + "Busy", + "Dialing Offhook", + "Pre-ring", + "Unknown" + ] + } + }, + "caller": { + "required": true, + "type": "CallerID" + }, + "connected": { + "required": true, + "type": "CallerID" + }, + "accountcode": { + "required": true, + "type": "string" + }, + "dialplan": { + "required": true, + "type": "DialplanCEP", + "description": "Current location in the dialplan" + }, + "creationtime": { + "required": true, + "type": "Date", + "description": "Timestamp when channel was created" + }, + "language": { + "required": true, + "type": "string", + "description": "The default spoken language" + }, + "channelvars": { + "required": false, + "type": "object", + "description": "Channel variables" + }, + "caller_rdnis": { + "type": "string", + "description": "The Caller ID RDNIS" + }, + "tenantid": { + "required": false, + "type": "string", + "description": "The Tenant ID for the channel" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_10_0_0/deviceStates.json b/codegen/src/main/resources/codegen-data/ari_10_0_0/deviceStates.json new file mode 100644 index 00000000..f0a889bc --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_10_0_0/deviceStates.json @@ -0,0 +1,169 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "Kevin Harwell ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/deviceStates.{format}", + "since": [ + "12.0.0" + ], + "requiresModules": [ + "res_stasis_device_state" + ], + "apis": [ + { + "path": "/deviceStates", + "description": "Device states", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "List all ARI controlled device states.", + "nickname": "list", + "responseClass": "List[DeviceState]" + } + ] + }, + { + "path": "/deviceStates/{deviceName}", + "description": "Device state", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "Retrieve the current state of a device.", + "nickname": "get", + "responseClass": "DeviceState", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ] + }, + { + "httpMethod": "PUT", + "since": [ + "12.0.0" + ], + "summary": "Change the state of a device controlled by ARI. (Note - implicitly creates the device state).", + "nickname": "update", + "responseClass": "void", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "deviceState", + "description": "Device state value", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "NOT_INUSE", + "INUSE", + "BUSY", + "INVALID", + "UNAVAILABLE", + "RINGING", + "RINGINUSE", + "ONHOLD" + ] + } + + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Device name is missing" + }, + { + "code": 409, + "reason": "Uncontrolled device specified" + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "12.0.0" + ], + "summary": "Destroy a device-state controlled by ARI.", + "nickname": "delete", + "responseClass": "void", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Device name is missing" + }, + { + "code": 409, + "reason": "Uncontrolled device specified" + } + ] + } + ] + } + ], + "models": { + "DeviceState": { + "id": "DeviceState", + "description": "Represents the state of a device.", + "properties": { + "name": { + "type": "string", + "description": "Name of the device.", + "required": true + }, + "state": { + "type": "string", + "description": "Device's state", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "UNKNOWN", + "NOT_INUSE", + "INUSE", + "BUSY", + "INVALID", + "UNAVAILABLE", + "RINGING", + "RINGINUSE", + "ONHOLD" + ] + } + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_10_0_0/endpoints.json b/codegen/src/main/resources/codegen-data/ari_10_0_0/endpoints.json new file mode 100644 index 00000000..233f2c84 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_10_0_0/endpoints.json @@ -0,0 +1,423 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/endpoints.{format}", + "since": [ + "12.0.0" + ], + "apis": [ + { + "path": "/endpoints", + "description": "Asterisk endpoints", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "List all endpoints.", + "nickname": "list", + "responseClass": "List[Endpoint]" + } + ] + }, + { + "path": "/endpoints/sendMessage", + "description": "Send a message to some technology URI or endpoint.", + "operations": [ + { + "httpMethod": "PUT", + "since": [ + "13.0.0" + ], + "summary": "Send a message to some technology URI or endpoint.", + "nickname": "sendMessage", + "responseClass": "void", + "parameters": [ + { + "name": "to", + "description": "The endpoint resource or technology specific URI to send the message to. Valid resources are pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "from", + "description": "The endpoint resource or technology specific identity to send this message from. Valid resources are pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "body", + "description": "The body of the message", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "descriptioni": "The \"variables\" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, pjsip and sip resource types will add the key/value pairs as SIP headers,", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoint not found" + } + ] + } + ] + }, + { + "path": "/endpoints/refer", + "description": "Refer an endpoint or technology URI to some technology URI or endpoint.", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "18.20.0", + "20.5.0" + ], + "summary": "Refer an endpoint or technology URI to some technology URI or endpoint.", + "nickname": "refer", + "responseClass": "void", + "parameters": [ + { + "name": "to", + "description": "The endpoint resource or technology specific URI that should be referred to somewhere. Valid resource is pjsip.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "from", + "description": "The endpoint resource or technology specific identity to refer from.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "refer_to", + "description": "The endpoint resource or technology specific URI to refer to.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "to_self", + "description": "If true and \"refer_to\" refers to an Asterisk endpoint, the \"refer_to\" value is set to point to this Asterisk endpoint - so the referee is referred to Asterisk. Otherwise, use the contact URI associated with the endpoint.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, the pjsip resource type will add the key/value pairs as SIP headers. The \"display_name\" key is used by the PJSIP technology. Its value will be prepended as a display name to the Refer-To URI.", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for referring." + }, + { + "code": 404, + "reason": "Endpoint not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}", + "description": "Asterisk endpoints", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "List available endoints for a given endpoint technology.", + "nickname": "listByTech", + "responseClass": "List[Endpoint]", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoints (pjsip,iax2,...)", + "paramType": "path", + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Endpoints not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}/{resource}", + "description": "Single endpoint", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "Details for an endpoint.", + "nickname": "get", + "responseClass": "Endpoint", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "resource", + "description": "ID of the endpoint", + "paramType": "path", + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoints not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}/{resource}/sendMessage", + "description": "Send a message to some endpoint in a technology.", + "operations": [ + { + "httpMethod": "PUT", + "since": [ + "13.0.0" + ], + "summary": "Send a message to some endpoint in a technology.", + "nickname": "sendMessageToEndpoint", + "responseClass": "void", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "resource", + "description": "ID of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "from", + "description": "The endpoint resource or technology specific identity to send this message from. Valid resources are pjsip and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "body", + "description": "The body of the message", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "descriptioni": "The \"variables\" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, pjsip and sip resource types will add the key/value pairs as SIP headers,", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoint not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}/{resource}/refer", + "description": "Refer an endpoint in a technology to some technology URI or endpoint..", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "18.20.0", + "20.5.0" + ], + "summary": "Refer an endpoint or technology URI to some technology URI or endpoint.", + "nickname": "referToEndpoint", + "responseClass": "void", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "resource", + "description": "ID of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "from", + "description": "The endpoint resource or technology specific identity to refer from.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "refer_to", + "description": "The endpoint resource or technology specific URI to refer to.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "to_self", + "description": "If true and \"refer_to\" refers to an Asterisk endpoint, the \"refer_to\" value is set to point to this Asterisk endpoint - so the referee is referred to Asterisk. Otherwise, use the contact URI associated with the endpoint.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, the pjsip resource type will add the key/value pairs as SIP headers,", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for referring." + }, + { + "code": 404, + "reason": "Endpoint not found" + } + ] + } + ] + } + ], + "models": { + "Endpoint": { + "id": "Endpoint", + "description": "An external device that may offer/accept calls to/from Asterisk.\n\nUnlike most resources, which have a single unique identifier, an endpoint is uniquely identified by the technology/resource pair.", + "properties": { + "technology": { + "type": "string", + "description": "Technology of the endpoint", + "required": true + }, + "resource": { + "type": "string", + "description": "Identifier of the endpoint, specific to the given technology.", + "required": true + }, + "state": { + "type": "string", + "description": "Endpoint's state", + "required": false, + "allowableValues": { + "valueType": "LIST", + "values": [ + "unknown", + "offline", + "online" + ] + } + }, + "channel_ids": { + "type": "List[string]", + "description": "Id's of channels associated with this endpoint", + "required": true + } + } + }, + "TextMessage": { + "id": "TextMessage", + "description": "A text message.", + "properties": { + "from": { + "type": "string", + "description": "A technology specific URI specifying the source of the message. For pjsip technology, any SIP URI can be specified. For xmpp, the URI must correspond to the client connection being used to send the message.", + "required": true + }, + "to": { + "type": "string", + "description": "A technology specific URI specifying the destination of the message. Valid technologies include pjsip, and xmp. The destination of a message should be an endpoint.", + "required": true + }, + "body": { + "type": "string", + "description": "The text of the message.", + "required": true + }, + "variables": { + "type": "object", + "description": "Technology specific key/value pairs (JSON object) associated with the message.", + "required": false + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_10_0_0/events.json b/codegen/src/main/resources/codegen-data/ari_10_0_0/events.json new file mode 100644 index 00000000..f08a665e --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_10_0_0/events.json @@ -0,0 +1,1184 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.2", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/events.{format}", + "since": [ + "12.0.0" + ], + "requiresModules": [ + "res_http_websocket" + ], + "apis": [ + { + "path": "/events", + "description": "Events from Asterisk to applications", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "upgrade": "websocket", + "websocketProtocol": "ari", + "summary": "WebSocket connection for events.", + "nickname": "eventWebsocket", + "responseClass": "Message", + "parameters": [ + { + "name": "app", + "description": "Applications to subscribe to.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "subscribeAll", + "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'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean" + } + ] + } + ] + }, + { + "path": "/events/user/{eventName}", + "description": "Stasis application user events", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.3.0" + ], + "summary": "Generate a user event.", + "nickname": "userEvent", + "responseClass": "void", + "parameters": [ + { + "name": "eventName", + "description": "Event name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "application", + "description": "The name of the application that will receive this event", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "source", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}/{resource}, deviceState:{deviceName}", + "paramType": "query", + "required": false, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds custom key/value pairs to add to the user event. Ex. { \"variables\": { \"key\": \"value\" } }", + "paramType": "body", + "required": false, + "allowMultiple": false, + "dataType": "containers" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 422, + "reason": "Event source not found." + }, + { + "code": 400, + "reason": "Invalid even tsource URI or userevent data." + } + ] + } + ] + } + ], + "models": { + "Message": { + "id": "Message", + "description": "Base type for errors and events", + "discriminator": "type", + "properties": { + "type": { + "type": "string", + "required": true, + "description": "Indicates the type of this message." + }, + "asterisk_id": { + "type": "string", + "required": false, + "description": "The unique ID for the Asterisk instance that raised this event." + } + }, + "subTypes": [ + "MissingParams", + "Event" + ] + }, + "MissingParams": { + "id": "MissingParams", + "description": "Error event sent when required params are missing.", + "properties": { + "params": { + "required": true, + "type": "List[string]", + "description": "A list of the missing parameters" + } + } + }, + "Event": { + "id": "Event", + "description": "Base type for asynchronous events from Asterisk.", + "properties": { + "application": { + "type": "string", + "description": "Name of the application receiving the event.", + "required": true + }, + "timestamp": { + "type": "Date", + "description": "Time at which this event was created.", + "required": true + } + }, + "subTypes": [ + "DeviceStateChanged", + "PlaybackStarted", + "PlaybackContinuing", + "PlaybackFinished", + "RecordingStarted", + "RecordingFinished", + "RecordingFailed", + "ApplicationMoveFailed", + "ApplicationRegistered", + "ApplicationUnregistered", + "ApplicationReplaced", + "BridgeCreated", + "BridgeDestroyed", + "BridgeMerged", + "BridgeBlindTransfer", + "BridgeAttendedTransfer", + "BridgeVideoSourceChanged", + "ChannelCreated", + "ChannelDestroyed", + "ChannelEnteredBridge", + "ChannelLeftBridge", + "ChannelStateChange", + "ChannelDtmfReceived", + "ChannelDialplan", + "ChannelCallerId", + "ChannelUserevent", + "ChannelHangupRequest", + "ChannelVarset", + "ChannelToneDetected", + "ChannelTalkingStarted", + "ChannelTalkingFinished", + "ChannelHold", + "ChannelUnhold", + "ContactStatusChange", + "EndpointStateChange", + "Dial", + "StasisEnd", + "StasisStart", + "TextMessageReceived", + "ChannelConnectedLine", + "PeerStatusChange", + "ChannelTransfer", + "RESTResponse" + ] + }, + "ContactInfo": { + "id": "ContactInfo", + "description": "Detailed information about a contact on an endpoint.", + "properties": { + "uri": { + "type": "string", + "description": "The location of the contact.", + "required": true + }, + "contact_status": { + "type": "string", + "description": "The current status of the contact.", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "Unreachable", + "Reachable", + "Unknown", + "NonQualified", + "Removed" + ] + } + }, + "aor": { + "type": "string", + "description": "The Address of Record this contact belongs to.", + "required": true + }, + "roundtrip_usec": { + "type": "string", + "description": "Current round trip time, in microseconds, for the contact.", + "required": false + } + } + }, + "Peer": { + "id": "Peer", + "description": "Detailed information about a remote peer that communicates with Asterisk.", + "properties": { + "peer_status": { + "type": "string", + "description": "The current state of the peer. Note that the values of the status are dependent on the underlying peer technology.", + "required": true + }, + "cause": { + "type": "string", + "description": "An optional reason associated with the change in peer_status.", + "required": false + }, + "address": { + "type": "string", + "description": "The IP address of the peer.", + "required": false + }, + "port": { + "type": "string", + "description": "The port of the peer.", + "required": false + }, + "time": { + "type": "string", + "description": "The last known time the peer was contacted.", + "required": false + } + } + }, + "DeviceStateChanged": { + "id": "DeviceStateChanged", + "description": "Notification that a device state has changed.", + "properties": { + "device_state": { + "type": "DeviceState", + "description": "Device state object", + "required": true + } + } + }, + "PlaybackStarted": { + "id": "PlaybackStarted", + "description": "Event showing the start of a media playback operation.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "PlaybackContinuing": { + "id": "PlaybackContinuing", + "description": "Event showing the continuation of a media playback operation from one media URI to the next in the list.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "PlaybackFinished": { + "id": "PlaybackFinished", + "description": "Event showing the completion of a media playback operation.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "RecordingStarted": { + "id": "RecordingStarted", + "description": "Event showing the start of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "RecordingFinished": { + "id": "RecordingFinished", + "description": "Event showing the completion of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "RecordingFailed": { + "id": "RecordingFailed", + "description": "Event showing failure of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "ApplicationMoveFailed": { + "id": "ApplicationMoveFailed", + "description": "Notification that trying to move a channel to another Stasis application failed.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + }, + "destination": { + "required": true, + "type": "string" + }, + "args": { + "required": true, + "type": "List[string]", + "description": "Arguments to the application" + } + } + }, + "ApplicationRegistered": { + "id": "ApplicationRegistered", + "description": "Notification that a Stasis app has been registered.", + "properties": {} + }, + "ApplicationUnregistered": { + "id": "ApplicationUnregistered", + "description": "Notification that a Stasis app has been unregistered.", + "properties": {} + }, + "ApplicationReplaced": { + "id": "ApplicationReplaced", + "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.", + "properties": {} + }, + "BridgeCreated": { + "id": "BridgeCreated", + "description": "Notification that a bridge has been created.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeDestroyed": { + "id": "BridgeDestroyed", + "description": "Notification that a bridge has been destroyed.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeMerged": { + "id": "BridgeMerged", + "description": "Notification that one bridge has merged into another.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "bridge_from": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeVideoSourceChanged": { + "id": "BridgeVideoSourceChanged", + "description": "Notification that the source of video in a bridge has changed.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "old_video_source_id": { + "required": false, + "type": "string" + } + } + }, + "BridgeBlindTransfer": { + "id": "BridgeBlindTransfer", + "description": "Notification that a blind transfer has occurred.", + "properties": { + "channel": { + "description": "The channel performing the blind transfer", + "required": true, + "type": "Channel" + }, + "replace_channel": { + "description": "The channel that is replacing transferer when the transferee(s) can not be transferred directly", + "required": false, + "type": "Channel" + }, + "transferee": { + "description": "The channel that is being transferred", + "required": false, + "type": "Channel" + }, + "exten": { + "description": "The extension transferred to", + "required": true, + "type": "string" + }, + "context": { + "description": "The context transferred to", + "required": true, + "type": "string" + }, + "result": { + "description": "The result of the transfer attempt", + "required": true, + "type": "string" + }, + "is_external": { + "description": "Whether the transfer was externally initiated or not", + "required": true, + "type": "boolean" + }, + "bridge": { + "description": "The bridge being transferred", + "type": "Bridge" + } + } + }, + "BridgeAttendedTransfer": { + "id": "BridgeAttendedTransfer", + "description": "Notification that an attended transfer has occurred.", + "properties": { + "transferer_first_leg": { + "description": "First leg of the transferer", + "required": true, + "type": "Channel" + }, + "transferer_second_leg": { + "description": "Second leg of the transferer", + "required": true, + "type": "Channel" + }, + "replace_channel": { + "description": "The channel that is replacing transferer_first_leg in the swap", + "required": false, + "type": "Channel" + }, + "transferee": { + "description": "The channel that is being transferred", + "required": false, + "type": "Channel" + }, + "transfer_target": { + "description": "The channel that is being transferred to", + "required": false, + "type": "Channel" + }, + "result": { + "description": "The result of the transfer attempt", + "required": true, + "type": "string" + }, + "is_external": { + "description": "Whether the transfer was externally initiated or not", + "required": true, + "type": "boolean" + }, + "transferer_first_leg_bridge": { + "description": "Bridge the transferer first leg is in", + "type": "Bridge" + }, + "transferer_second_leg_bridge": { + "description": "Bridge the transferer second leg is in", + "type": "Bridge" + }, + "destination_type": { + "description": "How the transfer was accomplished", + "required": true, + "type": "string" + }, + "destination_bridge": { + "description": "Bridge that survived the merge result", + "type": "string" + }, + "destination_application": { + "description": "Application that has been transferred into", + "type": "string" + }, + "destination_link_first_leg": { + "description": "First leg of a link transfer result", + "type": "Channel" + }, + "destination_link_second_leg": { + "description": "Second leg of a link transfer result", + "type": "Channel" + }, + "destination_threeway_channel": { + "description": "Transferer channel that survived the threeway result", + "type": "Channel" + }, + "destination_threeway_bridge": { + "description": "Bridge that survived the threeway result", + "type": "Bridge" + } + } + }, + "ChannelCreated": { + "id": "ChannelCreated", + "description": "Notification that a channel has been created.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelDestroyed": { + "id": "ChannelDestroyed", + "description": "Notification that a channel has been destroyed.", + "properties": { + "cause": { + "required": true, + "description": "Integer representation of the cause of the hangup", + "type": "int" + }, + "cause_txt": { + "required": true, + "description": "Text representation of the cause of the hangup", + "type": "string" + }, + "tech_cause": { + "type": "int", + "description": "Integer representation of the technology-specific off-nominal cause of the hangup." + }, + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelEnteredBridge": { + "id": "ChannelEnteredBridge", + "description": "Notification that a channel has entered a bridge.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "channel": { + "type": "Channel" + } + } + }, + "ChannelLeftBridge": { + "id": "ChannelLeftBridge", + "description": "Notification that a channel has left a bridge.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelStateChange": { + "id": "ChannelStateChange", + "description": "Notification of a channel's state change.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelDtmfReceived": { + "id": "ChannelDtmfReceived", + "description": "DTMF received on a channel.\n\nThis event is sent when the DTMF ends. There is no notification about the start of DTMF", + "properties": { + "digit": { + "required": true, + "type": "string", + "description": "DTMF digit received (0-9, A-E, # or *)" + }, + "duration_ms": { + "required": true, + "type": "int", + "description": "Number of milliseconds DTMF was received" + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which DTMF was received" + } + } + }, + "ChannelDialplan": { + "id": "ChannelDialplan", + "description": "Channel changed location in the dialplan.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that changed dialplan location." + }, + "dialplan_app": { + "required": true, + "type": "string", + "description": "The application about to be executed." + }, + "dialplan_app_data": { + "required": true, + "type": "string", + "description": "The data to be passed to the application." + } + } + }, + "ChannelCallerId": { + "id": "ChannelCallerId", + "description": "Channel changed Caller ID.", + "properties": { + "caller_presentation": { + "required": true, + "type": "int", + "description": "The integer representation of the Caller Presentation value." + }, + "caller_presentation_txt": { + "required": true, + "type": "string", + "description": "The text representation of the Caller Presentation value." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that changed Caller ID." + } + } + }, + "ChannelUserevent": { + "id": "ChannelUserevent", + "description": "User-generated event with additional user-defined fields in the object.", + "properties": { + "eventname": { + "required": true, + "type": "string", + "description": "The name of the user event." + }, + "channel": { + "required": false, + "type": "Channel", + "description": "A channel that is signaled with the user event." + }, + "bridge": { + "required": false, + "type": "Bridge", + "description": "A bridge that is signaled with the user event." + }, + "endpoint": { + "required": false, + "type": "Endpoint", + "description": "A endpoint that is signaled with the user event." + }, + "userevent": { + "required": true, + "type": "object", + "description": "Custom Userevent data" + } + } + }, + "ChannelHangupRequest": { + "id": "ChannelHangupRequest", + "description": "A hangup was requested on the channel.", + "properties": { + "cause": { + "type": "int", + "description": "Integer representation of the cause of the hangup." + }, + "tech_cause": { + "type": "int", + "description": "Integer representation of the technology-specific off-nominal cause of the hangup." + }, + "soft": { + "type": "boolean", + "description": "Whether the hangup request was a soft hangup request." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which the hangup was requested." + } + } + }, + "ChannelVarset": { + "id": "ChannelVarset", + "description": "Channel variable changed.", + "properties": { + "variable": { + "required": true, + "type": "string", + "description": "The variable that changed." + }, + "value": { + "required": true, + "type": "string", + "description": "The new value of the variable." + }, + "channel": { + "required": false, + "type": "Channel", + "description": "The channel on which the variable was set.\n\nIf missing, the variable is a global variable." + } + } + }, + "ChannelHold": { + "id": "ChannelHold", + "description": "A channel initiated a media hold.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that initiated the hold event." + }, + "musicclass": { + "required": false, + "type": "string", + "description": "The music on hold class that the initiator requested." + } + } + }, + "ChannelUnhold": { + "id": "ChannelUnhold", + "description": "A channel initiated a media unhold.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that initiated the unhold event." + } + } + }, + "ChannelToneDetected": { + "id": "ChannelToneDetected", + "description": "Tone was detected on the channel.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel the tone was detected on." + } + } + }, + "ChannelTalkingStarted": { + "id": "ChannelTalkingStarted", + "description": "Talking was detected on the channel.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which talking started." + } + } + }, + "ChannelTalkingFinished": { + "id": "ChannelTalkingFinished", + "description": "Talking is no longer detected on the channel.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which talking completed." + }, + "duration": { + "required": true, + "type": "int", + "description": "The length of time, in milliseconds, that talking was detected on the channel" + } + } + }, + "ContactStatusChange": { + "id": "ContactStatusChange", + "description": "The state of a contact on an endpoint has changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + }, + "contact_info": { + "required": true, + "type": "ContactInfo" + } + } + }, + "PeerStatusChange": { + "id": "PeerStatusChange", + "description": "The state of a peer associated with an endpoint has changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + }, + "peer": { + "required": true, + "type": "Peer" + } + } + }, + "EndpointStateChange": { + "id": "EndpointStateChange", + "description": "Endpoint state changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + } + } + }, + "Dial": { + "id": "Dial", + "description": "Dialing state has changed.", + "properties": { + "caller": { + "required": false, + "type": "Channel", + "description": "The calling channel." + }, + "peer": { + "required": true, + "type": "Channel", + "description": "The dialed channel." + }, + "forward": { + "required": false, + "type": "string", + "description": "Forwarding target requested by the original dialed channel." + }, + "forwarded": { + "required": false, + "type": "Channel", + "description": "Channel that the caller has been forwarded to." + }, + "dialstring": { + "required": false, + "type": "string", + "description": "The dial string for calling the peer channel." + }, + "dialstatus": { + "required": true, + "type": "string", + "description": "Current status of the dialing attempt to the peer." + } + } + }, + "StasisEnd": { + "id": "StasisEnd", + "description": "Notification that a channel has left a Stasis application.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "StasisStart": { + "id": "StasisStart", + "description": "Notification that a channel has entered a Stasis application.", + "properties": { + "args": { + "required": true, + "type": "List[string]", + "description": "Arguments to the application" + }, + "channel": { + "required": true, + "type": "Channel" + }, + "replace_channel": { + "required": false, + "type": "Channel" + } + } + }, + "TextMessageReceived": { + "id": "TextMessageReceived", + "description": "A text message was received from an endpoint.", + "properties": { + "message": { + "required": true, + "type": "TextMessage" + }, + "endpoint": { + "required": false, + "type": "Endpoint" + } + } + }, + "ChannelConnectedLine": { + "id": "ChannelConnectedLine", + "description": "Channel changed Connected Line.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel whose connected line has changed." + } + } + }, + "ChannelTransfer": { + "id": "ChannelTransfer", + "description": "transfer on a channel.", + "properties": { + "state": { + "required": false, + "type": "string", + "description": "Transfer State" + }, + "refer_to": { + "required": true, + "type": "ReferTo", + "description": "Refer-To information with optionally both affected channels" + }, + "referred_by": { + "required": true, + "type": "ReferredBy", + "description": "Referred-By SIP Header according rfc3892" + } + } + }, + "ReferTo": { + "id": "ReferTo", + "description": "transfer destination requested by transferee", + "properties": { + "requested_destination": { + "required": true, + "type": "RequiredDestination" + }, + "destination_channel": { + "required": false, + "type": "Channel", + "description": "The Channel Object, that is to be replaced" + }, + "connected_channel": { + "required": false, + "type": "Channel", + "description": "Channel, connected to the to be replaced channel" + }, + "bridge": { + "required": false, + "type": "Bridge", + "description": "Bridge connecting both destination channels" + } + } + }, + "ReferredBy": { + "id": "ReferredBy", + "description": "transfer destination requested by transferee", + "properties": { + "source_channel": { + "required": true, + "type": "Channel", + "description": "The channel on which the refer was received" + }, + "connected_channel": { + "required": false, + "type": "Channel", + "description": "Channel, Connected to the channel, receiving the transfer request on." + }, + "bridge": { + "required": false, + "type": "Bridge", + "description": "Bridge connecting both Channels" + } + } + }, + "RequiredDestination": { + "id": "RequiredDestination", + "description": "Information about the requested destination", + "properties": { + "protocol_id": { + "required": false, + "type": "string", + "description": "the requested protocol-id by the referee in case of SIP channel, this is a SIP Call ID, Mutually exclusive to destination" + }, + "destination": { + "required": false, + "type": "string", + "description": "Destination User Part. Only for Blind transfer. Mutually exclusive to protocol_id" + }, + "additional_protocol_params": { + "required": false, + "type": "List[AdditionalParam]", + "description": "List of additional protocol specific information" + } + } + }, + "AdditionalParam": { + "id": "AdditionalParam", + "description": "Protocol specific additional parameter", + "properties": { + "parameter_name": { + "required": true, + "type": "string", + "description": "Name of the parameter" + }, + "parameter_value": { + "required": true, + "type": "string", + "description": "Value of the parameter" + } + } + }, + "RESTHeader": { + "id": "RESTHeader", + "description": "REST over Websocket header", + "properties": { + "name": { + "type": "string", + "description": "Header name", + "required": true + }, + "value": { + "required": true, + "type": "string", + "description": "Header value" + } + } + }, + "RESTQueryStringParameter": { + "id": "RESTQueryStringParameter", + "description": "REST over Websocket Query String Parameter", + "properties": { + "name": { + "type": "string", + "description": "Parameter name", + "required": true + }, + "value": { + "required": true, + "type": "string", + "description": "Parameter value" + } + } + }, + "RESTRequest": { + "id": "RESTRequest", + "description": "REST over Websocket Request.", + "properties": { + "type": { + "type": "string", + "description": "Message type. Must be 'RESTRequest'", + "required": true + }, + "transaction_id": { + "type": "string", + "description": "Opaque transaction id. Can be any valid string. Will be returned in any response to this request.", + "required": true + }, + "request_id": { + "type": "string", + "description": "Opaque request id. Can be any valid string. Will be returned in any response to this request.", + "required": true + }, + "method": { + "required": true, + "type": "string", + "description": "HTTP method (GET, PUT, POST, DELETE, etc.)" + }, + "uri": { + "required": true, + "type": "string", + "description": "Resource URI with optional query string parameters." + }, + "content_type": { + "required": false, + "type": "string", + "description": "The Content-Type of the message body." + }, + "query_strings": { + "required": false, + "type": "List[RESTQueryStringParameter]", + "description": "Request query string parameters." + }, + "message_body": { + "required": false, + "type": "string", + "description": "Request message body. Only content types application/json and application/x-www-form-urlencoded are supported." + } + } + }, + "RESTResponse": { + "id": "RESTResponse", + "description": "REST over Websocket Response.", + "properties": { + "transaction_id": { + "type": "string", + "description": "Opaque transaction id. Will be whatever was specified on the original request.", + "required": true + }, + "request_id": { + "type": "string", + "description": "Opaque request id. Will be whatever was specified on the original request.", + "required": true + }, + "status_code": { + "required": true, + "type": "int", + "description": "HTTP status code" + }, + "reason_phrase": { + "required": true, + "type": "string", + "description": "HTTP reason phrase" + }, + "uri": { + "required": true, + "type": "string", + "description": "Original request resource URI" + }, + "content_type": { + "required": false, + "type": "string", + "description": "The Content-Type of the message body." + }, + "message_body": { + "required": false, + "type": "string", + "description": "Response message body" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_10_0_0/mailboxes.json b/codegen/src/main/resources/codegen-data/ari_10_0_0/mailboxes.json new file mode 100644 index 00000000..d99e1eac --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_10_0_0/mailboxes.json @@ -0,0 +1,152 @@ +{ + "_copyright": "Copyright (C) 2013, Digium, Inc.", + "_author": "Jonathan Rose ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/mailboxes.{format}", + "since": [ + "12.1.0" + ], + "requiresModules": [ + "res_stasis_mailbox" + ], + "apis": [ + { + "path": "/mailboxes", + "description": "Mailboxes", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.1.0" + ], + "summary": "List all mailboxes.", + "nickname": "list", + "responseClass": "List[Mailbox]" + } + ] + }, + { + "path": "/mailboxes/{mailboxName}", + "description": "Mailbox state", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.1.0" + ], + "summary": "Retrieve the current state of a mailbox.", + "nickname": "get", + "responseClass": "Mailbox", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + }, + { + "httpMethod": "PUT", + "since": [ + "12.1.0" + ], + "summary": "Change the state of a mailbox. (Note - implicitly creates the mailbox).", + "nickname": "update", + "responseClass": "void", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "oldMessages", + "description": "Count of old messages in the mailbox", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "newMessages", + "description": "Count of new messages in the mailbox", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "int" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "12.1.0" + ], + "summary": "Destroy a mailbox.", + "nickname": "delete", + "responseClass": "void", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + } + ] + } + ], + "models": { + "Mailbox": { + "id": "Mailbox", + "description": "Represents the state of a mailbox.", + "properties": { + "name": { + "type": "string", + "description": "Name of the mailbox.", + "required": true + }, + "old_messages": { + "type": "int", + "description": "Count of old messages in the mailbox.", + "required": true + }, + "new_messages": { + "type": "int", + "description": "Count of new messages in the mailbox.", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_10_0_0/playbacks.json b/codegen/src/main/resources/codegen-data/ari_10_0_0/playbacks.json new file mode 100644 index 00000000..a7892f18 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_10_0_0/playbacks.json @@ -0,0 +1,177 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/playbacks.{format}", + "since": [ + "12.0.0" + ], + "requiresModules": [ + "res_stasis_playback" + ], + "apis": [ + { + "path": "/playbacks/{playbackId}", + "description": "Control object for a playback operation.", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "Get a playback's details.", + "nickname": "get", + "responseClass": "Playback", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "The playback cannot be found" + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "12.0.0" + ], + "summary": "Stop a playback.", + "nickname": "stop", + "responseClass": "void", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "The playback cannot be found" + } + ] + } + ] + }, + { + "path": "/playbacks/{playbackId}/control", + "description": "Control object for a playback operation.", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Control a playback.", + "nickname": "control", + "responseClass": "void", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "operation", + "description": "Operation to perform on the playback.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "restart", + "pause", + "unpause", + "reverse", + "forward" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "The provided operation parameter was invalid" + }, + { + "code": 404, + "reason": "The playback cannot be found" + }, + { + "code": 409, + "reason": "The operation cannot be performed in the playback's current state" + } +] + } + ] + } + ], + "models": { + "Playback": { + "id": "Playback", + "description": "Object representing the playback of media to a channel", + "properties": { + "id": { + "type": "string", + "description": "ID for this playback operation", + "required": true + }, + "media_uri": { + "type": "string", + "description": "The URI for the media currently being played back.", + "required": true + }, + "next_media_uri": { + "type": "string", + "description": "If a list of URIs is being played, the next media URI to be played back.", + "required": false + }, + "target_uri": { + "type": "string", + "description": "URI for the channel or bridge to play the media on", + "required": true + }, + "language": { + "type": "string", + "description": "For media types that support multiple languages, the language requested for playback." + }, + "state": { + "type": "string", + "description": "Current state of the playback operation.", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "queued", + "playing", + "continuing", + "done", + "failed" + ] + } + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_10_0_0/recordings.json b/codegen/src/main/resources/codegen-data/ari_10_0_0/recordings.json new file mode 100644 index 00000000..1496db8a --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_10_0_0/recordings.json @@ -0,0 +1,452 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/recordings.{format}", + "since": [ + "12.0.0" + ], + "requiresModules": [ + "res_stasis_recording" + ], + "apis": [ + { + "path": "/recordings/stored", + "description": "Recordings", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "List recordings that are complete.", + "nickname": "listStored", + "responseClass": "List[StoredRecording]" + } + ] + }, + { + "path": "/recordings/stored/{recordingName}", + "description": "Individual recording", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "Get a stored recording's details.", + "nickname": "getStored", + "responseClass": "StoredRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "12.0.0" + ], + "summary": "Delete a stored recording.", + "nickname": "deleteStored", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/stored/{recordingName}/file", + "description": "The actual file associated with the stored recording", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "14.0.0" + ], + "summary": "Get the file associated with the stored recording.", + "nickname": "getStoredFile", + "responseClass": "binary", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 403, + "reason": "The recording file could not be opened" + }, + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/stored/{recordingName}/copy", + "description": "Copy an individual recording", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.5.0" + ], + "summary": "Copy a stored recording.", + "nickname": "copyStored", + "responseClass": "StoredRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording to copy", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "destinationRecordingName", + "description": "The destination name of the recording", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "A recording with the same name already exists on the system" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}", + "description": "A recording that is in progress", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "List live recordings.", + "nickname": "getLive", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "12.0.0" + ], + "summary": "Stop a live recording and discard it.", + "nickname": "cancel", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/stop", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Stop a live recording and store it.", + "nickname": "stop", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/pause", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Pause a live recording.", + "notes": "Pausing a recording suspends silence detection, which will be restarted when the recording is unpaused. Paused time is not included in the accounting for maxDurationSeconds.", + "nickname": "pause", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "12.0.0" + ], + "summary": "Unpause a live recording.", + "nickname": "unpause", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/mute", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Mute a live recording.", + "notes": "Muting a recording suspends silence detection, which will be restarted when the recording is unmuted.", + "nickname": "mute", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "12.0.0" + ], + "summary": "Unmute a live recording.", + "nickname": "unmute", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + } + ] + } + ], + "models": { + "StoredRecording": { + "id": "StoredRecording", + "description": "A past recording that may be played back.", + "properties": { + "name": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + }, + "LiveRecording": { + "id": "LiveRecording", + "description": "A recording that is in progress", + "properties": { + "name": { + "required": true, + "type": "string", + "description": "Base name for the recording" + }, + "format": { + "required": true, + "type": "string", + "description": "Recording format (wav, gsm, etc.)" + }, + "target_uri": { + "required": true, + "type": "string", + "description": "URI for the channel or bridge being recorded" + }, + "state": { + "required": true, + "type": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "queued", + "recording", + "paused", + "done", + "failed", + "canceled" + ] + } + }, + "duration": { + "required": false, + "type": "int", + "description": "Duration in seconds of the recording" + }, + "talking_duration": { + "required": false, + "type": "int", + "description": "Duration of talking, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds." + }, + "silence_duration": { + "required": false, + "type": "int", + "description": "Duration of silence, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds." + }, + "cause": { + "required": false, + "type": "string", + "description": "Cause for recording failure if failed" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_10_0_0/sounds.json b/codegen/src/main/resources/codegen-data/ari_10_0_0/sounds.json new file mode 100644 index 00000000..aee4d369 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_10_0_0/sounds.json @@ -0,0 +1,108 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/sounds.{format}", + "since": [ + "12.0.0" + ], + "apis": [ + { + "path": "/sounds", + "description": "Sounds", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "List all sounds.", + "nickname": "list", + "responseClass": "List[Sound]", + "parameters": [ + { + "name": "lang", + "description": "Lookup sound for a specific language.", + "paramType": "query", + "dataType": "string", + "required": false + }, + { + "name": "format", + "description": "Lookup sound in a specific format.", + "paramType": "query", + "dataType": "string", + "required": false, + "__note": "core show translation can show translation paths between formats, along with relative costs. so this could be just installed format, or we could follow that for transcoded formats." + } + ] + } + ] + }, + { + "path": "/sounds/{soundId}", + "description": "Individual sound", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "Get a sound's details.", + "nickname": "get", + "responseClass": "Sound", + "parameters": [ + { + "name": "soundId", + "description": "Sound's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ] + } + ] + } + ], + "models": { + "FormatLangPair": { + "id": "FormatLangPair", + "description": "Identifies the format and language of a sound file", + "properties": { + "language": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + }, + "Sound": { + "id": "Sound", + "description": "A media file that may be played back.", + "properties": { + "id": { + "required": true, + "description": "Sound's identifier.", + "type": "string" + }, + "text": { + "required": false, + "description": "Text description of the sound, usually the words spoken.", + "type": "string" + }, + "formats": { + "required": true, + "description": "The formats and languages in which this sound is available.", + "type": "List[FormatLangPair]" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_11_0_0/applications.json b/codegen/src/main/resources/codegen-data/ari_11_0_0/applications.json new file mode 100644 index 00000000..8ad9f36d --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_11_0_0/applications.json @@ -0,0 +1,242 @@ +{ + "_copyright": "Copyright (C) 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/applications.{format}", + "since": [ + "13.0.0" + ], + "apis": [ + { + "path": "/applications", + "description": "Stasis applications", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "13.0.0" + ], + "summary": "List all applications.", + "nickname": "list", + "responseClass": "List[Application]" + } + ] + }, + { + "path": "/applications/{applicationName}", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "13.0.0" + ], + "summary": "Get details of an application.", + "nickname": "get", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Application does not exist." + } + ] + } + ] + }, + { + "path": "/applications/{applicationName}/subscription", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "13.0.0" + ], + "summary": "Subscribe an application to a event source.", + "notes": "Returns the state of the application after the subscriptions have changed", + "nickname": "subscribe", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "eventSource", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing parameter." + }, + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 422, + "reason": "Event source does not exist." + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "13.0.0" + ], + "summary": "Unsubscribe an application from an event source.", + "notes": "Returns the state of the application after the subscriptions have changed", + "nickname": "unsubscribe", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "eventSource", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing parameter; event source scheme not recognized." + }, + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 409, + "reason": "Application not subscribed to event source." + }, + { + "code": 422, + "reason": "Event source does not exist." + } + ] + } + ] + }, + { + "path": "/applications/{applicationName}/eventFilter", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "PUT", + "since": [ + "13.26.0", + "16.3.0" + ], + "summary": "Filter application events types.", + "notes": "Allowed and/or disallowed event type filtering can be done. The body (parameter) should specify a JSON key/value object that describes the type of event filtering needed. One, or both of the following keys can be designated:

\"allowed\" - Specifies an allowed list of event types
\"disallowed\" - Specifies a disallowed list of event types

Further, each of those key's value should be a JSON array that holds zero, or more JSON key/value objects. Each of these objects must contain the following key with an associated value:

\"type\" - The type name of the event to filter

The value must be the string name (case sensitive) of the event type that needs filtering. For example:

{ \"allowed\": [ { \"type\": \"StasisStart\" }, { \"type\": \"StasisEnd\" } ] }

As this specifies only an allowed list, then only those two event type messages are sent to the application. No other event messages are sent.

The following rules apply:

* If the body is empty, both the allowed and disallowed filters are set empty.
* If both list types are given then both are set to their respective values (note, specifying an empty array for a given type sets that type to empty).
* If only one list type is given then only that type is set. The other type is not updated.
* An empty \"allowed\" list means all events are allowed.
* An empty \"disallowed\" list means no events are disallowed.
* Disallowed events take precedence over allowed events if the event type is specified in both lists.", + "nickname": "filter", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "filter", + "description": "Specify which event types to allow/disallow", + "paramType": "body", + "required": false, + "dataType": "object", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Bad request." + }, + { + "code": 404, + "reason": "Application does not exist." + } + ] + } + ] + } + ], + "models": { + "Application": { + "id": "Application", + "description": "Details of a Stasis application", + "properties": { + "name": { + "type": "string", + "description": "Name of this application", + "required": true + }, + "channel_ids": { + "type": "List[string]", + "description": "Id's for channels subscribed to.", + "required": true + }, + "bridge_ids": { + "type": "List[string]", + "description": "Id's for bridges subscribed to.", + "required": true + }, + "endpoint_ids": { + "type": "List[string]", + "description": "{tech}/{resource} for endpoints subscribed to.", + "required": true + }, + "device_names": { + "type": "List[string]", + "description": "Names of the devices subscribed to.", + "required": true + }, + "events_allowed": { + "type": "List[object]", + "description": "Event types sent to the application.", + "required": true + }, + "events_disallowed": { + "type": "List[object]", + "description": "Event types not sent to the application.", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_11_0_0/asterisk.json b/codegen/src/main/resources/codegen-data/ari_11_0_0/asterisk.json new file mode 100644 index 00000000..83fef8b7 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_11_0_0/asterisk.json @@ -0,0 +1,777 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/asterisk.{format}", + "since": [ + "12.0.0" + ], + "apis": [ + { + "path": "/asterisk/config/dynamic/{configClass}/{objectType}/{id}", + "description": "Asterisk dynamic configuration", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "13.5.0" + ], + "summary": "Retrieve a dynamic configuration object.", + "nickname": "getObject", + "responseClass": "List[ConfigTuple]", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to retrieve.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to retrieve.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "{configClass|objectType|id} not found" + } + ] + }, + { + "httpMethod": "PUT", + "since": [ + "13.5.0" + ], + "summary": "Create or update a dynamic configuration object.", + "nickname": "updateObject", + "responseClass": "List[ConfigTuple]", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to create or update.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to create or update.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "fields", + "description": "The body object should have a value that is a list of ConfigTuples, which provide the fields to update. Ex. [ { \"attribute\": \"directmedia\", \"value\": \"false\" } ]", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Bad request body" + }, + { + "code": 403, + "reason": "Could not create or update object" + }, + { + "code": 404, + "reason": "{configClass|objectType} not found" + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "13.5.0" + ], + "summary": "Delete a dynamic configuration object.", + "nickname": "deleteObject", + "responseClass": "void", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to delete.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to delete.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 403, + "reason": "Could not delete object" + }, + { + "code": 404, + "reason": "{configClass|objectType|id} not found" + } + ] + } + ] + }, + { + "path": "/asterisk/info", + "description": "Asterisk system information (similar to core show settings)", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "Gets Asterisk system information.", + "nickname": "getInfo", + "responseClass": "AsteriskInfo", + "parameters": [ + { + "name": "only", + "description": "Filter information returned", + "paramType": "query", + "required": false, + "allowMultiple": true, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "build", + "system", + "config", + "status" + ] + } + } + ] + } + ] + }, + { + "path": "/asterisk/ping", + "description": "Asterisk ping", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "13.25.0", + "16.2.0" + ], + "summary": "Response pong message.", + "nickname": "ping", + "responseClass": "AsteriskPing" + } + ] + }, + { + "path": "/asterisk/modules", + "description": "Asterisk modules", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "13.5.0" + ], + "summary": "List Asterisk modules.", + "nickname": "listModules", + "responseClass": "List[Module]" + } + ] + }, + { + "path": "/asterisk/modules/{moduleName}", + "description": "Asterisk module", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "13.5.0" + ], + "summary": "Get Asterisk module information.", + "nickname": "getModule", + "responseClass": "Module", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module could not be found in running modules." + }, + { + "code": 409, + "reason": "Module information could not be retrieved." + } + ] + }, + { + "httpMethod": "POST", + "since": [ + "13.5.0" + ], + "summary": "Load an Asterisk module.", + "nickname": "loadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 409, + "reason": "Module could not be loaded." + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "13.5.0" + ], + "summary": "Unload an Asterisk module.", + "nickname": "unloadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module not found in running modules." + }, + { + "code": 409, + "reason": "Module could not be unloaded." + } + ] + }, + { + "httpMethod": "PUT", + "since": [ + "13.5.0" + ], + "summary": "Reload an Asterisk module.", + "nickname": "reloadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module not found in running modules." + }, + { + "code": 409, + "reason": "Module could not be reloaded." + } + ] + } + ] + }, + { + "path": "/asterisk/logging", + "description": "Asterisk log channels", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "13.6.0" + ], + "summary": "Gets Asterisk log channel information.", + "nickname": "listLogChannels", + "responseClass": "List[LogChannel]" + } + ] + }, + { + "path": "/asterisk/logging/{logChannelName}", + "description": "Asterisk log channel", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "13.6.0" + ], + "summary": "Adds a log channel.", + "nickname": "addLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "The log channel to add", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "configuration", + "description": "levels of the log channel", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Bad request body" + }, + { + "code": 409, + "reason": "Log channel could not be created." + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "13.6.0" + ], + "summary": "Deletes a log channel.", + "nickname": "deleteLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "Log channels name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Log channel does not exist." + } + ] + } + ] + }, + { + "path": "/asterisk/logging/{logChannelName}/rotate", + "description": "Asterisk log channel", + "operations": [ + { + "httpMethod": "PUT", + "since": [ + "13.6.0" + ], + "summary": "Rotates a log channel.", + "nickname": "rotateLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "Log channel's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Log channel does not exist." + } + ] + } + ] + }, + { + "path": "/asterisk/variable", + "description": "Global variables", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "Get the value of a global variable.", + "nickname": "getGlobalVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "variable", + "description": "The variable to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + } + ] + }, + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Set the value of a global variable.", + "nickname": "setGlobalVar", + "responseClass": "void", + "parameters": [ + { + "name": "variable", + "description": "The variable to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + } + ] + } + ] + } + ], + "models": { + "BuildInfo": { + "id": "BuildInfo", + "description": "Info about how Asterisk was built", + "properties": { + "os": { + "required": true, + "type": "string", + "description": "OS Asterisk was built on." + }, + "kernel": { + "required": true, + "type": "string", + "description": "Kernel version Asterisk was built on." + }, + "options": { + "required": true, + "type": "string", + "description": "Compile time options, or empty string if default." + }, + "machine": { + "required": true, + "type": "string", + "description": "Machine architecture (x86_64, i686, ppc, etc.)" + }, + "date": { + "required": true, + "type": "string", + "description": "Date and time when Asterisk was built." + }, + "user": { + "required": true, + "type": "string", + "description": "Username that build Asterisk" + } + } + }, + "SystemInfo": { + "id": "SystemInfo", + "description": "Info about Asterisk", + "properties": { + "version": { + "required": true, + "type": "string", + "description": "Asterisk version." + }, + "entity_id": { + "required": true, + "type": "string", + "description": "" + } + } + }, + "SetId": { + "id": "SetId", + "description": "Effective user/group id", + "properties": { + "user": { + "required": true, + "type": "string", + "description": "Effective user id." + }, + "group": { + "required": true, + "type": "string", + "description": "Effective group id." + } + } + }, + "ConfigInfo": { + "id": "ConfigInfo", + "description": "Info about Asterisk configuration", + "properties": { + "name": { + "required": true, + "type": "string", + "description": "Asterisk system name." + }, + "default_language": { + "required": true, + "type": "string", + "description": "Default language for media playback." + }, + "max_channels": { + "required": false, + "type": "int", + "description": "Maximum number of simultaneous channels." + }, + "max_open_files": { + "required": false, + "type": "int", + "description": "Maximum number of open file handles (files, sockets)." + }, + "max_load": { + "required": false, + "type": "double", + "description": "Maximum load avg on system." + }, + "setid": { + "required": true, + "type": "SetId", + "description": "Effective user/group id for running Asterisk." + } + } + }, + "StatusInfo": { + "id": "StatusInfo", + "description": "Info about Asterisk status", + "properties": { + "startup_time": { + "required": true, + "type": "Date", + "description": "Time when Asterisk was started." + }, + "last_reload_time": { + "required": true, + "type": "Date", + "description": "Time when Asterisk was last reloaded." + } + } + }, + "AsteriskInfo": { + "id": "AsteriskInfo", + "description": "Asterisk system information", + "properties": { + "build": { + "required": false, + "type": "BuildInfo", + "description": "Info about how Asterisk was built" + }, + "system": { + "required": false, + "type": "SystemInfo", + "description": "Info about the system running Asterisk" + }, + "config": { + "required": false, + "type": "ConfigInfo", + "description": "Info about Asterisk configuration" + }, + "status": { + "required": false, + "type": "StatusInfo", + "description": "Info about Asterisk status" + } + } + }, + "AsteriskPing": { + "id": "AsteriskPing", + "description": "Asterisk ping information", + "properties": { + "asterisk_id": { + "required": true, + "type": "string", + "description": "Asterisk id info" + }, + "ping": { + "required": true, + "type": "string", + "description": "Always string value is pong" + }, + "timestamp": { + "required": true, + "type": "string", + "description": "The timestamp string of request received time" + } + } + }, + "Module": { + "id": "Module", + "description": "Details of an Asterisk module", + "properties": { + "name": { + "type": "string", + "description": "The name of this module", + "required": true + }, + "description": { + "type": "string", + "description": "The description of this module", + "required": true + }, + "use_count": { + "type": "int", + "description": "The number of times this module is being used", + "required": true + }, + "status": { + "type": "string", + "description": "The running status of this module", + "required": true + }, + "support_level": { + "type": "string", + "description": "The support state of this module", + "required": true + } + } + }, + "LogChannel": { + "id": "LogChannel", + "description": "Details of an Asterisk log channel", + "properties": { + "channel": { + "type": "string", + "description": "The log channel path", + "required": true + }, + "type": { + "type": "string", + "description": "Types of logs for the log channel", + "required": true + }, + "status": { + "type": "string", + "description": "Whether or not a log type is enabled", + "required": true + }, + "configuration": { + "type": "string", + "description": "The various log levels", + "required": true + } + } + }, + "Variable": { + "id": "Variable", + "description": "The value of a channel variable", + "properties": { + "value": { + "required": true, + "type": "string", + "description": "The value of the variable requested" + } + } + }, + "ConfigTuple": { + "id": "ConfigTuple", + "description": "A key/value pair that makes up part of a configuration object.", + "properties": { + "attribute": { + "required": true, + "type": "string", + "description": "A configuration object attribute." + }, + "value": { + "required": true, + "type": "string", + "description": "The value for the attribute." + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_11_0_0/bridges.json b/codegen/src/main/resources/codegen-data/ari_11_0_0/bridges.json new file mode 100644 index 00000000..ae5ee56f --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_11_0_0/bridges.json @@ -0,0 +1,864 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/bridges.{format}", + "since": [ + "12.0.0" + ], + "requiresModules": [ + "res_stasis_recording", + "res_stasis_playback" + ], + "apis": [ + { + "path": "/bridges", + "description": "Active bridges", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "List all active bridges in Asterisk.", + "nickname": "list", + "responseClass": "List[Bridge]" + }, + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Create a new bridge.", + "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", + "nickname": "create", + "responseClass": "Bridge", + "parameters": [ + { + "name": "type", + "description": "Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media, video_sfu, video_single, sdp_label).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "bridgeId", + "description": "Unique ID to give to the bridge being created.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Name to give to the bridge being created.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 409, + "reason": "Bridge with the same bridgeId already exists" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}", + "description": "Individual bridge", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.2.0" + ], + "summary": "Create a new bridge.", + "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", + "nickname": "createWithId", + "responseClass": "Bridge", + "parameters": [ + { + "name": "type", + "description": "Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media, video_sfu, video_single, sdp_label) to set.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "bridgeId", + "description": "Unique ID to give to the bridge being created.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Set the name of the bridge.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 409, + "reason": "Bridge with the same bridgeId already exists" + } + ] + }, + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "Get bridge details.", + "nickname": "get", + "responseClass": "Bridge", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "12.0.0" + ], + "summary": "Shut down a bridge.", + "notes": "If any channels are in this bridge, they will be removed and resume whatever they were doing beforehand.", + "nickname": "destroy", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/addChannel", + "description": "Add a channel to a bridge", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Add a channel to a bridge.", + "nickname": "addChannel", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channel", + "description": "Ids of channels to add to bridge", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "role", + "description": "Channel's role in the bridge", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "absorbDTMF", + "description": "Absorb DTMF coming from this channel, preventing it to pass through to the bridge", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "mute", + "description": "Mute audio from this channel, preventing it to pass through to the bridge", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "inhibitConnectedLineUpdates", + "description": "Do not present the identity of the newly connected channel to other bridge members", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Channel not found" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application; Channel currently recording" + }, + { + "code": 422, + "reason": "Channel not in Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/removeChannel", + "description": "Remove a channel from a bridge", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Remove a channel from a bridge.", + "nickname": "removeChannel", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channel", + "description": "Ids of channels to remove from bridge", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Channel not found" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + }, + { + "code": 422, + "reason": "Channel not in this bridge" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/videoSource/{channelId}", + "description": "Set a channel as the video source in a multi-party bridge", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "13.13.0", + "14.2.0" + ], + "summary": "Set a channel as the video source in a multi-party mixing bridge. This operation has no effect on bridges with two or fewer participants.", + "nickname": "setVideoSource", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge or Channel not found" + }, + { + "code": 409, + "reason": "Channel not in Stasis application" + }, + { + "code": 422, + "reason": "Channel not in this Bridge" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/videoSource", + "description": "Removes any explicit video source", + "operations": [ + { + "httpMethod": "DELETE", + "since": [ + "13.13.0", + "14.2.0" + ], + "summary": "Removes any explicit video source in a multi-party mixing bridge. This operation has no effect on bridges with two or fewer participants. When no explicit video source is set, talk detection will be used to determine the active video stream.", + "nickname": "clearVideoSource", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/moh", + "description": "Play music on hold to a bridge", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Play music on hold to a bridge or change the MOH class that is playing.", + "nickname": "startMoh", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "mohClass", + "description": "Channel's id", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "12.0.0" + ], + "summary": "Stop playing music on hold to a bridge.", + "notes": "This will only stop music on hold being played via POST bridges/{bridgeId}/moh.", + "nickname": "stopMoh", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/play", + "description": "Play media to the participants of a bridge", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Start playback of media on a bridge.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "play", + "responseClass": "Playback", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "announcer_format", + "description": "Format of the 'Anouncer' channel attached to the bridge. Defaults to the format of the channel in the bridge with the highest sampe rate.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "playbackId", + "description": "Playback Id.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/play/{playbackId}", + "description": "Play media to a bridge", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.3.0" + ], + "summary": "Start playback of media on a bridge.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "playWithId", + "responseClass": "Playback", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "announcer_format", + "description": "Format of the 'Anouncer' channel attached to the bridge. Defaults to the format of the channel in the bridge with the highest sampe rate.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + + } + ] + }, + { + "path": "/bridges/{bridgeId}/record", + "description": "Record audio on a bridge", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Start a recording.", + "notes": "This records the mixed audio from all channels participating in this bridge.", + "nickname": "record", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Recording's filename", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "recorder_format", + "description": "Format of the 'Recorder' channel attached to the bridge. Defaults to the same format as the 'format' parameter.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "maxDurationSeconds", + "description": "Maximum duration of the recording, in seconds. 0 for no limit.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "maxSilenceSeconds", + "description": "Maximum duration of silence, in seconds. 0 for no limit.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "ifExists", + "description": "Action to take if a recording with the same name already exists.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "fail", + "allowableValues": { + "valueType": "LIST", + "values": [ + "fail", + "overwrite", + "append" + ] + } + }, + { + "name": "beep", + "description": "Play beep when recording begins", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "terminateOn", + "description": "DTMF input to terminate recording.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "any", + "*", + "#" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge is not in a Stasis application; A recording with the same name already exists on the system and can not be overwritten because it is in progress or ifExists=fail" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + } + ], + "models": { + "Bridge": { + "id": "Bridge", + "description": "The merging of media from one or more channels.\n\nEveryone on the bridge receives the same audio.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for this bridge", + "required": true + }, + "technology": { + "type": "string", + "description": "Name of the current bridging technology", + "required": true + }, + "bridge_type": { + "type": "string", + "description": "Type of bridge technology", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "mixing", + "holding" + ] + } + }, + "bridge_class": { + "type": "string", + "description": "Bridging class", + "required": true + }, + "creator": { + "type": "string", + "description": "Entity that created the bridge", + "required": true + }, + "name": { + "type": "string", + "description": "Name the creator gave the bridge", + "required": true + }, + "channels": { + "type": "List[string]", + "description": "Ids of channels participating in this bridge", + "required": true + }, + "video_mode": { + "type": "string", + "description": "The video mode the bridge is using. One of 'none', 'talker', 'sfu', or 'single'.", + "required": false + }, + "video_source_id": { + "type": "string", + "description": "The ID of the channel that is the source of video in this bridge, if one exists.", + "required": false + }, + "creationtime": { + "required": true, + "type": "Date", + "description": "Timestamp when bridge was created" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_11_0_0/channels.json b/codegen/src/main/resources/codegen-data/ari_11_0_0/channels.json new file mode 100644 index 00000000..f7ea634d --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_11_0_0/channels.json @@ -0,0 +1,2407 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/channels.{format}", + "since": [ + "12.0.0" + ], + "requiresModules": [ + "res_stasis_answer", + "res_stasis_playback", + "res_stasis_recording", + "res_stasis_snoop" + ], + "apis": [ + { + "path": "/channels", + "description": "Active channels", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "List all active channels in Asterisk.", + "nickname": "list", + "responseClass": "List[Channel]" + }, + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Create a new channel (originate).", + "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.", + "nickname": "originate", + "responseClass": "Channel", + "parameters": [ + { + "name": "endpoint", + "description": "Endpoint to call.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to dial after the endpoint answers. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to dial after the endpoint answers. If omitted, uses 'default'. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to dial after the endpoint answers. If omitted, uses 1. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "long" + }, + { + "name": "label", + "description": "The label to dial after the endpoint answers. Will supersede 'priority' if provided. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The application that is subscribed to the originated channel. When the channel is answered, it will be passed to this Stasis application. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "callerId", + "description": "CallerID to use when dialing the endpoint or extension.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 30 + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "The unique id of the channel which is originating this one.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "formats", + "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for originating a channel." + }, + { + "code": 409, + "reason": "Channel with given unique ID already exists." + } + ] + } + ] + }, + { + "path": "/channels/create", + "description": "Create a channel and place it in a Stasis app, but do not dial the channel yet.", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "14.0.0" + ], + "summary": "Create channel.", + "nickname": "create", + "responseClass": "Channel", + "parameters": [ + { + "name": "endpoint", + "description": "Endpoint for channel communication", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "Stasis Application to place channel into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "Unique ID of the calling channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "formats", + "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 409, + "reason": "Channel with given unique ID already exists." + } + ] + } + ] + }, + { + "path": "/channels/{channelId}", + "description": "Active channel", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "Channel details.", + "nickname": "get", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + } + ] + }, + { + "httpMethod": "POST", + "since": [ + "12.2.0" + ], + "summary": "Create a new channel (originate with id).", + "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.", + "nickname": "originateWithId", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "endpoint", + "description": "Endpoint to call.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to dial after the endpoint answers. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to dial after the endpoint answers. If omitted, uses 'default'. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to dial after the endpoint answers. If omitted, uses 1. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "long" + }, + { + "name": "label", + "description": "The label to dial after the endpoint answers. Will supersede 'priority' if provided. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The application that is subscribed to the originated channel. When the channel is answered, it will be passed to this Stasis application. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "callerId", + "description": "CallerID to use when dialing the endpoint or extension.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 30 + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "The unique id of the channel which is originating this one.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "formats", + "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for originating a channel." + }, + { + "code": 409, + "reason": "Channel with given unique ID already exists." + } + ] + + }, + { + "httpMethod": "DELETE", + "since": [ + "12.0.0" + ], + "summary": "Delete (i.e. hangup) a channel.", + "nickname": "hangup", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "reason_code", + "description": "The reason code for hanging up the channel for detail use. Mutually exclusive with 'reason'. See detail hangup codes at here. https://docs.asterisk.org/Configuration/Miscellaneous/Hangup-Cause-Mappings/", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "reason", + "description": "Reason for hanging up the channel for simple use. Mutually exclusive with 'reason_code'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "normal", + "busy", + "congestion", + "no_answer", + "timeout", + "rejected", + "unallocated", + "normal_unspecified", + "number_incomplete", + "codec_mismatch", + "interworking", + "failure", + "answered_elsewhere" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid reason for hangup provided" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/continue", + "description": "Exit application; continue execution in the dialplan", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Exit application; continue execution in the dialplan.", + "nickname": "continueInDialplan", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "label", + "description": "The label to continue to - will supersede 'priority' if both are provided.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/move", + "description": "Move the channel from one Stasis application to another.", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "13.26.0", + "16.3.0" + ], + "summary": "Move the channel from one Stasis application to another.", + "nickname": "move", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The channel will be passed to this Stasis application.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": "404", + "reason": "Channel not found" + }, + { + "code": "409", + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/redirect", + "description": "Inform the channel that it should redirect itself to a different location. Note that this will almost certainly cause the channel to exit the application.", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "13.3.0" + ], + "summary": "Redirect the channel to a different location.", + "nickname": "redirect", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "endpoint", + "description": "The endpoint to redirect the channel to", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Endpoint parameter not provided" + }, + { + "code": 404, + "reason": "Channel or endpoint not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 422, + "reason": "Endpoint is not the same type as the channel" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/answer", + "description": "Answer a channel", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Answer a channel.", + "nickname": "answer", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/ring", + "description": "Send a ringing indication to a channel", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Indicate ringing to a channel.", + "nickname": "ring", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "12.0.0" + ], + "summary": "Stop ringing indication on a channel if locally generated.", + "nickname": "ringStop", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/progress", + "description": "Indicate progress on a channel", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "22.6.0", + "21.11.0", + "20.16.0" + ], + "summary": "Indicate progress on a channel.", + "nickname": "progress", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/dtmf", + "description": "Send DTMF to a channel", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Send provided DTMF to a given channel.", + "nickname": "sendDTMF", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "dtmf", + "description": "DTMF To send.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "before", + "description": "Amount of time to wait before DTMF digits (specified in milliseconds) start.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0 + }, + { + "name": "between", + "description": "Amount of time in between DTMF digits (specified in milliseconds).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 100 + }, + { + "name": "duration", + "description": "Length of each DTMF digit (specified in milliseconds).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 100 + }, + { + "name": "after", + "description": "Amount of time to wait after DTMF digits (specified in milliseconds) end.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0 + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "DTMF is required" + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/mute", + "description": "Mute a channel", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Mute a channel.", + "nickname": "mute", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "Direction in which to mute audio", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both", + "in", + "out" + ] + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "12.0.0" + ], + "summary": "Unmute a channel.", + "nickname": "unmute", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "Direction in which to unmute audio", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both", + "in", + "out" + ] + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/hold", + "description": "Put a channel on hold", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Hold a channel.", + "nickname": "hold", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "12.0.0" + ], + "summary": "Remove a channel from hold.", + "nickname": "unhold", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/moh", + "description": "Play music on hold to a channel", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Play music on hold to a channel.", + "notes": "Using media operations such as /play on a channel playing MOH in this manner will suspend MOH without resuming automatically. If continuing music on hold is desired, the stasis application must reinitiate music on hold.", + "nickname": "startMoh", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "mohClass", + "description": "Music on hold class to use", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "12.0.0" + ], + "summary": "Stop playing music on hold to a channel.", + "nickname": "stopMoh", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/silence", + "description": "Play silence to a channel", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Play silence to a channel.", + "notes": "Using media operations such as /play on a channel playing silence in this manner will suspend silence without resuming automatically.", + "nickname": "startSilence", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "12.0.0" + ], + "summary": "Stop playing silence to a channel.", + "nickname": "stopSilence", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/play", + "description": "Play media to a channel", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Start playback of media.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "play", + "responseClass": "Playback", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000 + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/play/{playbackId}", + "description": "Play media to a channel", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.2.0" + ], + "summary": "Start playback of media and specify the playbackId.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "playWithId", + "responseClass": "Playback", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000 + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/record", + "description": "Record audio from a channel", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Start a recording.", + "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.", + "nickname": "record", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Recording's filename", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "maxDurationSeconds", + "description": "Maximum duration of the recording, in seconds. 0 for no limit", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "maxSilenceSeconds", + "description": "Maximum duration of silence, in seconds. 0 for no limit", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "ifExists", + "description": "Action to take if a recording with the same name already exists.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "fail", + "allowableValues": { + "valueType": "LIST", + "values": [ + "fail", + "overwrite", + "append" + ] + } + }, + { + "name": "beep", + "description": "Play beep when recording begins", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "terminateOn", + "description": "DTMF input to terminate recording", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "any", + "*", + "#" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel is not in a Stasis application; the channel is currently bridged with other channels; A recording with the same name already exists on the system and can not be overwritten because it is in progress or ifExists=fail" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/variable", + "description": "Variables on a channel", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "Get the value of a channel variable or function.", + "nickname": "getChannelVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The channel variable or function to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Channel or variable not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Set the value of a channel variable or function.", + "nickname": "setChannelVar", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The channel variable or function to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/snoop", + "description": "Snoop (spy/whisper) on a channel", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Start snooping.", + "notes": "Snoop (spy/whisper) on a specific channel.", + "nickname": "snoopChannel", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "spy", + "description": "Direction of audio to spy on", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "whisper", + "description": "Direction of audio to whisper into", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "app", + "description": "Application the snooping channel is placed into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "snoopId", + "description": "Unique ID to assign to snooping channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/snoop/{snoopId}", + "description": "Snoop (spy/whisper) on a channel", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.2.0" + ], + "summary": "Start snooping.", + "notes": "Snoop (spy/whisper) on a specific channel.", + "nickname": "snoopChannelWithId", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "snoopId", + "description": "Unique ID to assign to snooping channel", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "spy", + "description": "Direction of audio to spy on", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "whisper", + "description": "Direction of audio to whisper into", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "app", + "description": "Application the snooping channel is placed into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/dial", + "description": "Dial a channel", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "14.0.0" + ], + "summary": "Dial a created channel.", + "nickname": "dial", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "caller", + "description": "Channel ID of caller", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Dial timeout", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel cannot be found." + }, + { + "code": 409, + "reason": "Channel cannot be dialed." + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/rtp_statistics", + "description": "Get RTP statistics information for RTP on a channel", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "13.27.0", + "16.4.0" + ], + "summary": "RTP stats on a channel.", + "nickname": "rtpstatistics", + "responseClass": "RTPstat", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel cannot be found." + } + ] + } + ] + }, + { + "path": "/channels/externalMedia", + "description": "Create a channel to an External Media source/sink.", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "16.6.0", + "17.1.0" + ], + "summary": "Start an External Media session.", + "notes": "Create a channel to an External Media source/sink. The combination of transport and encapsulation will select one of chan_rtp(udp/rtp), chan_audiosocket(tcp/audiosocket) or chan_websocket(websocket/none) channel drivers.", + "nickname": "externalMedia", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "Stasis Application to place channel into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "external_host", + "description": "Hostname/ip:port or websocket_client connection ID of external host. May be empty for a websocket server connection.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "encapsulation", + "description": "Payload encapsulation protocol. Must be 'none' for the websocket transport.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "rtp", + "allowableValues": { + "valueType": "LIST", + "values": [ + "rtp", + "audiosocket", + "none" + ] + } + }, + { + "name": "transport", + "description": "Transport protocol", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "udp", + "allowableValues": { + "valueType": "LIST", + "values": [ + "udp", + "tcp", + "websocket" + ] + } + }, + { + "name": "connection_type", + "description": "Connection type (client/server). 'server' is only valid for the websocket transport.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "client", + "allowableValues": { + "valueType": "LIST", + "values": [ + "client", + "server" + ] + } + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "External media direction", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both" + ] + } + }, + { + "name": "data", + "description": "An arbitrary data field", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "transport_data", + "description": "Transport-specific data. For websocket this is appended to the dialstring.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 409, + "reason": "Channel is not in a Stasis application; Channel is already bridged" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/transfer_progress", + "description": "Inform the channel that the transfer is in progress.", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "22.3.0", + "21.8.0", + "20.13.0" + ], + "summary": "Inform the channel about the progress of the attended/blind transfer.", + "nickname": "transfer_progress", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "states", + "description": "The state of the progress", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Endpoint parameter not provided" + }, + { + "code": 404, + "reason": "Channel or endpoint not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + } + ], + "models": { + "Dialed": { + "id": "Dialed", + "description": "Dialed channel information.", + "properties": {} + }, + "DialplanCEP": { + "id": "DialplanCEP", + "description": "Dialplan location (context/extension/priority)", + "properties": { + "context": { + "required": true, + "type": "string", + "description": "Context in the dialplan" + }, + "exten": { + "required": true, + "type": "string", + "description": "Extension in the dialplan" + }, + "priority": { + "required": true, + "type": "long", + "description": "Priority in the dialplan" + }, + "app_name": { + "required": true, + "type": "string", + "description": "Name of current dialplan application" + }, + "app_data": { + "required": true, + "type": "string", + "description": "Parameter of current dialplan application" + } + } + }, + "CallerID": { + "id": "CallerID", + "description": "Caller identification", + "properties": { + "name": { + "required": true, + "type": "string" + }, + "number": { + "required": true, + "type": "string" + } + } + }, + "RTPstat": { + "id": "RTPstat", + "description": "A statistics of a RTP.", + "properties": { + "txcount": { + "required": true, + "type": "int", + "description": "Number of packets transmitted." + }, + "rxcount": { + "required": true, + "type": "int", + "description": "Number of packets received." + }, + "txjitter": { + "required": false, + "type": "double", + "description": "Jitter on transmitted packets." + }, + "rxjitter": { + "required": false, + "type": "double", + "description": "Jitter on received packets." + }, + "remote_maxjitter": { + "required": false, + "type": "double", + "description": "Maximum jitter on remote side." + }, + "remote_minjitter": { + "required": false, + "type": "double", + "description": "Minimum jitter on remote side." + }, + "remote_normdevjitter": { + "required": false, + "type": "double", + "description": "Average jitter on remote side." + }, + "remote_stdevjitter": { + "required": false, + "type": "double", + "description": "Standard deviation jitter on remote side." + }, + "local_maxjitter": { + "required": false, + "type": "double", + "description": "Maximum jitter on local side." + }, + "local_minjitter": { + "required": false, + "type": "double", + "description": "Minimum jitter on local side." + }, + "local_normdevjitter": { + "required": false, + "type": "double", + "description": "Average jitter on local side." + }, + "local_stdevjitter": { + "required": false, + "type": "double", + "description": "Standard deviation jitter on local side." + }, + "txploss": { + "required": true, + "type": "int", + "description": "Number of transmitted packets lost." + }, + "rxploss": { + "required": true, + "type": "int", + "description": "Number of received packets lost." + }, + "remote_maxrxploss": { + "required": false, + "type": "double", + "description": "Maximum number of packets lost on remote side." + }, + "remote_minrxploss": { + "required": false, + "type": "double", + "description": "Minimum number of packets lost on remote side." + }, + "remote_normdevrxploss": { + "required": false, + "type": "double", + "description": "Average number of packets lost on remote side." + }, + "remote_stdevrxploss": { + "required": false, + "type": "double", + "description": "Standard deviation packets lost on remote side." + }, + "local_maxrxploss": { + "required": false, + "type": "double", + "description": "Maximum number of packets lost on local side." + }, + "local_minrxploss": { + "required": false, + "type": "double", + "description": "Minimum number of packets lost on local side." + }, + "local_normdevrxploss": { + "required": false, + "type": "double", + "description": "Average number of packets lost on local side." + }, + "local_stdevrxploss": { + "required": false, + "type": "double", + "description": "Standard deviation packets lost on local side." + }, + "rtt": { + "required": false, + "type": "double", + "description": "Total round trip time." + }, + "maxrtt": { + "required": false, + "type": "double", + "description": "Maximum round trip time." + }, + "minrtt": { + "required": false, + "type": "double", + "description": "Minimum round trip time." + }, + "normdevrtt": { + "required": false, + "type": "double", + "description": "Average round trip time." + }, + "stdevrtt": { + "required": false, + "type": "double", + "description": "Standard deviation round trip time." + }, + "local_ssrc": { + "required": true, + "type": "int", + "description": "Our SSRC." + }, + "remote_ssrc": { + "required": true, + "type": "int", + "description": "Their SSRC." + }, + "txoctetcount": { + "required": true, + "type": "int", + "description": "Number of octets transmitted." + }, + "rxoctetcount": { + "required": true, + "type": "int", + "description": "Number of octets received." + }, + "channel_uniqueid": { + "required": true, + "type": "string", + "description": "The Asterisk channel's unique ID that owns this instance." + } + } + }, + "Channel": { + "id": "Channel", + "description": "A specific communication connection between Asterisk and an Endpoint.", + "properties": { + "id": { + "required": true, + "type": "string", + "description": "Unique identifier of the channel.\n\nThis is the same as the Uniqueid field in AMI." + }, + "protocol_id": { + "required": true, + "type": "string", + "description": "Protocol id from underlying channel driver (i.e. Call-ID for chan_pjsip; will be empty if not applicable or not implemented by driver)." + }, + "name": { + "required": true, + "type": "string", + "description": "Name of the channel (i.e. SIP/foo-0000a7e3)" + }, + "state": { + "required": true, + "type": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "Down", + "Rsrved", + "OffHook", + "Dialing", + "Ring", + "Ringing", + "Up", + "Busy", + "Dialing Offhook", + "Pre-ring", + "Unknown" + ] + } + }, + "caller": { + "required": true, + "type": "CallerID" + }, + "connected": { + "required": true, + "type": "CallerID" + }, + "accountcode": { + "required": true, + "type": "string" + }, + "dialplan": { + "required": true, + "type": "DialplanCEP", + "description": "Current location in the dialplan" + }, + "creationtime": { + "required": true, + "type": "Date", + "description": "Timestamp when channel was created" + }, + "language": { + "required": true, + "type": "string", + "description": "The default spoken language" + }, + "channelvars": { + "required": false, + "type": "object", + "description": "Channel variables" + }, + "caller_rdnis": { + "type": "string", + "description": "The Caller ID RDNIS" + }, + "tenantid": { + "required": false, + "type": "string", + "description": "The Tenant ID for the channel" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_11_0_0/deviceStates.json b/codegen/src/main/resources/codegen-data/ari_11_0_0/deviceStates.json new file mode 100644 index 00000000..f0a889bc --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_11_0_0/deviceStates.json @@ -0,0 +1,169 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "Kevin Harwell ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/deviceStates.{format}", + "since": [ + "12.0.0" + ], + "requiresModules": [ + "res_stasis_device_state" + ], + "apis": [ + { + "path": "/deviceStates", + "description": "Device states", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "List all ARI controlled device states.", + "nickname": "list", + "responseClass": "List[DeviceState]" + } + ] + }, + { + "path": "/deviceStates/{deviceName}", + "description": "Device state", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "Retrieve the current state of a device.", + "nickname": "get", + "responseClass": "DeviceState", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ] + }, + { + "httpMethod": "PUT", + "since": [ + "12.0.0" + ], + "summary": "Change the state of a device controlled by ARI. (Note - implicitly creates the device state).", + "nickname": "update", + "responseClass": "void", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "deviceState", + "description": "Device state value", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "NOT_INUSE", + "INUSE", + "BUSY", + "INVALID", + "UNAVAILABLE", + "RINGING", + "RINGINUSE", + "ONHOLD" + ] + } + + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Device name is missing" + }, + { + "code": 409, + "reason": "Uncontrolled device specified" + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "12.0.0" + ], + "summary": "Destroy a device-state controlled by ARI.", + "nickname": "delete", + "responseClass": "void", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Device name is missing" + }, + { + "code": 409, + "reason": "Uncontrolled device specified" + } + ] + } + ] + } + ], + "models": { + "DeviceState": { + "id": "DeviceState", + "description": "Represents the state of a device.", + "properties": { + "name": { + "type": "string", + "description": "Name of the device.", + "required": true + }, + "state": { + "type": "string", + "description": "Device's state", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "UNKNOWN", + "NOT_INUSE", + "INUSE", + "BUSY", + "INVALID", + "UNAVAILABLE", + "RINGING", + "RINGINUSE", + "ONHOLD" + ] + } + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_11_0_0/endpoints.json b/codegen/src/main/resources/codegen-data/ari_11_0_0/endpoints.json new file mode 100644 index 00000000..233f2c84 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_11_0_0/endpoints.json @@ -0,0 +1,423 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/endpoints.{format}", + "since": [ + "12.0.0" + ], + "apis": [ + { + "path": "/endpoints", + "description": "Asterisk endpoints", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "List all endpoints.", + "nickname": "list", + "responseClass": "List[Endpoint]" + } + ] + }, + { + "path": "/endpoints/sendMessage", + "description": "Send a message to some technology URI or endpoint.", + "operations": [ + { + "httpMethod": "PUT", + "since": [ + "13.0.0" + ], + "summary": "Send a message to some technology URI or endpoint.", + "nickname": "sendMessage", + "responseClass": "void", + "parameters": [ + { + "name": "to", + "description": "The endpoint resource or technology specific URI to send the message to. Valid resources are pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "from", + "description": "The endpoint resource or technology specific identity to send this message from. Valid resources are pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "body", + "description": "The body of the message", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "descriptioni": "The \"variables\" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, pjsip and sip resource types will add the key/value pairs as SIP headers,", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoint not found" + } + ] + } + ] + }, + { + "path": "/endpoints/refer", + "description": "Refer an endpoint or technology URI to some technology URI or endpoint.", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "18.20.0", + "20.5.0" + ], + "summary": "Refer an endpoint or technology URI to some technology URI or endpoint.", + "nickname": "refer", + "responseClass": "void", + "parameters": [ + { + "name": "to", + "description": "The endpoint resource or technology specific URI that should be referred to somewhere. Valid resource is pjsip.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "from", + "description": "The endpoint resource or technology specific identity to refer from.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "refer_to", + "description": "The endpoint resource or technology specific URI to refer to.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "to_self", + "description": "If true and \"refer_to\" refers to an Asterisk endpoint, the \"refer_to\" value is set to point to this Asterisk endpoint - so the referee is referred to Asterisk. Otherwise, use the contact URI associated with the endpoint.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, the pjsip resource type will add the key/value pairs as SIP headers. The \"display_name\" key is used by the PJSIP technology. Its value will be prepended as a display name to the Refer-To URI.", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for referring." + }, + { + "code": 404, + "reason": "Endpoint not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}", + "description": "Asterisk endpoints", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "List available endoints for a given endpoint technology.", + "nickname": "listByTech", + "responseClass": "List[Endpoint]", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoints (pjsip,iax2,...)", + "paramType": "path", + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Endpoints not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}/{resource}", + "description": "Single endpoint", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "Details for an endpoint.", + "nickname": "get", + "responseClass": "Endpoint", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "resource", + "description": "ID of the endpoint", + "paramType": "path", + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoints not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}/{resource}/sendMessage", + "description": "Send a message to some endpoint in a technology.", + "operations": [ + { + "httpMethod": "PUT", + "since": [ + "13.0.0" + ], + "summary": "Send a message to some endpoint in a technology.", + "nickname": "sendMessageToEndpoint", + "responseClass": "void", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "resource", + "description": "ID of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "from", + "description": "The endpoint resource or technology specific identity to send this message from. Valid resources are pjsip and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "body", + "description": "The body of the message", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "descriptioni": "The \"variables\" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, pjsip and sip resource types will add the key/value pairs as SIP headers,", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoint not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}/{resource}/refer", + "description": "Refer an endpoint in a technology to some technology URI or endpoint..", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "18.20.0", + "20.5.0" + ], + "summary": "Refer an endpoint or technology URI to some technology URI or endpoint.", + "nickname": "referToEndpoint", + "responseClass": "void", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "resource", + "description": "ID of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "from", + "description": "The endpoint resource or technology specific identity to refer from.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "refer_to", + "description": "The endpoint resource or technology specific URI to refer to.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "to_self", + "description": "If true and \"refer_to\" refers to an Asterisk endpoint, the \"refer_to\" value is set to point to this Asterisk endpoint - so the referee is referred to Asterisk. Otherwise, use the contact URI associated with the endpoint.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, the pjsip resource type will add the key/value pairs as SIP headers,", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for referring." + }, + { + "code": 404, + "reason": "Endpoint not found" + } + ] + } + ] + } + ], + "models": { + "Endpoint": { + "id": "Endpoint", + "description": "An external device that may offer/accept calls to/from Asterisk.\n\nUnlike most resources, which have a single unique identifier, an endpoint is uniquely identified by the technology/resource pair.", + "properties": { + "technology": { + "type": "string", + "description": "Technology of the endpoint", + "required": true + }, + "resource": { + "type": "string", + "description": "Identifier of the endpoint, specific to the given technology.", + "required": true + }, + "state": { + "type": "string", + "description": "Endpoint's state", + "required": false, + "allowableValues": { + "valueType": "LIST", + "values": [ + "unknown", + "offline", + "online" + ] + } + }, + "channel_ids": { + "type": "List[string]", + "description": "Id's of channels associated with this endpoint", + "required": true + } + } + }, + "TextMessage": { + "id": "TextMessage", + "description": "A text message.", + "properties": { + "from": { + "type": "string", + "description": "A technology specific URI specifying the source of the message. For pjsip technology, any SIP URI can be specified. For xmpp, the URI must correspond to the client connection being used to send the message.", + "required": true + }, + "to": { + "type": "string", + "description": "A technology specific URI specifying the destination of the message. Valid technologies include pjsip, and xmp. The destination of a message should be an endpoint.", + "required": true + }, + "body": { + "type": "string", + "description": "The text of the message.", + "required": true + }, + "variables": { + "type": "object", + "description": "Technology specific key/value pairs (JSON object) associated with the message.", + "required": false + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_11_0_0/events.json b/codegen/src/main/resources/codegen-data/ari_11_0_0/events.json new file mode 100644 index 00000000..f08a665e --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_11_0_0/events.json @@ -0,0 +1,1184 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.2", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/events.{format}", + "since": [ + "12.0.0" + ], + "requiresModules": [ + "res_http_websocket" + ], + "apis": [ + { + "path": "/events", + "description": "Events from Asterisk to applications", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "upgrade": "websocket", + "websocketProtocol": "ari", + "summary": "WebSocket connection for events.", + "nickname": "eventWebsocket", + "responseClass": "Message", + "parameters": [ + { + "name": "app", + "description": "Applications to subscribe to.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "subscribeAll", + "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'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean" + } + ] + } + ] + }, + { + "path": "/events/user/{eventName}", + "description": "Stasis application user events", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.3.0" + ], + "summary": "Generate a user event.", + "nickname": "userEvent", + "responseClass": "void", + "parameters": [ + { + "name": "eventName", + "description": "Event name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "application", + "description": "The name of the application that will receive this event", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "source", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}/{resource}, deviceState:{deviceName}", + "paramType": "query", + "required": false, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds custom key/value pairs to add to the user event. Ex. { \"variables\": { \"key\": \"value\" } }", + "paramType": "body", + "required": false, + "allowMultiple": false, + "dataType": "containers" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 422, + "reason": "Event source not found." + }, + { + "code": 400, + "reason": "Invalid even tsource URI or userevent data." + } + ] + } + ] + } + ], + "models": { + "Message": { + "id": "Message", + "description": "Base type for errors and events", + "discriminator": "type", + "properties": { + "type": { + "type": "string", + "required": true, + "description": "Indicates the type of this message." + }, + "asterisk_id": { + "type": "string", + "required": false, + "description": "The unique ID for the Asterisk instance that raised this event." + } + }, + "subTypes": [ + "MissingParams", + "Event" + ] + }, + "MissingParams": { + "id": "MissingParams", + "description": "Error event sent when required params are missing.", + "properties": { + "params": { + "required": true, + "type": "List[string]", + "description": "A list of the missing parameters" + } + } + }, + "Event": { + "id": "Event", + "description": "Base type for asynchronous events from Asterisk.", + "properties": { + "application": { + "type": "string", + "description": "Name of the application receiving the event.", + "required": true + }, + "timestamp": { + "type": "Date", + "description": "Time at which this event was created.", + "required": true + } + }, + "subTypes": [ + "DeviceStateChanged", + "PlaybackStarted", + "PlaybackContinuing", + "PlaybackFinished", + "RecordingStarted", + "RecordingFinished", + "RecordingFailed", + "ApplicationMoveFailed", + "ApplicationRegistered", + "ApplicationUnregistered", + "ApplicationReplaced", + "BridgeCreated", + "BridgeDestroyed", + "BridgeMerged", + "BridgeBlindTransfer", + "BridgeAttendedTransfer", + "BridgeVideoSourceChanged", + "ChannelCreated", + "ChannelDestroyed", + "ChannelEnteredBridge", + "ChannelLeftBridge", + "ChannelStateChange", + "ChannelDtmfReceived", + "ChannelDialplan", + "ChannelCallerId", + "ChannelUserevent", + "ChannelHangupRequest", + "ChannelVarset", + "ChannelToneDetected", + "ChannelTalkingStarted", + "ChannelTalkingFinished", + "ChannelHold", + "ChannelUnhold", + "ContactStatusChange", + "EndpointStateChange", + "Dial", + "StasisEnd", + "StasisStart", + "TextMessageReceived", + "ChannelConnectedLine", + "PeerStatusChange", + "ChannelTransfer", + "RESTResponse" + ] + }, + "ContactInfo": { + "id": "ContactInfo", + "description": "Detailed information about a contact on an endpoint.", + "properties": { + "uri": { + "type": "string", + "description": "The location of the contact.", + "required": true + }, + "contact_status": { + "type": "string", + "description": "The current status of the contact.", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "Unreachable", + "Reachable", + "Unknown", + "NonQualified", + "Removed" + ] + } + }, + "aor": { + "type": "string", + "description": "The Address of Record this contact belongs to.", + "required": true + }, + "roundtrip_usec": { + "type": "string", + "description": "Current round trip time, in microseconds, for the contact.", + "required": false + } + } + }, + "Peer": { + "id": "Peer", + "description": "Detailed information about a remote peer that communicates with Asterisk.", + "properties": { + "peer_status": { + "type": "string", + "description": "The current state of the peer. Note that the values of the status are dependent on the underlying peer technology.", + "required": true + }, + "cause": { + "type": "string", + "description": "An optional reason associated with the change in peer_status.", + "required": false + }, + "address": { + "type": "string", + "description": "The IP address of the peer.", + "required": false + }, + "port": { + "type": "string", + "description": "The port of the peer.", + "required": false + }, + "time": { + "type": "string", + "description": "The last known time the peer was contacted.", + "required": false + } + } + }, + "DeviceStateChanged": { + "id": "DeviceStateChanged", + "description": "Notification that a device state has changed.", + "properties": { + "device_state": { + "type": "DeviceState", + "description": "Device state object", + "required": true + } + } + }, + "PlaybackStarted": { + "id": "PlaybackStarted", + "description": "Event showing the start of a media playback operation.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "PlaybackContinuing": { + "id": "PlaybackContinuing", + "description": "Event showing the continuation of a media playback operation from one media URI to the next in the list.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "PlaybackFinished": { + "id": "PlaybackFinished", + "description": "Event showing the completion of a media playback operation.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "RecordingStarted": { + "id": "RecordingStarted", + "description": "Event showing the start of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "RecordingFinished": { + "id": "RecordingFinished", + "description": "Event showing the completion of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "RecordingFailed": { + "id": "RecordingFailed", + "description": "Event showing failure of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "ApplicationMoveFailed": { + "id": "ApplicationMoveFailed", + "description": "Notification that trying to move a channel to another Stasis application failed.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + }, + "destination": { + "required": true, + "type": "string" + }, + "args": { + "required": true, + "type": "List[string]", + "description": "Arguments to the application" + } + } + }, + "ApplicationRegistered": { + "id": "ApplicationRegistered", + "description": "Notification that a Stasis app has been registered.", + "properties": {} + }, + "ApplicationUnregistered": { + "id": "ApplicationUnregistered", + "description": "Notification that a Stasis app has been unregistered.", + "properties": {} + }, + "ApplicationReplaced": { + "id": "ApplicationReplaced", + "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.", + "properties": {} + }, + "BridgeCreated": { + "id": "BridgeCreated", + "description": "Notification that a bridge has been created.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeDestroyed": { + "id": "BridgeDestroyed", + "description": "Notification that a bridge has been destroyed.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeMerged": { + "id": "BridgeMerged", + "description": "Notification that one bridge has merged into another.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "bridge_from": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeVideoSourceChanged": { + "id": "BridgeVideoSourceChanged", + "description": "Notification that the source of video in a bridge has changed.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "old_video_source_id": { + "required": false, + "type": "string" + } + } + }, + "BridgeBlindTransfer": { + "id": "BridgeBlindTransfer", + "description": "Notification that a blind transfer has occurred.", + "properties": { + "channel": { + "description": "The channel performing the blind transfer", + "required": true, + "type": "Channel" + }, + "replace_channel": { + "description": "The channel that is replacing transferer when the transferee(s) can not be transferred directly", + "required": false, + "type": "Channel" + }, + "transferee": { + "description": "The channel that is being transferred", + "required": false, + "type": "Channel" + }, + "exten": { + "description": "The extension transferred to", + "required": true, + "type": "string" + }, + "context": { + "description": "The context transferred to", + "required": true, + "type": "string" + }, + "result": { + "description": "The result of the transfer attempt", + "required": true, + "type": "string" + }, + "is_external": { + "description": "Whether the transfer was externally initiated or not", + "required": true, + "type": "boolean" + }, + "bridge": { + "description": "The bridge being transferred", + "type": "Bridge" + } + } + }, + "BridgeAttendedTransfer": { + "id": "BridgeAttendedTransfer", + "description": "Notification that an attended transfer has occurred.", + "properties": { + "transferer_first_leg": { + "description": "First leg of the transferer", + "required": true, + "type": "Channel" + }, + "transferer_second_leg": { + "description": "Second leg of the transferer", + "required": true, + "type": "Channel" + }, + "replace_channel": { + "description": "The channel that is replacing transferer_first_leg in the swap", + "required": false, + "type": "Channel" + }, + "transferee": { + "description": "The channel that is being transferred", + "required": false, + "type": "Channel" + }, + "transfer_target": { + "description": "The channel that is being transferred to", + "required": false, + "type": "Channel" + }, + "result": { + "description": "The result of the transfer attempt", + "required": true, + "type": "string" + }, + "is_external": { + "description": "Whether the transfer was externally initiated or not", + "required": true, + "type": "boolean" + }, + "transferer_first_leg_bridge": { + "description": "Bridge the transferer first leg is in", + "type": "Bridge" + }, + "transferer_second_leg_bridge": { + "description": "Bridge the transferer second leg is in", + "type": "Bridge" + }, + "destination_type": { + "description": "How the transfer was accomplished", + "required": true, + "type": "string" + }, + "destination_bridge": { + "description": "Bridge that survived the merge result", + "type": "string" + }, + "destination_application": { + "description": "Application that has been transferred into", + "type": "string" + }, + "destination_link_first_leg": { + "description": "First leg of a link transfer result", + "type": "Channel" + }, + "destination_link_second_leg": { + "description": "Second leg of a link transfer result", + "type": "Channel" + }, + "destination_threeway_channel": { + "description": "Transferer channel that survived the threeway result", + "type": "Channel" + }, + "destination_threeway_bridge": { + "description": "Bridge that survived the threeway result", + "type": "Bridge" + } + } + }, + "ChannelCreated": { + "id": "ChannelCreated", + "description": "Notification that a channel has been created.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelDestroyed": { + "id": "ChannelDestroyed", + "description": "Notification that a channel has been destroyed.", + "properties": { + "cause": { + "required": true, + "description": "Integer representation of the cause of the hangup", + "type": "int" + }, + "cause_txt": { + "required": true, + "description": "Text representation of the cause of the hangup", + "type": "string" + }, + "tech_cause": { + "type": "int", + "description": "Integer representation of the technology-specific off-nominal cause of the hangup." + }, + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelEnteredBridge": { + "id": "ChannelEnteredBridge", + "description": "Notification that a channel has entered a bridge.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "channel": { + "type": "Channel" + } + } + }, + "ChannelLeftBridge": { + "id": "ChannelLeftBridge", + "description": "Notification that a channel has left a bridge.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelStateChange": { + "id": "ChannelStateChange", + "description": "Notification of a channel's state change.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelDtmfReceived": { + "id": "ChannelDtmfReceived", + "description": "DTMF received on a channel.\n\nThis event is sent when the DTMF ends. There is no notification about the start of DTMF", + "properties": { + "digit": { + "required": true, + "type": "string", + "description": "DTMF digit received (0-9, A-E, # or *)" + }, + "duration_ms": { + "required": true, + "type": "int", + "description": "Number of milliseconds DTMF was received" + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which DTMF was received" + } + } + }, + "ChannelDialplan": { + "id": "ChannelDialplan", + "description": "Channel changed location in the dialplan.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that changed dialplan location." + }, + "dialplan_app": { + "required": true, + "type": "string", + "description": "The application about to be executed." + }, + "dialplan_app_data": { + "required": true, + "type": "string", + "description": "The data to be passed to the application." + } + } + }, + "ChannelCallerId": { + "id": "ChannelCallerId", + "description": "Channel changed Caller ID.", + "properties": { + "caller_presentation": { + "required": true, + "type": "int", + "description": "The integer representation of the Caller Presentation value." + }, + "caller_presentation_txt": { + "required": true, + "type": "string", + "description": "The text representation of the Caller Presentation value." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that changed Caller ID." + } + } + }, + "ChannelUserevent": { + "id": "ChannelUserevent", + "description": "User-generated event with additional user-defined fields in the object.", + "properties": { + "eventname": { + "required": true, + "type": "string", + "description": "The name of the user event." + }, + "channel": { + "required": false, + "type": "Channel", + "description": "A channel that is signaled with the user event." + }, + "bridge": { + "required": false, + "type": "Bridge", + "description": "A bridge that is signaled with the user event." + }, + "endpoint": { + "required": false, + "type": "Endpoint", + "description": "A endpoint that is signaled with the user event." + }, + "userevent": { + "required": true, + "type": "object", + "description": "Custom Userevent data" + } + } + }, + "ChannelHangupRequest": { + "id": "ChannelHangupRequest", + "description": "A hangup was requested on the channel.", + "properties": { + "cause": { + "type": "int", + "description": "Integer representation of the cause of the hangup." + }, + "tech_cause": { + "type": "int", + "description": "Integer representation of the technology-specific off-nominal cause of the hangup." + }, + "soft": { + "type": "boolean", + "description": "Whether the hangup request was a soft hangup request." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which the hangup was requested." + } + } + }, + "ChannelVarset": { + "id": "ChannelVarset", + "description": "Channel variable changed.", + "properties": { + "variable": { + "required": true, + "type": "string", + "description": "The variable that changed." + }, + "value": { + "required": true, + "type": "string", + "description": "The new value of the variable." + }, + "channel": { + "required": false, + "type": "Channel", + "description": "The channel on which the variable was set.\n\nIf missing, the variable is a global variable." + } + } + }, + "ChannelHold": { + "id": "ChannelHold", + "description": "A channel initiated a media hold.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that initiated the hold event." + }, + "musicclass": { + "required": false, + "type": "string", + "description": "The music on hold class that the initiator requested." + } + } + }, + "ChannelUnhold": { + "id": "ChannelUnhold", + "description": "A channel initiated a media unhold.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that initiated the unhold event." + } + } + }, + "ChannelToneDetected": { + "id": "ChannelToneDetected", + "description": "Tone was detected on the channel.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel the tone was detected on." + } + } + }, + "ChannelTalkingStarted": { + "id": "ChannelTalkingStarted", + "description": "Talking was detected on the channel.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which talking started." + } + } + }, + "ChannelTalkingFinished": { + "id": "ChannelTalkingFinished", + "description": "Talking is no longer detected on the channel.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which talking completed." + }, + "duration": { + "required": true, + "type": "int", + "description": "The length of time, in milliseconds, that talking was detected on the channel" + } + } + }, + "ContactStatusChange": { + "id": "ContactStatusChange", + "description": "The state of a contact on an endpoint has changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + }, + "contact_info": { + "required": true, + "type": "ContactInfo" + } + } + }, + "PeerStatusChange": { + "id": "PeerStatusChange", + "description": "The state of a peer associated with an endpoint has changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + }, + "peer": { + "required": true, + "type": "Peer" + } + } + }, + "EndpointStateChange": { + "id": "EndpointStateChange", + "description": "Endpoint state changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + } + } + }, + "Dial": { + "id": "Dial", + "description": "Dialing state has changed.", + "properties": { + "caller": { + "required": false, + "type": "Channel", + "description": "The calling channel." + }, + "peer": { + "required": true, + "type": "Channel", + "description": "The dialed channel." + }, + "forward": { + "required": false, + "type": "string", + "description": "Forwarding target requested by the original dialed channel." + }, + "forwarded": { + "required": false, + "type": "Channel", + "description": "Channel that the caller has been forwarded to." + }, + "dialstring": { + "required": false, + "type": "string", + "description": "The dial string for calling the peer channel." + }, + "dialstatus": { + "required": true, + "type": "string", + "description": "Current status of the dialing attempt to the peer." + } + } + }, + "StasisEnd": { + "id": "StasisEnd", + "description": "Notification that a channel has left a Stasis application.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "StasisStart": { + "id": "StasisStart", + "description": "Notification that a channel has entered a Stasis application.", + "properties": { + "args": { + "required": true, + "type": "List[string]", + "description": "Arguments to the application" + }, + "channel": { + "required": true, + "type": "Channel" + }, + "replace_channel": { + "required": false, + "type": "Channel" + } + } + }, + "TextMessageReceived": { + "id": "TextMessageReceived", + "description": "A text message was received from an endpoint.", + "properties": { + "message": { + "required": true, + "type": "TextMessage" + }, + "endpoint": { + "required": false, + "type": "Endpoint" + } + } + }, + "ChannelConnectedLine": { + "id": "ChannelConnectedLine", + "description": "Channel changed Connected Line.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel whose connected line has changed." + } + } + }, + "ChannelTransfer": { + "id": "ChannelTransfer", + "description": "transfer on a channel.", + "properties": { + "state": { + "required": false, + "type": "string", + "description": "Transfer State" + }, + "refer_to": { + "required": true, + "type": "ReferTo", + "description": "Refer-To information with optionally both affected channels" + }, + "referred_by": { + "required": true, + "type": "ReferredBy", + "description": "Referred-By SIP Header according rfc3892" + } + } + }, + "ReferTo": { + "id": "ReferTo", + "description": "transfer destination requested by transferee", + "properties": { + "requested_destination": { + "required": true, + "type": "RequiredDestination" + }, + "destination_channel": { + "required": false, + "type": "Channel", + "description": "The Channel Object, that is to be replaced" + }, + "connected_channel": { + "required": false, + "type": "Channel", + "description": "Channel, connected to the to be replaced channel" + }, + "bridge": { + "required": false, + "type": "Bridge", + "description": "Bridge connecting both destination channels" + } + } + }, + "ReferredBy": { + "id": "ReferredBy", + "description": "transfer destination requested by transferee", + "properties": { + "source_channel": { + "required": true, + "type": "Channel", + "description": "The channel on which the refer was received" + }, + "connected_channel": { + "required": false, + "type": "Channel", + "description": "Channel, Connected to the channel, receiving the transfer request on." + }, + "bridge": { + "required": false, + "type": "Bridge", + "description": "Bridge connecting both Channels" + } + } + }, + "RequiredDestination": { + "id": "RequiredDestination", + "description": "Information about the requested destination", + "properties": { + "protocol_id": { + "required": false, + "type": "string", + "description": "the requested protocol-id by the referee in case of SIP channel, this is a SIP Call ID, Mutually exclusive to destination" + }, + "destination": { + "required": false, + "type": "string", + "description": "Destination User Part. Only for Blind transfer. Mutually exclusive to protocol_id" + }, + "additional_protocol_params": { + "required": false, + "type": "List[AdditionalParam]", + "description": "List of additional protocol specific information" + } + } + }, + "AdditionalParam": { + "id": "AdditionalParam", + "description": "Protocol specific additional parameter", + "properties": { + "parameter_name": { + "required": true, + "type": "string", + "description": "Name of the parameter" + }, + "parameter_value": { + "required": true, + "type": "string", + "description": "Value of the parameter" + } + } + }, + "RESTHeader": { + "id": "RESTHeader", + "description": "REST over Websocket header", + "properties": { + "name": { + "type": "string", + "description": "Header name", + "required": true + }, + "value": { + "required": true, + "type": "string", + "description": "Header value" + } + } + }, + "RESTQueryStringParameter": { + "id": "RESTQueryStringParameter", + "description": "REST over Websocket Query String Parameter", + "properties": { + "name": { + "type": "string", + "description": "Parameter name", + "required": true + }, + "value": { + "required": true, + "type": "string", + "description": "Parameter value" + } + } + }, + "RESTRequest": { + "id": "RESTRequest", + "description": "REST over Websocket Request.", + "properties": { + "type": { + "type": "string", + "description": "Message type. Must be 'RESTRequest'", + "required": true + }, + "transaction_id": { + "type": "string", + "description": "Opaque transaction id. Can be any valid string. Will be returned in any response to this request.", + "required": true + }, + "request_id": { + "type": "string", + "description": "Opaque request id. Can be any valid string. Will be returned in any response to this request.", + "required": true + }, + "method": { + "required": true, + "type": "string", + "description": "HTTP method (GET, PUT, POST, DELETE, etc.)" + }, + "uri": { + "required": true, + "type": "string", + "description": "Resource URI with optional query string parameters." + }, + "content_type": { + "required": false, + "type": "string", + "description": "The Content-Type of the message body." + }, + "query_strings": { + "required": false, + "type": "List[RESTQueryStringParameter]", + "description": "Request query string parameters." + }, + "message_body": { + "required": false, + "type": "string", + "description": "Request message body. Only content types application/json and application/x-www-form-urlencoded are supported." + } + } + }, + "RESTResponse": { + "id": "RESTResponse", + "description": "REST over Websocket Response.", + "properties": { + "transaction_id": { + "type": "string", + "description": "Opaque transaction id. Will be whatever was specified on the original request.", + "required": true + }, + "request_id": { + "type": "string", + "description": "Opaque request id. Will be whatever was specified on the original request.", + "required": true + }, + "status_code": { + "required": true, + "type": "int", + "description": "HTTP status code" + }, + "reason_phrase": { + "required": true, + "type": "string", + "description": "HTTP reason phrase" + }, + "uri": { + "required": true, + "type": "string", + "description": "Original request resource URI" + }, + "content_type": { + "required": false, + "type": "string", + "description": "The Content-Type of the message body." + }, + "message_body": { + "required": false, + "type": "string", + "description": "Response message body" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_11_0_0/mailboxes.json b/codegen/src/main/resources/codegen-data/ari_11_0_0/mailboxes.json new file mode 100644 index 00000000..d99e1eac --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_11_0_0/mailboxes.json @@ -0,0 +1,152 @@ +{ + "_copyright": "Copyright (C) 2013, Digium, Inc.", + "_author": "Jonathan Rose ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/mailboxes.{format}", + "since": [ + "12.1.0" + ], + "requiresModules": [ + "res_stasis_mailbox" + ], + "apis": [ + { + "path": "/mailboxes", + "description": "Mailboxes", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.1.0" + ], + "summary": "List all mailboxes.", + "nickname": "list", + "responseClass": "List[Mailbox]" + } + ] + }, + { + "path": "/mailboxes/{mailboxName}", + "description": "Mailbox state", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.1.0" + ], + "summary": "Retrieve the current state of a mailbox.", + "nickname": "get", + "responseClass": "Mailbox", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + }, + { + "httpMethod": "PUT", + "since": [ + "12.1.0" + ], + "summary": "Change the state of a mailbox. (Note - implicitly creates the mailbox).", + "nickname": "update", + "responseClass": "void", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "oldMessages", + "description": "Count of old messages in the mailbox", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "newMessages", + "description": "Count of new messages in the mailbox", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "int" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "12.1.0" + ], + "summary": "Destroy a mailbox.", + "nickname": "delete", + "responseClass": "void", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + } + ] + } + ], + "models": { + "Mailbox": { + "id": "Mailbox", + "description": "Represents the state of a mailbox.", + "properties": { + "name": { + "type": "string", + "description": "Name of the mailbox.", + "required": true + }, + "old_messages": { + "type": "int", + "description": "Count of old messages in the mailbox.", + "required": true + }, + "new_messages": { + "type": "int", + "description": "Count of new messages in the mailbox.", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_11_0_0/playbacks.json b/codegen/src/main/resources/codegen-data/ari_11_0_0/playbacks.json new file mode 100644 index 00000000..a7892f18 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_11_0_0/playbacks.json @@ -0,0 +1,177 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/playbacks.{format}", + "since": [ + "12.0.0" + ], + "requiresModules": [ + "res_stasis_playback" + ], + "apis": [ + { + "path": "/playbacks/{playbackId}", + "description": "Control object for a playback operation.", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "Get a playback's details.", + "nickname": "get", + "responseClass": "Playback", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "The playback cannot be found" + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "12.0.0" + ], + "summary": "Stop a playback.", + "nickname": "stop", + "responseClass": "void", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "The playback cannot be found" + } + ] + } + ] + }, + { + "path": "/playbacks/{playbackId}/control", + "description": "Control object for a playback operation.", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Control a playback.", + "nickname": "control", + "responseClass": "void", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "operation", + "description": "Operation to perform on the playback.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "restart", + "pause", + "unpause", + "reverse", + "forward" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "The provided operation parameter was invalid" + }, + { + "code": 404, + "reason": "The playback cannot be found" + }, + { + "code": 409, + "reason": "The operation cannot be performed in the playback's current state" + } +] + } + ] + } + ], + "models": { + "Playback": { + "id": "Playback", + "description": "Object representing the playback of media to a channel", + "properties": { + "id": { + "type": "string", + "description": "ID for this playback operation", + "required": true + }, + "media_uri": { + "type": "string", + "description": "The URI for the media currently being played back.", + "required": true + }, + "next_media_uri": { + "type": "string", + "description": "If a list of URIs is being played, the next media URI to be played back.", + "required": false + }, + "target_uri": { + "type": "string", + "description": "URI for the channel or bridge to play the media on", + "required": true + }, + "language": { + "type": "string", + "description": "For media types that support multiple languages, the language requested for playback." + }, + "state": { + "type": "string", + "description": "Current state of the playback operation.", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "queued", + "playing", + "continuing", + "done", + "failed" + ] + } + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_11_0_0/recordings.json b/codegen/src/main/resources/codegen-data/ari_11_0_0/recordings.json new file mode 100644 index 00000000..1496db8a --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_11_0_0/recordings.json @@ -0,0 +1,452 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/recordings.{format}", + "since": [ + "12.0.0" + ], + "requiresModules": [ + "res_stasis_recording" + ], + "apis": [ + { + "path": "/recordings/stored", + "description": "Recordings", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "List recordings that are complete.", + "nickname": "listStored", + "responseClass": "List[StoredRecording]" + } + ] + }, + { + "path": "/recordings/stored/{recordingName}", + "description": "Individual recording", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "Get a stored recording's details.", + "nickname": "getStored", + "responseClass": "StoredRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "12.0.0" + ], + "summary": "Delete a stored recording.", + "nickname": "deleteStored", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/stored/{recordingName}/file", + "description": "The actual file associated with the stored recording", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "14.0.0" + ], + "summary": "Get the file associated with the stored recording.", + "nickname": "getStoredFile", + "responseClass": "binary", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 403, + "reason": "The recording file could not be opened" + }, + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/stored/{recordingName}/copy", + "description": "Copy an individual recording", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.5.0" + ], + "summary": "Copy a stored recording.", + "nickname": "copyStored", + "responseClass": "StoredRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording to copy", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "destinationRecordingName", + "description": "The destination name of the recording", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "A recording with the same name already exists on the system" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}", + "description": "A recording that is in progress", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "List live recordings.", + "nickname": "getLive", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "12.0.0" + ], + "summary": "Stop a live recording and discard it.", + "nickname": "cancel", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/stop", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Stop a live recording and store it.", + "nickname": "stop", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/pause", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Pause a live recording.", + "notes": "Pausing a recording suspends silence detection, which will be restarted when the recording is unpaused. Paused time is not included in the accounting for maxDurationSeconds.", + "nickname": "pause", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "12.0.0" + ], + "summary": "Unpause a live recording.", + "nickname": "unpause", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/mute", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Mute a live recording.", + "notes": "Muting a recording suspends silence detection, which will be restarted when the recording is unmuted.", + "nickname": "mute", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "12.0.0" + ], + "summary": "Unmute a live recording.", + "nickname": "unmute", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + } + ] + } + ], + "models": { + "StoredRecording": { + "id": "StoredRecording", + "description": "A past recording that may be played back.", + "properties": { + "name": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + }, + "LiveRecording": { + "id": "LiveRecording", + "description": "A recording that is in progress", + "properties": { + "name": { + "required": true, + "type": "string", + "description": "Base name for the recording" + }, + "format": { + "required": true, + "type": "string", + "description": "Recording format (wav, gsm, etc.)" + }, + "target_uri": { + "required": true, + "type": "string", + "description": "URI for the channel or bridge being recorded" + }, + "state": { + "required": true, + "type": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "queued", + "recording", + "paused", + "done", + "failed", + "canceled" + ] + } + }, + "duration": { + "required": false, + "type": "int", + "description": "Duration in seconds of the recording" + }, + "talking_duration": { + "required": false, + "type": "int", + "description": "Duration of talking, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds." + }, + "silence_duration": { + "required": false, + "type": "int", + "description": "Duration of silence, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds." + }, + "cause": { + "required": false, + "type": "string", + "description": "Cause for recording failure if failed" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_11_0_0/sounds.json b/codegen/src/main/resources/codegen-data/ari_11_0_0/sounds.json new file mode 100644 index 00000000..aee4d369 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_11_0_0/sounds.json @@ -0,0 +1,108 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/sounds.{format}", + "since": [ + "12.0.0" + ], + "apis": [ + { + "path": "/sounds", + "description": "Sounds", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "List all sounds.", + "nickname": "list", + "responseClass": "List[Sound]", + "parameters": [ + { + "name": "lang", + "description": "Lookup sound for a specific language.", + "paramType": "query", + "dataType": "string", + "required": false + }, + { + "name": "format", + "description": "Lookup sound in a specific format.", + "paramType": "query", + "dataType": "string", + "required": false, + "__note": "core show translation can show translation paths between formats, along with relative costs. so this could be just installed format, or we could follow that for transcoded formats." + } + ] + } + ] + }, + { + "path": "/sounds/{soundId}", + "description": "Individual sound", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "Get a sound's details.", + "nickname": "get", + "responseClass": "Sound", + "parameters": [ + { + "name": "soundId", + "description": "Sound's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ] + } + ] + } + ], + "models": { + "FormatLangPair": { + "id": "FormatLangPair", + "description": "Identifies the format and language of a sound file", + "properties": { + "language": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + }, + "Sound": { + "id": "Sound", + "description": "A media file that may be played back.", + "properties": { + "id": { + "required": true, + "description": "Sound's identifier.", + "type": "string" + }, + "text": { + "required": false, + "description": "Text description of the sound, usually the words spoken.", + "type": "string" + }, + "formats": { + "required": true, + "description": "The formats and languages in which this sound is available.", + "type": "List[FormatLangPair]" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_0_0/applications.json b/codegen/src/main/resources/codegen-data/ari_1_0_0/applications.json new file mode 100644 index 00000000..32ee3c45 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_0_0/applications.json @@ -0,0 +1,172 @@ +{ + "_copyright": "Copyright (C) 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/stasis", + "resourcePath": "/api-docs/applications.{format}", + "apis": [ + { + "path": "/applications", + "description": "Stasis applications", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all applications.", + "nickname": "list", + "responseClass": "List[Application]" + } + ] + }, + { + "path": "/applications/{applicationName}", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get details of an application.", + "nickname": "get", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Application does not exist." + } + ] + } + ] + }, + { + "path": "/applications/{applicationName}/subscription", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "POST", + "summary": "Subscribe an application to a event source.", + "notes": "Returns the state of the application after the subscriptions have changed", + "nickname": "subscribe", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "eventSource", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}/{resource}, deviceState:{deviceName}", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing parameter." + }, + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 422, + "reason": "Event source does not exist." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unsubscribe an application from an event source.", + "notes": "Returns the state of the application after the subscriptions have changed", + "nickname": "unsubscribe", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "eventSource", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}/{resource}, deviceState:{deviceName}", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing parameter; event source scheme not recognized." + }, + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 409, + "reason": "Application not subscribed to event source." + }, + { + "code": 422, + "reason": "Event source does not exist." + } + ] + } + ] + } + ], + "models": { + "Application": { + "id": "Application", + "description": "Details of a Stasis application", + "properties": { + "name": { + "type": "string", + "description": "Name of this application", + "required": true + }, + "channel_ids": { + "type": "List[string]", + "description": "Id's for channels subscribed to.", + "required": true + }, + "bridge_ids": { + "type": "List[string]", + "description": "Id's for bridges subscribed to.", + "required": true + }, + "endpoint_ids": { + "type": "List[string]", + "description": "{tech}/{resource} for endpoints subscribed to.", + "required": true + }, + "device_names": { + "type": "List[string]", + "description": "Names of the devices subscribed to.", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_0_0/asterisk.json b/codegen/src/main/resources/codegen-data/ari_1_0_0/asterisk.json new file mode 100644 index 00000000..2f1ca734 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_0_0/asterisk.json @@ -0,0 +1,259 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/stasis", + "resourcePath": "/api-docs/asterisk.{format}", + "apis": [ + { + "path": "/asterisk/info", + "description": "Asterisk system information (similar to core show settings)", + "operations": [ + { + "httpMethod": "GET", + "summary": "Gets Asterisk system information.", + "nickname": "getInfo", + "responseClass": "AsteriskInfo", + "parameters": [ + { + "name": "only", + "description": "Filter information returned", + "paramType": "query", + "required": false, + "allowMultiple": true, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "build", + "system", + "config", + "status" + ] + } + } + ] + } + ] + }, + { + "path": "/asterisk/variable", + "description": "Global variables", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the value of a global variable.", + "nickname": "getGlobalVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "variable", + "description": "The variable to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + } + ] + }, + { + "httpMethod": "POST", + "summary": "Set the value of a global variable.", + "nickname": "setGlobalVar", + "responseClass": "void", + "parameters": [ + { + "name": "variable", + "description": "The variable to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + } + ] + } + ] + } + ], + "models": { + "BuildInfo": { + "id": "BuildInfo", + "description": "Info about how Asterisk was built", + "properties": { + "os": { + "required": true, + "type": "string", + "description": "OS Asterisk was built on." + }, + "kernel": { + "required": true, + "type": "string", + "description": "Kernel version Asterisk was built on." + }, + "options": { + "required": true, + "type": "string", + "description": "Compile time options, or empty string if default." + }, + "machine": { + "required": true, + "type": "string", + "description": "Machine architecture (x86_64, i686, ppc, etc.)" + }, + "date": { + "required": true, + "type": "string", + "description": "Date and time when Asterisk was built." + }, + "user": { + "required": true, + "type": "string", + "description": "Username that build Asterisk" + } + } + }, + "SystemInfo": { + "id": "SystemInfo", + "description": "Info about Asterisk", + "properties": { + "version": { + "required": true, + "type": "string", + "description": "Asterisk version." + }, + "entity_id": { + "required": true, + "type": "string", + "description": "" + } + } + }, + "SetId": { + "id": "SetId", + "description": "Effective user/group id", + "properties": { + "user": { + "required": true, + "type": "string", + "description": "Effective user id." + }, + "group": { + "required": true, + "type": "string", + "description": "Effective group id." + } + } + }, + "ConfigInfo": { + "id": "ConfigInfo", + "description": "Info about Asterisk configuration", + "properties": { + "name": { + "required": true, + "type": "string", + "description": "Asterisk system name." + }, + "default_language": { + "required": true, + "type": "string", + "description": "Default language for media playback." + }, + "max_channels": { + "required": false, + "type": "int", + "description": "Maximum number of simultaneous channels." + }, + "max_open_files": { + "required": false, + "type": "int", + "description": "Maximum number of open file handles (files, sockets)." + }, + "max_load": { + "required": false, + "type": "double", + "description": "Maximum load avg on system." + }, + "setid": { + "required": true, + "type": "SetId", + "description": "Effective user/group id for running Asterisk." + } + } + }, + "StatusInfo": { + "id": "StatusInfo", + "description": "Info about Asterisk status", + "properties": { + "startup_time": { + "required": true, + "type": "Date", + "description": "Time when Asterisk was started." + }, + "last_reload_time": { + "required": true, + "type": "Date", + "description": "Time when Asterisk was last reloaded." + } + } + }, + "AsteriskInfo": { + "id": "AsteriskInfo", + "description": "Asterisk system information", + "properties": { + "build": { + "required": false, + "type": "BuildInfo", + "description": "Info about how Asterisk was built" + }, + "system": { + "required": false, + "type": "SystemInfo", + "description": "Info about the system running Asterisk" + }, + "config": { + "required": false, + "type": "ConfigInfo", + "description": "Info about Asterisk configuration" + }, + "status": { + "required": false, + "type": "StatusInfo", + "description": "Info about Asterisk status" + } + } + }, + "Variable": { + "id": "Variable", + "description": "The value of a channel variable", + "properties": { + "value": { + "required": true, + "type": "string", + "description": "The value of the variable requested" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_0_0/bridges.json b/codegen/src/main/resources/codegen-data/ari_1_0_0/bridges.json new file mode 100644 index 00000000..025781c9 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_0_0/bridges.json @@ -0,0 +1,531 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/stasis", + "resourcePath": "/api-docs/bridges.{format}", + "apis": [ + { + "path": "/bridges", + "description": "Active bridges", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all active bridges in Asterisk.", + "nickname": "list", + "responseClass": "List[Bridge]" + }, + { + "httpMethod": "POST", + "summary": "Create a new bridge.", + "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", + "nickname": "create", + "responseClass": "Bridge", + "parameters": [ + { + "name": "type", + "description": "Type of bridge to create.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "mixing", + "holding" + ] + } + }, + { + "name": "name", + "description": "Name to give to the bridge being created.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}", + "description": "Individual bridge", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get bridge details.", + "nickname": "get", + "responseClass": "Bridge", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Shut down a bridge.", + "notes": "If any channels are in this bridge, they will be removed and resume whatever they were doing beforehand.", + "nickname": "destroy", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/addChannel", + "description": "Add a channel to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Add a channel to a bridge.", + "nickname": "addChannel", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channel", + "description": "Ids of channels to add to bridge", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "role", + "description": "Channel's role in the bridge", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Channel not found" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application; Channel currently recording" + }, + { + "code": 422, + "reason": "Channel not in Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/removeChannel", + "description": "Remove a channel from a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Remove a channel from a bridge.", + "nickname": "removeChannel", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channel", + "description": "Ids of channels to remove from bridge", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Channel not found" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + }, + { + "code": 422, + "reason": "Channel not in this bridge" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/moh", + "description": "Play music on hold to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play music on hold to a bridge or change the MOH class that is playing.", + "nickname": "startMoh", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "mohClass", + "description": "Channel's id", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing music on hold to a bridge.", + "notes": "This will only stop music on hold being played via POST bridges/{bridgeId}/moh.", + "nickname": "stopMoh", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/play", + "description": "Play media to the participants of a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media on a bridge.", + "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.)", + "nickname": "play", + "responseClass": "Playback", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media's URI to play.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of media to skip before playing.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/record", + "description": "Record audio on a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start a recording.", + "notes": "This records the mixed audio from all channels participating in this bridge.", + "nickname": "record", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Recording's filename", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "maxDurationSeconds", + "description": "Maximum duration of the recording, in seconds. 0 for no limit.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "maxSilenceSeconds", + "description": "Maximum duration of silence, in seconds. 0 for no limit.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "ifExists", + "description": "Action to take if a recording with the same name already exists.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "fail", + "allowableValues": { + "valueType": "LIST", + "values": [ + "fail", + "overwrite", + "append" + ] + } + }, + { + "name": "beep", + "description": "Play beep when recording begins", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "terminateOn", + "description": "DTMF input to terminate recording.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "any", + "*", + "#" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge is not in a Stasis application; A recording with the same name already exists on the system and can not be overwritten because it is in progress or ifExists=fail" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + } + ], + "models": { + "Bridge": { + "id": "Bridge", + "description": "The merging of media from one or more channels.\n\nEveryone on the bridge receives the same audio.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for this bridge", + "required": true + }, + "technology": { + "type": "string", + "description": "Name of the current bridging technology", + "required": true + }, + "bridge_type": { + "type": "string", + "description": "Type of bridge technology", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "mixing", + "holding" + ] + } + }, + "bridge_class": { + "type": "string", + "description": "Bridging class", + "required": true + }, + "creator": { + "type": "string", + "description": "Entity that created the bridge", + "required": true + }, + "name": { + "type": "string", + "description": "Name the creator gave the bridge", + "required": true + }, + "channels": { + "type": "List[string]", + "description": "Ids of channels participating in this bridge", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_0_0/channels.json b/codegen/src/main/resources/codegen-data/ari_1_0_0/channels.json new file mode 100644 index 00000000..3b14c8fb --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_0_0/channels.json @@ -0,0 +1,1144 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/stasis", + "resourcePath": "/api-docs/channels.{format}", + "apis": [ + { + "path": "/channels", + "description": "Active channels", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all active channels in Asterisk.", + "nickname": "list", + "responseClass": "List[Channel]" + }, + { + "httpMethod": "POST", + "summary": "Create a new channel (originate).", + "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.", + "nickname": "originate", + "responseClass": "Channel", + "parameters": [ + { + "name": "endpoint", + "description": "Endpoint to call.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to dial after the endpoint answers", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to dial after the endpoint answers. If omitted, uses 'default'", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to dial after the endpoint answers. If omitted, uses 1", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "long" + }, + { + "name": "app", + "description": "The application that is subscribed to the originated channel, and passed to the Stasis application.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "callerId", + "description": "CallerID to use when dialing the endpoint or extension.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 30 + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for originating a channel." + } + ] + } + ] + }, + { + "path": "/channels/{channelId}", + "description": "Active channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "Channel details.", + "nickname": "get", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Delete (i.e. hangup) a channel.", + "nickname": "hangup", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "reason", + "description": "Reason for hanging up the channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defalutValue": "normal", + "allowableValues": { + "valueType": "LIST", + "values": [ + "normal", + "busy", + "congestion" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid reason for hangup provided" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/continue", + "description": "Exit application; continue execution in the dialplan", + "operations": [ + { + "httpMethod": "POST", + "summary": "Exit application; continue execution in the dialplan.", + "nickname": "continueInDialplan", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/answer", + "description": "Answer a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Answer a channel.", + "nickname": "answer", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/ring", + "description": "Send a ringing indication to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Indicate ringing to a channel.", + "nickname": "ring", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop ringing indication on a channel if locally generated.", + "nickname": "ringStop", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/dtmf", + "description": "Send DTMF to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Send provided DTMF to a given channel.", + "nickname": "sendDTMF", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "dtmf", + "description": "DTMF To send.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "before", + "description": "Amount of time to wait before DTMF digits (specified in milliseconds) start.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0 + }, + { + "name": "between", + "description": "Amount of time in between DTMF digits (specified in milliseconds).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 100 + }, + { + "name": "duration", + "description": "Length of each DTMF digit (specified in milliseconds).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 100 + }, + { + "name": "after", + "description": "Amount of time to wait after DTMF digits (specified in milliseconds) end.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0 + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "DTMF is required" + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/mute", + "description": "Mute a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Mute a channel.", + "nickname": "mute", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "Direction in which to mute audio", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both", + "in", + "out" + ] + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unmute a channel.", + "nickname": "unmute", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "Direction in which to unmute audio", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both", + "in", + "out" + ] + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/hold", + "description": "Put a channel on hold", + "operations": [ + { + "httpMethod": "POST", + "summary": "Hold a channel.", + "nickname": "hold", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Remove a channel from hold.", + "nickname": "unhold", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/moh", + "description": "Play music on hold to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play music on hold to a channel.", + "notes": "Using media operations such as /play on a channel playing MOH in this manner will suspend MOH without resuming automatically. If continuing music on hold is desired, the stasis application must reinitiate music on hold.", + "nickname": "startMoh", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "mohClass", + "description": "Music on hold class to use", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing music on hold to a channel.", + "nickname": "stopMoh", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/silence", + "description": "Play silence to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play silence to a channel.", + "notes": "Using media operations such as /play on a channel playing silence in this manner will suspend silence without resuming automatically.", + "nickname": "startSilence", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing silence to a channel.", + "nickname": "stopSilence", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/play", + "description": "Play media to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media.", + "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.)", + "nickname": "play", + "responseClass": "Playback", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media's URI to play.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of media to skip before playing.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000 + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/record", + "description": "Record audio from a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start a recording.", + "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.", + "nickname": "record", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Recording's filename", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "maxDurationSeconds", + "description": "Maximum duration of the recording, in seconds. 0 for no limit", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "maxSilenceSeconds", + "description": "Maximum duration of silence, in seconds. 0 for no limit", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "ifExists", + "description": "Action to take if a recording with the same name already exists.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "fail", + "allowableValues": { + "valueType": "LIST", + "values": [ + "fail", + "overwrite", + "append" + ] + } + }, + { + "name": "beep", + "description": "Play beep when recording begins", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "terminateOn", + "description": "DTMF input to terminate recording", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "any", + "*", + "#" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "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" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/variable", + "description": "Variables on a channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the value of a channel variable or function.", + "nickname": "getChannelVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The channel variable or function to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "POST", + "summary": "Set the value of a channel variable or function.", + "nickname": "setChannelVar", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The channel variable or function to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/snoop", + "description": "Snoop (spy/whisper) on a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start snooping.", + "notes": "Snoop (spy/whisper) on a specific channel.", + "nickname": "snoopChannel", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "spy", + "description": "Direction of audio to spy on", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "whisper", + "description": "Direction of audio to whisper into", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "app", + "description": "Application the snooping channel is placed into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + } + ], + "models": { + "Dialed": { + "id": "Dialed", + "description": "Dialed channel information.", + "properties": {} + }, + "DialplanCEP": { + "id": "DialplanCEP", + "description": "Dialplan location (context/extension/priority)", + "properties": { + "context": { + "required": true, + "type": "string", + "description": "Context in the dialplan" + }, + "exten": { + "required": true, + "type": "string", + "description": "Extension in the dialplan" + }, + "priority": { + "required": true, + "type": "long", + "description": "Priority in the dialplan" + } + } + }, + "CallerID": { + "id": "CallerID", + "description": "Caller identification", + "properties": { + "name": { + "required": true, + "type": "string" + }, + "number": { + "required": true, + "type": "string" + } + } + }, + "Channel": { + "id": "Channel", + "description": "A specific communication connection between Asterisk and an Endpoint.", + "properties": { + "id": { + "required": true, + "type": "string", + "description": "Unique identifier of the channel.\n\nThis is the same as the Uniqueid field in AMI." + }, + "name": { + "required": true, + "type": "string", + "description": "Name of the channel (i.e. SIP/foo-0000a7e3)" + }, + "state": { + "required": true, + "type": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "Down", + "Rsrved", + "OffHook", + "Dialing", + "Ring", + "Ringing", + "Up", + "Busy", + "Dialing Offhook", + "Pre-ring", + "Unknown" + ] + } + }, + "caller": { + "required": true, + "type": "CallerID" + }, + "connected": { + "required": true, + "type": "CallerID" + }, + "accountcode": { + "required": true, + "type": "string" + }, + "dialplan": { + "required": true, + "type": "DialplanCEP", + "description": "Current location in the dialplan" + }, + "creationtime": { + "required": true, + "type": "Date", + "description": "Timestamp when channel was created" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_0_0/deviceStates.json b/codegen/src/main/resources/codegen-data/ari_1_0_0/deviceStates.json new file mode 100644 index 00000000..1f18ac29 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_0_0/deviceStates.json @@ -0,0 +1,151 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "Kevin Harwell ", + "_svn_revision": "$Revision$", + "apiVersion": "1.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/stasis", + "resourcePath": "/api-docs/deviceStates.{format}", + "apis": [ + { + "path": "/deviceStates", + "description": "Device states", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all ARI controlled device states.", + "nickname": "list", + "responseClass": "List[DeviceState]" + } + ] + }, + { + "path": "/deviceStates/{deviceName}", + "description": "Device state", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve the current state of a device.", + "nickname": "get", + "responseClass": "DeviceState", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Change the state of a device controlled by ARI. (Note - implicitly creates the device state).", + "nickname": "update", + "responseClass": "void", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "deviceState", + "description": "Device state value", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "NOT_INUSE", + "INUSE", + "BUSY", + "INVALID", + "UNAVAILABLE", + "RINGING", + "RINGINUSE", + "ONHOLD" + ] + } + + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Device name is missing" + }, + { + "code": 409, + "reason": "Uncontrolled device specified" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Destroy a device-state controlled by ARI.", + "nickname": "delete", + "responseClass": "void", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Device name is missing" + }, + { + "code": 409, + "reason": "Uncontrolled device specified" + } + ] + } + ] + } + ], + "models": { + "DeviceState": { + "id": "DeviceState", + "description": "Represents the state of a device.", + "properties": { + "name": { + "type": "string", + "description": "Name of the device.", + "required": true + }, + "state": { + "type": "string", + "description": "Device's state", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "UNKNOWN", + "NOT_INUSE", + "INUSE", + "BUSY", + "INVALID", + "UNAVAILABLE", + "RINGING", + "RINGINUSE", + "ONHOLD" + ] + } + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_0_0/endpoints.json b/codegen/src/main/resources/codegen-data/ari_1_0_0/endpoints.json new file mode 100644 index 00000000..d9021fb3 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_0_0/endpoints.json @@ -0,0 +1,117 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/stasis", + "resourcePath": "/api-docs/endpoints.{format}", + "apis": [ + { + "path": "/endpoints", + "description": "Asterisk endpoints", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all endpoints.", + "nickname": "list", + "responseClass": "List[Endpoint]" + } + ] + }, + { + "path": "/endpoints/{tech}", + "description": "Asterisk endpoints", + "operations": [ + { + "httpMethod": "GET", + "summary": "List available endoints for a given endpoint technology.", + "nickname": "listByTech", + "responseClass": "List[Endpoint]", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoints (sip,iax2,...)", + "paramType": "path", + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Endpoints not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}/{resource}", + "description": "Single endpoint", + "operations": [ + { + "httpMethod": "GET", + "summary": "Details for an endpoint.", + "nickname": "get", + "responseClass": "Endpoint", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "resource", + "description": "ID of the endpoint", + "paramType": "path", + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Endpoints not found" + } + ] + } + ] + } + ], + "models": { + "Endpoint": { + "id": "Endpoint", + "description": "An external device that may offer/accept calls to/from Asterisk.\n\nUnlike most resources, which have a single unique identifier, an endpoint is uniquely identified by the technology/resource pair.", + "properties": { + "technology": { + "type": "string", + "description": "Technology of the endpoint", + "required": true + }, + "resource": { + "type": "string", + "description": "Identifier of the endpoint, specific to the given technology.", + "required": true + }, + "state": { + "type": "string", + "description": "Endpoint's state", + "required": false, + "allowableValues": { + "valueType": "LIST", + "values": [ + "unknown", + "offline", + "online" + ] + } + }, + "channel_ids": { + "type": "List[string]", + "description": "Id's of channels associated with this endpoint", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_0_0/events.json b/codegen/src/main/resources/codegen-data/ari_1_0_0/events.json new file mode 100644 index 00000000..b841485b --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_0_0/events.json @@ -0,0 +1,477 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.0.0", + "swaggerVersion": "1.2", + "basePath": "http://localhost:8088/stasis", + "resourcePath": "/api-docs/events.{format}", + "apis": [ + { + "path": "/events", + "description": "Events from Asterisk to applications", + "operations": [ + { + "httpMethod": "GET", + "upgrade": "websocket", + "websocketProtocol": "ari", + "summary": "WebSocket connection for events.", + "nickname": "eventWebsocket", + "responseClass": "Message", + "parameters": [ + { + "name": "app", + "description": "Applications to subscribe to.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ] + } + ] + } + ], + "models": { + "Message": { + "id": "Message", + "description": "Base type for errors and events", + "discriminator": "type", + "properties": { + "type": { + "type": "string", + "required": true, + "description": "Indicates the type of this message." + } + }, + "subTypes": [ + "MissingParams", + "Event" + ] + }, + "MissingParams": { + "id": "MissingParams", + "description": "Error event sent when required params are missing.", + "properties": { + "params": { + "required": true, + "type": "List[string]", + "description": "A list of the missing parameters" + } + } + }, + "Event": { + "id": "Event", + "description": "Base type for asynchronous events from Asterisk.", + "properties": { + "application": { + "type": "string", + "description": "Name of the application receiving the event.", + "required": true + }, + "timestamp": { + "type": "Date", + "description": "Time at which this event was created.", + "required": false + } + }, + "subTypes": [ + "DeviceStateChanged", + "PlaybackStarted", + "PlaybackFinished", + "RecordingStarted", + "RecordingFinished", + "RecordingFailed", + "ApplicationReplaced", + "BridgeCreated", + "BridgeDestroyed", + "BridgeMerged", + "ChannelCreated", + "ChannelDestroyed", + "ChannelEnteredBridge", + "ChannelLeftBridge", + "ChannelStateChange", + "ChannelDtmfReceived", + "ChannelDialplan", + "ChannelCallerId", + "ChannelUserevent", + "ChannelHangupRequest", + "ChannelVarset", + "EndpointStateChange", + "Dial", + "StasisEnd", + "StasisStart" + ] + }, + "DeviceStateChanged": { + "id": "DeviceStateChanged", + "description": "Notification that a device state has changed.", + "properties": { + "device_state": { + "type": "DeviceState", + "description": "Device state object", + "required": true + } + } + }, + "PlaybackStarted": { + "id": "PlaybackStarted", + "description": "Event showing the start of a media playback operation.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "PlaybackFinished": { + "id": "PlaybackFinished", + "description": "Event showing the completion of a media playback operation.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "RecordingStarted": { + "id": "RecordingStarted", + "extends": "Event", + "description": "Event showing the start of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "RecordingFinished": { + "id": "RecordingFinished", + "extends": "Event", + "description": "Event showing the completion of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "RecordingFailed": { + "id": "RecordingFailed", + "extends": "Event", + "description": "Event showing failure of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "ApplicationReplaced": { + "id": "ApplicationReplaced", + "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.", + "properties": {} + }, + "BridgeCreated": { + "id": "BridgeCreated", + "description": "Notification that a bridge has been created.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeDestroyed": { + "id": "BridgeDestroyed", + "description": "Notification that a bridge has been destroyed.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeMerged": { + "id": "BridgeMerged", + "description": "Notification that one bridge has merged into another.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "bridge_from": { + "required": true, + "type": "Bridge" + } + } + }, + "ChannelCreated": { + "id": "ChannelCreated", + "description": "Notification that a channel has been created.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelDestroyed": { + "id": "ChannelDestroyed", + "description": "Notification that a channel has been destroyed.", + "properties": { + "cause": { + "required": true, + "description": "Integer representation of the cause of the hangup", + "type": "int" + }, + "cause_txt": { + "required": true, + "description": "Text representation of the cause of the hangup", + "type": "string" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelEnteredBridge": { + "id": "ChannelEnteredBridge", + "description": "Notification that a channel has entered a bridge.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "channel": { + "type": "Channel" + } + } + }, + "ChannelLeftBridge": { + "id": "ChannelLeftBridge", + "description": "Notification that a channel has left a bridge.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelStateChange": { + "id": "ChannelStateChange", + "description": "Notification of a channel's state change.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelDtmfReceived": { + "id": "ChannelDtmfReceived", + "description": "DTMF received on a channel.\n\nThis event is sent when the DTMF ends. There is no notification about the start of DTMF", + "properties": { + "digit": { + "required": true, + "type": "string", + "description": "DTMF digit received (0-9, A-E, # or *)" + }, + "duration_ms": { + "required": true, + "type": "int", + "description": "Number of milliseconds DTMF was received" + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which DTMF was received" + } + } + }, + "ChannelDialplan": { + "id": "ChannelDialplan", + "description": "Channel changed location in the dialplan.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that changed dialplan location." + }, + "dialplan_app": { + "required": true, + "type": "string", + "description": "The application about to be executed." + }, + "dialplan_app_data": { + "required": true, + "type": "string", + "description": "The data to be passed to the application." + } + } + }, + "ChannelCallerId": { + "id": "ChannelCallerId", + "description": "Channel changed Caller ID.", + "properties": { + "caller_presentation": { + "required": true, + "type": "int", + "description": "The integer representation of the Caller Presentation value." + }, + "caller_presentation_txt": { + "required": true, + "type": "string", + "description": "The text representation of the Caller Presentation value." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that changed Caller ID." + } + } + }, + "ChannelUserevent": { + "id": "ChannelUserevent", + "description": "User-generated event with additional user-defined fields in the object.", + "properties": { + "eventname": { + "required": true, + "type": "string", + "description": "The name of the user event." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that signaled the user event." + }, + "userevent": { + "required": true, + "type": "object", + "description": "Custom Userevent data" + } + } + }, + "ChannelHangupRequest": { + "id": "ChannelHangupRequest", + "description": "A hangup was requested on the channel.", + "properties": { + "cause": { + "type": "int", + "description": "Integer representation of the cause of the hangup." + }, + "soft": { + "type": "boolean", + "description": "Whether the hangup request was a soft hangup request." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which the hangup was requested." + } + } + }, + "ChannelVarset": { + "id": "ChannelVarset", + "description": "Channel variable changed.", + "properties": { + "variable": { + "required": true, + "type": "string", + "description": "The variable that changed." + }, + "value": { + "required": true, + "type": "string", + "description": "The new value of the variable." + }, + "channel": { + "required": false, + "type": "Channel", + "description": "The channel on which the variable was set.\n\nIf missing, the variable is a global variable." + } + } + }, + "EndpointStateChange": { + "id": "EndpointStateChange", + "description": "Endpoint state changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + } + } + }, + "Dial": { + "id": "Dial", + "description": "Dialing state has changed.", + "properties": { + "caller": { + "required": false, + "type": "Channel", + "description": "The calling channel." + }, + "peer": { + "required": true, + "type": "Channel", + "description": "The dialed channel." + }, + "forward": { + "required": false, + "type": "string", + "description": "Forwarding target requested by the original dialed channel." + }, + "forwarded": { + "required": false, + "type": "Channel", + "description": "Channel that the caller has been forwarded to." + }, + "dialstring": { + "required": false, + "type": "string", + "description": "The dial string for calling the peer channel." + }, + "dialstatus": { + "required": true, + "type": "string", + "description": "Current status of the dialing attempt to the peer." + } + } + }, + "StasisEnd": { + "id": "StasisEnd", + "description": "Notification that a channel has left a Stasis application.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "StasisStart": { + "id": "StasisStart", + "description": "Notification that a channel has entered a Stasis application.", + "properties": { + "args": { + "required": true, + "type": "List[string]", + "description": "Arguments to the application" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_0_0/playbacks.json b/codegen/src/main/resources/codegen-data/ari_1_0_0/playbacks.json new file mode 100644 index 00000000..0b7146c8 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_0_0/playbacks.json @@ -0,0 +1,155 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/stasis", + "resourcePath": "/api-docs/playbacks.{format}", + "apis": [ + { + "path": "/playbacks/{playbackId}", + "description": "Control object for a playback operation.", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a playback's details.", + "nickname": "get", + "responseClass": "Playback", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "The playback cannot be found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop a playback.", + "nickname": "stop", + "responseClass": "void", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "The playback cannot be found" + } + ] + } + ] + }, + { + "path": "/playbacks/{playbackId}/control", + "description": "Control object for a playback operation.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Control a playback.", + "nickname": "control", + "responseClass": "void", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "operation", + "description": "Operation to perform on the playback.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "restart", + "pause", + "unpause", + "reverse", + "forward" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "The provided operation parameter was invalid" + }, + { + "code": 404, + "reason": "The playback cannot be found" + }, + { + "code": 409, + "reason": "The operation cannot be performed in the playback's current state" + } +] + } + ] + } + ], + "models": { + "Playback": { + "id": "Playback", + "description": "Object representing the playback of media to a channel", + "properties": { + "id": { + "type": "string", + "description": "ID for this playback operation", + "required": true + }, + "media_uri": { + "type": "string", + "description": "URI for the media to play back.", + "required": true + }, + "target_uri": { + "type": "string", + "description": "URI for the channel or bridge to play the media on", + "required": true + }, + "language": { + "type": "string", + "description": "For media types that support multiple languages, the language requested for playback." + }, + "state": { + "type": "string", + "description": "Current state of the playback operation.", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "queued", + "playing", + "complete" + ] + } + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_0_0/recordings.json b/codegen/src/main/resources/codegen-data/ari_1_0_0/recordings.json new file mode 100644 index 00000000..6a51753a --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_0_0/recordings.json @@ -0,0 +1,326 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/stasis", + "resourcePath": "/api-docs/recordings.{format}", + "apis": [ + { + "path": "/recordings/stored", + "description": "Recordings", + "operations": [ + { + "httpMethod": "GET", + "summary": "List recordings that are complete.", + "nickname": "listStored", + "responseClass": "List[StoredRecording]" + } + ] + }, + { + "path": "/recordings/stored/{recordingName}", + "description": "Individual recording", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a stored recording's details.", + "nickname": "getStored", + "responseClass": "StoredRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Delete a stored recording.", + "nickname": "deleteStored", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}", + "description": "A recording that is in progress", + "operations": [ + { + "httpMethod": "GET", + "summary": "List live recordings.", + "nickname": "getLive", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop a live recording and discard it.", + "nickname": "cancel", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/stop", + "operations": [ + { + "httpMethod": "POST", + "summary": "Stop a live recording and store it.", + "nickname": "stop", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/pause", + "operations": [ + { + "httpMethod": "POST", + "summary": "Pause a live recording.", + "notes": "Pausing a recording suspends silence detection, which will be restarted when the recording is unpaused. Paused time is not included in the accounting for maxDurationSeconds.", + "nickname": "pause", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unpause a live recording.", + "nickname": "unpause", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/mute", + "operations": [ + { + "httpMethod": "POST", + "summary": "Mute a live recording.", + "notes": "Muting a recording suspends silence detection, which will be restarted when the recording is unmuted.", + "nickname": "mute", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unmute a live recording.", + "nickname": "unmute", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + } + ] + } + ], + "models": { + "StoredRecording": { + "id": "StoredRecording", + "description": "A past recording that may be played back.", + "properties": { + "name": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + }, + "LiveRecording": { + "id": "LiveRecording", + "description": "A recording that is in progress", + "properties": { + "name": { + "required": true, + "type": "string", + "description": "Base name for the recording" + }, + "format": { + "required": true, + "type": "string", + "description": "Recording format (wav, gsm, etc.)" + }, + "state": { + "required": false, + "type": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "queued", + "recording", + "paused", + "done", + "failed", + "canceled" + ] + } + }, + "cause": { + "required": false, + "type": "string", + "description": "Cause for recording failure if failed" + }, + "state": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_0_0/sounds.json b/codegen/src/main/resources/codegen-data/ari_1_0_0/sounds.json new file mode 100644 index 00000000..f54ac042 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_0_0/sounds.json @@ -0,0 +1,99 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/stasis", + "resourcePath": "/api-docs/sounds.{format}", + "apis": [ + { + "path": "/sounds", + "description": "Sounds", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all sounds.", + "nickname": "list", + "responseClass": "List[Sound]", + "parameters": [ + { + "name": "lang", + "description": "Lookup sound for a specific language.", + "paramType": "query", + "dataType": "string", + "required": false + }, + { + "name": "format", + "description": "Lookup sound in a specific format.", + "paramType": "query", + "dataType": "string", + "required": false, + "__note": "core show translation can show translation paths between formats, along with relative costs. so this could be just installed format, or we could follow that for transcoded formats." + } + ] + } + ] + }, + { + "path": "/sounds/{soundId}", + "description": "Individual sound", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a sound's details.", + "nickname": "get", + "responseClass": "Sound", + "parameters": [ + { + "name": "soundId", + "description": "Sound's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ] + } + ] + } + ], + "models": { + "FormatLangPair": { + "id": "FormatLangPair", + "description": "Identifies the format and language of a sound file", + "properties": { + "language": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + }, + "Sound": { + "id": "Sound", + "description": "A media file that may be played back.", + "properties": { + "id": { + "required": true, + "description": "Sound's identifier.", + "type": "string" + }, + "text": { + "required": false, + "description": "Text description of the sound, usually the words spoken.", + "type": "string" + }, + "formats": { + "required": true, + "description": "The formats and languages in which this sound is available.", + "type": "List[FormatLangPair]" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_10_0/applications.json b/codegen/src/main/resources/codegen-data/ari_1_10_0/applications.json new file mode 100644 index 00000000..5ed720dd --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_10_0/applications.json @@ -0,0 +1,172 @@ +{ + "_copyright": "Copyright (C) 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.10.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/applications.{format}", + "apis": [ + { + "path": "/applications", + "description": "Stasis applications", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all applications.", + "nickname": "list", + "responseClass": "List[Application]" + } + ] + }, + { + "path": "/applications/{applicationName}", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get details of an application.", + "nickname": "get", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Application does not exist." + } + ] + } + ] + }, + { + "path": "/applications/{applicationName}/subscription", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "POST", + "summary": "Subscribe an application to a event source.", + "notes": "Returns the state of the application after the subscriptions have changed", + "nickname": "subscribe", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "eventSource", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing parameter." + }, + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 422, + "reason": "Event source does not exist." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unsubscribe an application from an event source.", + "notes": "Returns the state of the application after the subscriptions have changed", + "nickname": "unsubscribe", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "eventSource", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing parameter; event source scheme not recognized." + }, + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 409, + "reason": "Application not subscribed to event source." + }, + { + "code": 422, + "reason": "Event source does not exist." + } + ] + } + ] + } + ], + "models": { + "Application": { + "id": "Application", + "description": "Details of a Stasis application", + "properties": { + "name": { + "type": "string", + "description": "Name of this application", + "required": true + }, + "channel_ids": { + "type": "List[string]", + "description": "Id's for channels subscribed to.", + "required": true + }, + "bridge_ids": { + "type": "List[string]", + "description": "Id's for bridges subscribed to.", + "required": true + }, + "endpoint_ids": { + "type": "List[string]", + "description": "{tech}/{resource} for endpoints subscribed to.", + "required": true + }, + "device_names": { + "type": "List[string]", + "description": "Names of the devices subscribed to.", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_10_0/asterisk.json b/codegen/src/main/resources/codegen-data/ari_1_10_0/asterisk.json new file mode 100644 index 00000000..9ae965d3 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_10_0/asterisk.json @@ -0,0 +1,692 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.10.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/asterisk.{format}", + "apis": [ + { + "path": "/asterisk/config/dynamic/{configClass}/{objectType}/{id}", + "description": "Asterisk dynamic configuration", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve a dynamic configuration object.", + "nickname": "getObject", + "responseClass": "List[ConfigTuple]", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to retrieve.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to retrieve.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "{configClass|objectType|id} not found" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Create or update a dynamic configuration object.", + "nickname": "updateObject", + "responseClass": "List[ConfigTuple]", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to create or update.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to create or update.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "fields", + "description": "The body object should have a value that is a list of ConfigTuples, which provide the fields to update. Ex. [ { \"attribute\": \"directmedia\", \"value\": \"false\" } ]", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Bad request body" + }, + { + "code": 403, + "reason": "Could not create or update object" + }, + { + "code": 404, + "reason": "{configClass|objectType} not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Delete a dynamic configuration object.", + "nickname": "deleteObject", + "responseClass": "void", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to delete.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to delete.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 403, + "reason": "Could not delete object" + }, + { + "code": 404, + "reason": "{configClass|objectType|id} not found" + } + ] + } + ] + }, + { + "path": "/asterisk/info", + "description": "Asterisk system information (similar to core show settings)", + "operations": [ + { + "httpMethod": "GET", + "summary": "Gets Asterisk system information.", + "nickname": "getInfo", + "responseClass": "AsteriskInfo", + "parameters": [ + { + "name": "only", + "description": "Filter information returned", + "paramType": "query", + "required": false, + "allowMultiple": true, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "build", + "system", + "config", + "status" + ] + } + } + ] + } + ] + }, + { + "path": "/asterisk/modules", + "description": "Asterisk modules", + "operations": [ + { + "httpMethod": "GET", + "summary": "List Asterisk modules.", + "nickname": "listModules", + "responseClass": "List[Module]" + } + ] + }, + { + "path": "/asterisk/modules/{moduleName}", + "description": "Asterisk module", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get Asterisk module information.", + "nickname": "getModule", + "responseClass": "Module", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module could not be found in running modules." + }, + { + "code": 409, + "reason": "Module information could not be retrieved." + } + ] + }, + { + "httpMethod": "POST", + "summary": "Load an Asterisk module.", + "nickname": "loadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 409, + "reason": "Module could not be loaded." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unload an Asterisk module.", + "nickname": "unloadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module not found in running modules." + }, + { + "code": 409, + "reason": "Module could not be unloaded." + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Reload an Asterisk module.", + "nickname": "reloadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module not found in running modules." + }, + { + "code": 409, + "reason": "Module could not be reloaded." + } + ] + } + ] + }, + { + "path": "/asterisk/logging", + "description": "Asterisk log channels", + "operations": [ + { + "httpMethod": "GET", + "summary": "Gets Asterisk log channel information.", + "nickname": "listLogChannels", + "responseClass": "List[LogChannel]" + } + ] + }, + { + "path": "/asterisk/logging/{logChannelName}", + "description": "Asterisk log channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Adds a log channel.", + "nickname": "addLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "The log channel to add", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "configuration", + "description": "levels of the log channel", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Bad request body" + }, + { + "code": 409, + "reason": "Log channel could not be created." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Deletes a log channel.", + "nickname": "deleteLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "Log channels name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Log channel does not exist." + } + ] + } + ] + }, + { + "path": "/asterisk/logging/{logChannelName}/rotate", + "description": "Asterisk log channel", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Rotates a log channel.", + "nickname": "rotateLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "Log channel's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Log channel does not exist." + } + ] + } + ] + }, + { + "path": "/asterisk/variable", + "description": "Global variables", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the value of a global variable.", + "nickname": "getGlobalVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "variable", + "description": "The variable to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + } + ] + }, + { + "httpMethod": "POST", + "summary": "Set the value of a global variable.", + "nickname": "setGlobalVar", + "responseClass": "void", + "parameters": [ + { + "name": "variable", + "description": "The variable to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + } + ] + } + ] + } + ], + "models": { + "BuildInfo": { + "id": "BuildInfo", + "description": "Info about how Asterisk was built", + "properties": { + "os": { + "required": true, + "type": "string", + "description": "OS Asterisk was built on." + }, + "kernel": { + "required": true, + "type": "string", + "description": "Kernel version Asterisk was built on." + }, + "options": { + "required": true, + "type": "string", + "description": "Compile time options, or empty string if default." + }, + "machine": { + "required": true, + "type": "string", + "description": "Machine architecture (x86_64, i686, ppc, etc.)" + }, + "date": { + "required": true, + "type": "string", + "description": "Date and time when Asterisk was built." + }, + "user": { + "required": true, + "type": "string", + "description": "Username that build Asterisk" + } + } + }, + "SystemInfo": { + "id": "SystemInfo", + "description": "Info about Asterisk", + "properties": { + "version": { + "required": true, + "type": "string", + "description": "Asterisk version." + }, + "entity_id": { + "required": true, + "type": "string", + "description": "" + } + } + }, + "SetId": { + "id": "SetId", + "description": "Effective user/group id", + "properties": { + "user": { + "required": true, + "type": "string", + "description": "Effective user id." + }, + "group": { + "required": true, + "type": "string", + "description": "Effective group id." + } + } + }, + "ConfigInfo": { + "id": "ConfigInfo", + "description": "Info about Asterisk configuration", + "properties": { + "name": { + "required": true, + "type": "string", + "description": "Asterisk system name." + }, + "default_language": { + "required": true, + "type": "string", + "description": "Default language for media playback." + }, + "max_channels": { + "required": false, + "type": "int", + "description": "Maximum number of simultaneous channels." + }, + "max_open_files": { + "required": false, + "type": "int", + "description": "Maximum number of open file handles (files, sockets)." + }, + "max_load": { + "required": false, + "type": "double", + "description": "Maximum load avg on system." + }, + "setid": { + "required": true, + "type": "SetId", + "description": "Effective user/group id for running Asterisk." + } + } + }, + "StatusInfo": { + "id": "StatusInfo", + "description": "Info about Asterisk status", + "properties": { + "startup_time": { + "required": true, + "type": "Date", + "description": "Time when Asterisk was started." + }, + "last_reload_time": { + "required": true, + "type": "Date", + "description": "Time when Asterisk was last reloaded." + } + } + }, + "AsteriskInfo": { + "id": "AsteriskInfo", + "description": "Asterisk system information", + "properties": { + "build": { + "required": false, + "type": "BuildInfo", + "description": "Info about how Asterisk was built" + }, + "system": { + "required": false, + "type": "SystemInfo", + "description": "Info about the system running Asterisk" + }, + "config": { + "required": false, + "type": "ConfigInfo", + "description": "Info about Asterisk configuration" + }, + "status": { + "required": false, + "type": "StatusInfo", + "description": "Info about Asterisk status" + } + } + }, + "Module": { + "id": "Module", + "description": "Details of an Asterisk module", + "properties": { + "name": { + "type": "string", + "description": "The name of this module", + "required": true + }, + "description": { + "type": "string", + "description": "The description of this module", + "required": true + }, + "use_count": { + "type": "int", + "description": "The number of times this module is being used", + "required": true + }, + "status": { + "type": "string", + "description": "The running status of this module", + "required": true + }, + "support_level": { + "type": "string", + "description": "The support state of this module", + "required": true + } + } + }, + "LogChannel": { + "id": "LogChannel", + "description": "Details of an Asterisk log channel", + "properties": { + "channel": { + "type": "string", + "description": "The log channel path", + "required": true + }, + "type": { + "type": "string", + "description": "Types of logs for the log channel", + "required": true + }, + "status": { + "type": "string", + "description": "Whether or not a log type is enabled", + "required": true + }, + "configuration": { + "type": "string", + "description": "The various log levels", + "required": true + } + } + }, + "Variable": { + "id": "Variable", + "description": "The value of a channel variable", + "properties": { + "value": { + "required": true, + "type": "string", + "description": "The value of the variable requested" + } + } + }, + "ConfigTuple": { + "id": "ConfigTuple", + "description": "A key/value pair that makes up part of a configuration object.", + "properties": { + "attribute": { + "required": true, + "type": "string", + "description": "A configuration object attribute." + }, + "value": { + "required": true, + "type": "string", + "description": "The value for the attribute." + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_10_0/bridges.json b/codegen/src/main/resources/codegen-data/ari_1_10_0/bridges.json new file mode 100644 index 00000000..3eefa16d --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_10_0/bridges.json @@ -0,0 +1,738 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.10.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/bridges.{format}", + "apis": [ + { + "path": "/bridges", + "description": "Active bridges", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all active bridges in Asterisk.", + "nickname": "list", + "responseClass": "List[Bridge]" + }, + { + "httpMethod": "POST", + "summary": "Create a new bridge.", + "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", + "nickname": "create", + "responseClass": "Bridge", + "parameters": [ + { + "name": "type", + "description": "Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "bridgeId", + "description": "Unique ID to give to the bridge being created.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Name to give to the bridge being created.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}", + "description": "Individual bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Create a new bridge or updates an existing one.", + "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", + "nickname": "createWithId", + "responseClass": "Bridge", + "parameters": [ + { + "name": "type", + "description": "Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media) to set.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "bridgeId", + "description": "Unique ID to give to the bridge being created.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Set the name of the bridge.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ] + }, + { + "httpMethod": "GET", + "summary": "Get bridge details.", + "nickname": "get", + "responseClass": "Bridge", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Shut down a bridge.", + "notes": "If any channels are in this bridge, they will be removed and resume whatever they were doing beforehand.", + "nickname": "destroy", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/addChannel", + "description": "Add a channel to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Add a channel to a bridge.", + "nickname": "addChannel", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channel", + "description": "Ids of channels to add to bridge", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "role", + "description": "Channel's role in the bridge", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Channel not found" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application; Channel currently recording" + }, + { + "code": 422, + "reason": "Channel not in Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/removeChannel", + "description": "Remove a channel from a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Remove a channel from a bridge.", + "nickname": "removeChannel", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channel", + "description": "Ids of channels to remove from bridge", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Channel not found" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + }, + { + "code": 422, + "reason": "Channel not in this bridge" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/videoSource/{channelId}", + "description": "Set a channel as the video source in a multi-party bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Set a channel as the video source in a multi-party mixing bridge. This operation has no effect on bridges with two or fewer participants.", + "nickname": "setVideoSource", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge or Channel not found" + }, + { + "code": 409, + "reason": "Channel not in Stasis application" + }, + { + "code": 422, + "reason": "Channel not in this Bridge" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/videoSource", + "description": "Removes any explicit video source", + "operations": [ + { + "httpMethod": "DELETE", + "summary": "Removes any explicit video source in a multi-party mixing bridge. This operation has no effect on bridges with two or fewer participants. When no explicit video source is set, talk detection will be used to determine the active video stream.", + "nickname": "clearVideoSource", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/moh", + "description": "Play music on hold to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play music on hold to a bridge or change the MOH class that is playing.", + "nickname": "startMoh", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "mohClass", + "description": "Channel's id", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing music on hold to a bridge.", + "notes": "This will only stop music on hold being played via POST bridges/{bridgeId}/moh.", + "nickname": "stopMoh", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/play", + "description": "Play media to the participants of a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media on a bridge.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "play", + "responseClass": "Playback", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media's URI to play.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of media to skip before playing.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "playbackId", + "description": "Playback Id.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/play/{playbackId}", + "description": "Play media to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media on a bridge.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "playWithId", + "responseClass": "Playback", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media's URI to play.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of media to skip before playing.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + + } + ] + }, + { + "path": "/bridges/{bridgeId}/record", + "description": "Record audio on a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start a recording.", + "notes": "This records the mixed audio from all channels participating in this bridge.", + "nickname": "record", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Recording's filename", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "maxDurationSeconds", + "description": "Maximum duration of the recording, in seconds. 0 for no limit.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "maxSilenceSeconds", + "description": "Maximum duration of silence, in seconds. 0 for no limit.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "ifExists", + "description": "Action to take if a recording with the same name already exists.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "fail", + "allowableValues": { + "valueType": "LIST", + "values": [ + "fail", + "overwrite", + "append" + ] + } + }, + { + "name": "beep", + "description": "Play beep when recording begins", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "terminateOn", + "description": "DTMF input to terminate recording.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "any", + "*", + "#" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge is not in a Stasis application; A recording with the same name already exists on the system and can not be overwritten because it is in progress or ifExists=fail" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + } + ], + "models": { + "Bridge": { + "id": "Bridge", + "description": "The merging of media from one or more channels.\n\nEveryone on the bridge receives the same audio.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for this bridge", + "required": true + }, + "technology": { + "type": "string", + "description": "Name of the current bridging technology", + "required": true + }, + "bridge_type": { + "type": "string", + "description": "Type of bridge technology", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "mixing", + "holding" + ] + } + }, + "bridge_class": { + "type": "string", + "description": "Bridging class", + "required": true + }, + "creator": { + "type": "string", + "description": "Entity that created the bridge", + "required": true + }, + "name": { + "type": "string", + "description": "Name the creator gave the bridge", + "required": true + }, + "channels": { + "type": "List[string]", + "description": "Ids of channels participating in this bridge", + "required": true + }, + "video_mode": { + "type": "string", + "description": "The video mode the bridge is using. One of 'none', 'talker', or 'single'.", + "required": false + }, + "video_source_id": { + "type": "string", + "description": "The ID of the channel that is the source of video in this bridge, if one exists.", + "required": false + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_10_0/channels.json b/codegen/src/main/resources/codegen-data/ari_1_10_0/channels.json new file mode 100644 index 00000000..487db448 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_10_0/channels.json @@ -0,0 +1,1573 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.10.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/channels.{format}", + "apis": [ + { + "path": "/channels", + "description": "Active channels", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all active channels in Asterisk.", + "nickname": "list", + "responseClass": "List[Channel]" + }, + { + "httpMethod": "POST", + "summary": "Create a new channel (originate).", + "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.", + "nickname": "originate", + "responseClass": "Channel", + "parameters": [ + { + "name": "endpoint", + "description": "Endpoint to call.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to dial after the endpoint answers. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to dial after the endpoint answers. If omitted, uses 'default'. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to dial after the endpoint answers. If omitted, uses 1. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "long" + }, + { + "name": "label", + "description": "The label to dial after the endpoint answers. Will supersede 'priority' if provided. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The application that is subscribed to the originated channel. When the channel is answered, it will be passed to this Stasis application. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "callerId", + "description": "CallerID to use when dialing the endpoint or extension.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 30 + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "The unique id of the channel which is originating this one.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "formats", + "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for originating a channel." + }, + { + "code": 409, + "reason": "Channel with given unique ID already exists." + } + ] + } + ] + }, + { + "path": "/channels/{channelId}", + "description": "Active channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "Channel details.", + "nickname": "get", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + } + ] + }, + { + "httpMethod": "POST", + "summary": "Create a new channel (originate with id).", + "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.", + "nickname": "originateWithId", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "endpoint", + "description": "Endpoint to call.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to dial after the endpoint answers. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to dial after the endpoint answers. If omitted, uses 'default'. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to dial after the endpoint answers. If omitted, uses 1. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "long" + }, + { + "name": "label", + "description": "The label to dial after the endpoint answers. Will supersede 'priority' if provided. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The application that is subscribed to the originated channel. When the channel is answered, it will be passed to this Stasis application. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "callerId", + "description": "CallerID to use when dialing the endpoint or extension.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 30 + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "The unique id of the channel which is originating this one.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "formats", + "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for originating a channel." + }, + { + "code": 409, + "reason": "Channel with given unique ID already exists." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Delete (i.e. hangup) a channel.", + "nickname": "hangup", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "reason", + "description": "Reason for hanging up the channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defalutValue": "normal", + "allowableValues": { + "valueType": "LIST", + "values": [ + "normal", + "busy", + "congestion", + "no_answer" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid reason for hangup provided" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/continue", + "description": "Exit application; continue execution in the dialplan", + "operations": [ + { + "httpMethod": "POST", + "summary": "Exit application; continue execution in the dialplan.", + "nickname": "continueInDialplan", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "label", + "description": "The label to continue to - will supersede 'priority' if both are provided.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/redirect", + "description": "Inform the channel that it should redirect itself to a different location. Note that this will almost certainly cause the channel to exit the application.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Redirect the channel to a different location.", + "nickname": "redirect", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "endpoint", + "description": "The endpoint to redirect the channel to", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Endpoint parameter not provided" + }, + { + "code": 404, + "reason": "Channel or endpoint not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 422, + "reason": "Endpoint is not the same type as the channel" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/answer", + "description": "Answer a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Answer a channel.", + "nickname": "answer", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/ring", + "description": "Send a ringing indication to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Indicate ringing to a channel.", + "nickname": "ring", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop ringing indication on a channel if locally generated.", + "nickname": "ringStop", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/dtmf", + "description": "Send DTMF to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Send provided DTMF to a given channel.", + "nickname": "sendDTMF", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "dtmf", + "description": "DTMF To send.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "before", + "description": "Amount of time to wait before DTMF digits (specified in milliseconds) start.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0 + }, + { + "name": "between", + "description": "Amount of time in between DTMF digits (specified in milliseconds).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 100 + }, + { + "name": "duration", + "description": "Length of each DTMF digit (specified in milliseconds).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 100 + }, + { + "name": "after", + "description": "Amount of time to wait after DTMF digits (specified in milliseconds) end.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0 + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "DTMF is required" + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/mute", + "description": "Mute a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Mute a channel.", + "nickname": "mute", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "Direction in which to mute audio", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both", + "in", + "out" + ] + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unmute a channel.", + "nickname": "unmute", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "Direction in which to unmute audio", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both", + "in", + "out" + ] + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/hold", + "description": "Put a channel on hold", + "operations": [ + { + "httpMethod": "POST", + "summary": "Hold a channel.", + "nickname": "hold", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Remove a channel from hold.", + "nickname": "unhold", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/moh", + "description": "Play music on hold to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play music on hold to a channel.", + "notes": "Using media operations such as /play on a channel playing MOH in this manner will suspend MOH without resuming automatically. If continuing music on hold is desired, the stasis application must reinitiate music on hold.", + "nickname": "startMoh", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "mohClass", + "description": "Music on hold class to use", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing music on hold to a channel.", + "nickname": "stopMoh", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/silence", + "description": "Play silence to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play silence to a channel.", + "notes": "Using media operations such as /play on a channel playing silence in this manner will suspend silence without resuming automatically.", + "nickname": "startSilence", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing silence to a channel.", + "nickname": "stopSilence", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/play", + "description": "Play media to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "play", + "responseClass": "Playback", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media's URI to play.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of media to skip before playing.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000 + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/play/{playbackId}", + "description": "Play media to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media and specify the playbackId.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "playWithId", + "responseClass": "Playback", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media's URI to play.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of media to skip before playing.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000 + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/record", + "description": "Record audio from a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start a recording.", + "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.", + "nickname": "record", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Recording's filename", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "maxDurationSeconds", + "description": "Maximum duration of the recording, in seconds. 0 for no limit", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "maxSilenceSeconds", + "description": "Maximum duration of silence, in seconds. 0 for no limit", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "ifExists", + "description": "Action to take if a recording with the same name already exists.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "fail", + "allowableValues": { + "valueType": "LIST", + "values": [ + "fail", + "overwrite", + "append" + ] + } + }, + { + "name": "beep", + "description": "Play beep when recording begins", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "terminateOn", + "description": "DTMF input to terminate recording", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "any", + "*", + "#" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "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" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/variable", + "description": "Variables on a channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the value of a channel variable or function.", + "nickname": "getChannelVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The channel variable or function to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Channel or variable not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "POST", + "summary": "Set the value of a channel variable or function.", + "nickname": "setChannelVar", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The channel variable or function to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/snoop", + "description": "Snoop (spy/whisper) on a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start snooping.", + "notes": "Snoop (spy/whisper) on a specific channel.", + "nickname": "snoopChannel", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "spy", + "description": "Direction of audio to spy on", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "whisper", + "description": "Direction of audio to whisper into", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "app", + "description": "Application the snooping channel is placed into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "snoopId", + "description": "Unique ID to assign to snooping channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/snoop/{snoopId}", + "description": "Snoop (spy/whisper) on a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start snooping.", + "notes": "Snoop (spy/whisper) on a specific channel.", + "nickname": "snoopChannelWithId", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "snoopId", + "description": "Unique ID to assign to snooping channel", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "spy", + "description": "Direction of audio to spy on", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "whisper", + "description": "Direction of audio to whisper into", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "app", + "description": "Application the snooping channel is placed into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + } + ], + "models": { + "Dialed": { + "id": "Dialed", + "description": "Dialed channel information.", + "properties": {} + }, + "DialplanCEP": { + "id": "DialplanCEP", + "description": "Dialplan location (context/extension/priority)", + "properties": { + "context": { + "required": true, + "type": "string", + "description": "Context in the dialplan" + }, + "exten": { + "required": true, + "type": "string", + "description": "Extension in the dialplan" + }, + "priority": { + "required": true, + "type": "long", + "description": "Priority in the dialplan" + } + } + }, + "CallerID": { + "id": "CallerID", + "description": "Caller identification", + "properties": { + "name": { + "required": true, + "type": "string" + }, + "number": { + "required": true, + "type": "string" + } + } + }, + "Channel": { + "id": "Channel", + "description": "A specific communication connection between Asterisk and an Endpoint.", + "properties": { + "id": { + "required": true, + "type": "string", + "description": "Unique identifier of the channel.\n\nThis is the same as the Uniqueid field in AMI." + }, + "name": { + "required": true, + "type": "string", + "description": "Name of the channel (i.e. SIP/foo-0000a7e3)" + }, + "state": { + "required": true, + "type": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "Down", + "Rsrved", + "OffHook", + "Dialing", + "Ring", + "Ringing", + "Up", + "Busy", + "Dialing Offhook", + "Pre-ring", + "Unknown" + ] + } + }, + "caller": { + "required": true, + "type": "CallerID" + }, + "connected": { + "required": true, + "type": "CallerID" + }, + "accountcode": { + "required": true, + "type": "string" + }, + "dialplan": { + "required": true, + "type": "DialplanCEP", + "description": "Current location in the dialplan" + }, + "creationtime": { + "required": true, + "type": "Date", + "description": "Timestamp when channel was created" + }, + "language": { + "required": true, + "type": "string", + "description": "The default spoken language" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_10_0/deviceStates.json b/codegen/src/main/resources/codegen-data/ari_1_10_0/deviceStates.json new file mode 100644 index 00000000..16d3af75 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_10_0/deviceStates.json @@ -0,0 +1,151 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "Kevin Harwell ", + "_svn_revision": "$Revision$", + "apiVersion": "1.10.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/deviceStates.{format}", + "apis": [ + { + "path": "/deviceStates", + "description": "Device states", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all ARI controlled device states.", + "nickname": "list", + "responseClass": "List[DeviceState]" + } + ] + }, + { + "path": "/deviceStates/{deviceName}", + "description": "Device state", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve the current state of a device.", + "nickname": "get", + "responseClass": "DeviceState", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Change the state of a device controlled by ARI. (Note - implicitly creates the device state).", + "nickname": "update", + "responseClass": "void", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "deviceState", + "description": "Device state value", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "NOT_INUSE", + "INUSE", + "BUSY", + "INVALID", + "UNAVAILABLE", + "RINGING", + "RINGINUSE", + "ONHOLD" + ] + } + + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Device name is missing" + }, + { + "code": 409, + "reason": "Uncontrolled device specified" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Destroy a device-state controlled by ARI.", + "nickname": "delete", + "responseClass": "void", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Device name is missing" + }, + { + "code": 409, + "reason": "Uncontrolled device specified" + } + ] + } + ] + } + ], + "models": { + "DeviceState": { + "id": "DeviceState", + "description": "Represents the state of a device.", + "properties": { + "name": { + "type": "string", + "description": "Name of the device.", + "required": true + }, + "state": { + "type": "string", + "description": "Device's state", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "UNKNOWN", + "NOT_INUSE", + "INUSE", + "BUSY", + "INVALID", + "UNAVAILABLE", + "RINGING", + "RINGINUSE", + "ONHOLD" + ] + } + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_10_0/endpoints.json b/codegen/src/main/resources/codegen-data/ari_1_10_0/endpoints.json new file mode 100644 index 00000000..13a5beda --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_10_0/endpoints.json @@ -0,0 +1,279 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.10.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/endpoints.{format}", + "apis": [ + { + "path": "/endpoints", + "description": "Asterisk endpoints", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all endpoints.", + "nickname": "list", + "responseClass": "List[Endpoint]" + } + ] + }, + { + "path": "/endpoints/sendMessage", + "description": "Send a message to some technology URI or endpoint.", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Send a message to some technology URI or endpoint.", + "nickname": "sendMessage", + "responseClass": "void", + "parameters": [ + { + "name": "to", + "description": "The endpoint resource or technology specific URI to send the message to. Valid resources are sip, pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "from", + "description": "The endpoint resource or technology specific identity to send this message from. Valid resources are sip, pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "body", + "description": "The body of the message", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "descriptioni": "The \"variables\" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, pjsip and sip resource types will add the key/value pairs as SIP headers,", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoint not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}", + "description": "Asterisk endpoints", + "operations": [ + { + "httpMethod": "GET", + "summary": "List available endoints for a given endpoint technology.", + "nickname": "listByTech", + "responseClass": "List[Endpoint]", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoints (sip,iax2,...)", + "paramType": "path", + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Endpoints not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}/{resource}", + "description": "Single endpoint", + "operations": [ + { + "httpMethod": "GET", + "summary": "Details for an endpoint.", + "nickname": "get", + "responseClass": "Endpoint", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "resource", + "description": "ID of the endpoint", + "paramType": "path", + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoints not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}/{resource}/sendMessage", + "description": "Send a message to some endpoint in a technology.", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Send a message to some endpoint in a technology.", + "nickname": "sendMessageToEndpoint", + "responseClass": "void", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "resource", + "description": "ID of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "from", + "description": "The endpoint resource or technology specific identity to send this message from. Valid resources are sip, pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "body", + "description": "The body of the message", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "descriptioni": "The \"variables\" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, pjsip and sip resource types will add the key/value pairs as SIP headers,", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoint not found" + } + ] + } + ] + } + ], + "models": { + "Endpoint": { + "id": "Endpoint", + "description": "An external device that may offer/accept calls to/from Asterisk.\n\nUnlike most resources, which have a single unique identifier, an endpoint is uniquely identified by the technology/resource pair.", + "properties": { + "technology": { + "type": "string", + "description": "Technology of the endpoint", + "required": true + }, + "resource": { + "type": "string", + "description": "Identifier of the endpoint, specific to the given technology.", + "required": true + }, + "state": { + "type": "string", + "description": "Endpoint's state", + "required": false, + "allowableValues": { + "valueType": "LIST", + "values": [ + "unknown", + "offline", + "online" + ] + } + }, + "channel_ids": { + "type": "List[string]", + "description": "Id's of channels associated with this endpoint", + "required": true + } + } + }, + "TextMessageVariable": { + "id": "TextMessageVariable", + "description": "A key/value pair variable in a text message.", + "properties": { + "key": { + "type": "string", + "description": "A unique key identifying the variable.", + "required": true + }, + "value": { + "type": "string", + "description": "The value of the variable.", + "required": true + } + } + }, + "TextMessage": { + "id": "TextMessage", + "description": "A text message.", + "properties": { + "from": { + "type": "string", + "description": "A technology specific URI specifying the source of the message. For sip and pjsip technologies, any SIP URI can be specified. For xmpp, the URI must correspond to the client connection being used to send the message.", + "required": true + }, + "to": { + "type": "string", + "description": "A technology specific URI specifying the destination of the message. Valid technologies include sip, pjsip, and xmp. The destination of a message should be an endpoint.", + "required": true + }, + "body": { + "type": "string", + "description": "The text of the message.", + "required": true + }, + "variables": { + "type": "List[TextMessageVariable]", + "description": "Technology specific key/value pairs associated with the message.", + "required": false + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_10_0/events.json b/codegen/src/main/resources/codegen-data/ari_1_10_0/events.json new file mode 100644 index 00000000..2d174cff --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_10_0/events.json @@ -0,0 +1,883 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.10.0", + "swaggerVersion": "1.2", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/events.{format}", + "apis": [ + { + "path": "/events", + "description": "Events from Asterisk to applications", + "operations": [ + { + "httpMethod": "GET", + "upgrade": "websocket", + "websocketProtocol": "ari", + "summary": "WebSocket connection for events.", + "nickname": "eventWebsocket", + "responseClass": "Message", + "parameters": [ + { + "name": "app", + "description": "Applications to subscribe to.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "subscribeAll", + "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'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean" + } + ] + } + ] + }, + { + "path": "/events/user/{eventName}", + "description": "Stasis application user events", + "operations": [ + { + "httpMethod": "POST", + "summary": "Generate a user event.", + "nickname": "userEvent", + "responseClass": "void", + "parameters": [ + { + "name": "eventName", + "description": "Event name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "application", + "description": "The name of the application that will receive this event", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "source", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}/{resource}, deviceState:{deviceName}", + "paramType": "query", + "required": false, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds custom key/value pairs to add to the user event. Ex. { \"variables\": { \"key\": \"value\" } }", + "paramType": "body", + "required": false, + "allowMultiple": false, + "dataType": "containers" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 422, + "reason": "Event source not found." + }, + { + "code": 400, + "reason": "Invalid even tsource URI or userevent data." + } + ] + } + ] + } + ], + "models": { + "Message": { + "id": "Message", + "description": "Base type for errors and events", + "discriminator": "type", + "properties": { + "type": { + "type": "string", + "required": true, + "description": "Indicates the type of this message." + }, + "asterisk_id": { + "type": "string", + "required": false, + "description": "The unique ID for the Asterisk instance that raised this event." + } + }, + "subTypes": [ + "MissingParams", + "Event" + ] + }, + "MissingParams": { + "id": "MissingParams", + "description": "Error event sent when required params are missing.", + "properties": { + "params": { + "required": true, + "type": "List[string]", + "description": "A list of the missing parameters" + } + } + }, + "Event": { + "id": "Event", + "description": "Base type for asynchronous events from Asterisk.", + "properties": { + "application": { + "type": "string", + "description": "Name of the application receiving the event.", + "required": true + }, + "timestamp": { + "type": "Date", + "description": "Time at which this event was created.", + "required": false + } + }, + "subTypes": [ + "DeviceStateChanged", + "PlaybackStarted", + "PlaybackFinished", + "RecordingStarted", + "RecordingFinished", + "RecordingFailed", + "ApplicationReplaced", + "BridgeCreated", + "BridgeDestroyed", + "BridgeMerged", + "BridgeBlindTransfer", + "BridgeAttendedTransfer", + "BridgeVideoSourceChanged", + "ChannelCreated", + "ChannelDestroyed", + "ChannelEnteredBridge", + "ChannelLeftBridge", + "ChannelStateChange", + "ChannelDtmfReceived", + "ChannelDialplan", + "ChannelCallerId", + "ChannelUserevent", + "ChannelHangupRequest", + "ChannelVarset", + "ChannelTalkingStarted", + "ChannelTalkingFinished", + "ChannelHold", + "ChannelUnhold", + "ContactStatusChange", + "EndpointStateChange", + "Dial", + "StasisEnd", + "StasisStart", + "TextMessageReceived", + "ChannelConnectedLine", + "PeerStatusChange" + ] + }, + "ContactInfo": { + "id": "ContactInfo", + "description": "Detailed information about a contact on an endpoint.", + "properties": { + "uri": { + "type": "string", + "description": "The location of the contact.", + "required": true + }, + "contact_status": { + "type": "string", + "description": "The current status of the contact.", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "Unreachable", + "Reachable", + "Unknown", + "Created", + "Removed" + ] + } + }, + "aor": { + "type": "string", + "description": "The Address of Record this contact belongs to.", + "required": true + }, + "roundtrip_usec": { + "type": "string", + "description": "Current round trip time, in microseconds, for the contact.", + "required": false + } + } + }, + "Peer": { + "id": "Peer", + "description": "Detailed information about a remote peer that communicates with Asterisk.", + "properties": { + "peer_status": { + "type": "string", + "description": "The current state of the peer. Note that the values of the status are dependent on the underlying peer technology.", + "required": true + }, + "cause": { + "type": "string", + "description": "An optional reason associated with the change in peer_status.", + "required": false + }, + "address": { + "type": "string", + "description": "The IP address of the peer.", + "required": false + }, + "port": { + "type": "string", + "description": "The port of the peer.", + "required": false + }, + "time": { + "type": "string", + "description": "The last known time the peer was contacted.", + "required": false + } + } + }, + "DeviceStateChanged": { + "id": "DeviceStateChanged", + "description": "Notification that a device state has changed.", + "properties": { + "device_state": { + "type": "DeviceState", + "description": "Device state object", + "required": true + } + } + }, + "PlaybackStarted": { + "id": "PlaybackStarted", + "description": "Event showing the start of a media playback operation.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "PlaybackFinished": { + "id": "PlaybackFinished", + "description": "Event showing the completion of a media playback operation.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "RecordingStarted": { + "id": "RecordingStarted", + "description": "Event showing the start of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "RecordingFinished": { + "id": "RecordingFinished", + "description": "Event showing the completion of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "RecordingFailed": { + "id": "RecordingFailed", + "description": "Event showing failure of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "ApplicationReplaced": { + "id": "ApplicationReplaced", + "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.", + "properties": {} + }, + "BridgeCreated": { + "id": "BridgeCreated", + "description": "Notification that a bridge has been created.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeDestroyed": { + "id": "BridgeDestroyed", + "description": "Notification that a bridge has been destroyed.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeMerged": { + "id": "BridgeMerged", + "description": "Notification that one bridge has merged into another.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "bridge_from": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeVideoSourceChanged": { + "id": "BridgeVideoSourceChanged", + "description": "Notification that the source of video in a bridge has changed.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "old_video_source_id": { + "required": false, + "type": "string" + } + } + }, + "BridgeBlindTransfer": { + "id": "BridgeBlindTransfer", + "description": "Notification that a blind transfer has occurred.", + "properties": { + "channel": { + "description": "The channel performing the blind transfer", + "required": true, + "type": "Channel" + }, + "replace_channel": { + "description": "The channel that is replacing transferer when the transferee(s) can not be transferred directly", + "required": false, + "type": "Channel" + }, + "transferee": { + "description": "The channel that is being transferred", + "required": false, + "type": "Channel" + }, + "exten": { + "description": "The extension transferred to", + "required": true, + "type": "string" + }, + "context": { + "description": "The context transferred to", + "required": true, + "type": "string" + }, + "result": { + "description": "The result of the transfer attempt", + "required": true, + "type": "string" + }, + "is_external": { + "description": "Whether the transfer was externally initiated or not", + "required": true, + "type": "boolean" + }, + "bridge": { + "description": "The bridge being transferred", + "type": "Bridge" + } + } + }, + "BridgeAttendedTransfer": { + "id": "BridgeAttendedTransfer", + "description": "Notification that an attended transfer has occurred.", + "properties": { + "transferer_first_leg": { + "description": "First leg of the transferer", + "required": true, + "type": "Channel" + }, + "transferer_second_leg": { + "description": "Second leg of the transferer", + "required": true, + "type": "Channel" + }, + "replace_channel": { + "description": "The channel that is replacing transferer_first_leg in the swap", + "required": false, + "type": "Channel" + }, + "transferee": { + "description": "The channel that is being transferred", + "required": false, + "type": "Channel" + }, + "transfer_target": { + "description": "The channel that is being transferred to", + "required": false, + "type": "Channel" + }, + "result": { + "description": "The result of the transfer attempt", + "required": true, + "type": "string" + }, + "is_external": { + "description": "Whether the transfer was externally initiated or not", + "required": true, + "type": "boolean" + }, + "transferer_first_leg_bridge": { + "description": "Bridge the transferer first leg is in", + "type": "Bridge" + }, + "transferer_second_leg_bridge": { + "description": "Bridge the transferer second leg is in", + "type": "Bridge" + }, + "destination_type": { + "description": "How the transfer was accomplished", + "required": true, + "type": "string" + }, + "destination_bridge": { + "description": "Bridge that survived the merge result", + "type": "string" + }, + "destination_application": { + "description": "Application that has been transferred into", + "type": "string" + }, + "destination_link_first_leg": { + "description": "First leg of a link transfer result", + "type": "Channel" + }, + "destination_link_second_leg": { + "description": "Second leg of a link transfer result", + "type": "Channel" + }, + "destination_threeway_channel": { + "description": "Transferer channel that survived the threeway result", + "type": "Channel" + }, + "destination_threeway_bridge": { + "description": "Bridge that survived the threeway result", + "type": "Bridge" + } + } + }, + "ChannelCreated": { + "id": "ChannelCreated", + "description": "Notification that a channel has been created.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelDestroyed": { + "id": "ChannelDestroyed", + "description": "Notification that a channel has been destroyed.", + "properties": { + "cause": { + "required": true, + "description": "Integer representation of the cause of the hangup", + "type": "int" + }, + "cause_txt": { + "required": true, + "description": "Text representation of the cause of the hangup", + "type": "string" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelEnteredBridge": { + "id": "ChannelEnteredBridge", + "description": "Notification that a channel has entered a bridge.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "channel": { + "type": "Channel" + } + } + }, + "ChannelLeftBridge": { + "id": "ChannelLeftBridge", + "description": "Notification that a channel has left a bridge.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelStateChange": { + "id": "ChannelStateChange", + "description": "Notification of a channel's state change.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelDtmfReceived": { + "id": "ChannelDtmfReceived", + "description": "DTMF received on a channel.\n\nThis event is sent when the DTMF ends. There is no notification about the start of DTMF", + "properties": { + "digit": { + "required": true, + "type": "string", + "description": "DTMF digit received (0-9, A-E, # or *)" + }, + "duration_ms": { + "required": true, + "type": "int", + "description": "Number of milliseconds DTMF was received" + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which DTMF was received" + } + } + }, + "ChannelDialplan": { + "id": "ChannelDialplan", + "description": "Channel changed location in the dialplan.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that changed dialplan location." + }, + "dialplan_app": { + "required": true, + "type": "string", + "description": "The application about to be executed." + }, + "dialplan_app_data": { + "required": true, + "type": "string", + "description": "The data to be passed to the application." + } + } + }, + "ChannelCallerId": { + "id": "ChannelCallerId", + "description": "Channel changed Caller ID.", + "properties": { + "caller_presentation": { + "required": true, + "type": "int", + "description": "The integer representation of the Caller Presentation value." + }, + "caller_presentation_txt": { + "required": true, + "type": "string", + "description": "The text representation of the Caller Presentation value." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that changed Caller ID." + } + } + }, + "ChannelUserevent": { + "id": "ChannelUserevent", + "description": "User-generated event with additional user-defined fields in the object.", + "properties": { + "eventname": { + "required": true, + "type": "string", + "description": "The name of the user event." + }, + "channel": { + "required": false, + "type": "Channel", + "description": "A channel that is signaled with the user event." + }, + "bridge": { + "required": false, + "type": "Bridge", + "description": "A bridge that is signaled with the user event." + }, + "endpoint": { + "required": false, + "type": "Endpoint", + "description": "A endpoint that is signaled with the user event." + }, + "userevent": { + "required": true, + "type": "object", + "description": "Custom Userevent data" + } + } + }, + "ChannelHangupRequest": { + "id": "ChannelHangupRequest", + "description": "A hangup was requested on the channel.", + "properties": { + "cause": { + "type": "int", + "description": "Integer representation of the cause of the hangup." + }, + "soft": { + "type": "boolean", + "description": "Whether the hangup request was a soft hangup request." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which the hangup was requested." + } + } + }, + "ChannelVarset": { + "id": "ChannelVarset", + "description": "Channel variable changed.", + "properties": { + "variable": { + "required": true, + "type": "string", + "description": "The variable that changed." + }, + "value": { + "required": true, + "type": "string", + "description": "The new value of the variable." + }, + "channel": { + "required": false, + "type": "Channel", + "description": "The channel on which the variable was set.\n\nIf missing, the variable is a global variable." + } + } + }, + "ChannelHold": { + "id": "ChannelHold", + "description": "A channel initiated a media hold.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that initiated the hold event." + }, + "musicclass": { + "required": false, + "type": "string", + "description": "The music on hold class that the initiator requested." + } + } + }, + "ChannelUnhold": { + "id": "ChannelUnhold", + "description": "A channel initiated a media unhold.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that initiated the unhold event." + } + } + }, + "ChannelTalkingStarted": { + "id": "ChannelTalkingStarted", + "description": "Talking was detected on the channel.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which talking started." + } + } + }, + "ChannelTalkingFinished": { + "id": "ChannelTalkingFinished", + "description": "Talking is no longer detected on the channel.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which talking completed." + }, + "duration": { + "required": true, + "type": "int", + "description": "The length of time, in milliseconds, that talking was detected on the channel" + } + } + }, + "ContactStatusChange": { + "id": "ContactStatusChange", + "description": "The state of a contact on an endpoint has changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + }, + "contact_info": { + "required": true, + "type": "ContactInfo" + } + } + }, + "PeerStatusChange": { + "id": "PeerStatusChange", + "description": "The state of a peer associated with an endpoint has changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + }, + "peer": { + "required": true, + "type": "Peer" + } + } + }, + "EndpointStateChange": { + "id": "EndpointStateChange", + "description": "Endpoint state changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + } + } + }, + "Dial": { + "id": "Dial", + "description": "Dialing state has changed.", + "properties": { + "caller": { + "required": false, + "type": "Channel", + "description": "The calling channel." + }, + "peer": { + "required": true, + "type": "Channel", + "description": "The dialed channel." + }, + "forward": { + "required": false, + "type": "string", + "description": "Forwarding target requested by the original dialed channel." + }, + "forwarded": { + "required": false, + "type": "Channel", + "description": "Channel that the caller has been forwarded to." + }, + "dialstring": { + "required": false, + "type": "string", + "description": "The dial string for calling the peer channel." + }, + "dialstatus": { + "required": true, + "type": "string", + "description": "Current status of the dialing attempt to the peer." + } + } + }, + "StasisEnd": { + "id": "StasisEnd", + "description": "Notification that a channel has left a Stasis application.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "StasisStart": { + "id": "StasisStart", + "description": "Notification that a channel has entered a Stasis application.", + "properties": { + "args": { + "required": true, + "type": "List[string]", + "description": "Arguments to the application" + }, + "channel": { + "required": true, + "type": "Channel" + }, + "replace_channel": { + "required": false, + "type": "Channel" + } + } + }, + "TextMessageReceived": { + "id": "TextMessageReceived", + "description": "A text message was received from an endpoint.", + "properties": { + "message": { + "required": true, + "type": "TextMessage" + }, + "endpoint": { + "required": false, + "type": "Endpoint" + } + } + }, + "ChannelConnectedLine": { + "id": "ChannelConnectedLine", + "description": "Channel changed Connected Line.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel whose connected line has changed." + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_10_0/mailboxes.json b/codegen/src/main/resources/codegen-data/ari_1_10_0/mailboxes.json new file mode 100644 index 00000000..999cd8db --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_10_0/mailboxes.json @@ -0,0 +1,134 @@ +{ + "_copyright": "Copyright (C) 2013, Digium, Inc.", + "_author": "Jonathan Rose ", + "_svn_revision": "$Revision$", + "apiVersion": "1.10.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/mailboxes.{format}", + "apis": [ + { + "path": "/mailboxes", + "description": "Mailboxes", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all mailboxes.", + "nickname": "list", + "responseClass": "List[Mailbox]" + } + ] + }, + { + "path": "/mailboxes/{mailboxName}", + "description": "Mailbox state", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve the current state of a mailbox.", + "nickname": "get", + "responseClass": "Mailbox", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Change the state of a mailbox. (Note - implicitly creates the mailbox).", + "nickname": "update", + "responseClass": "void", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "oldMessages", + "description": "Count of old messages in the mailbox", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "newMessages", + "description": "Count of new messages in the mailbox", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "int" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Destroy a mailbox.", + "nickname": "delete", + "responseClass": "void", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + } + ] + } + ], + "models": { + "Mailbox": { + "id": "Mailbox", + "description": "Represents the state of a mailbox.", + "properties": { + "name": { + "type": "string", + "description": "Name of the mailbox.", + "required": true + }, + "old_messages": { + "type": "int", + "description": "Count of old messages in the mailbox.", + "required": true + }, + "new_messages": { + "type": "int", + "description": "Count of new messages in the mailbox.", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_10_0/playbacks.json b/codegen/src/main/resources/codegen-data/ari_1_10_0/playbacks.json new file mode 100644 index 00000000..1a124325 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_10_0/playbacks.json @@ -0,0 +1,155 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.10.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/playbacks.{format}", + "apis": [ + { + "path": "/playbacks/{playbackId}", + "description": "Control object for a playback operation.", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a playback's details.", + "nickname": "get", + "responseClass": "Playback", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "The playback cannot be found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop a playback.", + "nickname": "stop", + "responseClass": "void", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "The playback cannot be found" + } + ] + } + ] + }, + { + "path": "/playbacks/{playbackId}/control", + "description": "Control object for a playback operation.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Control a playback.", + "nickname": "control", + "responseClass": "void", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "operation", + "description": "Operation to perform on the playback.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "restart", + "pause", + "unpause", + "reverse", + "forward" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "The provided operation parameter was invalid" + }, + { + "code": 404, + "reason": "The playback cannot be found" + }, + { + "code": 409, + "reason": "The operation cannot be performed in the playback's current state" + } +] + } + ] + } + ], + "models": { + "Playback": { + "id": "Playback", + "description": "Object representing the playback of media to a channel", + "properties": { + "id": { + "type": "string", + "description": "ID for this playback operation", + "required": true + }, + "media_uri": { + "type": "string", + "description": "URI for the media to play back.", + "required": true + }, + "target_uri": { + "type": "string", + "description": "URI for the channel or bridge to play the media on", + "required": true + }, + "language": { + "type": "string", + "description": "For media types that support multiple languages, the language requested for playback." + }, + "state": { + "type": "string", + "description": "Current state of the playback operation.", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "queued", + "playing", + "complete" + ] + } + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_10_0/recordings.json b/codegen/src/main/resources/codegen-data/ari_1_10_0/recordings.json new file mode 100644 index 00000000..48499bfa --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_10_0/recordings.json @@ -0,0 +1,378 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.10.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/recordings.{format}", + "apis": [ + { + "path": "/recordings/stored", + "description": "Recordings", + "operations": [ + { + "httpMethod": "GET", + "summary": "List recordings that are complete.", + "nickname": "listStored", + "responseClass": "List[StoredRecording]" + } + ] + }, + { + "path": "/recordings/stored/{recordingName}", + "description": "Individual recording", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a stored recording's details.", + "nickname": "getStored", + "responseClass": "StoredRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Delete a stored recording.", + "nickname": "deleteStored", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/stored/{recordingName}/copy", + "description": "Copy an individual recording", + "operations": [ + { + "httpMethod": "POST", + "summary": "Copy a stored recording.", + "nickname": "copyStored", + "responseClass": "StoredRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording to copy", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "destinationRecordingName", + "description": "The destination name of the recording", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "A recording with the same name already exists on the system" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}", + "description": "A recording that is in progress", + "operations": [ + { + "httpMethod": "GET", + "summary": "List live recordings.", + "nickname": "getLive", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop a live recording and discard it.", + "nickname": "cancel", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/stop", + "operations": [ + { + "httpMethod": "POST", + "summary": "Stop a live recording and store it.", + "nickname": "stop", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/pause", + "operations": [ + { + "httpMethod": "POST", + "summary": "Pause a live recording.", + "notes": "Pausing a recording suspends silence detection, which will be restarted when the recording is unpaused. Paused time is not included in the accounting for maxDurationSeconds.", + "nickname": "pause", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unpause a live recording.", + "nickname": "unpause", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/mute", + "operations": [ + { + "httpMethod": "POST", + "summary": "Mute a live recording.", + "notes": "Muting a recording suspends silence detection, which will be restarted when the recording is unmuted.", + "nickname": "mute", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unmute a live recording.", + "nickname": "unmute", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + } + ] + } + ], + "models": { + "StoredRecording": { + "id": "StoredRecording", + "description": "A past recording that may be played back.", + "properties": { + "name": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + }, + "LiveRecording": { + "id": "LiveRecording", + "description": "A recording that is in progress", + "properties": { + "name": { + "required": true, + "type": "string", + "description": "Base name for the recording" + }, + "format": { + "required": true, + "type": "string", + "description": "Recording format (wav, gsm, etc.)" + }, + "target_uri": { + "required": true, + "type": "string", + "description": "URI for the channel or bridge being recorded" + }, + "state": { + "required": true, + "type": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "queued", + "recording", + "paused", + "done", + "failed", + "canceled" + ] + } + }, + "duration": { + "required": false, + "type": "int", + "description": "Duration in seconds of the recording" + }, + "talking_duration": { + "required": false, + "type": "int", + "description": "Duration of talking, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds." + }, + "silence_duration": { + "required": false, + "type": "int", + "description": "Duration of silence, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds." + }, + "cause": { + "required": false, + "type": "string", + "description": "Cause for recording failure if failed" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_10_0/sounds.json b/codegen/src/main/resources/codegen-data/ari_1_10_0/sounds.json new file mode 100644 index 00000000..4a8eb2cc --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_10_0/sounds.json @@ -0,0 +1,99 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.10.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/sounds.{format}", + "apis": [ + { + "path": "/sounds", + "description": "Sounds", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all sounds.", + "nickname": "list", + "responseClass": "List[Sound]", + "parameters": [ + { + "name": "lang", + "description": "Lookup sound for a specific language.", + "paramType": "query", + "dataType": "string", + "required": false + }, + { + "name": "format", + "description": "Lookup sound in a specific format.", + "paramType": "query", + "dataType": "string", + "required": false, + "__note": "core show translation can show translation paths between formats, along with relative costs. so this could be just installed format, or we could follow that for transcoded formats." + } + ] + } + ] + }, + { + "path": "/sounds/{soundId}", + "description": "Individual sound", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a sound's details.", + "nickname": "get", + "responseClass": "Sound", + "parameters": [ + { + "name": "soundId", + "description": "Sound's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ] + } + ] + } + ], + "models": { + "FormatLangPair": { + "id": "FormatLangPair", + "description": "Identifies the format and language of a sound file", + "properties": { + "language": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + }, + "Sound": { + "id": "Sound", + "description": "A media file that may be played back.", + "properties": { + "id": { + "required": true, + "description": "Sound's identifier.", + "type": "string" + }, + "text": { + "required": false, + "description": "Text description of the sound, usually the words spoken.", + "type": "string" + }, + "formats": { + "required": true, + "description": "The formats and languages in which this sound is available.", + "type": "List[FormatLangPair]" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_10_1/applications.json b/codegen/src/main/resources/codegen-data/ari_1_10_1/applications.json new file mode 100644 index 00000000..ef61b821 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_10_1/applications.json @@ -0,0 +1,223 @@ +{ + "_copyright": "Copyright (C) 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.10.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/applications.{format}", + "apis": [ + { + "path": "/applications", + "description": "Stasis applications", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all applications.", + "nickname": "list", + "responseClass": "List[Application]" + } + ] + }, + { + "path": "/applications/{applicationName}", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get details of an application.", + "nickname": "get", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Application does not exist." + } + ] + } + ] + }, + { + "path": "/applications/{applicationName}/subscription", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "POST", + "summary": "Subscribe an application to a event source.", + "notes": "Returns the state of the application after the subscriptions have changed", + "nickname": "subscribe", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "eventSource", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing parameter." + }, + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 422, + "reason": "Event source does not exist." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unsubscribe an application from an event source.", + "notes": "Returns the state of the application after the subscriptions have changed", + "nickname": "unsubscribe", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "eventSource", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing parameter; event source scheme not recognized." + }, + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 409, + "reason": "Application not subscribed to event source." + }, + { + "code": 422, + "reason": "Event source does not exist." + } + ] + } + ] + }, + { + "path": "/applications/{applicationName}/eventFilter", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Filter application events types.", + "notes": "Allowed and/or disallowed event type filtering can be done. The body (parameter) should specify a JSON key/value object that describes the type of event filtering needed. One, or both of the following keys can be designated:

\"allowed\" - Specifies an allowed list of event types
\"disallowed\" - Specifies a disallowed list of event types

Further, each of those key's value should be a JSON array that holds zero, or more JSON key/value objects. Each of these objects must contain the following key with an associated value:

\"type\" - The type name of the event to filter

The value must be the string name (case sensitive) of the event type that needs filtering. For example:

{ \"allowed\": [ { \"type\": \"StasisStart\" }, { \"type\": \"StasisEnd\" } ] }

As this specifies only an allowed list, then only those two event type messages are sent to the application. No other event messages are sent.

The following rules apply:

* If the body is empty, both the allowed and disallowed filters are set empty.
* If both list types are given then both are set to their respective values (note, specifying an empty array for a given type sets that type to empty).
* If only one list type is given then only that type is set. The other type is not updated.
* An empty \"allowed\" list means all events are allowed.
* An empty \"disallowed\" list means no events are disallowed.
* Disallowed events take precedence over allowed events if the event type is specified in both lists.", + "nickname": "filter", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "filter", + "description": "Specify which event types to allow/disallow", + "paramType": "body", + "required": false, + "dataType": "object", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Bad request." + }, + { + "code": 404, + "reason": "Application does not exist." + } + ] + } + ] + } + ], + "models": { + "Application": { + "id": "Application", + "description": "Details of a Stasis application", + "properties": { + "name": { + "type": "string", + "description": "Name of this application", + "required": true + }, + "channel_ids": { + "type": "List[string]", + "description": "Id's for channels subscribed to.", + "required": true + }, + "bridge_ids": { + "type": "List[string]", + "description": "Id's for bridges subscribed to.", + "required": true + }, + "endpoint_ids": { + "type": "List[string]", + "description": "{tech}/{resource} for endpoints subscribed to.", + "required": true + }, + "device_names": { + "type": "List[string]", + "description": "Names of the devices subscribed to.", + "required": true + }, + "events_allowed": { + "type": "List[object]", + "description": "Event types sent to the application.", + "required": true + }, + "events_disallowed": { + "type": "List[object]", + "description": "Event types not sent to the application.", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_10_1/asterisk.json b/codegen/src/main/resources/codegen-data/ari_1_10_1/asterisk.json new file mode 100644 index 00000000..226c48e8 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_10_1/asterisk.json @@ -0,0 +1,725 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.10.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/asterisk.{format}", + "apis": [ + { + "path": "/asterisk/config/dynamic/{configClass}/{objectType}/{id}", + "description": "Asterisk dynamic configuration", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve a dynamic configuration object.", + "nickname": "getObject", + "responseClass": "List[ConfigTuple]", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to retrieve.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to retrieve.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "{configClass|objectType|id} not found" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Create or update a dynamic configuration object.", + "nickname": "updateObject", + "responseClass": "List[ConfigTuple]", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to create or update.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to create or update.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "fields", + "description": "The body object should have a value that is a list of ConfigTuples, which provide the fields to update. Ex. [ { \"attribute\": \"directmedia\", \"value\": \"false\" } ]", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Bad request body" + }, + { + "code": 403, + "reason": "Could not create or update object" + }, + { + "code": 404, + "reason": "{configClass|objectType} not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Delete a dynamic configuration object.", + "nickname": "deleteObject", + "responseClass": "void", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to delete.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to delete.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 403, + "reason": "Could not delete object" + }, + { + "code": 404, + "reason": "{configClass|objectType|id} not found" + } + ] + } + ] + }, + { + "path": "/asterisk/info", + "description": "Asterisk system information (similar to core show settings)", + "operations": [ + { + "httpMethod": "GET", + "summary": "Gets Asterisk system information.", + "nickname": "getInfo", + "responseClass": "AsteriskInfo", + "parameters": [ + { + "name": "only", + "description": "Filter information returned", + "paramType": "query", + "required": false, + "allowMultiple": true, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "build", + "system", + "config", + "status" + ] + } + } + ] + } + ] + }, + { + "path": "/asterisk/ping", + "description": "Asterisk ping", + "operations": [ + { + "httpMethod": "GET", + "summary": "Response pong message.", + "nickname": "ping", + "responseClass": "AsteriskPing" + } + ] + }, + { + "path": "/asterisk/modules", + "description": "Asterisk modules", + "operations": [ + { + "httpMethod": "GET", + "summary": "List Asterisk modules.", + "nickname": "listModules", + "responseClass": "List[Module]" + } + ] + }, + { + "path": "/asterisk/modules/{moduleName}", + "description": "Asterisk module", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get Asterisk module information.", + "nickname": "getModule", + "responseClass": "Module", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module could not be found in running modules." + }, + { + "code": 409, + "reason": "Module information could not be retrieved." + } + ] + }, + { + "httpMethod": "POST", + "summary": "Load an Asterisk module.", + "nickname": "loadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 409, + "reason": "Module could not be loaded." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unload an Asterisk module.", + "nickname": "unloadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module not found in running modules." + }, + { + "code": 409, + "reason": "Module could not be unloaded." + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Reload an Asterisk module.", + "nickname": "reloadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module not found in running modules." + }, + { + "code": 409, + "reason": "Module could not be reloaded." + } + ] + } + ] + }, + { + "path": "/asterisk/logging", + "description": "Asterisk log channels", + "operations": [ + { + "httpMethod": "GET", + "summary": "Gets Asterisk log channel information.", + "nickname": "listLogChannels", + "responseClass": "List[LogChannel]" + } + ] + }, + { + "path": "/asterisk/logging/{logChannelName}", + "description": "Asterisk log channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Adds a log channel.", + "nickname": "addLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "The log channel to add", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "configuration", + "description": "levels of the log channel", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Bad request body" + }, + { + "code": 409, + "reason": "Log channel could not be created." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Deletes a log channel.", + "nickname": "deleteLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "Log channels name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Log channel does not exist." + } + ] + } + ] + }, + { + "path": "/asterisk/logging/{logChannelName}/rotate", + "description": "Asterisk log channel", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Rotates a log channel.", + "nickname": "rotateLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "Log channel's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Log channel does not exist." + } + ] + } + ] + }, + { + "path": "/asterisk/variable", + "description": "Global variables", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the value of a global variable.", + "nickname": "getGlobalVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "variable", + "description": "The variable to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + } + ] + }, + { + "httpMethod": "POST", + "summary": "Set the value of a global variable.", + "nickname": "setGlobalVar", + "responseClass": "void", + "parameters": [ + { + "name": "variable", + "description": "The variable to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + } + ] + } + ] + } + ], + "models": { + "BuildInfo": { + "id": "BuildInfo", + "description": "Info about how Asterisk was built", + "properties": { + "os": { + "required": true, + "type": "string", + "description": "OS Asterisk was built on." + }, + "kernel": { + "required": true, + "type": "string", + "description": "Kernel version Asterisk was built on." + }, + "options": { + "required": true, + "type": "string", + "description": "Compile time options, or empty string if default." + }, + "machine": { + "required": true, + "type": "string", + "description": "Machine architecture (x86_64, i686, ppc, etc.)" + }, + "date": { + "required": true, + "type": "string", + "description": "Date and time when Asterisk was built." + }, + "user": { + "required": true, + "type": "string", + "description": "Username that build Asterisk" + } + } + }, + "SystemInfo": { + "id": "SystemInfo", + "description": "Info about Asterisk", + "properties": { + "version": { + "required": true, + "type": "string", + "description": "Asterisk version." + }, + "entity_id": { + "required": true, + "type": "string", + "description": "" + } + } + }, + "SetId": { + "id": "SetId", + "description": "Effective user/group id", + "properties": { + "user": { + "required": true, + "type": "string", + "description": "Effective user id." + }, + "group": { + "required": true, + "type": "string", + "description": "Effective group id." + } + } + }, + "ConfigInfo": { + "id": "ConfigInfo", + "description": "Info about Asterisk configuration", + "properties": { + "name": { + "required": true, + "type": "string", + "description": "Asterisk system name." + }, + "default_language": { + "required": true, + "type": "string", + "description": "Default language for media playback." + }, + "max_channels": { + "required": false, + "type": "int", + "description": "Maximum number of simultaneous channels." + }, + "max_open_files": { + "required": false, + "type": "int", + "description": "Maximum number of open file handles (files, sockets)." + }, + "max_load": { + "required": false, + "type": "double", + "description": "Maximum load avg on system." + }, + "setid": { + "required": true, + "type": "SetId", + "description": "Effective user/group id for running Asterisk." + } + } + }, + "StatusInfo": { + "id": "StatusInfo", + "description": "Info about Asterisk status", + "properties": { + "startup_time": { + "required": true, + "type": "Date", + "description": "Time when Asterisk was started." + }, + "last_reload_time": { + "required": true, + "type": "Date", + "description": "Time when Asterisk was last reloaded." + } + } + }, + "AsteriskInfo": { + "id": "AsteriskInfo", + "description": "Asterisk system information", + "properties": { + "build": { + "required": false, + "type": "BuildInfo", + "description": "Info about how Asterisk was built" + }, + "system": { + "required": false, + "type": "SystemInfo", + "description": "Info about the system running Asterisk" + }, + "config": { + "required": false, + "type": "ConfigInfo", + "description": "Info about Asterisk configuration" + }, + "status": { + "required": false, + "type": "StatusInfo", + "description": "Info about Asterisk status" + } + } + }, + "AsteriskPing": { + "id": "AsteriskPing", + "description": "Asterisk ping information", + "properties": { + "asterisk_id": { + "required": true, + "type": "string", + "description": "Asterisk id info" + }, + "ping": { + "required": true, + "type": "string", + "description": "Always string value is pong" + }, + "timestamp": { + "required": true, + "type": "string", + "description": "The timestamp string of request received time" + } + } + }, + "Module": { + "id": "Module", + "description": "Details of an Asterisk module", + "properties": { + "name": { + "type": "string", + "description": "The name of this module", + "required": true + }, + "description": { + "type": "string", + "description": "The description of this module", + "required": true + }, + "use_count": { + "type": "int", + "description": "The number of times this module is being used", + "required": true + }, + "status": { + "type": "string", + "description": "The running status of this module", + "required": true + }, + "support_level": { + "type": "string", + "description": "The support state of this module", + "required": true + } + } + }, + "LogChannel": { + "id": "LogChannel", + "description": "Details of an Asterisk log channel", + "properties": { + "channel": { + "type": "string", + "description": "The log channel path", + "required": true + }, + "type": { + "type": "string", + "description": "Types of logs for the log channel", + "required": true + }, + "status": { + "type": "string", + "description": "Whether or not a log type is enabled", + "required": true + }, + "configuration": { + "type": "string", + "description": "The various log levels", + "required": true + } + } + }, + "Variable": { + "id": "Variable", + "description": "The value of a channel variable", + "properties": { + "value": { + "required": true, + "type": "string", + "description": "The value of the variable requested" + } + } + }, + "ConfigTuple": { + "id": "ConfigTuple", + "description": "A key/value pair that makes up part of a configuration object.", + "properties": { + "attribute": { + "required": true, + "type": "string", + "description": "A configuration object attribute." + }, + "value": { + "required": true, + "type": "string", + "description": "The value for the attribute." + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_10_1/bridges.json b/codegen/src/main/resources/codegen-data/ari_1_10_1/bridges.json new file mode 100644 index 00000000..78bd3afa --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_10_1/bridges.json @@ -0,0 +1,743 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.10.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/bridges.{format}", + "apis": [ + { + "path": "/bridges", + "description": "Active bridges", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all active bridges in Asterisk.", + "nickname": "list", + "responseClass": "List[Bridge]" + }, + { + "httpMethod": "POST", + "summary": "Create a new bridge.", + "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", + "nickname": "create", + "responseClass": "Bridge", + "parameters": [ + { + "name": "type", + "description": "Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "bridgeId", + "description": "Unique ID to give to the bridge being created.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Name to give to the bridge being created.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}", + "description": "Individual bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Create a new bridge or updates an existing one.", + "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", + "nickname": "createWithId", + "responseClass": "Bridge", + "parameters": [ + { + "name": "type", + "description": "Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media) to set.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "bridgeId", + "description": "Unique ID to give to the bridge being created.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Set the name of the bridge.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ] + }, + { + "httpMethod": "GET", + "summary": "Get bridge details.", + "nickname": "get", + "responseClass": "Bridge", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Shut down a bridge.", + "notes": "If any channels are in this bridge, they will be removed and resume whatever they were doing beforehand.", + "nickname": "destroy", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/addChannel", + "description": "Add a channel to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Add a channel to a bridge.", + "nickname": "addChannel", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channel", + "description": "Ids of channels to add to bridge", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "role", + "description": "Channel's role in the bridge", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Channel not found" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application; Channel currently recording" + }, + { + "code": 422, + "reason": "Channel not in Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/removeChannel", + "description": "Remove a channel from a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Remove a channel from a bridge.", + "nickname": "removeChannel", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channel", + "description": "Ids of channels to remove from bridge", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Channel not found" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + }, + { + "code": 422, + "reason": "Channel not in this bridge" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/videoSource/{channelId}", + "description": "Set a channel as the video source in a multi-party bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Set a channel as the video source in a multi-party mixing bridge. This operation has no effect on bridges with two or fewer participants.", + "nickname": "setVideoSource", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge or Channel not found" + }, + { + "code": 409, + "reason": "Channel not in Stasis application" + }, + { + "code": 422, + "reason": "Channel not in this Bridge" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/videoSource", + "description": "Removes any explicit video source", + "operations": [ + { + "httpMethod": "DELETE", + "summary": "Removes any explicit video source in a multi-party mixing bridge. This operation has no effect on bridges with two or fewer participants. When no explicit video source is set, talk detection will be used to determine the active video stream.", + "nickname": "clearVideoSource", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/moh", + "description": "Play music on hold to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play music on hold to a bridge or change the MOH class that is playing.", + "nickname": "startMoh", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "mohClass", + "description": "Channel's id", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing music on hold to a bridge.", + "notes": "This will only stop music on hold being played via POST bridges/{bridgeId}/moh.", + "nickname": "stopMoh", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/play", + "description": "Play media to the participants of a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media on a bridge.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "play", + "responseClass": "Playback", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media's URI to play.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of media to skip before playing.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "playbackId", + "description": "Playback Id.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/play/{playbackId}", + "description": "Play media to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media on a bridge.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "playWithId", + "responseClass": "Playback", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media's URI to play.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of media to skip before playing.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + + } + ] + }, + { + "path": "/bridges/{bridgeId}/record", + "description": "Record audio on a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start a recording.", + "notes": "This records the mixed audio from all channels participating in this bridge.", + "nickname": "record", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Recording's filename", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "maxDurationSeconds", + "description": "Maximum duration of the recording, in seconds. 0 for no limit.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "maxSilenceSeconds", + "description": "Maximum duration of silence, in seconds. 0 for no limit.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "ifExists", + "description": "Action to take if a recording with the same name already exists.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "fail", + "allowableValues": { + "valueType": "LIST", + "values": [ + "fail", + "overwrite", + "append" + ] + } + }, + { + "name": "beep", + "description": "Play beep when recording begins", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "terminateOn", + "description": "DTMF input to terminate recording.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "any", + "*", + "#" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge is not in a Stasis application; A recording with the same name already exists on the system and can not be overwritten because it is in progress or ifExists=fail" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + } + ], + "models": { + "Bridge": { + "id": "Bridge", + "description": "The merging of media from one or more channels.\n\nEveryone on the bridge receives the same audio.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for this bridge", + "required": true + }, + "technology": { + "type": "string", + "description": "Name of the current bridging technology", + "required": true + }, + "bridge_type": { + "type": "string", + "description": "Type of bridge technology", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "mixing", + "holding" + ] + } + }, + "bridge_class": { + "type": "string", + "description": "Bridging class", + "required": true + }, + "creator": { + "type": "string", + "description": "Entity that created the bridge", + "required": true + }, + "name": { + "type": "string", + "description": "Name the creator gave the bridge", + "required": true + }, + "channels": { + "type": "List[string]", + "description": "Ids of channels participating in this bridge", + "required": true + }, + "video_mode": { + "type": "string", + "description": "The video mode the bridge is using. One of 'none', 'talker', or 'single'.", + "required": false + }, + "video_source_id": { + "type": "string", + "description": "The ID of the channel that is the source of video in this bridge, if one exists.", + "required": false + }, + "creationtime": { + "required": true, + "type": "Date", + "description": "Timestamp when bridge was created" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_10_1/channels.json b/codegen/src/main/resources/codegen-data/ari_1_10_1/channels.json new file mode 100644 index 00000000..afe95dc2 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_10_1/channels.json @@ -0,0 +1,1621 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.10.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/channels.{format}", + "apis": [ + { + "path": "/channels", + "description": "Active channels", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all active channels in Asterisk.", + "nickname": "list", + "responseClass": "List[Channel]" + }, + { + "httpMethod": "POST", + "summary": "Create a new channel (originate).", + "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.", + "nickname": "originate", + "responseClass": "Channel", + "parameters": [ + { + "name": "endpoint", + "description": "Endpoint to call.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to dial after the endpoint answers. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to dial after the endpoint answers. If omitted, uses 'default'. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to dial after the endpoint answers. If omitted, uses 1. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "long" + }, + { + "name": "label", + "description": "The label to dial after the endpoint answers. Will supersede 'priority' if provided. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The application that is subscribed to the originated channel. When the channel is answered, it will be passed to this Stasis application. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "callerId", + "description": "CallerID to use when dialing the endpoint or extension.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 30 + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "The unique id of the channel which is originating this one.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "formats", + "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for originating a channel." + }, + { + "code": 409, + "reason": "Channel with given unique ID already exists." + } + ] + } + ] + }, + { + "path": "/channels/{channelId}", + "description": "Active channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "Channel details.", + "nickname": "get", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + } + ] + }, + { + "httpMethod": "POST", + "summary": "Create a new channel (originate with id).", + "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.", + "nickname": "originateWithId", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "endpoint", + "description": "Endpoint to call.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to dial after the endpoint answers. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to dial after the endpoint answers. If omitted, uses 'default'. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to dial after the endpoint answers. If omitted, uses 1. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "long" + }, + { + "name": "label", + "description": "The label to dial after the endpoint answers. Will supersede 'priority' if provided. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The application that is subscribed to the originated channel. When the channel is answered, it will be passed to this Stasis application. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "callerId", + "description": "CallerID to use when dialing the endpoint or extension.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 30 + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "The unique id of the channel which is originating this one.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "formats", + "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for originating a channel." + }, + { + "code": 409, + "reason": "Channel with given unique ID already exists." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Delete (i.e. hangup) a channel.", + "nickname": "hangup", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "reason", + "description": "Reason for hanging up the channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defalutValue": "normal", + "allowableValues": { + "valueType": "LIST", + "values": [ + "normal", + "busy", + "congestion", + "no_answer" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid reason for hangup provided" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/continue", + "description": "Exit application; continue execution in the dialplan", + "operations": [ + { + "httpMethod": "POST", + "summary": "Exit application; continue execution in the dialplan.", + "nickname": "continueInDialplan", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "label", + "description": "The label to continue to - will supersede 'priority' if both are provided.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/move", + "description": "Move the channel from one Stasis application to another.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Move the channel from one Stasis application to another.", + "nickname": "move", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The channel will be passed to this Stasis application.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": "404", + "reason": "Channel not found" + }, + { + "code": "409", + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/redirect", + "description": "Inform the channel that it should redirect itself to a different location. Note that this will almost certainly cause the channel to exit the application.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Redirect the channel to a different location.", + "nickname": "redirect", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "endpoint", + "description": "The endpoint to redirect the channel to", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Endpoint parameter not provided" + }, + { + "code": 404, + "reason": "Channel or endpoint not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 422, + "reason": "Endpoint is not the same type as the channel" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/answer", + "description": "Answer a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Answer a channel.", + "nickname": "answer", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/ring", + "description": "Send a ringing indication to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Indicate ringing to a channel.", + "nickname": "ring", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop ringing indication on a channel if locally generated.", + "nickname": "ringStop", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/dtmf", + "description": "Send DTMF to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Send provided DTMF to a given channel.", + "nickname": "sendDTMF", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "dtmf", + "description": "DTMF To send.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "before", + "description": "Amount of time to wait before DTMF digits (specified in milliseconds) start.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0 + }, + { + "name": "between", + "description": "Amount of time in between DTMF digits (specified in milliseconds).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 100 + }, + { + "name": "duration", + "description": "Length of each DTMF digit (specified in milliseconds).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 100 + }, + { + "name": "after", + "description": "Amount of time to wait after DTMF digits (specified in milliseconds) end.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0 + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "DTMF is required" + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/mute", + "description": "Mute a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Mute a channel.", + "nickname": "mute", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "Direction in which to mute audio", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both", + "in", + "out" + ] + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unmute a channel.", + "nickname": "unmute", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "Direction in which to unmute audio", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both", + "in", + "out" + ] + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/hold", + "description": "Put a channel on hold", + "operations": [ + { + "httpMethod": "POST", + "summary": "Hold a channel.", + "nickname": "hold", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Remove a channel from hold.", + "nickname": "unhold", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/moh", + "description": "Play music on hold to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play music on hold to a channel.", + "notes": "Using media operations such as /play on a channel playing MOH in this manner will suspend MOH without resuming automatically. If continuing music on hold is desired, the stasis application must reinitiate music on hold.", + "nickname": "startMoh", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "mohClass", + "description": "Music on hold class to use", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing music on hold to a channel.", + "nickname": "stopMoh", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/silence", + "description": "Play silence to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play silence to a channel.", + "notes": "Using media operations such as /play on a channel playing silence in this manner will suspend silence without resuming automatically.", + "nickname": "startSilence", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing silence to a channel.", + "nickname": "stopSilence", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/play", + "description": "Play media to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "play", + "responseClass": "Playback", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media's URI to play.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of media to skip before playing.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000 + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/play/{playbackId}", + "description": "Play media to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media and specify the playbackId.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "playWithId", + "responseClass": "Playback", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media's URI to play.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of media to skip before playing.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000 + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/record", + "description": "Record audio from a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start a recording.", + "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.", + "nickname": "record", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Recording's filename", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "maxDurationSeconds", + "description": "Maximum duration of the recording, in seconds. 0 for no limit", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "maxSilenceSeconds", + "description": "Maximum duration of silence, in seconds. 0 for no limit", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "ifExists", + "description": "Action to take if a recording with the same name already exists.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "fail", + "allowableValues": { + "valueType": "LIST", + "values": [ + "fail", + "overwrite", + "append" + ] + } + }, + { + "name": "beep", + "description": "Play beep when recording begins", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "terminateOn", + "description": "DTMF input to terminate recording", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "any", + "*", + "#" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "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" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/variable", + "description": "Variables on a channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the value of a channel variable or function.", + "nickname": "getChannelVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The channel variable or function to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Channel or variable not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "POST", + "summary": "Set the value of a channel variable or function.", + "nickname": "setChannelVar", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The channel variable or function to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/snoop", + "description": "Snoop (spy/whisper) on a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start snooping.", + "notes": "Snoop (spy/whisper) on a specific channel.", + "nickname": "snoopChannel", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "spy", + "description": "Direction of audio to spy on", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "whisper", + "description": "Direction of audio to whisper into", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "app", + "description": "Application the snooping channel is placed into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "snoopId", + "description": "Unique ID to assign to snooping channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/snoop/{snoopId}", + "description": "Snoop (spy/whisper) on a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start snooping.", + "notes": "Snoop (spy/whisper) on a specific channel.", + "nickname": "snoopChannelWithId", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "snoopId", + "description": "Unique ID to assign to snooping channel", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "spy", + "description": "Direction of audio to spy on", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "whisper", + "description": "Direction of audio to whisper into", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "app", + "description": "Application the snooping channel is placed into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + } + ], + "models": { + "Dialed": { + "id": "Dialed", + "description": "Dialed channel information.", + "properties": {} + }, + "DialplanCEP": { + "id": "DialplanCEP", + "description": "Dialplan location (context/extension/priority)", + "properties": { + "context": { + "required": true, + "type": "string", + "description": "Context in the dialplan" + }, + "exten": { + "required": true, + "type": "string", + "description": "Extension in the dialplan" + }, + "priority": { + "required": true, + "type": "long", + "description": "Priority in the dialplan" + } + } + }, + "CallerID": { + "id": "CallerID", + "description": "Caller identification", + "properties": { + "name": { + "required": true, + "type": "string" + }, + "number": { + "required": true, + "type": "string" + } + } + }, + "Channel": { + "id": "Channel", + "description": "A specific communication connection between Asterisk and an Endpoint.", + "properties": { + "id": { + "required": true, + "type": "string", + "description": "Unique identifier of the channel.\n\nThis is the same as the Uniqueid field in AMI." + }, + "name": { + "required": true, + "type": "string", + "description": "Name of the channel (i.e. SIP/foo-0000a7e3)" + }, + "state": { + "required": true, + "type": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "Down", + "Rsrved", + "OffHook", + "Dialing", + "Ring", + "Ringing", + "Up", + "Busy", + "Dialing Offhook", + "Pre-ring", + "Unknown" + ] + } + }, + "caller": { + "required": true, + "type": "CallerID" + }, + "connected": { + "required": true, + "type": "CallerID" + }, + "accountcode": { + "required": true, + "type": "string" + }, + "dialplan": { + "required": true, + "type": "DialplanCEP", + "description": "Current location in the dialplan" + }, + "creationtime": { + "required": true, + "type": "Date", + "description": "Timestamp when channel was created" + }, + "language": { + "required": true, + "type": "string", + "description": "The default spoken language" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_10_1/deviceStates.json b/codegen/src/main/resources/codegen-data/ari_1_10_1/deviceStates.json new file mode 100644 index 00000000..16d3af75 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_10_1/deviceStates.json @@ -0,0 +1,151 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "Kevin Harwell ", + "_svn_revision": "$Revision$", + "apiVersion": "1.10.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/deviceStates.{format}", + "apis": [ + { + "path": "/deviceStates", + "description": "Device states", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all ARI controlled device states.", + "nickname": "list", + "responseClass": "List[DeviceState]" + } + ] + }, + { + "path": "/deviceStates/{deviceName}", + "description": "Device state", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve the current state of a device.", + "nickname": "get", + "responseClass": "DeviceState", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Change the state of a device controlled by ARI. (Note - implicitly creates the device state).", + "nickname": "update", + "responseClass": "void", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "deviceState", + "description": "Device state value", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "NOT_INUSE", + "INUSE", + "BUSY", + "INVALID", + "UNAVAILABLE", + "RINGING", + "RINGINUSE", + "ONHOLD" + ] + } + + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Device name is missing" + }, + { + "code": 409, + "reason": "Uncontrolled device specified" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Destroy a device-state controlled by ARI.", + "nickname": "delete", + "responseClass": "void", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Device name is missing" + }, + { + "code": 409, + "reason": "Uncontrolled device specified" + } + ] + } + ] + } + ], + "models": { + "DeviceState": { + "id": "DeviceState", + "description": "Represents the state of a device.", + "properties": { + "name": { + "type": "string", + "description": "Name of the device.", + "required": true + }, + "state": { + "type": "string", + "description": "Device's state", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "UNKNOWN", + "NOT_INUSE", + "INUSE", + "BUSY", + "INVALID", + "UNAVAILABLE", + "RINGING", + "RINGINUSE", + "ONHOLD" + ] + } + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_10_1/endpoints.json b/codegen/src/main/resources/codegen-data/ari_1_10_1/endpoints.json new file mode 100644 index 00000000..13a5beda --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_10_1/endpoints.json @@ -0,0 +1,279 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.10.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/endpoints.{format}", + "apis": [ + { + "path": "/endpoints", + "description": "Asterisk endpoints", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all endpoints.", + "nickname": "list", + "responseClass": "List[Endpoint]" + } + ] + }, + { + "path": "/endpoints/sendMessage", + "description": "Send a message to some technology URI or endpoint.", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Send a message to some technology URI or endpoint.", + "nickname": "sendMessage", + "responseClass": "void", + "parameters": [ + { + "name": "to", + "description": "The endpoint resource or technology specific URI to send the message to. Valid resources are sip, pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "from", + "description": "The endpoint resource or technology specific identity to send this message from. Valid resources are sip, pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "body", + "description": "The body of the message", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "descriptioni": "The \"variables\" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, pjsip and sip resource types will add the key/value pairs as SIP headers,", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoint not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}", + "description": "Asterisk endpoints", + "operations": [ + { + "httpMethod": "GET", + "summary": "List available endoints for a given endpoint technology.", + "nickname": "listByTech", + "responseClass": "List[Endpoint]", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoints (sip,iax2,...)", + "paramType": "path", + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Endpoints not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}/{resource}", + "description": "Single endpoint", + "operations": [ + { + "httpMethod": "GET", + "summary": "Details for an endpoint.", + "nickname": "get", + "responseClass": "Endpoint", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "resource", + "description": "ID of the endpoint", + "paramType": "path", + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoints not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}/{resource}/sendMessage", + "description": "Send a message to some endpoint in a technology.", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Send a message to some endpoint in a technology.", + "nickname": "sendMessageToEndpoint", + "responseClass": "void", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "resource", + "description": "ID of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "from", + "description": "The endpoint resource or technology specific identity to send this message from. Valid resources are sip, pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "body", + "description": "The body of the message", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "descriptioni": "The \"variables\" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, pjsip and sip resource types will add the key/value pairs as SIP headers,", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoint not found" + } + ] + } + ] + } + ], + "models": { + "Endpoint": { + "id": "Endpoint", + "description": "An external device that may offer/accept calls to/from Asterisk.\n\nUnlike most resources, which have a single unique identifier, an endpoint is uniquely identified by the technology/resource pair.", + "properties": { + "technology": { + "type": "string", + "description": "Technology of the endpoint", + "required": true + }, + "resource": { + "type": "string", + "description": "Identifier of the endpoint, specific to the given technology.", + "required": true + }, + "state": { + "type": "string", + "description": "Endpoint's state", + "required": false, + "allowableValues": { + "valueType": "LIST", + "values": [ + "unknown", + "offline", + "online" + ] + } + }, + "channel_ids": { + "type": "List[string]", + "description": "Id's of channels associated with this endpoint", + "required": true + } + } + }, + "TextMessageVariable": { + "id": "TextMessageVariable", + "description": "A key/value pair variable in a text message.", + "properties": { + "key": { + "type": "string", + "description": "A unique key identifying the variable.", + "required": true + }, + "value": { + "type": "string", + "description": "The value of the variable.", + "required": true + } + } + }, + "TextMessage": { + "id": "TextMessage", + "description": "A text message.", + "properties": { + "from": { + "type": "string", + "description": "A technology specific URI specifying the source of the message. For sip and pjsip technologies, any SIP URI can be specified. For xmpp, the URI must correspond to the client connection being used to send the message.", + "required": true + }, + "to": { + "type": "string", + "description": "A technology specific URI specifying the destination of the message. Valid technologies include sip, pjsip, and xmp. The destination of a message should be an endpoint.", + "required": true + }, + "body": { + "type": "string", + "description": "The text of the message.", + "required": true + }, + "variables": { + "type": "List[TextMessageVariable]", + "description": "Technology specific key/value pairs associated with the message.", + "required": false + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_10_1/events.json b/codegen/src/main/resources/codegen-data/ari_1_10_1/events.json new file mode 100644 index 00000000..24d55130 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_10_1/events.json @@ -0,0 +1,903 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.10.0", + "swaggerVersion": "1.2", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/events.{format}", + "apis": [ + { + "path": "/events", + "description": "Events from Asterisk to applications", + "operations": [ + { + "httpMethod": "GET", + "upgrade": "websocket", + "websocketProtocol": "ari", + "summary": "WebSocket connection for events.", + "nickname": "eventWebsocket", + "responseClass": "Message", + "parameters": [ + { + "name": "app", + "description": "Applications to subscribe to.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "subscribeAll", + "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'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean" + } + ] + } + ] + }, + { + "path": "/events/user/{eventName}", + "description": "Stasis application user events", + "operations": [ + { + "httpMethod": "POST", + "summary": "Generate a user event.", + "nickname": "userEvent", + "responseClass": "void", + "parameters": [ + { + "name": "eventName", + "description": "Event name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "application", + "description": "The name of the application that will receive this event", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "source", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}/{resource}, deviceState:{deviceName}", + "paramType": "query", + "required": false, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds custom key/value pairs to add to the user event. Ex. { \"variables\": { \"key\": \"value\" } }", + "paramType": "body", + "required": false, + "allowMultiple": false, + "dataType": "containers" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 422, + "reason": "Event source not found." + }, + { + "code": 400, + "reason": "Invalid even tsource URI or userevent data." + } + ] + } + ] + } + ], + "models": { + "Message": { + "id": "Message", + "description": "Base type for errors and events", + "discriminator": "type", + "properties": { + "type": { + "type": "string", + "required": true, + "description": "Indicates the type of this message." + }, + "asterisk_id": { + "type": "string", + "required": false, + "description": "The unique ID for the Asterisk instance that raised this event." + } + }, + "subTypes": [ + "MissingParams", + "Event" + ] + }, + "MissingParams": { + "id": "MissingParams", + "description": "Error event sent when required params are missing.", + "properties": { + "params": { + "required": true, + "type": "List[string]", + "description": "A list of the missing parameters" + } + } + }, + "Event": { + "id": "Event", + "description": "Base type for asynchronous events from Asterisk.", + "properties": { + "application": { + "type": "string", + "description": "Name of the application receiving the event.", + "required": true + }, + "timestamp": { + "type": "Date", + "description": "Time at which this event was created.", + "required": true + } + }, + "subTypes": [ + "DeviceStateChanged", + "PlaybackStarted", + "PlaybackFinished", + "RecordingStarted", + "RecordingFinished", + "RecordingFailed", + "ApplicationMoveFailed", + "ApplicationReplaced", + "BridgeCreated", + "BridgeDestroyed", + "BridgeMerged", + "BridgeBlindTransfer", + "BridgeAttendedTransfer", + "BridgeVideoSourceChanged", + "ChannelCreated", + "ChannelDestroyed", + "ChannelEnteredBridge", + "ChannelLeftBridge", + "ChannelStateChange", + "ChannelDtmfReceived", + "ChannelDialplan", + "ChannelCallerId", + "ChannelUserevent", + "ChannelHangupRequest", + "ChannelVarset", + "ChannelTalkingStarted", + "ChannelTalkingFinished", + "ChannelHold", + "ChannelUnhold", + "ContactStatusChange", + "EndpointStateChange", + "Dial", + "StasisEnd", + "StasisStart", + "TextMessageReceived", + "ChannelConnectedLine", + "PeerStatusChange" + ] + }, + "ContactInfo": { + "id": "ContactInfo", + "description": "Detailed information about a contact on an endpoint.", + "properties": { + "uri": { + "type": "string", + "description": "The location of the contact.", + "required": true + }, + "contact_status": { + "type": "string", + "description": "The current status of the contact.", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "Unreachable", + "Reachable", + "Unknown", + "Created", + "Removed" + ] + } + }, + "aor": { + "type": "string", + "description": "The Address of Record this contact belongs to.", + "required": true + }, + "roundtrip_usec": { + "type": "string", + "description": "Current round trip time, in microseconds, for the contact.", + "required": false + } + } + }, + "Peer": { + "id": "Peer", + "description": "Detailed information about a remote peer that communicates with Asterisk.", + "properties": { + "peer_status": { + "type": "string", + "description": "The current state of the peer. Note that the values of the status are dependent on the underlying peer technology.", + "required": true + }, + "cause": { + "type": "string", + "description": "An optional reason associated with the change in peer_status.", + "required": false + }, + "address": { + "type": "string", + "description": "The IP address of the peer.", + "required": false + }, + "port": { + "type": "string", + "description": "The port of the peer.", + "required": false + }, + "time": { + "type": "string", + "description": "The last known time the peer was contacted.", + "required": false + } + } + }, + "DeviceStateChanged": { + "id": "DeviceStateChanged", + "description": "Notification that a device state has changed.", + "properties": { + "device_state": { + "type": "DeviceState", + "description": "Device state object", + "required": true + } + } + }, + "PlaybackStarted": { + "id": "PlaybackStarted", + "description": "Event showing the start of a media playback operation.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "PlaybackFinished": { + "id": "PlaybackFinished", + "description": "Event showing the completion of a media playback operation.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "RecordingStarted": { + "id": "RecordingStarted", + "description": "Event showing the start of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "RecordingFinished": { + "id": "RecordingFinished", + "description": "Event showing the completion of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "RecordingFailed": { + "id": "RecordingFailed", + "description": "Event showing failure of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "ApplicationMoveFailed": { + "id": "ApplicationMoveFailed", + "description": "Notification that trying to move a channel to another Stasis application failed.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + }, + "destination": { + "required": true, + "type": "string" + }, + "args": { + "required": true, + "type": "List[string]", + "description": "Arguments to the application" + } + } + }, + "ApplicationReplaced": { + "id": "ApplicationReplaced", + "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.", + "properties": {} + }, + "BridgeCreated": { + "id": "BridgeCreated", + "description": "Notification that a bridge has been created.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeDestroyed": { + "id": "BridgeDestroyed", + "description": "Notification that a bridge has been destroyed.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeMerged": { + "id": "BridgeMerged", + "description": "Notification that one bridge has merged into another.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "bridge_from": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeVideoSourceChanged": { + "id": "BridgeVideoSourceChanged", + "description": "Notification that the source of video in a bridge has changed.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "old_video_source_id": { + "required": false, + "type": "string" + } + } + }, + "BridgeBlindTransfer": { + "id": "BridgeBlindTransfer", + "description": "Notification that a blind transfer has occurred.", + "properties": { + "channel": { + "description": "The channel performing the blind transfer", + "required": true, + "type": "Channel" + }, + "replace_channel": { + "description": "The channel that is replacing transferer when the transferee(s) can not be transferred directly", + "required": false, + "type": "Channel" + }, + "transferee": { + "description": "The channel that is being transferred", + "required": false, + "type": "Channel" + }, + "exten": { + "description": "The extension transferred to", + "required": true, + "type": "string" + }, + "context": { + "description": "The context transferred to", + "required": true, + "type": "string" + }, + "result": { + "description": "The result of the transfer attempt", + "required": true, + "type": "string" + }, + "is_external": { + "description": "Whether the transfer was externally initiated or not", + "required": true, + "type": "boolean" + }, + "bridge": { + "description": "The bridge being transferred", + "type": "Bridge" + } + } + }, + "BridgeAttendedTransfer": { + "id": "BridgeAttendedTransfer", + "description": "Notification that an attended transfer has occurred.", + "properties": { + "transferer_first_leg": { + "description": "First leg of the transferer", + "required": true, + "type": "Channel" + }, + "transferer_second_leg": { + "description": "Second leg of the transferer", + "required": true, + "type": "Channel" + }, + "replace_channel": { + "description": "The channel that is replacing transferer_first_leg in the swap", + "required": false, + "type": "Channel" + }, + "transferee": { + "description": "The channel that is being transferred", + "required": false, + "type": "Channel" + }, + "transfer_target": { + "description": "The channel that is being transferred to", + "required": false, + "type": "Channel" + }, + "result": { + "description": "The result of the transfer attempt", + "required": true, + "type": "string" + }, + "is_external": { + "description": "Whether the transfer was externally initiated or not", + "required": true, + "type": "boolean" + }, + "transferer_first_leg_bridge": { + "description": "Bridge the transferer first leg is in", + "type": "Bridge" + }, + "transferer_second_leg_bridge": { + "description": "Bridge the transferer second leg is in", + "type": "Bridge" + }, + "destination_type": { + "description": "How the transfer was accomplished", + "required": true, + "type": "string" + }, + "destination_bridge": { + "description": "Bridge that survived the merge result", + "type": "string" + }, + "destination_application": { + "description": "Application that has been transferred into", + "type": "string" + }, + "destination_link_first_leg": { + "description": "First leg of a link transfer result", + "type": "Channel" + }, + "destination_link_second_leg": { + "description": "Second leg of a link transfer result", + "type": "Channel" + }, + "destination_threeway_channel": { + "description": "Transferer channel that survived the threeway result", + "type": "Channel" + }, + "destination_threeway_bridge": { + "description": "Bridge that survived the threeway result", + "type": "Bridge" + } + } + }, + "ChannelCreated": { + "id": "ChannelCreated", + "description": "Notification that a channel has been created.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelDestroyed": { + "id": "ChannelDestroyed", + "description": "Notification that a channel has been destroyed.", + "properties": { + "cause": { + "required": true, + "description": "Integer representation of the cause of the hangup", + "type": "int" + }, + "cause_txt": { + "required": true, + "description": "Text representation of the cause of the hangup", + "type": "string" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelEnteredBridge": { + "id": "ChannelEnteredBridge", + "description": "Notification that a channel has entered a bridge.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "channel": { + "type": "Channel" + } + } + }, + "ChannelLeftBridge": { + "id": "ChannelLeftBridge", + "description": "Notification that a channel has left a bridge.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelStateChange": { + "id": "ChannelStateChange", + "description": "Notification of a channel's state change.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelDtmfReceived": { + "id": "ChannelDtmfReceived", + "description": "DTMF received on a channel.\n\nThis event is sent when the DTMF ends. There is no notification about the start of DTMF", + "properties": { + "digit": { + "required": true, + "type": "string", + "description": "DTMF digit received (0-9, A-E, # or *)" + }, + "duration_ms": { + "required": true, + "type": "int", + "description": "Number of milliseconds DTMF was received" + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which DTMF was received" + } + } + }, + "ChannelDialplan": { + "id": "ChannelDialplan", + "description": "Channel changed location in the dialplan.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that changed dialplan location." + }, + "dialplan_app": { + "required": true, + "type": "string", + "description": "The application about to be executed." + }, + "dialplan_app_data": { + "required": true, + "type": "string", + "description": "The data to be passed to the application." + } + } + }, + "ChannelCallerId": { + "id": "ChannelCallerId", + "description": "Channel changed Caller ID.", + "properties": { + "caller_presentation": { + "required": true, + "type": "int", + "description": "The integer representation of the Caller Presentation value." + }, + "caller_presentation_txt": { + "required": true, + "type": "string", + "description": "The text representation of the Caller Presentation value." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that changed Caller ID." + } + } + }, + "ChannelUserevent": { + "id": "ChannelUserevent", + "description": "User-generated event with additional user-defined fields in the object.", + "properties": { + "eventname": { + "required": true, + "type": "string", + "description": "The name of the user event." + }, + "channel": { + "required": false, + "type": "Channel", + "description": "A channel that is signaled with the user event." + }, + "bridge": { + "required": false, + "type": "Bridge", + "description": "A bridge that is signaled with the user event." + }, + "endpoint": { + "required": false, + "type": "Endpoint", + "description": "A endpoint that is signaled with the user event." + }, + "userevent": { + "required": true, + "type": "object", + "description": "Custom Userevent data" + } + } + }, + "ChannelHangupRequest": { + "id": "ChannelHangupRequest", + "description": "A hangup was requested on the channel.", + "properties": { + "cause": { + "type": "int", + "description": "Integer representation of the cause of the hangup." + }, + "soft": { + "type": "boolean", + "description": "Whether the hangup request was a soft hangup request." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which the hangup was requested." + } + } + }, + "ChannelVarset": { + "id": "ChannelVarset", + "description": "Channel variable changed.", + "properties": { + "variable": { + "required": true, + "type": "string", + "description": "The variable that changed." + }, + "value": { + "required": true, + "type": "string", + "description": "The new value of the variable." + }, + "channel": { + "required": false, + "type": "Channel", + "description": "The channel on which the variable was set.\n\nIf missing, the variable is a global variable." + } + } + }, + "ChannelHold": { + "id": "ChannelHold", + "description": "A channel initiated a media hold.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that initiated the hold event." + }, + "musicclass": { + "required": false, + "type": "string", + "description": "The music on hold class that the initiator requested." + } + } + }, + "ChannelUnhold": { + "id": "ChannelUnhold", + "description": "A channel initiated a media unhold.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that initiated the unhold event." + } + } + }, + "ChannelTalkingStarted": { + "id": "ChannelTalkingStarted", + "description": "Talking was detected on the channel.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which talking started." + } + } + }, + "ChannelTalkingFinished": { + "id": "ChannelTalkingFinished", + "description": "Talking is no longer detected on the channel.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which talking completed." + }, + "duration": { + "required": true, + "type": "int", + "description": "The length of time, in milliseconds, that talking was detected on the channel" + } + } + }, + "ContactStatusChange": { + "id": "ContactStatusChange", + "description": "The state of a contact on an endpoint has changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + }, + "contact_info": { + "required": true, + "type": "ContactInfo" + } + } + }, + "PeerStatusChange": { + "id": "PeerStatusChange", + "description": "The state of a peer associated with an endpoint has changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + }, + "peer": { + "required": true, + "type": "Peer" + } + } + }, + "EndpointStateChange": { + "id": "EndpointStateChange", + "description": "Endpoint state changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + } + } + }, + "Dial": { + "id": "Dial", + "description": "Dialing state has changed.", + "properties": { + "caller": { + "required": false, + "type": "Channel", + "description": "The calling channel." + }, + "peer": { + "required": true, + "type": "Channel", + "description": "The dialed channel." + }, + "forward": { + "required": false, + "type": "string", + "description": "Forwarding target requested by the original dialed channel." + }, + "forwarded": { + "required": false, + "type": "Channel", + "description": "Channel that the caller has been forwarded to." + }, + "dialstring": { + "required": false, + "type": "string", + "description": "The dial string for calling the peer channel." + }, + "dialstatus": { + "required": true, + "type": "string", + "description": "Current status of the dialing attempt to the peer." + } + } + }, + "StasisEnd": { + "id": "StasisEnd", + "description": "Notification that a channel has left a Stasis application.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "StasisStart": { + "id": "StasisStart", + "description": "Notification that a channel has entered a Stasis application.", + "properties": { + "args": { + "required": true, + "type": "List[string]", + "description": "Arguments to the application" + }, + "channel": { + "required": true, + "type": "Channel" + }, + "replace_channel": { + "required": false, + "type": "Channel" + } + } + }, + "TextMessageReceived": { + "id": "TextMessageReceived", + "description": "A text message was received from an endpoint.", + "properties": { + "message": { + "required": true, + "type": "TextMessage" + }, + "endpoint": { + "required": false, + "type": "Endpoint" + } + } + }, + "ChannelConnectedLine": { + "id": "ChannelConnectedLine", + "description": "Channel changed Connected Line.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel whose connected line has changed." + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_10_1/mailboxes.json b/codegen/src/main/resources/codegen-data/ari_1_10_1/mailboxes.json new file mode 100644 index 00000000..999cd8db --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_10_1/mailboxes.json @@ -0,0 +1,134 @@ +{ + "_copyright": "Copyright (C) 2013, Digium, Inc.", + "_author": "Jonathan Rose ", + "_svn_revision": "$Revision$", + "apiVersion": "1.10.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/mailboxes.{format}", + "apis": [ + { + "path": "/mailboxes", + "description": "Mailboxes", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all mailboxes.", + "nickname": "list", + "responseClass": "List[Mailbox]" + } + ] + }, + { + "path": "/mailboxes/{mailboxName}", + "description": "Mailbox state", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve the current state of a mailbox.", + "nickname": "get", + "responseClass": "Mailbox", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Change the state of a mailbox. (Note - implicitly creates the mailbox).", + "nickname": "update", + "responseClass": "void", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "oldMessages", + "description": "Count of old messages in the mailbox", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "newMessages", + "description": "Count of new messages in the mailbox", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "int" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Destroy a mailbox.", + "nickname": "delete", + "responseClass": "void", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + } + ] + } + ], + "models": { + "Mailbox": { + "id": "Mailbox", + "description": "Represents the state of a mailbox.", + "properties": { + "name": { + "type": "string", + "description": "Name of the mailbox.", + "required": true + }, + "old_messages": { + "type": "int", + "description": "Count of old messages in the mailbox.", + "required": true + }, + "new_messages": { + "type": "int", + "description": "Count of new messages in the mailbox.", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_10_1/playbacks.json b/codegen/src/main/resources/codegen-data/ari_1_10_1/playbacks.json new file mode 100644 index 00000000..1a124325 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_10_1/playbacks.json @@ -0,0 +1,155 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.10.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/playbacks.{format}", + "apis": [ + { + "path": "/playbacks/{playbackId}", + "description": "Control object for a playback operation.", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a playback's details.", + "nickname": "get", + "responseClass": "Playback", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "The playback cannot be found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop a playback.", + "nickname": "stop", + "responseClass": "void", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "The playback cannot be found" + } + ] + } + ] + }, + { + "path": "/playbacks/{playbackId}/control", + "description": "Control object for a playback operation.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Control a playback.", + "nickname": "control", + "responseClass": "void", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "operation", + "description": "Operation to perform on the playback.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "restart", + "pause", + "unpause", + "reverse", + "forward" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "The provided operation parameter was invalid" + }, + { + "code": 404, + "reason": "The playback cannot be found" + }, + { + "code": 409, + "reason": "The operation cannot be performed in the playback's current state" + } +] + } + ] + } + ], + "models": { + "Playback": { + "id": "Playback", + "description": "Object representing the playback of media to a channel", + "properties": { + "id": { + "type": "string", + "description": "ID for this playback operation", + "required": true + }, + "media_uri": { + "type": "string", + "description": "URI for the media to play back.", + "required": true + }, + "target_uri": { + "type": "string", + "description": "URI for the channel or bridge to play the media on", + "required": true + }, + "language": { + "type": "string", + "description": "For media types that support multiple languages, the language requested for playback." + }, + "state": { + "type": "string", + "description": "Current state of the playback operation.", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "queued", + "playing", + "complete" + ] + } + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_10_1/recordings.json b/codegen/src/main/resources/codegen-data/ari_1_10_1/recordings.json new file mode 100644 index 00000000..48499bfa --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_10_1/recordings.json @@ -0,0 +1,378 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.10.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/recordings.{format}", + "apis": [ + { + "path": "/recordings/stored", + "description": "Recordings", + "operations": [ + { + "httpMethod": "GET", + "summary": "List recordings that are complete.", + "nickname": "listStored", + "responseClass": "List[StoredRecording]" + } + ] + }, + { + "path": "/recordings/stored/{recordingName}", + "description": "Individual recording", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a stored recording's details.", + "nickname": "getStored", + "responseClass": "StoredRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Delete a stored recording.", + "nickname": "deleteStored", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/stored/{recordingName}/copy", + "description": "Copy an individual recording", + "operations": [ + { + "httpMethod": "POST", + "summary": "Copy a stored recording.", + "nickname": "copyStored", + "responseClass": "StoredRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording to copy", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "destinationRecordingName", + "description": "The destination name of the recording", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "A recording with the same name already exists on the system" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}", + "description": "A recording that is in progress", + "operations": [ + { + "httpMethod": "GET", + "summary": "List live recordings.", + "nickname": "getLive", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop a live recording and discard it.", + "nickname": "cancel", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/stop", + "operations": [ + { + "httpMethod": "POST", + "summary": "Stop a live recording and store it.", + "nickname": "stop", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/pause", + "operations": [ + { + "httpMethod": "POST", + "summary": "Pause a live recording.", + "notes": "Pausing a recording suspends silence detection, which will be restarted when the recording is unpaused. Paused time is not included in the accounting for maxDurationSeconds.", + "nickname": "pause", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unpause a live recording.", + "nickname": "unpause", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/mute", + "operations": [ + { + "httpMethod": "POST", + "summary": "Mute a live recording.", + "notes": "Muting a recording suspends silence detection, which will be restarted when the recording is unmuted.", + "nickname": "mute", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unmute a live recording.", + "nickname": "unmute", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + } + ] + } + ], + "models": { + "StoredRecording": { + "id": "StoredRecording", + "description": "A past recording that may be played back.", + "properties": { + "name": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + }, + "LiveRecording": { + "id": "LiveRecording", + "description": "A recording that is in progress", + "properties": { + "name": { + "required": true, + "type": "string", + "description": "Base name for the recording" + }, + "format": { + "required": true, + "type": "string", + "description": "Recording format (wav, gsm, etc.)" + }, + "target_uri": { + "required": true, + "type": "string", + "description": "URI for the channel or bridge being recorded" + }, + "state": { + "required": true, + "type": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "queued", + "recording", + "paused", + "done", + "failed", + "canceled" + ] + } + }, + "duration": { + "required": false, + "type": "int", + "description": "Duration in seconds of the recording" + }, + "talking_duration": { + "required": false, + "type": "int", + "description": "Duration of talking, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds." + }, + "silence_duration": { + "required": false, + "type": "int", + "description": "Duration of silence, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds." + }, + "cause": { + "required": false, + "type": "string", + "description": "Cause for recording failure if failed" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_10_1/sounds.json b/codegen/src/main/resources/codegen-data/ari_1_10_1/sounds.json new file mode 100644 index 00000000..4a8eb2cc --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_10_1/sounds.json @@ -0,0 +1,99 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.10.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/sounds.{format}", + "apis": [ + { + "path": "/sounds", + "description": "Sounds", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all sounds.", + "nickname": "list", + "responseClass": "List[Sound]", + "parameters": [ + { + "name": "lang", + "description": "Lookup sound for a specific language.", + "paramType": "query", + "dataType": "string", + "required": false + }, + { + "name": "format", + "description": "Lookup sound in a specific format.", + "paramType": "query", + "dataType": "string", + "required": false, + "__note": "core show translation can show translation paths between formats, along with relative costs. so this could be just installed format, or we could follow that for transcoded formats." + } + ] + } + ] + }, + { + "path": "/sounds/{soundId}", + "description": "Individual sound", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a sound's details.", + "nickname": "get", + "responseClass": "Sound", + "parameters": [ + { + "name": "soundId", + "description": "Sound's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ] + } + ] + } + ], + "models": { + "FormatLangPair": { + "id": "FormatLangPair", + "description": "Identifies the format and language of a sound file", + "properties": { + "language": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + }, + "Sound": { + "id": "Sound", + "description": "A media file that may be played back.", + "properties": { + "id": { + "required": true, + "description": "Sound's identifier.", + "type": "string" + }, + "text": { + "required": false, + "description": "Text description of the sound, usually the words spoken.", + "type": "string" + }, + "formats": { + "required": true, + "description": "The formats and languages in which this sound is available.", + "type": "List[FormatLangPair]" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_10_2/applications.json b/codegen/src/main/resources/codegen-data/ari_1_10_2/applications.json new file mode 100644 index 00000000..ef61b821 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_10_2/applications.json @@ -0,0 +1,223 @@ +{ + "_copyright": "Copyright (C) 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.10.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/applications.{format}", + "apis": [ + { + "path": "/applications", + "description": "Stasis applications", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all applications.", + "nickname": "list", + "responseClass": "List[Application]" + } + ] + }, + { + "path": "/applications/{applicationName}", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get details of an application.", + "nickname": "get", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Application does not exist." + } + ] + } + ] + }, + { + "path": "/applications/{applicationName}/subscription", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "POST", + "summary": "Subscribe an application to a event source.", + "notes": "Returns the state of the application after the subscriptions have changed", + "nickname": "subscribe", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "eventSource", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing parameter." + }, + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 422, + "reason": "Event source does not exist." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unsubscribe an application from an event source.", + "notes": "Returns the state of the application after the subscriptions have changed", + "nickname": "unsubscribe", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "eventSource", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing parameter; event source scheme not recognized." + }, + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 409, + "reason": "Application not subscribed to event source." + }, + { + "code": 422, + "reason": "Event source does not exist." + } + ] + } + ] + }, + { + "path": "/applications/{applicationName}/eventFilter", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Filter application events types.", + "notes": "Allowed and/or disallowed event type filtering can be done. The body (parameter) should specify a JSON key/value object that describes the type of event filtering needed. One, or both of the following keys can be designated:

\"allowed\" - Specifies an allowed list of event types
\"disallowed\" - Specifies a disallowed list of event types

Further, each of those key's value should be a JSON array that holds zero, or more JSON key/value objects. Each of these objects must contain the following key with an associated value:

\"type\" - The type name of the event to filter

The value must be the string name (case sensitive) of the event type that needs filtering. For example:

{ \"allowed\": [ { \"type\": \"StasisStart\" }, { \"type\": \"StasisEnd\" } ] }

As this specifies only an allowed list, then only those two event type messages are sent to the application. No other event messages are sent.

The following rules apply:

* If the body is empty, both the allowed and disallowed filters are set empty.
* If both list types are given then both are set to their respective values (note, specifying an empty array for a given type sets that type to empty).
* If only one list type is given then only that type is set. The other type is not updated.
* An empty \"allowed\" list means all events are allowed.
* An empty \"disallowed\" list means no events are disallowed.
* Disallowed events take precedence over allowed events if the event type is specified in both lists.", + "nickname": "filter", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "filter", + "description": "Specify which event types to allow/disallow", + "paramType": "body", + "required": false, + "dataType": "object", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Bad request." + }, + { + "code": 404, + "reason": "Application does not exist." + } + ] + } + ] + } + ], + "models": { + "Application": { + "id": "Application", + "description": "Details of a Stasis application", + "properties": { + "name": { + "type": "string", + "description": "Name of this application", + "required": true + }, + "channel_ids": { + "type": "List[string]", + "description": "Id's for channels subscribed to.", + "required": true + }, + "bridge_ids": { + "type": "List[string]", + "description": "Id's for bridges subscribed to.", + "required": true + }, + "endpoint_ids": { + "type": "List[string]", + "description": "{tech}/{resource} for endpoints subscribed to.", + "required": true + }, + "device_names": { + "type": "List[string]", + "description": "Names of the devices subscribed to.", + "required": true + }, + "events_allowed": { + "type": "List[object]", + "description": "Event types sent to the application.", + "required": true + }, + "events_disallowed": { + "type": "List[object]", + "description": "Event types not sent to the application.", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_10_2/asterisk.json b/codegen/src/main/resources/codegen-data/ari_1_10_2/asterisk.json new file mode 100644 index 00000000..226c48e8 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_10_2/asterisk.json @@ -0,0 +1,725 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.10.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/asterisk.{format}", + "apis": [ + { + "path": "/asterisk/config/dynamic/{configClass}/{objectType}/{id}", + "description": "Asterisk dynamic configuration", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve a dynamic configuration object.", + "nickname": "getObject", + "responseClass": "List[ConfigTuple]", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to retrieve.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to retrieve.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "{configClass|objectType|id} not found" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Create or update a dynamic configuration object.", + "nickname": "updateObject", + "responseClass": "List[ConfigTuple]", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to create or update.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to create or update.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "fields", + "description": "The body object should have a value that is a list of ConfigTuples, which provide the fields to update. Ex. [ { \"attribute\": \"directmedia\", \"value\": \"false\" } ]", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Bad request body" + }, + { + "code": 403, + "reason": "Could not create or update object" + }, + { + "code": 404, + "reason": "{configClass|objectType} not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Delete a dynamic configuration object.", + "nickname": "deleteObject", + "responseClass": "void", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to delete.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to delete.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 403, + "reason": "Could not delete object" + }, + { + "code": 404, + "reason": "{configClass|objectType|id} not found" + } + ] + } + ] + }, + { + "path": "/asterisk/info", + "description": "Asterisk system information (similar to core show settings)", + "operations": [ + { + "httpMethod": "GET", + "summary": "Gets Asterisk system information.", + "nickname": "getInfo", + "responseClass": "AsteriskInfo", + "parameters": [ + { + "name": "only", + "description": "Filter information returned", + "paramType": "query", + "required": false, + "allowMultiple": true, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "build", + "system", + "config", + "status" + ] + } + } + ] + } + ] + }, + { + "path": "/asterisk/ping", + "description": "Asterisk ping", + "operations": [ + { + "httpMethod": "GET", + "summary": "Response pong message.", + "nickname": "ping", + "responseClass": "AsteriskPing" + } + ] + }, + { + "path": "/asterisk/modules", + "description": "Asterisk modules", + "operations": [ + { + "httpMethod": "GET", + "summary": "List Asterisk modules.", + "nickname": "listModules", + "responseClass": "List[Module]" + } + ] + }, + { + "path": "/asterisk/modules/{moduleName}", + "description": "Asterisk module", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get Asterisk module information.", + "nickname": "getModule", + "responseClass": "Module", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module could not be found in running modules." + }, + { + "code": 409, + "reason": "Module information could not be retrieved." + } + ] + }, + { + "httpMethod": "POST", + "summary": "Load an Asterisk module.", + "nickname": "loadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 409, + "reason": "Module could not be loaded." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unload an Asterisk module.", + "nickname": "unloadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module not found in running modules." + }, + { + "code": 409, + "reason": "Module could not be unloaded." + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Reload an Asterisk module.", + "nickname": "reloadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module not found in running modules." + }, + { + "code": 409, + "reason": "Module could not be reloaded." + } + ] + } + ] + }, + { + "path": "/asterisk/logging", + "description": "Asterisk log channels", + "operations": [ + { + "httpMethod": "GET", + "summary": "Gets Asterisk log channel information.", + "nickname": "listLogChannels", + "responseClass": "List[LogChannel]" + } + ] + }, + { + "path": "/asterisk/logging/{logChannelName}", + "description": "Asterisk log channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Adds a log channel.", + "nickname": "addLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "The log channel to add", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "configuration", + "description": "levels of the log channel", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Bad request body" + }, + { + "code": 409, + "reason": "Log channel could not be created." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Deletes a log channel.", + "nickname": "deleteLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "Log channels name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Log channel does not exist." + } + ] + } + ] + }, + { + "path": "/asterisk/logging/{logChannelName}/rotate", + "description": "Asterisk log channel", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Rotates a log channel.", + "nickname": "rotateLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "Log channel's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Log channel does not exist." + } + ] + } + ] + }, + { + "path": "/asterisk/variable", + "description": "Global variables", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the value of a global variable.", + "nickname": "getGlobalVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "variable", + "description": "The variable to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + } + ] + }, + { + "httpMethod": "POST", + "summary": "Set the value of a global variable.", + "nickname": "setGlobalVar", + "responseClass": "void", + "parameters": [ + { + "name": "variable", + "description": "The variable to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + } + ] + } + ] + } + ], + "models": { + "BuildInfo": { + "id": "BuildInfo", + "description": "Info about how Asterisk was built", + "properties": { + "os": { + "required": true, + "type": "string", + "description": "OS Asterisk was built on." + }, + "kernel": { + "required": true, + "type": "string", + "description": "Kernel version Asterisk was built on." + }, + "options": { + "required": true, + "type": "string", + "description": "Compile time options, or empty string if default." + }, + "machine": { + "required": true, + "type": "string", + "description": "Machine architecture (x86_64, i686, ppc, etc.)" + }, + "date": { + "required": true, + "type": "string", + "description": "Date and time when Asterisk was built." + }, + "user": { + "required": true, + "type": "string", + "description": "Username that build Asterisk" + } + } + }, + "SystemInfo": { + "id": "SystemInfo", + "description": "Info about Asterisk", + "properties": { + "version": { + "required": true, + "type": "string", + "description": "Asterisk version." + }, + "entity_id": { + "required": true, + "type": "string", + "description": "" + } + } + }, + "SetId": { + "id": "SetId", + "description": "Effective user/group id", + "properties": { + "user": { + "required": true, + "type": "string", + "description": "Effective user id." + }, + "group": { + "required": true, + "type": "string", + "description": "Effective group id." + } + } + }, + "ConfigInfo": { + "id": "ConfigInfo", + "description": "Info about Asterisk configuration", + "properties": { + "name": { + "required": true, + "type": "string", + "description": "Asterisk system name." + }, + "default_language": { + "required": true, + "type": "string", + "description": "Default language for media playback." + }, + "max_channels": { + "required": false, + "type": "int", + "description": "Maximum number of simultaneous channels." + }, + "max_open_files": { + "required": false, + "type": "int", + "description": "Maximum number of open file handles (files, sockets)." + }, + "max_load": { + "required": false, + "type": "double", + "description": "Maximum load avg on system." + }, + "setid": { + "required": true, + "type": "SetId", + "description": "Effective user/group id for running Asterisk." + } + } + }, + "StatusInfo": { + "id": "StatusInfo", + "description": "Info about Asterisk status", + "properties": { + "startup_time": { + "required": true, + "type": "Date", + "description": "Time when Asterisk was started." + }, + "last_reload_time": { + "required": true, + "type": "Date", + "description": "Time when Asterisk was last reloaded." + } + } + }, + "AsteriskInfo": { + "id": "AsteriskInfo", + "description": "Asterisk system information", + "properties": { + "build": { + "required": false, + "type": "BuildInfo", + "description": "Info about how Asterisk was built" + }, + "system": { + "required": false, + "type": "SystemInfo", + "description": "Info about the system running Asterisk" + }, + "config": { + "required": false, + "type": "ConfigInfo", + "description": "Info about Asterisk configuration" + }, + "status": { + "required": false, + "type": "StatusInfo", + "description": "Info about Asterisk status" + } + } + }, + "AsteriskPing": { + "id": "AsteriskPing", + "description": "Asterisk ping information", + "properties": { + "asterisk_id": { + "required": true, + "type": "string", + "description": "Asterisk id info" + }, + "ping": { + "required": true, + "type": "string", + "description": "Always string value is pong" + }, + "timestamp": { + "required": true, + "type": "string", + "description": "The timestamp string of request received time" + } + } + }, + "Module": { + "id": "Module", + "description": "Details of an Asterisk module", + "properties": { + "name": { + "type": "string", + "description": "The name of this module", + "required": true + }, + "description": { + "type": "string", + "description": "The description of this module", + "required": true + }, + "use_count": { + "type": "int", + "description": "The number of times this module is being used", + "required": true + }, + "status": { + "type": "string", + "description": "The running status of this module", + "required": true + }, + "support_level": { + "type": "string", + "description": "The support state of this module", + "required": true + } + } + }, + "LogChannel": { + "id": "LogChannel", + "description": "Details of an Asterisk log channel", + "properties": { + "channel": { + "type": "string", + "description": "The log channel path", + "required": true + }, + "type": { + "type": "string", + "description": "Types of logs for the log channel", + "required": true + }, + "status": { + "type": "string", + "description": "Whether or not a log type is enabled", + "required": true + }, + "configuration": { + "type": "string", + "description": "The various log levels", + "required": true + } + } + }, + "Variable": { + "id": "Variable", + "description": "The value of a channel variable", + "properties": { + "value": { + "required": true, + "type": "string", + "description": "The value of the variable requested" + } + } + }, + "ConfigTuple": { + "id": "ConfigTuple", + "description": "A key/value pair that makes up part of a configuration object.", + "properties": { + "attribute": { + "required": true, + "type": "string", + "description": "A configuration object attribute." + }, + "value": { + "required": true, + "type": "string", + "description": "The value for the attribute." + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_10_2/bridges.json b/codegen/src/main/resources/codegen-data/ari_1_10_2/bridges.json new file mode 100644 index 00000000..78bd3afa --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_10_2/bridges.json @@ -0,0 +1,743 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.10.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/bridges.{format}", + "apis": [ + { + "path": "/bridges", + "description": "Active bridges", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all active bridges in Asterisk.", + "nickname": "list", + "responseClass": "List[Bridge]" + }, + { + "httpMethod": "POST", + "summary": "Create a new bridge.", + "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", + "nickname": "create", + "responseClass": "Bridge", + "parameters": [ + { + "name": "type", + "description": "Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "bridgeId", + "description": "Unique ID to give to the bridge being created.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Name to give to the bridge being created.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}", + "description": "Individual bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Create a new bridge or updates an existing one.", + "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", + "nickname": "createWithId", + "responseClass": "Bridge", + "parameters": [ + { + "name": "type", + "description": "Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media) to set.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "bridgeId", + "description": "Unique ID to give to the bridge being created.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Set the name of the bridge.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ] + }, + { + "httpMethod": "GET", + "summary": "Get bridge details.", + "nickname": "get", + "responseClass": "Bridge", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Shut down a bridge.", + "notes": "If any channels are in this bridge, they will be removed and resume whatever they were doing beforehand.", + "nickname": "destroy", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/addChannel", + "description": "Add a channel to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Add a channel to a bridge.", + "nickname": "addChannel", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channel", + "description": "Ids of channels to add to bridge", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "role", + "description": "Channel's role in the bridge", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Channel not found" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application; Channel currently recording" + }, + { + "code": 422, + "reason": "Channel not in Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/removeChannel", + "description": "Remove a channel from a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Remove a channel from a bridge.", + "nickname": "removeChannel", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channel", + "description": "Ids of channels to remove from bridge", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Channel not found" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + }, + { + "code": 422, + "reason": "Channel not in this bridge" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/videoSource/{channelId}", + "description": "Set a channel as the video source in a multi-party bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Set a channel as the video source in a multi-party mixing bridge. This operation has no effect on bridges with two or fewer participants.", + "nickname": "setVideoSource", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge or Channel not found" + }, + { + "code": 409, + "reason": "Channel not in Stasis application" + }, + { + "code": 422, + "reason": "Channel not in this Bridge" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/videoSource", + "description": "Removes any explicit video source", + "operations": [ + { + "httpMethod": "DELETE", + "summary": "Removes any explicit video source in a multi-party mixing bridge. This operation has no effect on bridges with two or fewer participants. When no explicit video source is set, talk detection will be used to determine the active video stream.", + "nickname": "clearVideoSource", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/moh", + "description": "Play music on hold to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play music on hold to a bridge or change the MOH class that is playing.", + "nickname": "startMoh", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "mohClass", + "description": "Channel's id", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing music on hold to a bridge.", + "notes": "This will only stop music on hold being played via POST bridges/{bridgeId}/moh.", + "nickname": "stopMoh", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/play", + "description": "Play media to the participants of a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media on a bridge.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "play", + "responseClass": "Playback", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media's URI to play.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of media to skip before playing.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "playbackId", + "description": "Playback Id.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/play/{playbackId}", + "description": "Play media to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media on a bridge.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "playWithId", + "responseClass": "Playback", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media's URI to play.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of media to skip before playing.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + + } + ] + }, + { + "path": "/bridges/{bridgeId}/record", + "description": "Record audio on a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start a recording.", + "notes": "This records the mixed audio from all channels participating in this bridge.", + "nickname": "record", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Recording's filename", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "maxDurationSeconds", + "description": "Maximum duration of the recording, in seconds. 0 for no limit.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "maxSilenceSeconds", + "description": "Maximum duration of silence, in seconds. 0 for no limit.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "ifExists", + "description": "Action to take if a recording with the same name already exists.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "fail", + "allowableValues": { + "valueType": "LIST", + "values": [ + "fail", + "overwrite", + "append" + ] + } + }, + { + "name": "beep", + "description": "Play beep when recording begins", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "terminateOn", + "description": "DTMF input to terminate recording.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "any", + "*", + "#" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge is not in a Stasis application; A recording with the same name already exists on the system and can not be overwritten because it is in progress or ifExists=fail" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + } + ], + "models": { + "Bridge": { + "id": "Bridge", + "description": "The merging of media from one or more channels.\n\nEveryone on the bridge receives the same audio.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for this bridge", + "required": true + }, + "technology": { + "type": "string", + "description": "Name of the current bridging technology", + "required": true + }, + "bridge_type": { + "type": "string", + "description": "Type of bridge technology", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "mixing", + "holding" + ] + } + }, + "bridge_class": { + "type": "string", + "description": "Bridging class", + "required": true + }, + "creator": { + "type": "string", + "description": "Entity that created the bridge", + "required": true + }, + "name": { + "type": "string", + "description": "Name the creator gave the bridge", + "required": true + }, + "channels": { + "type": "List[string]", + "description": "Ids of channels participating in this bridge", + "required": true + }, + "video_mode": { + "type": "string", + "description": "The video mode the bridge is using. One of 'none', 'talker', or 'single'.", + "required": false + }, + "video_source_id": { + "type": "string", + "description": "The ID of the channel that is the source of video in this bridge, if one exists.", + "required": false + }, + "creationtime": { + "required": true, + "type": "Date", + "description": "Timestamp when bridge was created" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_10_2/channels.json b/codegen/src/main/resources/codegen-data/ari_1_10_2/channels.json new file mode 100644 index 00000000..fdeb0b83 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_10_2/channels.json @@ -0,0 +1,1825 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.10.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/channels.{format}", + "apis": [ + { + "path": "/channels", + "description": "Active channels", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all active channels in Asterisk.", + "nickname": "list", + "responseClass": "List[Channel]" + }, + { + "httpMethod": "POST", + "summary": "Create a new channel (originate).", + "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.", + "nickname": "originate", + "responseClass": "Channel", + "parameters": [ + { + "name": "endpoint", + "description": "Endpoint to call.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to dial after the endpoint answers. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to dial after the endpoint answers. If omitted, uses 'default'. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to dial after the endpoint answers. If omitted, uses 1. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "long" + }, + { + "name": "label", + "description": "The label to dial after the endpoint answers. Will supersede 'priority' if provided. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The application that is subscribed to the originated channel. When the channel is answered, it will be passed to this Stasis application. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "callerId", + "description": "CallerID to use when dialing the endpoint or extension.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 30 + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "The unique id of the channel which is originating this one.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "formats", + "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for originating a channel." + }, + { + "code": 409, + "reason": "Channel with given unique ID already exists." + } + ] + } + ] + }, + { + "path": "/channels/{channelId}", + "description": "Active channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "Channel details.", + "nickname": "get", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + } + ] + }, + { + "httpMethod": "POST", + "summary": "Create a new channel (originate with id).", + "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.", + "nickname": "originateWithId", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "endpoint", + "description": "Endpoint to call.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to dial after the endpoint answers. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to dial after the endpoint answers. If omitted, uses 'default'. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to dial after the endpoint answers. If omitted, uses 1. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "long" + }, + { + "name": "label", + "description": "The label to dial after the endpoint answers. Will supersede 'priority' if provided. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The application that is subscribed to the originated channel. When the channel is answered, it will be passed to this Stasis application. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "callerId", + "description": "CallerID to use when dialing the endpoint or extension.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 30 + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "The unique id of the channel which is originating this one.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "formats", + "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for originating a channel." + }, + { + "code": 409, + "reason": "Channel with given unique ID already exists." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Delete (i.e. hangup) a channel.", + "nickname": "hangup", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "reason", + "description": "Reason for hanging up the channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defalutValue": "normal", + "allowableValues": { + "valueType": "LIST", + "values": [ + "normal", + "busy", + "congestion", + "no_answer" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid reason for hangup provided" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/continue", + "description": "Exit application; continue execution in the dialplan", + "operations": [ + { + "httpMethod": "POST", + "summary": "Exit application; continue execution in the dialplan.", + "nickname": "continueInDialplan", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "label", + "description": "The label to continue to - will supersede 'priority' if both are provided.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/move", + "description": "Move the channel from one Stasis application to another.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Move the channel from one Stasis application to another.", + "nickname": "move", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The channel will be passed to this Stasis application.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": "404", + "reason": "Channel not found" + }, + { + "code": "409", + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/redirect", + "description": "Inform the channel that it should redirect itself to a different location. Note that this will almost certainly cause the channel to exit the application.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Redirect the channel to a different location.", + "nickname": "redirect", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "endpoint", + "description": "The endpoint to redirect the channel to", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Endpoint parameter not provided" + }, + { + "code": 404, + "reason": "Channel or endpoint not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 422, + "reason": "Endpoint is not the same type as the channel" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/answer", + "description": "Answer a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Answer a channel.", + "nickname": "answer", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/ring", + "description": "Send a ringing indication to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Indicate ringing to a channel.", + "nickname": "ring", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop ringing indication on a channel if locally generated.", + "nickname": "ringStop", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/dtmf", + "description": "Send DTMF to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Send provided DTMF to a given channel.", + "nickname": "sendDTMF", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "dtmf", + "description": "DTMF To send.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "before", + "description": "Amount of time to wait before DTMF digits (specified in milliseconds) start.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0 + }, + { + "name": "between", + "description": "Amount of time in between DTMF digits (specified in milliseconds).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 100 + }, + { + "name": "duration", + "description": "Length of each DTMF digit (specified in milliseconds).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 100 + }, + { + "name": "after", + "description": "Amount of time to wait after DTMF digits (specified in milliseconds) end.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0 + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "DTMF is required" + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/mute", + "description": "Mute a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Mute a channel.", + "nickname": "mute", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "Direction in which to mute audio", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both", + "in", + "out" + ] + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unmute a channel.", + "nickname": "unmute", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "Direction in which to unmute audio", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both", + "in", + "out" + ] + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/hold", + "description": "Put a channel on hold", + "operations": [ + { + "httpMethod": "POST", + "summary": "Hold a channel.", + "nickname": "hold", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Remove a channel from hold.", + "nickname": "unhold", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/moh", + "description": "Play music on hold to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play music on hold to a channel.", + "notes": "Using media operations such as /play on a channel playing MOH in this manner will suspend MOH without resuming automatically. If continuing music on hold is desired, the stasis application must reinitiate music on hold.", + "nickname": "startMoh", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "mohClass", + "description": "Music on hold class to use", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing music on hold to a channel.", + "nickname": "stopMoh", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/silence", + "description": "Play silence to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play silence to a channel.", + "notes": "Using media operations such as /play on a channel playing silence in this manner will suspend silence without resuming automatically.", + "nickname": "startSilence", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing silence to a channel.", + "nickname": "stopSilence", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/play", + "description": "Play media to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "play", + "responseClass": "Playback", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media's URI to play.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of media to skip before playing.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000 + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/play/{playbackId}", + "description": "Play media to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media and specify the playbackId.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "playWithId", + "responseClass": "Playback", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media's URI to play.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of media to skip before playing.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000 + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/record", + "description": "Record audio from a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start a recording.", + "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.", + "nickname": "record", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Recording's filename", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "maxDurationSeconds", + "description": "Maximum duration of the recording, in seconds. 0 for no limit", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "maxSilenceSeconds", + "description": "Maximum duration of silence, in seconds. 0 for no limit", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "ifExists", + "description": "Action to take if a recording with the same name already exists.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "fail", + "allowableValues": { + "valueType": "LIST", + "values": [ + "fail", + "overwrite", + "append" + ] + } + }, + { + "name": "beep", + "description": "Play beep when recording begins", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "terminateOn", + "description": "DTMF input to terminate recording", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "any", + "*", + "#" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "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" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/variable", + "description": "Variables on a channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the value of a channel variable or function.", + "nickname": "getChannelVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The channel variable or function to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Channel or variable not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "POST", + "summary": "Set the value of a channel variable or function.", + "nickname": "setChannelVar", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The channel variable or function to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/snoop", + "description": "Snoop (spy/whisper) on a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start snooping.", + "notes": "Snoop (spy/whisper) on a specific channel.", + "nickname": "snoopChannel", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "spy", + "description": "Direction of audio to spy on", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "whisper", + "description": "Direction of audio to whisper into", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "app", + "description": "Application the snooping channel is placed into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "snoopId", + "description": "Unique ID to assign to snooping channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/snoop/{snoopId}", + "description": "Snoop (spy/whisper) on a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start snooping.", + "notes": "Snoop (spy/whisper) on a specific channel.", + "nickname": "snoopChannelWithId", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "snoopId", + "description": "Unique ID to assign to snooping channel", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "spy", + "description": "Direction of audio to spy on", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "whisper", + "description": "Direction of audio to whisper into", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "app", + "description": "Application the snooping channel is placed into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/rtp_statistics", + "description": "Get RTP statistics information for RTP on a channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "RTP stats on a channel.", + "nickname": "rtpstatistics", + "responseClass": "RTPstat", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel cannot be found." + } + ] + } + ] + } + ], + "models": { + "Dialed": { + "id": "Dialed", + "description": "Dialed channel information.", + "properties": {} + }, + "DialplanCEP": { + "id": "DialplanCEP", + "description": "Dialplan location (context/extension/priority)", + "properties": { + "context": { + "required": true, + "type": "string", + "description": "Context in the dialplan" + }, + "exten": { + "required": true, + "type": "string", + "description": "Extension in the dialplan" + }, + "priority": { + "required": true, + "type": "long", + "description": "Priority in the dialplan" + }, + "app_name": { + "required": true, + "type": "string", + "description": "Name of current dialplan application" + }, + "app_data": { + "required": true, + "type": "string", + "description": "Parameter of current dialplan application" + } + } + }, + "CallerID": { + "id": "CallerID", + "description": "Caller identification", + "properties": { + "name": { + "required": true, + "type": "string" + }, + "number": { + "required": true, + "type": "string" + } + } + }, + "RTPstat": { + "id": "RTPstat", + "description": "A statistics of a RTP.", + "properties": { + "txcount": { + "required": true, + "type": "int", + "description": "Number of packets transmitted." + }, + "rxcount": { + "required": true, + "type": "int", + "description": "Number of packets received." + }, + "txjitter": { + "required": false, + "type": "double", + "description": "Jitter on transmitted packets." + }, + "rxjitter": { + "required": false, + "type": "double", + "description": "Jitter on received packets." + }, + "remote_maxjitter": { + "required": false, + "type": "double", + "description": "Maximum jitter on remote side." + }, + "remote_minjitter": { + "required": false, + "type": "double", + "description": "Minimum jitter on remote side." + }, + "remote_normdevjitter": { + "required": false, + "type": "double", + "description": "Average jitter on remote side." + }, + "remote_stdevjitter": { + "required": false, + "type": "double", + "description": "Standard deviation jitter on remote side." + }, + "local_maxjitter": { + "required": false, + "type": "double", + "description": "Maximum jitter on local side." + }, + "local_minjitter": { + "required": false, + "type": "double", + "description": "Minimum jitter on local side." + }, + "local_normdevjitter": { + "required": false, + "type": "double", + "description": "Average jitter on local side." + }, + "local_stdevjitter": { + "required": false, + "type": "double", + "description": "Standard deviation jitter on local side." + }, + "txploss": { + "required": true, + "type": "int", + "description": "Number of transmitted packets lost." + }, + "rxploss": { + "required": true, + "type": "int", + "description": "Number of received packets lost." + }, + "remote_maxrxploss": { + "required": false, + "type": "double", + "description": "Maximum number of packets lost on remote side." + }, + "remote_minrxploss": { + "required": false, + "type": "double", + "description": "Minimum number of packets lost on remote side." + }, + "remote_normdevrxploss": { + "required": false, + "type": "double", + "description": "Average number of packets lost on remote side." + }, + "remote_stdevrxploss": { + "required": false, + "type": "double", + "description": "Standard deviation packets lost on remote side." + }, + "local_maxrxploss": { + "required": false, + "type": "double", + "description": "Maximum number of packets lost on local side." + }, + "local_minrxploss": { + "required": false, + "type": "double", + "description": "Minimum number of packets lost on local side." + }, + "local_normdevrxploss": { + "required": false, + "type": "double", + "description": "Average number of packets lost on local side." + }, + "local_stdevrxploss": { + "required": false, + "type": "double", + "description": "Standard deviation packets lost on local side." + }, + "rtt": { + "required": false, + "type": "double", + "description": "Total round trip time." + }, + "maxrtt": { + "required": false, + "type": "double", + "description": "Maximum round trip time." + }, + "minrtt": { + "required": false, + "type": "double", + "description": "Minimum round trip time." + }, + "normdevrtt": { + "required": false, + "type": "double", + "description": "Average round trip time." + }, + "stdevrtt": { + "required": false, + "type": "double", + "description": "Standard deviation round trip time." + }, + "local_ssrc": { + "required": true, + "type": "int", + "description": "Our SSRC." + }, + "remote_ssrc": { + "required": true, + "type": "int", + "description": "Their SSRC." + }, + "txoctetcount": { + "required": true, + "type": "int", + "description": "Number of octets transmitted." + }, + "rxoctetcount": { + "required": true, + "type": "int", + "description": "Number of octets received." + }, + "channel_uniqueid": { + "required": true, + "type": "string", + "description": "The Asterisk channel's unique ID that owns this instance." + } + } + }, + "Channel": { + "id": "Channel", + "description": "A specific communication connection between Asterisk and an Endpoint.", + "properties": { + "id": { + "required": true, + "type": "string", + "description": "Unique identifier of the channel.\n\nThis is the same as the Uniqueid field in AMI." + }, + "name": { + "required": true, + "type": "string", + "description": "Name of the channel (i.e. SIP/foo-0000a7e3)" + }, + "state": { + "required": true, + "type": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "Down", + "Rsrved", + "OffHook", + "Dialing", + "Ring", + "Ringing", + "Up", + "Busy", + "Dialing Offhook", + "Pre-ring", + "Unknown" + ] + } + }, + "caller": { + "required": true, + "type": "CallerID" + }, + "connected": { + "required": true, + "type": "CallerID" + }, + "accountcode": { + "required": true, + "type": "string" + }, + "dialplan": { + "required": true, + "type": "DialplanCEP", + "description": "Current location in the dialplan" + }, + "creationtime": { + "required": true, + "type": "Date", + "description": "Timestamp when channel was created" + }, + "language": { + "required": true, + "type": "string", + "description": "The default spoken language" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_10_2/deviceStates.json b/codegen/src/main/resources/codegen-data/ari_1_10_2/deviceStates.json new file mode 100644 index 00000000..16d3af75 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_10_2/deviceStates.json @@ -0,0 +1,151 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "Kevin Harwell ", + "_svn_revision": "$Revision$", + "apiVersion": "1.10.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/deviceStates.{format}", + "apis": [ + { + "path": "/deviceStates", + "description": "Device states", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all ARI controlled device states.", + "nickname": "list", + "responseClass": "List[DeviceState]" + } + ] + }, + { + "path": "/deviceStates/{deviceName}", + "description": "Device state", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve the current state of a device.", + "nickname": "get", + "responseClass": "DeviceState", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Change the state of a device controlled by ARI. (Note - implicitly creates the device state).", + "nickname": "update", + "responseClass": "void", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "deviceState", + "description": "Device state value", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "NOT_INUSE", + "INUSE", + "BUSY", + "INVALID", + "UNAVAILABLE", + "RINGING", + "RINGINUSE", + "ONHOLD" + ] + } + + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Device name is missing" + }, + { + "code": 409, + "reason": "Uncontrolled device specified" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Destroy a device-state controlled by ARI.", + "nickname": "delete", + "responseClass": "void", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Device name is missing" + }, + { + "code": 409, + "reason": "Uncontrolled device specified" + } + ] + } + ] + } + ], + "models": { + "DeviceState": { + "id": "DeviceState", + "description": "Represents the state of a device.", + "properties": { + "name": { + "type": "string", + "description": "Name of the device.", + "required": true + }, + "state": { + "type": "string", + "description": "Device's state", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "UNKNOWN", + "NOT_INUSE", + "INUSE", + "BUSY", + "INVALID", + "UNAVAILABLE", + "RINGING", + "RINGINUSE", + "ONHOLD" + ] + } + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_10_2/endpoints.json b/codegen/src/main/resources/codegen-data/ari_1_10_2/endpoints.json new file mode 100644 index 00000000..13a5beda --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_10_2/endpoints.json @@ -0,0 +1,279 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.10.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/endpoints.{format}", + "apis": [ + { + "path": "/endpoints", + "description": "Asterisk endpoints", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all endpoints.", + "nickname": "list", + "responseClass": "List[Endpoint]" + } + ] + }, + { + "path": "/endpoints/sendMessage", + "description": "Send a message to some technology URI or endpoint.", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Send a message to some technology URI or endpoint.", + "nickname": "sendMessage", + "responseClass": "void", + "parameters": [ + { + "name": "to", + "description": "The endpoint resource or technology specific URI to send the message to. Valid resources are sip, pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "from", + "description": "The endpoint resource or technology specific identity to send this message from. Valid resources are sip, pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "body", + "description": "The body of the message", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "descriptioni": "The \"variables\" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, pjsip and sip resource types will add the key/value pairs as SIP headers,", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoint not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}", + "description": "Asterisk endpoints", + "operations": [ + { + "httpMethod": "GET", + "summary": "List available endoints for a given endpoint technology.", + "nickname": "listByTech", + "responseClass": "List[Endpoint]", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoints (sip,iax2,...)", + "paramType": "path", + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Endpoints not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}/{resource}", + "description": "Single endpoint", + "operations": [ + { + "httpMethod": "GET", + "summary": "Details for an endpoint.", + "nickname": "get", + "responseClass": "Endpoint", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "resource", + "description": "ID of the endpoint", + "paramType": "path", + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoints not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}/{resource}/sendMessage", + "description": "Send a message to some endpoint in a technology.", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Send a message to some endpoint in a technology.", + "nickname": "sendMessageToEndpoint", + "responseClass": "void", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "resource", + "description": "ID of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "from", + "description": "The endpoint resource or technology specific identity to send this message from. Valid resources are sip, pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "body", + "description": "The body of the message", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "descriptioni": "The \"variables\" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, pjsip and sip resource types will add the key/value pairs as SIP headers,", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoint not found" + } + ] + } + ] + } + ], + "models": { + "Endpoint": { + "id": "Endpoint", + "description": "An external device that may offer/accept calls to/from Asterisk.\n\nUnlike most resources, which have a single unique identifier, an endpoint is uniquely identified by the technology/resource pair.", + "properties": { + "technology": { + "type": "string", + "description": "Technology of the endpoint", + "required": true + }, + "resource": { + "type": "string", + "description": "Identifier of the endpoint, specific to the given technology.", + "required": true + }, + "state": { + "type": "string", + "description": "Endpoint's state", + "required": false, + "allowableValues": { + "valueType": "LIST", + "values": [ + "unknown", + "offline", + "online" + ] + } + }, + "channel_ids": { + "type": "List[string]", + "description": "Id's of channels associated with this endpoint", + "required": true + } + } + }, + "TextMessageVariable": { + "id": "TextMessageVariable", + "description": "A key/value pair variable in a text message.", + "properties": { + "key": { + "type": "string", + "description": "A unique key identifying the variable.", + "required": true + }, + "value": { + "type": "string", + "description": "The value of the variable.", + "required": true + } + } + }, + "TextMessage": { + "id": "TextMessage", + "description": "A text message.", + "properties": { + "from": { + "type": "string", + "description": "A technology specific URI specifying the source of the message. For sip and pjsip technologies, any SIP URI can be specified. For xmpp, the URI must correspond to the client connection being used to send the message.", + "required": true + }, + "to": { + "type": "string", + "description": "A technology specific URI specifying the destination of the message. Valid technologies include sip, pjsip, and xmp. The destination of a message should be an endpoint.", + "required": true + }, + "body": { + "type": "string", + "description": "The text of the message.", + "required": true + }, + "variables": { + "type": "List[TextMessageVariable]", + "description": "Technology specific key/value pairs associated with the message.", + "required": false + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_10_2/events.json b/codegen/src/main/resources/codegen-data/ari_1_10_2/events.json new file mode 100644 index 00000000..24d55130 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_10_2/events.json @@ -0,0 +1,903 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.10.0", + "swaggerVersion": "1.2", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/events.{format}", + "apis": [ + { + "path": "/events", + "description": "Events from Asterisk to applications", + "operations": [ + { + "httpMethod": "GET", + "upgrade": "websocket", + "websocketProtocol": "ari", + "summary": "WebSocket connection for events.", + "nickname": "eventWebsocket", + "responseClass": "Message", + "parameters": [ + { + "name": "app", + "description": "Applications to subscribe to.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "subscribeAll", + "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'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean" + } + ] + } + ] + }, + { + "path": "/events/user/{eventName}", + "description": "Stasis application user events", + "operations": [ + { + "httpMethod": "POST", + "summary": "Generate a user event.", + "nickname": "userEvent", + "responseClass": "void", + "parameters": [ + { + "name": "eventName", + "description": "Event name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "application", + "description": "The name of the application that will receive this event", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "source", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}/{resource}, deviceState:{deviceName}", + "paramType": "query", + "required": false, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds custom key/value pairs to add to the user event. Ex. { \"variables\": { \"key\": \"value\" } }", + "paramType": "body", + "required": false, + "allowMultiple": false, + "dataType": "containers" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 422, + "reason": "Event source not found." + }, + { + "code": 400, + "reason": "Invalid even tsource URI or userevent data." + } + ] + } + ] + } + ], + "models": { + "Message": { + "id": "Message", + "description": "Base type for errors and events", + "discriminator": "type", + "properties": { + "type": { + "type": "string", + "required": true, + "description": "Indicates the type of this message." + }, + "asterisk_id": { + "type": "string", + "required": false, + "description": "The unique ID for the Asterisk instance that raised this event." + } + }, + "subTypes": [ + "MissingParams", + "Event" + ] + }, + "MissingParams": { + "id": "MissingParams", + "description": "Error event sent when required params are missing.", + "properties": { + "params": { + "required": true, + "type": "List[string]", + "description": "A list of the missing parameters" + } + } + }, + "Event": { + "id": "Event", + "description": "Base type for asynchronous events from Asterisk.", + "properties": { + "application": { + "type": "string", + "description": "Name of the application receiving the event.", + "required": true + }, + "timestamp": { + "type": "Date", + "description": "Time at which this event was created.", + "required": true + } + }, + "subTypes": [ + "DeviceStateChanged", + "PlaybackStarted", + "PlaybackFinished", + "RecordingStarted", + "RecordingFinished", + "RecordingFailed", + "ApplicationMoveFailed", + "ApplicationReplaced", + "BridgeCreated", + "BridgeDestroyed", + "BridgeMerged", + "BridgeBlindTransfer", + "BridgeAttendedTransfer", + "BridgeVideoSourceChanged", + "ChannelCreated", + "ChannelDestroyed", + "ChannelEnteredBridge", + "ChannelLeftBridge", + "ChannelStateChange", + "ChannelDtmfReceived", + "ChannelDialplan", + "ChannelCallerId", + "ChannelUserevent", + "ChannelHangupRequest", + "ChannelVarset", + "ChannelTalkingStarted", + "ChannelTalkingFinished", + "ChannelHold", + "ChannelUnhold", + "ContactStatusChange", + "EndpointStateChange", + "Dial", + "StasisEnd", + "StasisStart", + "TextMessageReceived", + "ChannelConnectedLine", + "PeerStatusChange" + ] + }, + "ContactInfo": { + "id": "ContactInfo", + "description": "Detailed information about a contact on an endpoint.", + "properties": { + "uri": { + "type": "string", + "description": "The location of the contact.", + "required": true + }, + "contact_status": { + "type": "string", + "description": "The current status of the contact.", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "Unreachable", + "Reachable", + "Unknown", + "Created", + "Removed" + ] + } + }, + "aor": { + "type": "string", + "description": "The Address of Record this contact belongs to.", + "required": true + }, + "roundtrip_usec": { + "type": "string", + "description": "Current round trip time, in microseconds, for the contact.", + "required": false + } + } + }, + "Peer": { + "id": "Peer", + "description": "Detailed information about a remote peer that communicates with Asterisk.", + "properties": { + "peer_status": { + "type": "string", + "description": "The current state of the peer. Note that the values of the status are dependent on the underlying peer technology.", + "required": true + }, + "cause": { + "type": "string", + "description": "An optional reason associated with the change in peer_status.", + "required": false + }, + "address": { + "type": "string", + "description": "The IP address of the peer.", + "required": false + }, + "port": { + "type": "string", + "description": "The port of the peer.", + "required": false + }, + "time": { + "type": "string", + "description": "The last known time the peer was contacted.", + "required": false + } + } + }, + "DeviceStateChanged": { + "id": "DeviceStateChanged", + "description": "Notification that a device state has changed.", + "properties": { + "device_state": { + "type": "DeviceState", + "description": "Device state object", + "required": true + } + } + }, + "PlaybackStarted": { + "id": "PlaybackStarted", + "description": "Event showing the start of a media playback operation.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "PlaybackFinished": { + "id": "PlaybackFinished", + "description": "Event showing the completion of a media playback operation.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "RecordingStarted": { + "id": "RecordingStarted", + "description": "Event showing the start of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "RecordingFinished": { + "id": "RecordingFinished", + "description": "Event showing the completion of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "RecordingFailed": { + "id": "RecordingFailed", + "description": "Event showing failure of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "ApplicationMoveFailed": { + "id": "ApplicationMoveFailed", + "description": "Notification that trying to move a channel to another Stasis application failed.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + }, + "destination": { + "required": true, + "type": "string" + }, + "args": { + "required": true, + "type": "List[string]", + "description": "Arguments to the application" + } + } + }, + "ApplicationReplaced": { + "id": "ApplicationReplaced", + "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.", + "properties": {} + }, + "BridgeCreated": { + "id": "BridgeCreated", + "description": "Notification that a bridge has been created.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeDestroyed": { + "id": "BridgeDestroyed", + "description": "Notification that a bridge has been destroyed.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeMerged": { + "id": "BridgeMerged", + "description": "Notification that one bridge has merged into another.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "bridge_from": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeVideoSourceChanged": { + "id": "BridgeVideoSourceChanged", + "description": "Notification that the source of video in a bridge has changed.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "old_video_source_id": { + "required": false, + "type": "string" + } + } + }, + "BridgeBlindTransfer": { + "id": "BridgeBlindTransfer", + "description": "Notification that a blind transfer has occurred.", + "properties": { + "channel": { + "description": "The channel performing the blind transfer", + "required": true, + "type": "Channel" + }, + "replace_channel": { + "description": "The channel that is replacing transferer when the transferee(s) can not be transferred directly", + "required": false, + "type": "Channel" + }, + "transferee": { + "description": "The channel that is being transferred", + "required": false, + "type": "Channel" + }, + "exten": { + "description": "The extension transferred to", + "required": true, + "type": "string" + }, + "context": { + "description": "The context transferred to", + "required": true, + "type": "string" + }, + "result": { + "description": "The result of the transfer attempt", + "required": true, + "type": "string" + }, + "is_external": { + "description": "Whether the transfer was externally initiated or not", + "required": true, + "type": "boolean" + }, + "bridge": { + "description": "The bridge being transferred", + "type": "Bridge" + } + } + }, + "BridgeAttendedTransfer": { + "id": "BridgeAttendedTransfer", + "description": "Notification that an attended transfer has occurred.", + "properties": { + "transferer_first_leg": { + "description": "First leg of the transferer", + "required": true, + "type": "Channel" + }, + "transferer_second_leg": { + "description": "Second leg of the transferer", + "required": true, + "type": "Channel" + }, + "replace_channel": { + "description": "The channel that is replacing transferer_first_leg in the swap", + "required": false, + "type": "Channel" + }, + "transferee": { + "description": "The channel that is being transferred", + "required": false, + "type": "Channel" + }, + "transfer_target": { + "description": "The channel that is being transferred to", + "required": false, + "type": "Channel" + }, + "result": { + "description": "The result of the transfer attempt", + "required": true, + "type": "string" + }, + "is_external": { + "description": "Whether the transfer was externally initiated or not", + "required": true, + "type": "boolean" + }, + "transferer_first_leg_bridge": { + "description": "Bridge the transferer first leg is in", + "type": "Bridge" + }, + "transferer_second_leg_bridge": { + "description": "Bridge the transferer second leg is in", + "type": "Bridge" + }, + "destination_type": { + "description": "How the transfer was accomplished", + "required": true, + "type": "string" + }, + "destination_bridge": { + "description": "Bridge that survived the merge result", + "type": "string" + }, + "destination_application": { + "description": "Application that has been transferred into", + "type": "string" + }, + "destination_link_first_leg": { + "description": "First leg of a link transfer result", + "type": "Channel" + }, + "destination_link_second_leg": { + "description": "Second leg of a link transfer result", + "type": "Channel" + }, + "destination_threeway_channel": { + "description": "Transferer channel that survived the threeway result", + "type": "Channel" + }, + "destination_threeway_bridge": { + "description": "Bridge that survived the threeway result", + "type": "Bridge" + } + } + }, + "ChannelCreated": { + "id": "ChannelCreated", + "description": "Notification that a channel has been created.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelDestroyed": { + "id": "ChannelDestroyed", + "description": "Notification that a channel has been destroyed.", + "properties": { + "cause": { + "required": true, + "description": "Integer representation of the cause of the hangup", + "type": "int" + }, + "cause_txt": { + "required": true, + "description": "Text representation of the cause of the hangup", + "type": "string" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelEnteredBridge": { + "id": "ChannelEnteredBridge", + "description": "Notification that a channel has entered a bridge.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "channel": { + "type": "Channel" + } + } + }, + "ChannelLeftBridge": { + "id": "ChannelLeftBridge", + "description": "Notification that a channel has left a bridge.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelStateChange": { + "id": "ChannelStateChange", + "description": "Notification of a channel's state change.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelDtmfReceived": { + "id": "ChannelDtmfReceived", + "description": "DTMF received on a channel.\n\nThis event is sent when the DTMF ends. There is no notification about the start of DTMF", + "properties": { + "digit": { + "required": true, + "type": "string", + "description": "DTMF digit received (0-9, A-E, # or *)" + }, + "duration_ms": { + "required": true, + "type": "int", + "description": "Number of milliseconds DTMF was received" + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which DTMF was received" + } + } + }, + "ChannelDialplan": { + "id": "ChannelDialplan", + "description": "Channel changed location in the dialplan.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that changed dialplan location." + }, + "dialplan_app": { + "required": true, + "type": "string", + "description": "The application about to be executed." + }, + "dialplan_app_data": { + "required": true, + "type": "string", + "description": "The data to be passed to the application." + } + } + }, + "ChannelCallerId": { + "id": "ChannelCallerId", + "description": "Channel changed Caller ID.", + "properties": { + "caller_presentation": { + "required": true, + "type": "int", + "description": "The integer representation of the Caller Presentation value." + }, + "caller_presentation_txt": { + "required": true, + "type": "string", + "description": "The text representation of the Caller Presentation value." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that changed Caller ID." + } + } + }, + "ChannelUserevent": { + "id": "ChannelUserevent", + "description": "User-generated event with additional user-defined fields in the object.", + "properties": { + "eventname": { + "required": true, + "type": "string", + "description": "The name of the user event." + }, + "channel": { + "required": false, + "type": "Channel", + "description": "A channel that is signaled with the user event." + }, + "bridge": { + "required": false, + "type": "Bridge", + "description": "A bridge that is signaled with the user event." + }, + "endpoint": { + "required": false, + "type": "Endpoint", + "description": "A endpoint that is signaled with the user event." + }, + "userevent": { + "required": true, + "type": "object", + "description": "Custom Userevent data" + } + } + }, + "ChannelHangupRequest": { + "id": "ChannelHangupRequest", + "description": "A hangup was requested on the channel.", + "properties": { + "cause": { + "type": "int", + "description": "Integer representation of the cause of the hangup." + }, + "soft": { + "type": "boolean", + "description": "Whether the hangup request was a soft hangup request." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which the hangup was requested." + } + } + }, + "ChannelVarset": { + "id": "ChannelVarset", + "description": "Channel variable changed.", + "properties": { + "variable": { + "required": true, + "type": "string", + "description": "The variable that changed." + }, + "value": { + "required": true, + "type": "string", + "description": "The new value of the variable." + }, + "channel": { + "required": false, + "type": "Channel", + "description": "The channel on which the variable was set.\n\nIf missing, the variable is a global variable." + } + } + }, + "ChannelHold": { + "id": "ChannelHold", + "description": "A channel initiated a media hold.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that initiated the hold event." + }, + "musicclass": { + "required": false, + "type": "string", + "description": "The music on hold class that the initiator requested." + } + } + }, + "ChannelUnhold": { + "id": "ChannelUnhold", + "description": "A channel initiated a media unhold.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that initiated the unhold event." + } + } + }, + "ChannelTalkingStarted": { + "id": "ChannelTalkingStarted", + "description": "Talking was detected on the channel.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which talking started." + } + } + }, + "ChannelTalkingFinished": { + "id": "ChannelTalkingFinished", + "description": "Talking is no longer detected on the channel.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which talking completed." + }, + "duration": { + "required": true, + "type": "int", + "description": "The length of time, in milliseconds, that talking was detected on the channel" + } + } + }, + "ContactStatusChange": { + "id": "ContactStatusChange", + "description": "The state of a contact on an endpoint has changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + }, + "contact_info": { + "required": true, + "type": "ContactInfo" + } + } + }, + "PeerStatusChange": { + "id": "PeerStatusChange", + "description": "The state of a peer associated with an endpoint has changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + }, + "peer": { + "required": true, + "type": "Peer" + } + } + }, + "EndpointStateChange": { + "id": "EndpointStateChange", + "description": "Endpoint state changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + } + } + }, + "Dial": { + "id": "Dial", + "description": "Dialing state has changed.", + "properties": { + "caller": { + "required": false, + "type": "Channel", + "description": "The calling channel." + }, + "peer": { + "required": true, + "type": "Channel", + "description": "The dialed channel." + }, + "forward": { + "required": false, + "type": "string", + "description": "Forwarding target requested by the original dialed channel." + }, + "forwarded": { + "required": false, + "type": "Channel", + "description": "Channel that the caller has been forwarded to." + }, + "dialstring": { + "required": false, + "type": "string", + "description": "The dial string for calling the peer channel." + }, + "dialstatus": { + "required": true, + "type": "string", + "description": "Current status of the dialing attempt to the peer." + } + } + }, + "StasisEnd": { + "id": "StasisEnd", + "description": "Notification that a channel has left a Stasis application.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "StasisStart": { + "id": "StasisStart", + "description": "Notification that a channel has entered a Stasis application.", + "properties": { + "args": { + "required": true, + "type": "List[string]", + "description": "Arguments to the application" + }, + "channel": { + "required": true, + "type": "Channel" + }, + "replace_channel": { + "required": false, + "type": "Channel" + } + } + }, + "TextMessageReceived": { + "id": "TextMessageReceived", + "description": "A text message was received from an endpoint.", + "properties": { + "message": { + "required": true, + "type": "TextMessage" + }, + "endpoint": { + "required": false, + "type": "Endpoint" + } + } + }, + "ChannelConnectedLine": { + "id": "ChannelConnectedLine", + "description": "Channel changed Connected Line.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel whose connected line has changed." + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_10_2/mailboxes.json b/codegen/src/main/resources/codegen-data/ari_1_10_2/mailboxes.json new file mode 100644 index 00000000..999cd8db --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_10_2/mailboxes.json @@ -0,0 +1,134 @@ +{ + "_copyright": "Copyright (C) 2013, Digium, Inc.", + "_author": "Jonathan Rose ", + "_svn_revision": "$Revision$", + "apiVersion": "1.10.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/mailboxes.{format}", + "apis": [ + { + "path": "/mailboxes", + "description": "Mailboxes", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all mailboxes.", + "nickname": "list", + "responseClass": "List[Mailbox]" + } + ] + }, + { + "path": "/mailboxes/{mailboxName}", + "description": "Mailbox state", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve the current state of a mailbox.", + "nickname": "get", + "responseClass": "Mailbox", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Change the state of a mailbox. (Note - implicitly creates the mailbox).", + "nickname": "update", + "responseClass": "void", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "oldMessages", + "description": "Count of old messages in the mailbox", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "newMessages", + "description": "Count of new messages in the mailbox", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "int" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Destroy a mailbox.", + "nickname": "delete", + "responseClass": "void", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + } + ] + } + ], + "models": { + "Mailbox": { + "id": "Mailbox", + "description": "Represents the state of a mailbox.", + "properties": { + "name": { + "type": "string", + "description": "Name of the mailbox.", + "required": true + }, + "old_messages": { + "type": "int", + "description": "Count of old messages in the mailbox.", + "required": true + }, + "new_messages": { + "type": "int", + "description": "Count of new messages in the mailbox.", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_10_2/playbacks.json b/codegen/src/main/resources/codegen-data/ari_1_10_2/playbacks.json new file mode 100644 index 00000000..1a124325 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_10_2/playbacks.json @@ -0,0 +1,155 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.10.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/playbacks.{format}", + "apis": [ + { + "path": "/playbacks/{playbackId}", + "description": "Control object for a playback operation.", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a playback's details.", + "nickname": "get", + "responseClass": "Playback", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "The playback cannot be found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop a playback.", + "nickname": "stop", + "responseClass": "void", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "The playback cannot be found" + } + ] + } + ] + }, + { + "path": "/playbacks/{playbackId}/control", + "description": "Control object for a playback operation.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Control a playback.", + "nickname": "control", + "responseClass": "void", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "operation", + "description": "Operation to perform on the playback.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "restart", + "pause", + "unpause", + "reverse", + "forward" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "The provided operation parameter was invalid" + }, + { + "code": 404, + "reason": "The playback cannot be found" + }, + { + "code": 409, + "reason": "The operation cannot be performed in the playback's current state" + } +] + } + ] + } + ], + "models": { + "Playback": { + "id": "Playback", + "description": "Object representing the playback of media to a channel", + "properties": { + "id": { + "type": "string", + "description": "ID for this playback operation", + "required": true + }, + "media_uri": { + "type": "string", + "description": "URI for the media to play back.", + "required": true + }, + "target_uri": { + "type": "string", + "description": "URI for the channel or bridge to play the media on", + "required": true + }, + "language": { + "type": "string", + "description": "For media types that support multiple languages, the language requested for playback." + }, + "state": { + "type": "string", + "description": "Current state of the playback operation.", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "queued", + "playing", + "complete" + ] + } + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_10_2/recordings.json b/codegen/src/main/resources/codegen-data/ari_1_10_2/recordings.json new file mode 100644 index 00000000..48499bfa --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_10_2/recordings.json @@ -0,0 +1,378 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.10.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/recordings.{format}", + "apis": [ + { + "path": "/recordings/stored", + "description": "Recordings", + "operations": [ + { + "httpMethod": "GET", + "summary": "List recordings that are complete.", + "nickname": "listStored", + "responseClass": "List[StoredRecording]" + } + ] + }, + { + "path": "/recordings/stored/{recordingName}", + "description": "Individual recording", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a stored recording's details.", + "nickname": "getStored", + "responseClass": "StoredRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Delete a stored recording.", + "nickname": "deleteStored", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/stored/{recordingName}/copy", + "description": "Copy an individual recording", + "operations": [ + { + "httpMethod": "POST", + "summary": "Copy a stored recording.", + "nickname": "copyStored", + "responseClass": "StoredRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording to copy", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "destinationRecordingName", + "description": "The destination name of the recording", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "A recording with the same name already exists on the system" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}", + "description": "A recording that is in progress", + "operations": [ + { + "httpMethod": "GET", + "summary": "List live recordings.", + "nickname": "getLive", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop a live recording and discard it.", + "nickname": "cancel", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/stop", + "operations": [ + { + "httpMethod": "POST", + "summary": "Stop a live recording and store it.", + "nickname": "stop", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/pause", + "operations": [ + { + "httpMethod": "POST", + "summary": "Pause a live recording.", + "notes": "Pausing a recording suspends silence detection, which will be restarted when the recording is unpaused. Paused time is not included in the accounting for maxDurationSeconds.", + "nickname": "pause", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unpause a live recording.", + "nickname": "unpause", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/mute", + "operations": [ + { + "httpMethod": "POST", + "summary": "Mute a live recording.", + "notes": "Muting a recording suspends silence detection, which will be restarted when the recording is unmuted.", + "nickname": "mute", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unmute a live recording.", + "nickname": "unmute", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + } + ] + } + ], + "models": { + "StoredRecording": { + "id": "StoredRecording", + "description": "A past recording that may be played back.", + "properties": { + "name": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + }, + "LiveRecording": { + "id": "LiveRecording", + "description": "A recording that is in progress", + "properties": { + "name": { + "required": true, + "type": "string", + "description": "Base name for the recording" + }, + "format": { + "required": true, + "type": "string", + "description": "Recording format (wav, gsm, etc.)" + }, + "target_uri": { + "required": true, + "type": "string", + "description": "URI for the channel or bridge being recorded" + }, + "state": { + "required": true, + "type": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "queued", + "recording", + "paused", + "done", + "failed", + "canceled" + ] + } + }, + "duration": { + "required": false, + "type": "int", + "description": "Duration in seconds of the recording" + }, + "talking_duration": { + "required": false, + "type": "int", + "description": "Duration of talking, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds." + }, + "silence_duration": { + "required": false, + "type": "int", + "description": "Duration of silence, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds." + }, + "cause": { + "required": false, + "type": "string", + "description": "Cause for recording failure if failed" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_10_2/sounds.json b/codegen/src/main/resources/codegen-data/ari_1_10_2/sounds.json new file mode 100644 index 00000000..4a8eb2cc --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_10_2/sounds.json @@ -0,0 +1,99 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.10.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/sounds.{format}", + "apis": [ + { + "path": "/sounds", + "description": "Sounds", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all sounds.", + "nickname": "list", + "responseClass": "List[Sound]", + "parameters": [ + { + "name": "lang", + "description": "Lookup sound for a specific language.", + "paramType": "query", + "dataType": "string", + "required": false + }, + { + "name": "format", + "description": "Lookup sound in a specific format.", + "paramType": "query", + "dataType": "string", + "required": false, + "__note": "core show translation can show translation paths between formats, along with relative costs. so this could be just installed format, or we could follow that for transcoded formats." + } + ] + } + ] + }, + { + "path": "/sounds/{soundId}", + "description": "Individual sound", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a sound's details.", + "nickname": "get", + "responseClass": "Sound", + "parameters": [ + { + "name": "soundId", + "description": "Sound's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ] + } + ] + } + ], + "models": { + "FormatLangPair": { + "id": "FormatLangPair", + "description": "Identifies the format and language of a sound file", + "properties": { + "language": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + }, + "Sound": { + "id": "Sound", + "description": "A media file that may be played back.", + "properties": { + "id": { + "required": true, + "description": "Sound's identifier.", + "type": "string" + }, + "text": { + "required": false, + "description": "Text description of the sound, usually the words spoken.", + "type": "string" + }, + "formats": { + "required": true, + "description": "The formats and languages in which this sound is available.", + "type": "List[FormatLangPair]" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_11_2/applications.json b/codegen/src/main/resources/codegen-data/ari_1_11_2/applications.json new file mode 100644 index 00000000..ef61b821 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_11_2/applications.json @@ -0,0 +1,223 @@ +{ + "_copyright": "Copyright (C) 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.10.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/applications.{format}", + "apis": [ + { + "path": "/applications", + "description": "Stasis applications", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all applications.", + "nickname": "list", + "responseClass": "List[Application]" + } + ] + }, + { + "path": "/applications/{applicationName}", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get details of an application.", + "nickname": "get", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Application does not exist." + } + ] + } + ] + }, + { + "path": "/applications/{applicationName}/subscription", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "POST", + "summary": "Subscribe an application to a event source.", + "notes": "Returns the state of the application after the subscriptions have changed", + "nickname": "subscribe", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "eventSource", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing parameter." + }, + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 422, + "reason": "Event source does not exist." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unsubscribe an application from an event source.", + "notes": "Returns the state of the application after the subscriptions have changed", + "nickname": "unsubscribe", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "eventSource", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing parameter; event source scheme not recognized." + }, + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 409, + "reason": "Application not subscribed to event source." + }, + { + "code": 422, + "reason": "Event source does not exist." + } + ] + } + ] + }, + { + "path": "/applications/{applicationName}/eventFilter", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Filter application events types.", + "notes": "Allowed and/or disallowed event type filtering can be done. The body (parameter) should specify a JSON key/value object that describes the type of event filtering needed. One, or both of the following keys can be designated:

\"allowed\" - Specifies an allowed list of event types
\"disallowed\" - Specifies a disallowed list of event types

Further, each of those key's value should be a JSON array that holds zero, or more JSON key/value objects. Each of these objects must contain the following key with an associated value:

\"type\" - The type name of the event to filter

The value must be the string name (case sensitive) of the event type that needs filtering. For example:

{ \"allowed\": [ { \"type\": \"StasisStart\" }, { \"type\": \"StasisEnd\" } ] }

As this specifies only an allowed list, then only those two event type messages are sent to the application. No other event messages are sent.

The following rules apply:

* If the body is empty, both the allowed and disallowed filters are set empty.
* If both list types are given then both are set to their respective values (note, specifying an empty array for a given type sets that type to empty).
* If only one list type is given then only that type is set. The other type is not updated.
* An empty \"allowed\" list means all events are allowed.
* An empty \"disallowed\" list means no events are disallowed.
* Disallowed events take precedence over allowed events if the event type is specified in both lists.", + "nickname": "filter", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "filter", + "description": "Specify which event types to allow/disallow", + "paramType": "body", + "required": false, + "dataType": "object", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Bad request." + }, + { + "code": 404, + "reason": "Application does not exist." + } + ] + } + ] + } + ], + "models": { + "Application": { + "id": "Application", + "description": "Details of a Stasis application", + "properties": { + "name": { + "type": "string", + "description": "Name of this application", + "required": true + }, + "channel_ids": { + "type": "List[string]", + "description": "Id's for channels subscribed to.", + "required": true + }, + "bridge_ids": { + "type": "List[string]", + "description": "Id's for bridges subscribed to.", + "required": true + }, + "endpoint_ids": { + "type": "List[string]", + "description": "{tech}/{resource} for endpoints subscribed to.", + "required": true + }, + "device_names": { + "type": "List[string]", + "description": "Names of the devices subscribed to.", + "required": true + }, + "events_allowed": { + "type": "List[object]", + "description": "Event types sent to the application.", + "required": true + }, + "events_disallowed": { + "type": "List[object]", + "description": "Event types not sent to the application.", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_11_2/asterisk.json b/codegen/src/main/resources/codegen-data/ari_1_11_2/asterisk.json new file mode 100644 index 00000000..226c48e8 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_11_2/asterisk.json @@ -0,0 +1,725 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.10.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/asterisk.{format}", + "apis": [ + { + "path": "/asterisk/config/dynamic/{configClass}/{objectType}/{id}", + "description": "Asterisk dynamic configuration", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve a dynamic configuration object.", + "nickname": "getObject", + "responseClass": "List[ConfigTuple]", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to retrieve.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to retrieve.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "{configClass|objectType|id} not found" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Create or update a dynamic configuration object.", + "nickname": "updateObject", + "responseClass": "List[ConfigTuple]", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to create or update.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to create or update.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "fields", + "description": "The body object should have a value that is a list of ConfigTuples, which provide the fields to update. Ex. [ { \"attribute\": \"directmedia\", \"value\": \"false\" } ]", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Bad request body" + }, + { + "code": 403, + "reason": "Could not create or update object" + }, + { + "code": 404, + "reason": "{configClass|objectType} not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Delete a dynamic configuration object.", + "nickname": "deleteObject", + "responseClass": "void", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to delete.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to delete.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 403, + "reason": "Could not delete object" + }, + { + "code": 404, + "reason": "{configClass|objectType|id} not found" + } + ] + } + ] + }, + { + "path": "/asterisk/info", + "description": "Asterisk system information (similar to core show settings)", + "operations": [ + { + "httpMethod": "GET", + "summary": "Gets Asterisk system information.", + "nickname": "getInfo", + "responseClass": "AsteriskInfo", + "parameters": [ + { + "name": "only", + "description": "Filter information returned", + "paramType": "query", + "required": false, + "allowMultiple": true, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "build", + "system", + "config", + "status" + ] + } + } + ] + } + ] + }, + { + "path": "/asterisk/ping", + "description": "Asterisk ping", + "operations": [ + { + "httpMethod": "GET", + "summary": "Response pong message.", + "nickname": "ping", + "responseClass": "AsteriskPing" + } + ] + }, + { + "path": "/asterisk/modules", + "description": "Asterisk modules", + "operations": [ + { + "httpMethod": "GET", + "summary": "List Asterisk modules.", + "nickname": "listModules", + "responseClass": "List[Module]" + } + ] + }, + { + "path": "/asterisk/modules/{moduleName}", + "description": "Asterisk module", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get Asterisk module information.", + "nickname": "getModule", + "responseClass": "Module", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module could not be found in running modules." + }, + { + "code": 409, + "reason": "Module information could not be retrieved." + } + ] + }, + { + "httpMethod": "POST", + "summary": "Load an Asterisk module.", + "nickname": "loadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 409, + "reason": "Module could not be loaded." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unload an Asterisk module.", + "nickname": "unloadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module not found in running modules." + }, + { + "code": 409, + "reason": "Module could not be unloaded." + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Reload an Asterisk module.", + "nickname": "reloadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module not found in running modules." + }, + { + "code": 409, + "reason": "Module could not be reloaded." + } + ] + } + ] + }, + { + "path": "/asterisk/logging", + "description": "Asterisk log channels", + "operations": [ + { + "httpMethod": "GET", + "summary": "Gets Asterisk log channel information.", + "nickname": "listLogChannels", + "responseClass": "List[LogChannel]" + } + ] + }, + { + "path": "/asterisk/logging/{logChannelName}", + "description": "Asterisk log channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Adds a log channel.", + "nickname": "addLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "The log channel to add", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "configuration", + "description": "levels of the log channel", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Bad request body" + }, + { + "code": 409, + "reason": "Log channel could not be created." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Deletes a log channel.", + "nickname": "deleteLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "Log channels name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Log channel does not exist." + } + ] + } + ] + }, + { + "path": "/asterisk/logging/{logChannelName}/rotate", + "description": "Asterisk log channel", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Rotates a log channel.", + "nickname": "rotateLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "Log channel's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Log channel does not exist." + } + ] + } + ] + }, + { + "path": "/asterisk/variable", + "description": "Global variables", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the value of a global variable.", + "nickname": "getGlobalVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "variable", + "description": "The variable to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + } + ] + }, + { + "httpMethod": "POST", + "summary": "Set the value of a global variable.", + "nickname": "setGlobalVar", + "responseClass": "void", + "parameters": [ + { + "name": "variable", + "description": "The variable to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + } + ] + } + ] + } + ], + "models": { + "BuildInfo": { + "id": "BuildInfo", + "description": "Info about how Asterisk was built", + "properties": { + "os": { + "required": true, + "type": "string", + "description": "OS Asterisk was built on." + }, + "kernel": { + "required": true, + "type": "string", + "description": "Kernel version Asterisk was built on." + }, + "options": { + "required": true, + "type": "string", + "description": "Compile time options, or empty string if default." + }, + "machine": { + "required": true, + "type": "string", + "description": "Machine architecture (x86_64, i686, ppc, etc.)" + }, + "date": { + "required": true, + "type": "string", + "description": "Date and time when Asterisk was built." + }, + "user": { + "required": true, + "type": "string", + "description": "Username that build Asterisk" + } + } + }, + "SystemInfo": { + "id": "SystemInfo", + "description": "Info about Asterisk", + "properties": { + "version": { + "required": true, + "type": "string", + "description": "Asterisk version." + }, + "entity_id": { + "required": true, + "type": "string", + "description": "" + } + } + }, + "SetId": { + "id": "SetId", + "description": "Effective user/group id", + "properties": { + "user": { + "required": true, + "type": "string", + "description": "Effective user id." + }, + "group": { + "required": true, + "type": "string", + "description": "Effective group id." + } + } + }, + "ConfigInfo": { + "id": "ConfigInfo", + "description": "Info about Asterisk configuration", + "properties": { + "name": { + "required": true, + "type": "string", + "description": "Asterisk system name." + }, + "default_language": { + "required": true, + "type": "string", + "description": "Default language for media playback." + }, + "max_channels": { + "required": false, + "type": "int", + "description": "Maximum number of simultaneous channels." + }, + "max_open_files": { + "required": false, + "type": "int", + "description": "Maximum number of open file handles (files, sockets)." + }, + "max_load": { + "required": false, + "type": "double", + "description": "Maximum load avg on system." + }, + "setid": { + "required": true, + "type": "SetId", + "description": "Effective user/group id for running Asterisk." + } + } + }, + "StatusInfo": { + "id": "StatusInfo", + "description": "Info about Asterisk status", + "properties": { + "startup_time": { + "required": true, + "type": "Date", + "description": "Time when Asterisk was started." + }, + "last_reload_time": { + "required": true, + "type": "Date", + "description": "Time when Asterisk was last reloaded." + } + } + }, + "AsteriskInfo": { + "id": "AsteriskInfo", + "description": "Asterisk system information", + "properties": { + "build": { + "required": false, + "type": "BuildInfo", + "description": "Info about how Asterisk was built" + }, + "system": { + "required": false, + "type": "SystemInfo", + "description": "Info about the system running Asterisk" + }, + "config": { + "required": false, + "type": "ConfigInfo", + "description": "Info about Asterisk configuration" + }, + "status": { + "required": false, + "type": "StatusInfo", + "description": "Info about Asterisk status" + } + } + }, + "AsteriskPing": { + "id": "AsteriskPing", + "description": "Asterisk ping information", + "properties": { + "asterisk_id": { + "required": true, + "type": "string", + "description": "Asterisk id info" + }, + "ping": { + "required": true, + "type": "string", + "description": "Always string value is pong" + }, + "timestamp": { + "required": true, + "type": "string", + "description": "The timestamp string of request received time" + } + } + }, + "Module": { + "id": "Module", + "description": "Details of an Asterisk module", + "properties": { + "name": { + "type": "string", + "description": "The name of this module", + "required": true + }, + "description": { + "type": "string", + "description": "The description of this module", + "required": true + }, + "use_count": { + "type": "int", + "description": "The number of times this module is being used", + "required": true + }, + "status": { + "type": "string", + "description": "The running status of this module", + "required": true + }, + "support_level": { + "type": "string", + "description": "The support state of this module", + "required": true + } + } + }, + "LogChannel": { + "id": "LogChannel", + "description": "Details of an Asterisk log channel", + "properties": { + "channel": { + "type": "string", + "description": "The log channel path", + "required": true + }, + "type": { + "type": "string", + "description": "Types of logs for the log channel", + "required": true + }, + "status": { + "type": "string", + "description": "Whether or not a log type is enabled", + "required": true + }, + "configuration": { + "type": "string", + "description": "The various log levels", + "required": true + } + } + }, + "Variable": { + "id": "Variable", + "description": "The value of a channel variable", + "properties": { + "value": { + "required": true, + "type": "string", + "description": "The value of the variable requested" + } + } + }, + "ConfigTuple": { + "id": "ConfigTuple", + "description": "A key/value pair that makes up part of a configuration object.", + "properties": { + "attribute": { + "required": true, + "type": "string", + "description": "A configuration object attribute." + }, + "value": { + "required": true, + "type": "string", + "description": "The value for the attribute." + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_11_2/bridges.json b/codegen/src/main/resources/codegen-data/ari_1_11_2/bridges.json new file mode 100644 index 00000000..6268c49e --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_11_2/bridges.json @@ -0,0 +1,743 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.10.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/bridges.{format}", + "apis": [ + { + "path": "/bridges", + "description": "Active bridges", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all active bridges in Asterisk.", + "nickname": "list", + "responseClass": "List[Bridge]" + }, + { + "httpMethod": "POST", + "summary": "Create a new bridge.", + "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", + "nickname": "create", + "responseClass": "Bridge", + "parameters": [ + { + "name": "type", + "description": "Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media, video_single).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "bridgeId", + "description": "Unique ID to give to the bridge being created.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Name to give to the bridge being created.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}", + "description": "Individual bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Create a new bridge or updates an existing one.", + "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", + "nickname": "createWithId", + "responseClass": "Bridge", + "parameters": [ + { + "name": "type", + "description": "Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media, video_single) to set.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "bridgeId", + "description": "Unique ID to give to the bridge being created.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Set the name of the bridge.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ] + }, + { + "httpMethod": "GET", + "summary": "Get bridge details.", + "nickname": "get", + "responseClass": "Bridge", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Shut down a bridge.", + "notes": "If any channels are in this bridge, they will be removed and resume whatever they were doing beforehand.", + "nickname": "destroy", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/addChannel", + "description": "Add a channel to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Add a channel to a bridge.", + "nickname": "addChannel", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channel", + "description": "Ids of channels to add to bridge", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "role", + "description": "Channel's role in the bridge", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Channel not found" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application; Channel currently recording" + }, + { + "code": 422, + "reason": "Channel not in Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/removeChannel", + "description": "Remove a channel from a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Remove a channel from a bridge.", + "nickname": "removeChannel", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channel", + "description": "Ids of channels to remove from bridge", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Channel not found" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + }, + { + "code": 422, + "reason": "Channel not in this bridge" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/videoSource/{channelId}", + "description": "Set a channel as the video source in a multi-party bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Set a channel as the video source in a multi-party mixing bridge. This operation has no effect on bridges with two or fewer participants.", + "nickname": "setVideoSource", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge or Channel not found" + }, + { + "code": 409, + "reason": "Channel not in Stasis application" + }, + { + "code": 422, + "reason": "Channel not in this Bridge" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/videoSource", + "description": "Removes any explicit video source", + "operations": [ + { + "httpMethod": "DELETE", + "summary": "Removes any explicit video source in a multi-party mixing bridge. This operation has no effect on bridges with two or fewer participants. When no explicit video source is set, talk detection will be used to determine the active video stream.", + "nickname": "clearVideoSource", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/moh", + "description": "Play music on hold to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play music on hold to a bridge or change the MOH class that is playing.", + "nickname": "startMoh", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "mohClass", + "description": "Channel's id", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing music on hold to a bridge.", + "notes": "This will only stop music on hold being played via POST bridges/{bridgeId}/moh.", + "nickname": "stopMoh", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/play", + "description": "Play media to the participants of a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media on a bridge.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "play", + "responseClass": "Playback", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media's URI to play.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of media to skip before playing.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "playbackId", + "description": "Playback Id.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/play/{playbackId}", + "description": "Play media to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media on a bridge.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "playWithId", + "responseClass": "Playback", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media's URI to play.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of media to skip before playing.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + + } + ] + }, + { + "path": "/bridges/{bridgeId}/record", + "description": "Record audio on a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start a recording.", + "notes": "This records the mixed audio from all channels participating in this bridge.", + "nickname": "record", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Recording's filename", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "maxDurationSeconds", + "description": "Maximum duration of the recording, in seconds. 0 for no limit.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "maxSilenceSeconds", + "description": "Maximum duration of silence, in seconds. 0 for no limit.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "ifExists", + "description": "Action to take if a recording with the same name already exists.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "fail", + "allowableValues": { + "valueType": "LIST", + "values": [ + "fail", + "overwrite", + "append" + ] + } + }, + { + "name": "beep", + "description": "Play beep when recording begins", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "terminateOn", + "description": "DTMF input to terminate recording.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "any", + "*", + "#" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge is not in a Stasis application; A recording with the same name already exists on the system and can not be overwritten because it is in progress or ifExists=fail" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + } + ], + "models": { + "Bridge": { + "id": "Bridge", + "description": "The merging of media from one or more channels.\n\nEveryone on the bridge receives the same audio.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for this bridge", + "required": true + }, + "technology": { + "type": "string", + "description": "Name of the current bridging technology", + "required": true + }, + "bridge_type": { + "type": "string", + "description": "Type of bridge technology", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "mixing", + "holding" + ] + } + }, + "bridge_class": { + "type": "string", + "description": "Bridging class", + "required": true + }, + "creator": { + "type": "string", + "description": "Entity that created the bridge", + "required": true + }, + "name": { + "type": "string", + "description": "Name the creator gave the bridge", + "required": true + }, + "channels": { + "type": "List[string]", + "description": "Ids of channels participating in this bridge", + "required": true + }, + "video_mode": { + "type": "string", + "description": "The video mode the bridge is using. One of 'none', 'talker', or 'single'.", + "required": false + }, + "video_source_id": { + "type": "string", + "description": "The ID of the channel that is the source of video in this bridge, if one exists.", + "required": false + }, + "creationtime": { + "required": true, + "type": "Date", + "description": "Timestamp when bridge was created" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_11_2/channels.json b/codegen/src/main/resources/codegen-data/ari_1_11_2/channels.json new file mode 100644 index 00000000..fdeb0b83 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_11_2/channels.json @@ -0,0 +1,1825 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.10.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/channels.{format}", + "apis": [ + { + "path": "/channels", + "description": "Active channels", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all active channels in Asterisk.", + "nickname": "list", + "responseClass": "List[Channel]" + }, + { + "httpMethod": "POST", + "summary": "Create a new channel (originate).", + "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.", + "nickname": "originate", + "responseClass": "Channel", + "parameters": [ + { + "name": "endpoint", + "description": "Endpoint to call.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to dial after the endpoint answers. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to dial after the endpoint answers. If omitted, uses 'default'. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to dial after the endpoint answers. If omitted, uses 1. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "long" + }, + { + "name": "label", + "description": "The label to dial after the endpoint answers. Will supersede 'priority' if provided. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The application that is subscribed to the originated channel. When the channel is answered, it will be passed to this Stasis application. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "callerId", + "description": "CallerID to use when dialing the endpoint or extension.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 30 + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "The unique id of the channel which is originating this one.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "formats", + "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for originating a channel." + }, + { + "code": 409, + "reason": "Channel with given unique ID already exists." + } + ] + } + ] + }, + { + "path": "/channels/{channelId}", + "description": "Active channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "Channel details.", + "nickname": "get", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + } + ] + }, + { + "httpMethod": "POST", + "summary": "Create a new channel (originate with id).", + "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.", + "nickname": "originateWithId", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "endpoint", + "description": "Endpoint to call.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to dial after the endpoint answers. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to dial after the endpoint answers. If omitted, uses 'default'. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to dial after the endpoint answers. If omitted, uses 1. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "long" + }, + { + "name": "label", + "description": "The label to dial after the endpoint answers. Will supersede 'priority' if provided. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The application that is subscribed to the originated channel. When the channel is answered, it will be passed to this Stasis application. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "callerId", + "description": "CallerID to use when dialing the endpoint or extension.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 30 + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "The unique id of the channel which is originating this one.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "formats", + "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for originating a channel." + }, + { + "code": 409, + "reason": "Channel with given unique ID already exists." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Delete (i.e. hangup) a channel.", + "nickname": "hangup", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "reason", + "description": "Reason for hanging up the channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defalutValue": "normal", + "allowableValues": { + "valueType": "LIST", + "values": [ + "normal", + "busy", + "congestion", + "no_answer" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid reason for hangup provided" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/continue", + "description": "Exit application; continue execution in the dialplan", + "operations": [ + { + "httpMethod": "POST", + "summary": "Exit application; continue execution in the dialplan.", + "nickname": "continueInDialplan", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "label", + "description": "The label to continue to - will supersede 'priority' if both are provided.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/move", + "description": "Move the channel from one Stasis application to another.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Move the channel from one Stasis application to another.", + "nickname": "move", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The channel will be passed to this Stasis application.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": "404", + "reason": "Channel not found" + }, + { + "code": "409", + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/redirect", + "description": "Inform the channel that it should redirect itself to a different location. Note that this will almost certainly cause the channel to exit the application.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Redirect the channel to a different location.", + "nickname": "redirect", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "endpoint", + "description": "The endpoint to redirect the channel to", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Endpoint parameter not provided" + }, + { + "code": 404, + "reason": "Channel or endpoint not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 422, + "reason": "Endpoint is not the same type as the channel" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/answer", + "description": "Answer a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Answer a channel.", + "nickname": "answer", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/ring", + "description": "Send a ringing indication to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Indicate ringing to a channel.", + "nickname": "ring", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop ringing indication on a channel if locally generated.", + "nickname": "ringStop", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/dtmf", + "description": "Send DTMF to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Send provided DTMF to a given channel.", + "nickname": "sendDTMF", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "dtmf", + "description": "DTMF To send.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "before", + "description": "Amount of time to wait before DTMF digits (specified in milliseconds) start.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0 + }, + { + "name": "between", + "description": "Amount of time in between DTMF digits (specified in milliseconds).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 100 + }, + { + "name": "duration", + "description": "Length of each DTMF digit (specified in milliseconds).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 100 + }, + { + "name": "after", + "description": "Amount of time to wait after DTMF digits (specified in milliseconds) end.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0 + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "DTMF is required" + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/mute", + "description": "Mute a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Mute a channel.", + "nickname": "mute", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "Direction in which to mute audio", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both", + "in", + "out" + ] + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unmute a channel.", + "nickname": "unmute", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "Direction in which to unmute audio", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both", + "in", + "out" + ] + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/hold", + "description": "Put a channel on hold", + "operations": [ + { + "httpMethod": "POST", + "summary": "Hold a channel.", + "nickname": "hold", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Remove a channel from hold.", + "nickname": "unhold", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/moh", + "description": "Play music on hold to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play music on hold to a channel.", + "notes": "Using media operations such as /play on a channel playing MOH in this manner will suspend MOH without resuming automatically. If continuing music on hold is desired, the stasis application must reinitiate music on hold.", + "nickname": "startMoh", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "mohClass", + "description": "Music on hold class to use", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing music on hold to a channel.", + "nickname": "stopMoh", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/silence", + "description": "Play silence to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play silence to a channel.", + "notes": "Using media operations such as /play on a channel playing silence in this manner will suspend silence without resuming automatically.", + "nickname": "startSilence", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing silence to a channel.", + "nickname": "stopSilence", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/play", + "description": "Play media to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "play", + "responseClass": "Playback", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media's URI to play.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of media to skip before playing.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000 + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/play/{playbackId}", + "description": "Play media to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media and specify the playbackId.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "playWithId", + "responseClass": "Playback", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media's URI to play.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of media to skip before playing.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000 + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/record", + "description": "Record audio from a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start a recording.", + "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.", + "nickname": "record", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Recording's filename", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "maxDurationSeconds", + "description": "Maximum duration of the recording, in seconds. 0 for no limit", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "maxSilenceSeconds", + "description": "Maximum duration of silence, in seconds. 0 for no limit", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "ifExists", + "description": "Action to take if a recording with the same name already exists.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "fail", + "allowableValues": { + "valueType": "LIST", + "values": [ + "fail", + "overwrite", + "append" + ] + } + }, + { + "name": "beep", + "description": "Play beep when recording begins", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "terminateOn", + "description": "DTMF input to terminate recording", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "any", + "*", + "#" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "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" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/variable", + "description": "Variables on a channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the value of a channel variable or function.", + "nickname": "getChannelVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The channel variable or function to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Channel or variable not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "POST", + "summary": "Set the value of a channel variable or function.", + "nickname": "setChannelVar", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The channel variable or function to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/snoop", + "description": "Snoop (spy/whisper) on a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start snooping.", + "notes": "Snoop (spy/whisper) on a specific channel.", + "nickname": "snoopChannel", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "spy", + "description": "Direction of audio to spy on", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "whisper", + "description": "Direction of audio to whisper into", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "app", + "description": "Application the snooping channel is placed into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "snoopId", + "description": "Unique ID to assign to snooping channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/snoop/{snoopId}", + "description": "Snoop (spy/whisper) on a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start snooping.", + "notes": "Snoop (spy/whisper) on a specific channel.", + "nickname": "snoopChannelWithId", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "snoopId", + "description": "Unique ID to assign to snooping channel", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "spy", + "description": "Direction of audio to spy on", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "whisper", + "description": "Direction of audio to whisper into", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "app", + "description": "Application the snooping channel is placed into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/rtp_statistics", + "description": "Get RTP statistics information for RTP on a channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "RTP stats on a channel.", + "nickname": "rtpstatistics", + "responseClass": "RTPstat", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel cannot be found." + } + ] + } + ] + } + ], + "models": { + "Dialed": { + "id": "Dialed", + "description": "Dialed channel information.", + "properties": {} + }, + "DialplanCEP": { + "id": "DialplanCEP", + "description": "Dialplan location (context/extension/priority)", + "properties": { + "context": { + "required": true, + "type": "string", + "description": "Context in the dialplan" + }, + "exten": { + "required": true, + "type": "string", + "description": "Extension in the dialplan" + }, + "priority": { + "required": true, + "type": "long", + "description": "Priority in the dialplan" + }, + "app_name": { + "required": true, + "type": "string", + "description": "Name of current dialplan application" + }, + "app_data": { + "required": true, + "type": "string", + "description": "Parameter of current dialplan application" + } + } + }, + "CallerID": { + "id": "CallerID", + "description": "Caller identification", + "properties": { + "name": { + "required": true, + "type": "string" + }, + "number": { + "required": true, + "type": "string" + } + } + }, + "RTPstat": { + "id": "RTPstat", + "description": "A statistics of a RTP.", + "properties": { + "txcount": { + "required": true, + "type": "int", + "description": "Number of packets transmitted." + }, + "rxcount": { + "required": true, + "type": "int", + "description": "Number of packets received." + }, + "txjitter": { + "required": false, + "type": "double", + "description": "Jitter on transmitted packets." + }, + "rxjitter": { + "required": false, + "type": "double", + "description": "Jitter on received packets." + }, + "remote_maxjitter": { + "required": false, + "type": "double", + "description": "Maximum jitter on remote side." + }, + "remote_minjitter": { + "required": false, + "type": "double", + "description": "Minimum jitter on remote side." + }, + "remote_normdevjitter": { + "required": false, + "type": "double", + "description": "Average jitter on remote side." + }, + "remote_stdevjitter": { + "required": false, + "type": "double", + "description": "Standard deviation jitter on remote side." + }, + "local_maxjitter": { + "required": false, + "type": "double", + "description": "Maximum jitter on local side." + }, + "local_minjitter": { + "required": false, + "type": "double", + "description": "Minimum jitter on local side." + }, + "local_normdevjitter": { + "required": false, + "type": "double", + "description": "Average jitter on local side." + }, + "local_stdevjitter": { + "required": false, + "type": "double", + "description": "Standard deviation jitter on local side." + }, + "txploss": { + "required": true, + "type": "int", + "description": "Number of transmitted packets lost." + }, + "rxploss": { + "required": true, + "type": "int", + "description": "Number of received packets lost." + }, + "remote_maxrxploss": { + "required": false, + "type": "double", + "description": "Maximum number of packets lost on remote side." + }, + "remote_minrxploss": { + "required": false, + "type": "double", + "description": "Minimum number of packets lost on remote side." + }, + "remote_normdevrxploss": { + "required": false, + "type": "double", + "description": "Average number of packets lost on remote side." + }, + "remote_stdevrxploss": { + "required": false, + "type": "double", + "description": "Standard deviation packets lost on remote side." + }, + "local_maxrxploss": { + "required": false, + "type": "double", + "description": "Maximum number of packets lost on local side." + }, + "local_minrxploss": { + "required": false, + "type": "double", + "description": "Minimum number of packets lost on local side." + }, + "local_normdevrxploss": { + "required": false, + "type": "double", + "description": "Average number of packets lost on local side." + }, + "local_stdevrxploss": { + "required": false, + "type": "double", + "description": "Standard deviation packets lost on local side." + }, + "rtt": { + "required": false, + "type": "double", + "description": "Total round trip time." + }, + "maxrtt": { + "required": false, + "type": "double", + "description": "Maximum round trip time." + }, + "minrtt": { + "required": false, + "type": "double", + "description": "Minimum round trip time." + }, + "normdevrtt": { + "required": false, + "type": "double", + "description": "Average round trip time." + }, + "stdevrtt": { + "required": false, + "type": "double", + "description": "Standard deviation round trip time." + }, + "local_ssrc": { + "required": true, + "type": "int", + "description": "Our SSRC." + }, + "remote_ssrc": { + "required": true, + "type": "int", + "description": "Their SSRC." + }, + "txoctetcount": { + "required": true, + "type": "int", + "description": "Number of octets transmitted." + }, + "rxoctetcount": { + "required": true, + "type": "int", + "description": "Number of octets received." + }, + "channel_uniqueid": { + "required": true, + "type": "string", + "description": "The Asterisk channel's unique ID that owns this instance." + } + } + }, + "Channel": { + "id": "Channel", + "description": "A specific communication connection between Asterisk and an Endpoint.", + "properties": { + "id": { + "required": true, + "type": "string", + "description": "Unique identifier of the channel.\n\nThis is the same as the Uniqueid field in AMI." + }, + "name": { + "required": true, + "type": "string", + "description": "Name of the channel (i.e. SIP/foo-0000a7e3)" + }, + "state": { + "required": true, + "type": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "Down", + "Rsrved", + "OffHook", + "Dialing", + "Ring", + "Ringing", + "Up", + "Busy", + "Dialing Offhook", + "Pre-ring", + "Unknown" + ] + } + }, + "caller": { + "required": true, + "type": "CallerID" + }, + "connected": { + "required": true, + "type": "CallerID" + }, + "accountcode": { + "required": true, + "type": "string" + }, + "dialplan": { + "required": true, + "type": "DialplanCEP", + "description": "Current location in the dialplan" + }, + "creationtime": { + "required": true, + "type": "Date", + "description": "Timestamp when channel was created" + }, + "language": { + "required": true, + "type": "string", + "description": "The default spoken language" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_11_2/deviceStates.json b/codegen/src/main/resources/codegen-data/ari_1_11_2/deviceStates.json new file mode 100644 index 00000000..16d3af75 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_11_2/deviceStates.json @@ -0,0 +1,151 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "Kevin Harwell ", + "_svn_revision": "$Revision$", + "apiVersion": "1.10.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/deviceStates.{format}", + "apis": [ + { + "path": "/deviceStates", + "description": "Device states", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all ARI controlled device states.", + "nickname": "list", + "responseClass": "List[DeviceState]" + } + ] + }, + { + "path": "/deviceStates/{deviceName}", + "description": "Device state", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve the current state of a device.", + "nickname": "get", + "responseClass": "DeviceState", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Change the state of a device controlled by ARI. (Note - implicitly creates the device state).", + "nickname": "update", + "responseClass": "void", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "deviceState", + "description": "Device state value", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "NOT_INUSE", + "INUSE", + "BUSY", + "INVALID", + "UNAVAILABLE", + "RINGING", + "RINGINUSE", + "ONHOLD" + ] + } + + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Device name is missing" + }, + { + "code": 409, + "reason": "Uncontrolled device specified" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Destroy a device-state controlled by ARI.", + "nickname": "delete", + "responseClass": "void", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Device name is missing" + }, + { + "code": 409, + "reason": "Uncontrolled device specified" + } + ] + } + ] + } + ], + "models": { + "DeviceState": { + "id": "DeviceState", + "description": "Represents the state of a device.", + "properties": { + "name": { + "type": "string", + "description": "Name of the device.", + "required": true + }, + "state": { + "type": "string", + "description": "Device's state", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "UNKNOWN", + "NOT_INUSE", + "INUSE", + "BUSY", + "INVALID", + "UNAVAILABLE", + "RINGING", + "RINGINUSE", + "ONHOLD" + ] + } + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_11_2/endpoints.json b/codegen/src/main/resources/codegen-data/ari_1_11_2/endpoints.json new file mode 100644 index 00000000..65152950 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_11_2/endpoints.json @@ -0,0 +1,263 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.10.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/endpoints.{format}", + "apis": [ + { + "path": "/endpoints", + "description": "Asterisk endpoints", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all endpoints.", + "nickname": "list", + "responseClass": "List[Endpoint]" + } + ] + }, + { + "path": "/endpoints/sendMessage", + "description": "Send a message to some technology URI or endpoint.", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Send a message to some technology URI or endpoint.", + "nickname": "sendMessage", + "responseClass": "void", + "parameters": [ + { + "name": "to", + "description": "The endpoint resource or technology specific URI to send the message to. Valid resources are sip, pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "from", + "description": "The endpoint resource or technology specific identity to send this message from. Valid resources are sip, pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "body", + "description": "The body of the message", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "descriptioni": "The \"variables\" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, pjsip and sip resource types will add the key/value pairs as SIP headers,", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoint not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}", + "description": "Asterisk endpoints", + "operations": [ + { + "httpMethod": "GET", + "summary": "List available endoints for a given endpoint technology.", + "nickname": "listByTech", + "responseClass": "List[Endpoint]", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoints (sip,iax2,...)", + "paramType": "path", + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Endpoints not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}/{resource}", + "description": "Single endpoint", + "operations": [ + { + "httpMethod": "GET", + "summary": "Details for an endpoint.", + "nickname": "get", + "responseClass": "Endpoint", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "resource", + "description": "ID of the endpoint", + "paramType": "path", + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoints not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}/{resource}/sendMessage", + "description": "Send a message to some endpoint in a technology.", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Send a message to some endpoint in a technology.", + "nickname": "sendMessageToEndpoint", + "responseClass": "void", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "resource", + "description": "ID of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "from", + "description": "The endpoint resource or technology specific identity to send this message from. Valid resources are sip, pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "body", + "description": "The body of the message", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "descriptioni": "The \"variables\" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, pjsip and sip resource types will add the key/value pairs as SIP headers,", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoint not found" + } + ] + } + ] + } + ], + "models": { + "Endpoint": { + "id": "Endpoint", + "description": "An external device that may offer/accept calls to/from Asterisk.\n\nUnlike most resources, which have a single unique identifier, an endpoint is uniquely identified by the technology/resource pair.", + "properties": { + "technology": { + "type": "string", + "description": "Technology of the endpoint", + "required": true + }, + "resource": { + "type": "string", + "description": "Identifier of the endpoint, specific to the given technology.", + "required": true + }, + "state": { + "type": "string", + "description": "Endpoint's state", + "required": false, + "allowableValues": { + "valueType": "LIST", + "values": [ + "unknown", + "offline", + "online" + ] + } + }, + "channel_ids": { + "type": "List[string]", + "description": "Id's of channels associated with this endpoint", + "required": true + } + } + }, + "TextMessage": { + "id": "TextMessage", + "description": "A text message.", + "properties": { + "from": { + "type": "string", + "description": "A technology specific URI specifying the source of the message. For sip and pjsip technologies, any SIP URI can be specified. For xmpp, the URI must correspond to the client connection being used to send the message.", + "required": true + }, + "to": { + "type": "string", + "description": "A technology specific URI specifying the destination of the message. Valid technologies include sip, pjsip, and xmp. The destination of a message should be an endpoint.", + "required": true + }, + "body": { + "type": "string", + "description": "The text of the message.", + "required": true + }, + "variables": { + "type": "object", + "description": "Technology specific key/value pairs (JSON object) associated with the message.", + "required": false + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_11_2/events.json b/codegen/src/main/resources/codegen-data/ari_1_11_2/events.json new file mode 100644 index 00000000..24d55130 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_11_2/events.json @@ -0,0 +1,903 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.10.0", + "swaggerVersion": "1.2", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/events.{format}", + "apis": [ + { + "path": "/events", + "description": "Events from Asterisk to applications", + "operations": [ + { + "httpMethod": "GET", + "upgrade": "websocket", + "websocketProtocol": "ari", + "summary": "WebSocket connection for events.", + "nickname": "eventWebsocket", + "responseClass": "Message", + "parameters": [ + { + "name": "app", + "description": "Applications to subscribe to.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "subscribeAll", + "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'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean" + } + ] + } + ] + }, + { + "path": "/events/user/{eventName}", + "description": "Stasis application user events", + "operations": [ + { + "httpMethod": "POST", + "summary": "Generate a user event.", + "nickname": "userEvent", + "responseClass": "void", + "parameters": [ + { + "name": "eventName", + "description": "Event name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "application", + "description": "The name of the application that will receive this event", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "source", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}/{resource}, deviceState:{deviceName}", + "paramType": "query", + "required": false, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds custom key/value pairs to add to the user event. Ex. { \"variables\": { \"key\": \"value\" } }", + "paramType": "body", + "required": false, + "allowMultiple": false, + "dataType": "containers" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 422, + "reason": "Event source not found." + }, + { + "code": 400, + "reason": "Invalid even tsource URI or userevent data." + } + ] + } + ] + } + ], + "models": { + "Message": { + "id": "Message", + "description": "Base type for errors and events", + "discriminator": "type", + "properties": { + "type": { + "type": "string", + "required": true, + "description": "Indicates the type of this message." + }, + "asterisk_id": { + "type": "string", + "required": false, + "description": "The unique ID for the Asterisk instance that raised this event." + } + }, + "subTypes": [ + "MissingParams", + "Event" + ] + }, + "MissingParams": { + "id": "MissingParams", + "description": "Error event sent when required params are missing.", + "properties": { + "params": { + "required": true, + "type": "List[string]", + "description": "A list of the missing parameters" + } + } + }, + "Event": { + "id": "Event", + "description": "Base type for asynchronous events from Asterisk.", + "properties": { + "application": { + "type": "string", + "description": "Name of the application receiving the event.", + "required": true + }, + "timestamp": { + "type": "Date", + "description": "Time at which this event was created.", + "required": true + } + }, + "subTypes": [ + "DeviceStateChanged", + "PlaybackStarted", + "PlaybackFinished", + "RecordingStarted", + "RecordingFinished", + "RecordingFailed", + "ApplicationMoveFailed", + "ApplicationReplaced", + "BridgeCreated", + "BridgeDestroyed", + "BridgeMerged", + "BridgeBlindTransfer", + "BridgeAttendedTransfer", + "BridgeVideoSourceChanged", + "ChannelCreated", + "ChannelDestroyed", + "ChannelEnteredBridge", + "ChannelLeftBridge", + "ChannelStateChange", + "ChannelDtmfReceived", + "ChannelDialplan", + "ChannelCallerId", + "ChannelUserevent", + "ChannelHangupRequest", + "ChannelVarset", + "ChannelTalkingStarted", + "ChannelTalkingFinished", + "ChannelHold", + "ChannelUnhold", + "ContactStatusChange", + "EndpointStateChange", + "Dial", + "StasisEnd", + "StasisStart", + "TextMessageReceived", + "ChannelConnectedLine", + "PeerStatusChange" + ] + }, + "ContactInfo": { + "id": "ContactInfo", + "description": "Detailed information about a contact on an endpoint.", + "properties": { + "uri": { + "type": "string", + "description": "The location of the contact.", + "required": true + }, + "contact_status": { + "type": "string", + "description": "The current status of the contact.", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "Unreachable", + "Reachable", + "Unknown", + "Created", + "Removed" + ] + } + }, + "aor": { + "type": "string", + "description": "The Address of Record this contact belongs to.", + "required": true + }, + "roundtrip_usec": { + "type": "string", + "description": "Current round trip time, in microseconds, for the contact.", + "required": false + } + } + }, + "Peer": { + "id": "Peer", + "description": "Detailed information about a remote peer that communicates with Asterisk.", + "properties": { + "peer_status": { + "type": "string", + "description": "The current state of the peer. Note that the values of the status are dependent on the underlying peer technology.", + "required": true + }, + "cause": { + "type": "string", + "description": "An optional reason associated with the change in peer_status.", + "required": false + }, + "address": { + "type": "string", + "description": "The IP address of the peer.", + "required": false + }, + "port": { + "type": "string", + "description": "The port of the peer.", + "required": false + }, + "time": { + "type": "string", + "description": "The last known time the peer was contacted.", + "required": false + } + } + }, + "DeviceStateChanged": { + "id": "DeviceStateChanged", + "description": "Notification that a device state has changed.", + "properties": { + "device_state": { + "type": "DeviceState", + "description": "Device state object", + "required": true + } + } + }, + "PlaybackStarted": { + "id": "PlaybackStarted", + "description": "Event showing the start of a media playback operation.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "PlaybackFinished": { + "id": "PlaybackFinished", + "description": "Event showing the completion of a media playback operation.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "RecordingStarted": { + "id": "RecordingStarted", + "description": "Event showing the start of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "RecordingFinished": { + "id": "RecordingFinished", + "description": "Event showing the completion of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "RecordingFailed": { + "id": "RecordingFailed", + "description": "Event showing failure of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "ApplicationMoveFailed": { + "id": "ApplicationMoveFailed", + "description": "Notification that trying to move a channel to another Stasis application failed.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + }, + "destination": { + "required": true, + "type": "string" + }, + "args": { + "required": true, + "type": "List[string]", + "description": "Arguments to the application" + } + } + }, + "ApplicationReplaced": { + "id": "ApplicationReplaced", + "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.", + "properties": {} + }, + "BridgeCreated": { + "id": "BridgeCreated", + "description": "Notification that a bridge has been created.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeDestroyed": { + "id": "BridgeDestroyed", + "description": "Notification that a bridge has been destroyed.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeMerged": { + "id": "BridgeMerged", + "description": "Notification that one bridge has merged into another.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "bridge_from": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeVideoSourceChanged": { + "id": "BridgeVideoSourceChanged", + "description": "Notification that the source of video in a bridge has changed.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "old_video_source_id": { + "required": false, + "type": "string" + } + } + }, + "BridgeBlindTransfer": { + "id": "BridgeBlindTransfer", + "description": "Notification that a blind transfer has occurred.", + "properties": { + "channel": { + "description": "The channel performing the blind transfer", + "required": true, + "type": "Channel" + }, + "replace_channel": { + "description": "The channel that is replacing transferer when the transferee(s) can not be transferred directly", + "required": false, + "type": "Channel" + }, + "transferee": { + "description": "The channel that is being transferred", + "required": false, + "type": "Channel" + }, + "exten": { + "description": "The extension transferred to", + "required": true, + "type": "string" + }, + "context": { + "description": "The context transferred to", + "required": true, + "type": "string" + }, + "result": { + "description": "The result of the transfer attempt", + "required": true, + "type": "string" + }, + "is_external": { + "description": "Whether the transfer was externally initiated or not", + "required": true, + "type": "boolean" + }, + "bridge": { + "description": "The bridge being transferred", + "type": "Bridge" + } + } + }, + "BridgeAttendedTransfer": { + "id": "BridgeAttendedTransfer", + "description": "Notification that an attended transfer has occurred.", + "properties": { + "transferer_first_leg": { + "description": "First leg of the transferer", + "required": true, + "type": "Channel" + }, + "transferer_second_leg": { + "description": "Second leg of the transferer", + "required": true, + "type": "Channel" + }, + "replace_channel": { + "description": "The channel that is replacing transferer_first_leg in the swap", + "required": false, + "type": "Channel" + }, + "transferee": { + "description": "The channel that is being transferred", + "required": false, + "type": "Channel" + }, + "transfer_target": { + "description": "The channel that is being transferred to", + "required": false, + "type": "Channel" + }, + "result": { + "description": "The result of the transfer attempt", + "required": true, + "type": "string" + }, + "is_external": { + "description": "Whether the transfer was externally initiated or not", + "required": true, + "type": "boolean" + }, + "transferer_first_leg_bridge": { + "description": "Bridge the transferer first leg is in", + "type": "Bridge" + }, + "transferer_second_leg_bridge": { + "description": "Bridge the transferer second leg is in", + "type": "Bridge" + }, + "destination_type": { + "description": "How the transfer was accomplished", + "required": true, + "type": "string" + }, + "destination_bridge": { + "description": "Bridge that survived the merge result", + "type": "string" + }, + "destination_application": { + "description": "Application that has been transferred into", + "type": "string" + }, + "destination_link_first_leg": { + "description": "First leg of a link transfer result", + "type": "Channel" + }, + "destination_link_second_leg": { + "description": "Second leg of a link transfer result", + "type": "Channel" + }, + "destination_threeway_channel": { + "description": "Transferer channel that survived the threeway result", + "type": "Channel" + }, + "destination_threeway_bridge": { + "description": "Bridge that survived the threeway result", + "type": "Bridge" + } + } + }, + "ChannelCreated": { + "id": "ChannelCreated", + "description": "Notification that a channel has been created.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelDestroyed": { + "id": "ChannelDestroyed", + "description": "Notification that a channel has been destroyed.", + "properties": { + "cause": { + "required": true, + "description": "Integer representation of the cause of the hangup", + "type": "int" + }, + "cause_txt": { + "required": true, + "description": "Text representation of the cause of the hangup", + "type": "string" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelEnteredBridge": { + "id": "ChannelEnteredBridge", + "description": "Notification that a channel has entered a bridge.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "channel": { + "type": "Channel" + } + } + }, + "ChannelLeftBridge": { + "id": "ChannelLeftBridge", + "description": "Notification that a channel has left a bridge.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelStateChange": { + "id": "ChannelStateChange", + "description": "Notification of a channel's state change.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelDtmfReceived": { + "id": "ChannelDtmfReceived", + "description": "DTMF received on a channel.\n\nThis event is sent when the DTMF ends. There is no notification about the start of DTMF", + "properties": { + "digit": { + "required": true, + "type": "string", + "description": "DTMF digit received (0-9, A-E, # or *)" + }, + "duration_ms": { + "required": true, + "type": "int", + "description": "Number of milliseconds DTMF was received" + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which DTMF was received" + } + } + }, + "ChannelDialplan": { + "id": "ChannelDialplan", + "description": "Channel changed location in the dialplan.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that changed dialplan location." + }, + "dialplan_app": { + "required": true, + "type": "string", + "description": "The application about to be executed." + }, + "dialplan_app_data": { + "required": true, + "type": "string", + "description": "The data to be passed to the application." + } + } + }, + "ChannelCallerId": { + "id": "ChannelCallerId", + "description": "Channel changed Caller ID.", + "properties": { + "caller_presentation": { + "required": true, + "type": "int", + "description": "The integer representation of the Caller Presentation value." + }, + "caller_presentation_txt": { + "required": true, + "type": "string", + "description": "The text representation of the Caller Presentation value." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that changed Caller ID." + } + } + }, + "ChannelUserevent": { + "id": "ChannelUserevent", + "description": "User-generated event with additional user-defined fields in the object.", + "properties": { + "eventname": { + "required": true, + "type": "string", + "description": "The name of the user event." + }, + "channel": { + "required": false, + "type": "Channel", + "description": "A channel that is signaled with the user event." + }, + "bridge": { + "required": false, + "type": "Bridge", + "description": "A bridge that is signaled with the user event." + }, + "endpoint": { + "required": false, + "type": "Endpoint", + "description": "A endpoint that is signaled with the user event." + }, + "userevent": { + "required": true, + "type": "object", + "description": "Custom Userevent data" + } + } + }, + "ChannelHangupRequest": { + "id": "ChannelHangupRequest", + "description": "A hangup was requested on the channel.", + "properties": { + "cause": { + "type": "int", + "description": "Integer representation of the cause of the hangup." + }, + "soft": { + "type": "boolean", + "description": "Whether the hangup request was a soft hangup request." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which the hangup was requested." + } + } + }, + "ChannelVarset": { + "id": "ChannelVarset", + "description": "Channel variable changed.", + "properties": { + "variable": { + "required": true, + "type": "string", + "description": "The variable that changed." + }, + "value": { + "required": true, + "type": "string", + "description": "The new value of the variable." + }, + "channel": { + "required": false, + "type": "Channel", + "description": "The channel on which the variable was set.\n\nIf missing, the variable is a global variable." + } + } + }, + "ChannelHold": { + "id": "ChannelHold", + "description": "A channel initiated a media hold.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that initiated the hold event." + }, + "musicclass": { + "required": false, + "type": "string", + "description": "The music on hold class that the initiator requested." + } + } + }, + "ChannelUnhold": { + "id": "ChannelUnhold", + "description": "A channel initiated a media unhold.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that initiated the unhold event." + } + } + }, + "ChannelTalkingStarted": { + "id": "ChannelTalkingStarted", + "description": "Talking was detected on the channel.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which talking started." + } + } + }, + "ChannelTalkingFinished": { + "id": "ChannelTalkingFinished", + "description": "Talking is no longer detected on the channel.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which talking completed." + }, + "duration": { + "required": true, + "type": "int", + "description": "The length of time, in milliseconds, that talking was detected on the channel" + } + } + }, + "ContactStatusChange": { + "id": "ContactStatusChange", + "description": "The state of a contact on an endpoint has changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + }, + "contact_info": { + "required": true, + "type": "ContactInfo" + } + } + }, + "PeerStatusChange": { + "id": "PeerStatusChange", + "description": "The state of a peer associated with an endpoint has changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + }, + "peer": { + "required": true, + "type": "Peer" + } + } + }, + "EndpointStateChange": { + "id": "EndpointStateChange", + "description": "Endpoint state changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + } + } + }, + "Dial": { + "id": "Dial", + "description": "Dialing state has changed.", + "properties": { + "caller": { + "required": false, + "type": "Channel", + "description": "The calling channel." + }, + "peer": { + "required": true, + "type": "Channel", + "description": "The dialed channel." + }, + "forward": { + "required": false, + "type": "string", + "description": "Forwarding target requested by the original dialed channel." + }, + "forwarded": { + "required": false, + "type": "Channel", + "description": "Channel that the caller has been forwarded to." + }, + "dialstring": { + "required": false, + "type": "string", + "description": "The dial string for calling the peer channel." + }, + "dialstatus": { + "required": true, + "type": "string", + "description": "Current status of the dialing attempt to the peer." + } + } + }, + "StasisEnd": { + "id": "StasisEnd", + "description": "Notification that a channel has left a Stasis application.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "StasisStart": { + "id": "StasisStart", + "description": "Notification that a channel has entered a Stasis application.", + "properties": { + "args": { + "required": true, + "type": "List[string]", + "description": "Arguments to the application" + }, + "channel": { + "required": true, + "type": "Channel" + }, + "replace_channel": { + "required": false, + "type": "Channel" + } + } + }, + "TextMessageReceived": { + "id": "TextMessageReceived", + "description": "A text message was received from an endpoint.", + "properties": { + "message": { + "required": true, + "type": "TextMessage" + }, + "endpoint": { + "required": false, + "type": "Endpoint" + } + } + }, + "ChannelConnectedLine": { + "id": "ChannelConnectedLine", + "description": "Channel changed Connected Line.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel whose connected line has changed." + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_11_2/mailboxes.json b/codegen/src/main/resources/codegen-data/ari_1_11_2/mailboxes.json new file mode 100644 index 00000000..999cd8db --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_11_2/mailboxes.json @@ -0,0 +1,134 @@ +{ + "_copyright": "Copyright (C) 2013, Digium, Inc.", + "_author": "Jonathan Rose ", + "_svn_revision": "$Revision$", + "apiVersion": "1.10.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/mailboxes.{format}", + "apis": [ + { + "path": "/mailboxes", + "description": "Mailboxes", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all mailboxes.", + "nickname": "list", + "responseClass": "List[Mailbox]" + } + ] + }, + { + "path": "/mailboxes/{mailboxName}", + "description": "Mailbox state", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve the current state of a mailbox.", + "nickname": "get", + "responseClass": "Mailbox", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Change the state of a mailbox. (Note - implicitly creates the mailbox).", + "nickname": "update", + "responseClass": "void", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "oldMessages", + "description": "Count of old messages in the mailbox", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "newMessages", + "description": "Count of new messages in the mailbox", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "int" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Destroy a mailbox.", + "nickname": "delete", + "responseClass": "void", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + } + ] + } + ], + "models": { + "Mailbox": { + "id": "Mailbox", + "description": "Represents the state of a mailbox.", + "properties": { + "name": { + "type": "string", + "description": "Name of the mailbox.", + "required": true + }, + "old_messages": { + "type": "int", + "description": "Count of old messages in the mailbox.", + "required": true + }, + "new_messages": { + "type": "int", + "description": "Count of new messages in the mailbox.", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_11_2/playbacks.json b/codegen/src/main/resources/codegen-data/ari_1_11_2/playbacks.json new file mode 100644 index 00000000..1a124325 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_11_2/playbacks.json @@ -0,0 +1,155 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.10.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/playbacks.{format}", + "apis": [ + { + "path": "/playbacks/{playbackId}", + "description": "Control object for a playback operation.", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a playback's details.", + "nickname": "get", + "responseClass": "Playback", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "The playback cannot be found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop a playback.", + "nickname": "stop", + "responseClass": "void", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "The playback cannot be found" + } + ] + } + ] + }, + { + "path": "/playbacks/{playbackId}/control", + "description": "Control object for a playback operation.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Control a playback.", + "nickname": "control", + "responseClass": "void", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "operation", + "description": "Operation to perform on the playback.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "restart", + "pause", + "unpause", + "reverse", + "forward" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "The provided operation parameter was invalid" + }, + { + "code": 404, + "reason": "The playback cannot be found" + }, + { + "code": 409, + "reason": "The operation cannot be performed in the playback's current state" + } +] + } + ] + } + ], + "models": { + "Playback": { + "id": "Playback", + "description": "Object representing the playback of media to a channel", + "properties": { + "id": { + "type": "string", + "description": "ID for this playback operation", + "required": true + }, + "media_uri": { + "type": "string", + "description": "URI for the media to play back.", + "required": true + }, + "target_uri": { + "type": "string", + "description": "URI for the channel or bridge to play the media on", + "required": true + }, + "language": { + "type": "string", + "description": "For media types that support multiple languages, the language requested for playback." + }, + "state": { + "type": "string", + "description": "Current state of the playback operation.", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "queued", + "playing", + "complete" + ] + } + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_11_2/recordings.json b/codegen/src/main/resources/codegen-data/ari_1_11_2/recordings.json new file mode 100644 index 00000000..48499bfa --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_11_2/recordings.json @@ -0,0 +1,378 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.10.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/recordings.{format}", + "apis": [ + { + "path": "/recordings/stored", + "description": "Recordings", + "operations": [ + { + "httpMethod": "GET", + "summary": "List recordings that are complete.", + "nickname": "listStored", + "responseClass": "List[StoredRecording]" + } + ] + }, + { + "path": "/recordings/stored/{recordingName}", + "description": "Individual recording", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a stored recording's details.", + "nickname": "getStored", + "responseClass": "StoredRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Delete a stored recording.", + "nickname": "deleteStored", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/stored/{recordingName}/copy", + "description": "Copy an individual recording", + "operations": [ + { + "httpMethod": "POST", + "summary": "Copy a stored recording.", + "nickname": "copyStored", + "responseClass": "StoredRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording to copy", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "destinationRecordingName", + "description": "The destination name of the recording", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "A recording with the same name already exists on the system" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}", + "description": "A recording that is in progress", + "operations": [ + { + "httpMethod": "GET", + "summary": "List live recordings.", + "nickname": "getLive", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop a live recording and discard it.", + "nickname": "cancel", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/stop", + "operations": [ + { + "httpMethod": "POST", + "summary": "Stop a live recording and store it.", + "nickname": "stop", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/pause", + "operations": [ + { + "httpMethod": "POST", + "summary": "Pause a live recording.", + "notes": "Pausing a recording suspends silence detection, which will be restarted when the recording is unpaused. Paused time is not included in the accounting for maxDurationSeconds.", + "nickname": "pause", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unpause a live recording.", + "nickname": "unpause", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/mute", + "operations": [ + { + "httpMethod": "POST", + "summary": "Mute a live recording.", + "notes": "Muting a recording suspends silence detection, which will be restarted when the recording is unmuted.", + "nickname": "mute", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unmute a live recording.", + "nickname": "unmute", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + } + ] + } + ], + "models": { + "StoredRecording": { + "id": "StoredRecording", + "description": "A past recording that may be played back.", + "properties": { + "name": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + }, + "LiveRecording": { + "id": "LiveRecording", + "description": "A recording that is in progress", + "properties": { + "name": { + "required": true, + "type": "string", + "description": "Base name for the recording" + }, + "format": { + "required": true, + "type": "string", + "description": "Recording format (wav, gsm, etc.)" + }, + "target_uri": { + "required": true, + "type": "string", + "description": "URI for the channel or bridge being recorded" + }, + "state": { + "required": true, + "type": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "queued", + "recording", + "paused", + "done", + "failed", + "canceled" + ] + } + }, + "duration": { + "required": false, + "type": "int", + "description": "Duration in seconds of the recording" + }, + "talking_duration": { + "required": false, + "type": "int", + "description": "Duration of talking, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds." + }, + "silence_duration": { + "required": false, + "type": "int", + "description": "Duration of silence, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds." + }, + "cause": { + "required": false, + "type": "string", + "description": "Cause for recording failure if failed" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_11_2/sounds.json b/codegen/src/main/resources/codegen-data/ari_1_11_2/sounds.json new file mode 100644 index 00000000..4a8eb2cc --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_11_2/sounds.json @@ -0,0 +1,99 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.10.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/sounds.{format}", + "apis": [ + { + "path": "/sounds", + "description": "Sounds", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all sounds.", + "nickname": "list", + "responseClass": "List[Sound]", + "parameters": [ + { + "name": "lang", + "description": "Lookup sound for a specific language.", + "paramType": "query", + "dataType": "string", + "required": false + }, + { + "name": "format", + "description": "Lookup sound in a specific format.", + "paramType": "query", + "dataType": "string", + "required": false, + "__note": "core show translation can show translation paths between formats, along with relative costs. so this could be just installed format, or we could follow that for transcoded formats." + } + ] + } + ] + }, + { + "path": "/sounds/{soundId}", + "description": "Individual sound", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a sound's details.", + "nickname": "get", + "responseClass": "Sound", + "parameters": [ + { + "name": "soundId", + "description": "Sound's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ] + } + ] + } + ], + "models": { + "FormatLangPair": { + "id": "FormatLangPair", + "description": "Identifies the format and language of a sound file", + "properties": { + "language": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + }, + "Sound": { + "id": "Sound", + "description": "A media file that may be played back.", + "properties": { + "id": { + "required": true, + "description": "Sound's identifier.", + "type": "string" + }, + "text": { + "required": false, + "description": "Text description of the sound, usually the words spoken.", + "type": "string" + }, + "formats": { + "required": true, + "description": "The formats and languages in which this sound is available.", + "type": "List[FormatLangPair]" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_1_0/applications.json b/codegen/src/main/resources/codegen-data/ari_1_1_0/applications.json new file mode 100644 index 00000000..f976e554 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_1_0/applications.json @@ -0,0 +1,172 @@ +{ + "_copyright": "Copyright (C) 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.1.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/stasis", + "resourcePath": "/api-docs/applications.{format}", + "apis": [ + { + "path": "/applications", + "description": "Stasis applications", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all applications.", + "nickname": "list", + "responseClass": "List[Application]" + } + ] + }, + { + "path": "/applications/{applicationName}", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get details of an application.", + "nickname": "get", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Application does not exist." + } + ] + } + ] + }, + { + "path": "/applications/{applicationName}/subscription", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "POST", + "summary": "Subscribe an application to a event source.", + "notes": "Returns the state of the application after the subscriptions have changed", + "nickname": "subscribe", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "eventSource", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}/{resource}, deviceState:{deviceName}", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing parameter." + }, + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 422, + "reason": "Event source does not exist." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unsubscribe an application from an event source.", + "notes": "Returns the state of the application after the subscriptions have changed", + "nickname": "unsubscribe", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "eventSource", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}/{resource}, deviceState:{deviceName}", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing parameter; event source scheme not recognized." + }, + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 409, + "reason": "Application not subscribed to event source." + }, + { + "code": 422, + "reason": "Event source does not exist." + } + ] + } + ] + } + ], + "models": { + "Application": { + "id": "Application", + "description": "Details of a Stasis application", + "properties": { + "name": { + "type": "string", + "description": "Name of this application", + "required": true + }, + "channel_ids": { + "type": "List[string]", + "description": "Id's for channels subscribed to.", + "required": true + }, + "bridge_ids": { + "type": "List[string]", + "description": "Id's for bridges subscribed to.", + "required": true + }, + "endpoint_ids": { + "type": "List[string]", + "description": "{tech}/{resource} for endpoints subscribed to.", + "required": true + }, + "device_names": { + "type": "List[string]", + "description": "Names of the devices subscribed to.", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_1_0/asterisk.json b/codegen/src/main/resources/codegen-data/ari_1_1_0/asterisk.json new file mode 100644 index 00000000..9c54fc02 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_1_0/asterisk.json @@ -0,0 +1,259 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.1.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/stasis", + "resourcePath": "/api-docs/asterisk.{format}", + "apis": [ + { + "path": "/asterisk/info", + "description": "Asterisk system information (similar to core show settings)", + "operations": [ + { + "httpMethod": "GET", + "summary": "Gets Asterisk system information.", + "nickname": "getInfo", + "responseClass": "AsteriskInfo", + "parameters": [ + { + "name": "only", + "description": "Filter information returned", + "paramType": "query", + "required": false, + "allowMultiple": true, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "build", + "system", + "config", + "status" + ] + } + } + ] + } + ] + }, + { + "path": "/asterisk/variable", + "description": "Global variables", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the value of a global variable.", + "nickname": "getGlobalVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "variable", + "description": "The variable to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + } + ] + }, + { + "httpMethod": "POST", + "summary": "Set the value of a global variable.", + "nickname": "setGlobalVar", + "responseClass": "void", + "parameters": [ + { + "name": "variable", + "description": "The variable to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + } + ] + } + ] + } + ], + "models": { + "BuildInfo": { + "id": "BuildInfo", + "description": "Info about how Asterisk was built", + "properties": { + "os": { + "required": true, + "type": "string", + "description": "OS Asterisk was built on." + }, + "kernel": { + "required": true, + "type": "string", + "description": "Kernel version Asterisk was built on." + }, + "options": { + "required": true, + "type": "string", + "description": "Compile time options, or empty string if default." + }, + "machine": { + "required": true, + "type": "string", + "description": "Machine architecture (x86_64, i686, ppc, etc.)" + }, + "date": { + "required": true, + "type": "string", + "description": "Date and time when Asterisk was built." + }, + "user": { + "required": true, + "type": "string", + "description": "Username that build Asterisk" + } + } + }, + "SystemInfo": { + "id": "SystemInfo", + "description": "Info about Asterisk", + "properties": { + "version": { + "required": true, + "type": "string", + "description": "Asterisk version." + }, + "entity_id": { + "required": true, + "type": "string", + "description": "" + } + } + }, + "SetId": { + "id": "SetId", + "description": "Effective user/group id", + "properties": { + "user": { + "required": true, + "type": "string", + "description": "Effective user id." + }, + "group": { + "required": true, + "type": "string", + "description": "Effective group id." + } + } + }, + "ConfigInfo": { + "id": "ConfigInfo", + "description": "Info about Asterisk configuration", + "properties": { + "name": { + "required": true, + "type": "string", + "description": "Asterisk system name." + }, + "default_language": { + "required": true, + "type": "string", + "description": "Default language for media playback." + }, + "max_channels": { + "required": false, + "type": "int", + "description": "Maximum number of simultaneous channels." + }, + "max_open_files": { + "required": false, + "type": "int", + "description": "Maximum number of open file handles (files, sockets)." + }, + "max_load": { + "required": false, + "type": "double", + "description": "Maximum load avg on system." + }, + "setid": { + "required": true, + "type": "SetId", + "description": "Effective user/group id for running Asterisk." + } + } + }, + "StatusInfo": { + "id": "StatusInfo", + "description": "Info about Asterisk status", + "properties": { + "startup_time": { + "required": true, + "type": "Date", + "description": "Time when Asterisk was started." + }, + "last_reload_time": { + "required": true, + "type": "Date", + "description": "Time when Asterisk was last reloaded." + } + } + }, + "AsteriskInfo": { + "id": "AsteriskInfo", + "description": "Asterisk system information", + "properties": { + "build": { + "required": false, + "type": "BuildInfo", + "description": "Info about how Asterisk was built" + }, + "system": { + "required": false, + "type": "SystemInfo", + "description": "Info about the system running Asterisk" + }, + "config": { + "required": false, + "type": "ConfigInfo", + "description": "Info about Asterisk configuration" + }, + "status": { + "required": false, + "type": "StatusInfo", + "description": "Info about Asterisk status" + } + } + }, + "Variable": { + "id": "Variable", + "description": "The value of a channel variable", + "properties": { + "value": { + "required": true, + "type": "string", + "description": "The value of the variable requested" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_1_0/bridges.json b/codegen/src/main/resources/codegen-data/ari_1_1_0/bridges.json new file mode 100644 index 00000000..b259ca8f --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_1_0/bridges.json @@ -0,0 +1,531 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.1.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/stasis", + "resourcePath": "/api-docs/bridges.{format}", + "apis": [ + { + "path": "/bridges", + "description": "Active bridges", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all active bridges in Asterisk.", + "nickname": "list", + "responseClass": "List[Bridge]" + }, + { + "httpMethod": "POST", + "summary": "Create a new bridge.", + "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", + "nickname": "create", + "responseClass": "Bridge", + "parameters": [ + { + "name": "type", + "description": "Type of bridge to create.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "mixing", + "holding" + ] + } + }, + { + "name": "name", + "description": "Name to give to the bridge being created.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}", + "description": "Individual bridge", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get bridge details.", + "nickname": "get", + "responseClass": "Bridge", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Shut down a bridge.", + "notes": "If any channels are in this bridge, they will be removed and resume whatever they were doing beforehand.", + "nickname": "destroy", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/addChannel", + "description": "Add a channel to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Add a channel to a bridge.", + "nickname": "addChannel", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channel", + "description": "Ids of channels to add to bridge", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "role", + "description": "Channel's role in the bridge", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Channel not found" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application; Channel currently recording" + }, + { + "code": 422, + "reason": "Channel not in Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/removeChannel", + "description": "Remove a channel from a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Remove a channel from a bridge.", + "nickname": "removeChannel", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channel", + "description": "Ids of channels to remove from bridge", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Channel not found" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + }, + { + "code": 422, + "reason": "Channel not in this bridge" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/moh", + "description": "Play music on hold to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play music on hold to a bridge or change the MOH class that is playing.", + "nickname": "startMoh", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "mohClass", + "description": "Channel's id", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing music on hold to a bridge.", + "notes": "This will only stop music on hold being played via POST bridges/{bridgeId}/moh.", + "nickname": "stopMoh", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/play", + "description": "Play media to the participants of a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media on a bridge.", + "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.)", + "nickname": "play", + "responseClass": "Playback", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media's URI to play.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of media to skip before playing.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/record", + "description": "Record audio on a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start a recording.", + "notes": "This records the mixed audio from all channels participating in this bridge.", + "nickname": "record", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Recording's filename", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "maxDurationSeconds", + "description": "Maximum duration of the recording, in seconds. 0 for no limit.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "maxSilenceSeconds", + "description": "Maximum duration of silence, in seconds. 0 for no limit.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "ifExists", + "description": "Action to take if a recording with the same name already exists.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "fail", + "allowableValues": { + "valueType": "LIST", + "values": [ + "fail", + "overwrite", + "append" + ] + } + }, + { + "name": "beep", + "description": "Play beep when recording begins", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "terminateOn", + "description": "DTMF input to terminate recording.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "any", + "*", + "#" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge is not in a Stasis application; A recording with the same name already exists on the system and can not be overwritten because it is in progress or ifExists=fail" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + } + ], + "models": { + "Bridge": { + "id": "Bridge", + "description": "The merging of media from one or more channels.\n\nEveryone on the bridge receives the same audio.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for this bridge", + "required": true + }, + "technology": { + "type": "string", + "description": "Name of the current bridging technology", + "required": true + }, + "bridge_type": { + "type": "string", + "description": "Type of bridge technology", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "mixing", + "holding" + ] + } + }, + "bridge_class": { + "type": "string", + "description": "Bridging class", + "required": true + }, + "creator": { + "type": "string", + "description": "Entity that created the bridge", + "required": true + }, + "name": { + "type": "string", + "description": "Name the creator gave the bridge", + "required": true + }, + "channels": { + "type": "List[string]", + "description": "Ids of channels participating in this bridge", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_1_0/channels.json b/codegen/src/main/resources/codegen-data/ari_1_1_0/channels.json new file mode 100644 index 00000000..0cfe90e5 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_1_0/channels.json @@ -0,0 +1,1152 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.1.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/stasis", + "resourcePath": "/api-docs/channels.{format}", + "apis": [ + { + "path": "/channels", + "description": "Active channels", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all active channels in Asterisk.", + "nickname": "list", + "responseClass": "List[Channel]" + }, + { + "httpMethod": "POST", + "summary": "Create a new channel (originate).", + "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.", + "nickname": "originate", + "responseClass": "Channel", + "parameters": [ + { + "name": "endpoint", + "description": "Endpoint to call.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to dial after the endpoint answers", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to dial after the endpoint answers. If omitted, uses 'default'", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to dial after the endpoint answers. If omitted, uses 1", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "long" + }, + { + "name": "app", + "description": "The application that is subscribed to the originated channel, and passed to the Stasis application.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "callerId", + "description": "CallerID to use when dialing the endpoint or extension.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 30 + }, + { + "name": "variables", + "description": "The 'variables' key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { 'endpoint': 'SIP/Alice', 'variables': { 'CALLERID(name)': 'Alice' } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for originating a channel." + } + ] + } + ] + }, + { + "path": "/channels/{channelId}", + "description": "Active channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "Channel details.", + "nickname": "get", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Delete (i.e. hangup) a channel.", + "nickname": "hangup", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "reason", + "description": "Reason for hanging up the channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defalutValue": "normal", + "allowableValues": { + "valueType": "LIST", + "values": [ + "normal", + "busy", + "congestion" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid reason for hangup provided" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/continue", + "description": "Exit application; continue execution in the dialplan", + "operations": [ + { + "httpMethod": "POST", + "summary": "Exit application; continue execution in the dialplan.", + "nickname": "continueInDialplan", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/answer", + "description": "Answer a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Answer a channel.", + "nickname": "answer", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/ring", + "description": "Send a ringing indication to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Indicate ringing to a channel.", + "nickname": "ring", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop ringing indication on a channel if locally generated.", + "nickname": "ringStop", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/dtmf", + "description": "Send DTMF to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Send provided DTMF to a given channel.", + "nickname": "sendDTMF", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "dtmf", + "description": "DTMF To send.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "before", + "description": "Amount of time to wait before DTMF digits (specified in milliseconds) start.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0 + }, + { + "name": "between", + "description": "Amount of time in between DTMF digits (specified in milliseconds).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 100 + }, + { + "name": "duration", + "description": "Length of each DTMF digit (specified in milliseconds).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 100 + }, + { + "name": "after", + "description": "Amount of time to wait after DTMF digits (specified in milliseconds) end.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0 + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "DTMF is required" + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/mute", + "description": "Mute a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Mute a channel.", + "nickname": "mute", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "Direction in which to mute audio", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both", + "in", + "out" + ] + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unmute a channel.", + "nickname": "unmute", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "Direction in which to unmute audio", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both", + "in", + "out" + ] + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/hold", + "description": "Put a channel on hold", + "operations": [ + { + "httpMethod": "POST", + "summary": "Hold a channel.", + "nickname": "hold", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Remove a channel from hold.", + "nickname": "unhold", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/moh", + "description": "Play music on hold to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play music on hold to a channel.", + "notes": "Using media operations such as /play on a channel playing MOH in this manner will suspend MOH without resuming automatically. If continuing music on hold is desired, the stasis application must reinitiate music on hold.", + "nickname": "startMoh", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "mohClass", + "description": "Music on hold class to use", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing music on hold to a channel.", + "nickname": "stopMoh", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/silence", + "description": "Play silence to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play silence to a channel.", + "notes": "Using media operations such as /play on a channel playing silence in this manner will suspend silence without resuming automatically.", + "nickname": "startSilence", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing silence to a channel.", + "nickname": "stopSilence", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/play", + "description": "Play media to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media.", + "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.)", + "nickname": "play", + "responseClass": "Playback", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media's URI to play.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of media to skip before playing.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000 + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/record", + "description": "Record audio from a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start a recording.", + "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.", + "nickname": "record", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Recording's filename", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "maxDurationSeconds", + "description": "Maximum duration of the recording, in seconds. 0 for no limit", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "maxSilenceSeconds", + "description": "Maximum duration of silence, in seconds. 0 for no limit", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "ifExists", + "description": "Action to take if a recording with the same name already exists.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "fail", + "allowableValues": { + "valueType": "LIST", + "values": [ + "fail", + "overwrite", + "append" + ] + } + }, + { + "name": "beep", + "description": "Play beep when recording begins", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "terminateOn", + "description": "DTMF input to terminate recording", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "any", + "*", + "#" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "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" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/variable", + "description": "Variables on a channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the value of a channel variable or function.", + "nickname": "getChannelVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The channel variable or function to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "POST", + "summary": "Set the value of a channel variable or function.", + "nickname": "setChannelVar", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The channel variable or function to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/snoop", + "description": "Snoop (spy/whisper) on a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start snooping.", + "notes": "Snoop (spy/whisper) on a specific channel.", + "nickname": "snoopChannel", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "spy", + "description": "Direction of audio to spy on", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "whisper", + "description": "Direction of audio to whisper into", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "app", + "description": "Application the snooping channel is placed into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + } + ], + "models": { + "Dialed": { + "id": "Dialed", + "description": "Dialed channel information.", + "properties": {} + }, + "DialplanCEP": { + "id": "DialplanCEP", + "description": "Dialplan location (context/extension/priority)", + "properties": { + "context": { + "required": true, + "type": "string", + "description": "Context in the dialplan" + }, + "exten": { + "required": true, + "type": "string", + "description": "Extension in the dialplan" + }, + "priority": { + "required": true, + "type": "long", + "description": "Priority in the dialplan" + } + } + }, + "CallerID": { + "id": "CallerID", + "description": "Caller identification", + "properties": { + "name": { + "required": true, + "type": "string" + }, + "number": { + "required": true, + "type": "string" + } + } + }, + "Channel": { + "id": "Channel", + "description": "A specific communication connection between Asterisk and an Endpoint.", + "properties": { + "id": { + "required": true, + "type": "string", + "description": "Unique identifier of the channel.\n\nThis is the same as the Uniqueid field in AMI." + }, + "name": { + "required": true, + "type": "string", + "description": "Name of the channel (i.e. SIP/foo-0000a7e3)" + }, + "state": { + "required": true, + "type": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "Down", + "Rsrved", + "OffHook", + "Dialing", + "Ring", + "Ringing", + "Up", + "Busy", + "Dialing Offhook", + "Pre-ring", + "Unknown" + ] + } + }, + "caller": { + "required": true, + "type": "CallerID" + }, + "connected": { + "required": true, + "type": "CallerID" + }, + "accountcode": { + "required": true, + "type": "string" + }, + "dialplan": { + "required": true, + "type": "DialplanCEP", + "description": "Current location in the dialplan" + }, + "creationtime": { + "required": true, + "type": "Date", + "description": "Timestamp when channel was created" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_1_0/deviceStates.json b/codegen/src/main/resources/codegen-data/ari_1_1_0/deviceStates.json new file mode 100644 index 00000000..fa21ed57 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_1_0/deviceStates.json @@ -0,0 +1,151 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "Kevin Harwell ", + "_svn_revision": "$Revision$", + "apiVersion": "1.1.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/stasis", + "resourcePath": "/api-docs/deviceStates.{format}", + "apis": [ + { + "path": "/deviceStates", + "description": "Device states", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all ARI controlled device states.", + "nickname": "list", + "responseClass": "List[DeviceState]" + } + ] + }, + { + "path": "/deviceStates/{deviceName}", + "description": "Device state", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve the current state of a device.", + "nickname": "get", + "responseClass": "DeviceState", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Change the state of a device controlled by ARI. (Note - implicitly creates the device state).", + "nickname": "update", + "responseClass": "void", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "deviceState", + "description": "Device state value", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "NOT_INUSE", + "INUSE", + "BUSY", + "INVALID", + "UNAVAILABLE", + "RINGING", + "RINGINUSE", + "ONHOLD" + ] + } + + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Device name is missing" + }, + { + "code": 409, + "reason": "Uncontrolled device specified" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Destroy a device-state controlled by ARI.", + "nickname": "delete", + "responseClass": "void", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Device name is missing" + }, + { + "code": 409, + "reason": "Uncontrolled device specified" + } + ] + } + ] + } + ], + "models": { + "DeviceState": { + "id": "DeviceState", + "description": "Represents the state of a device.", + "properties": { + "name": { + "type": "string", + "description": "Name of the device.", + "required": true + }, + "state": { + "type": "string", + "description": "Device's state", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "UNKNOWN", + "NOT_INUSE", + "INUSE", + "BUSY", + "INVALID", + "UNAVAILABLE", + "RINGING", + "RINGINUSE", + "ONHOLD" + ] + } + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_1_0/endpoints.json b/codegen/src/main/resources/codegen-data/ari_1_1_0/endpoints.json new file mode 100644 index 00000000..7c5447ad --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_1_0/endpoints.json @@ -0,0 +1,117 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.1.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/stasis", + "resourcePath": "/api-docs/endpoints.{format}", + "apis": [ + { + "path": "/endpoints", + "description": "Asterisk endpoints", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all endpoints.", + "nickname": "list", + "responseClass": "List[Endpoint]" + } + ] + }, + { + "path": "/endpoints/{tech}", + "description": "Asterisk endpoints", + "operations": [ + { + "httpMethod": "GET", + "summary": "List available endoints for a given endpoint technology.", + "nickname": "listByTech", + "responseClass": "List[Endpoint]", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoints (sip,iax2,...)", + "paramType": "path", + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Endpoints not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}/{resource}", + "description": "Single endpoint", + "operations": [ + { + "httpMethod": "GET", + "summary": "Details for an endpoint.", + "nickname": "get", + "responseClass": "Endpoint", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "resource", + "description": "ID of the endpoint", + "paramType": "path", + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Endpoints not found" + } + ] + } + ] + } + ], + "models": { + "Endpoint": { + "id": "Endpoint", + "description": "An external device that may offer/accept calls to/from Asterisk.\n\nUnlike most resources, which have a single unique identifier, an endpoint is uniquely identified by the technology/resource pair.", + "properties": { + "technology": { + "type": "string", + "description": "Technology of the endpoint", + "required": true + }, + "resource": { + "type": "string", + "description": "Identifier of the endpoint, specific to the given technology.", + "required": true + }, + "state": { + "type": "string", + "description": "Endpoint's state", + "required": false, + "allowableValues": { + "valueType": "LIST", + "values": [ + "unknown", + "offline", + "online" + ] + } + }, + "channel_ids": { + "type": "List[string]", + "description": "Id's of channels associated with this endpoint", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_1_0/events.json b/codegen/src/main/resources/codegen-data/ari_1_1_0/events.json new file mode 100644 index 00000000..a5c7a763 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_1_0/events.json @@ -0,0 +1,577 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.1.0", + "swaggerVersion": "1.2", + "basePath": "http://localhost:8088/stasis", + "resourcePath": "/api-docs/events.{format}", + "apis": [ + { + "path": "/events", + "description": "Events from Asterisk to applications", + "operations": [ + { + "httpMethod": "GET", + "upgrade": "websocket", + "websocketProtocol": "ari", + "summary": "WebSocket connection for events.", + "nickname": "eventWebsocket", + "responseClass": "Message", + "parameters": [ + { + "name": "app", + "description": "Applications to subscribe to.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ] + } + ] + } + ], + "models": { + "Message": { + "id": "Message", + "description": "Base type for errors and events", + "discriminator": "type", + "properties": { + "type": { + "type": "string", + "required": true, + "description": "Indicates the type of this message." + } + }, + "subTypes": [ + "MissingParams", + "Event" + ] + }, + "MissingParams": { + "id": "MissingParams", + "description": "Error event sent when required params are missing.", + "properties": { + "params": { + "required": true, + "type": "List[string]", + "description": "A list of the missing parameters" + } + } + }, + "Event": { + "id": "Event", + "description": "Base type for asynchronous events from Asterisk.", + "properties": { + "application": { + "type": "string", + "description": "Name of the application receiving the event.", + "required": true + }, + "timestamp": { + "type": "Date", + "description": "Time at which this event was created.", + "required": false + } + }, + "subTypes": [ + "DeviceStateChanged", + "PlaybackStarted", + "PlaybackFinished", + "RecordingStarted", + "RecordingFinished", + "RecordingFailed", + "ApplicationReplaced", + "BridgeCreated", + "BridgeDestroyed", + "BridgeMerged", + "BridgeBlindTransfer", + "BridgeAttendedTransfer", + "ChannelCreated", + "ChannelDestroyed", + "ChannelEnteredBridge", + "ChannelLeftBridge", + "ChannelStateChange", + "ChannelDtmfReceived", + "ChannelDialplan", + "ChannelCallerId", + "ChannelUserevent", + "ChannelHangupRequest", + "ChannelVarset", + "EndpointStateChange", + "Dial", + "StasisEnd", + "StasisStart" + ] + }, + "DeviceStateChanged": { + "id": "DeviceStateChanged", + "description": "Notification that a device state has changed.", + "properties": { + "device_state": { + "type": "DeviceState", + "description": "Device state object", + "required": true + } + } + }, + "PlaybackStarted": { + "id": "PlaybackStarted", + "description": "Event showing the start of a media playback operation.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "PlaybackFinished": { + "id": "PlaybackFinished", + "description": "Event showing the completion of a media playback operation.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "RecordingStarted": { + "id": "RecordingStarted", + "extends": "Event", + "description": "Event showing the start of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "RecordingFinished": { + "id": "RecordingFinished", + "extends": "Event", + "description": "Event showing the completion of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "RecordingFailed": { + "id": "RecordingFailed", + "extends": "Event", + "description": "Event showing failure of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "ApplicationReplaced": { + "id": "ApplicationReplaced", + "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.", + "properties": {} + }, + "BridgeCreated": { + "id": "BridgeCreated", + "description": "Notification that a bridge has been created.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeDestroyed": { + "id": "BridgeDestroyed", + "description": "Notification that a bridge has been destroyed.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeMerged": { + "id": "BridgeMerged", + "description": "Notification that one bridge has merged into another.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "bridge_from": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeBlindTransfer": { + "id": "BridgeBlindTransfer", + "description": "Notification that a blind transfer has occurred.", + "properties": { + "channel": { + "description": "The channel performing the blind transfer", + "required": true, + "type": "Channel" + }, + "exten": { + "description": "The extension transferred to", + "required": true, + "type": "string" + }, + "context": { + "description": "The context transferred to", + "required": true, + "type": "string" + }, + "result": { + "description": "The result of the transfer attempt", + "required": true, + "type": "string" + }, + "is_external": { + "description": "Whether the transfer was externally initiated or not", + "required": true, + "type": "boolean" + }, + "bridge": { + "description": "The bridge being transferred", + "type": "Bridge" + } + } + }, + "BridgeAttendedTransfer": { + "id": "BridgeAttendedTransfer", + "description": "Notification that an attended transfer has occurred.", + "properties": { + "transferer_first_leg": { + "description": "First leg of the transferer", + "required": true, + "type": "Channel" + }, + "transferer_second_leg": { + "description": "Second leg of the transferer", + "required": true, + "type": "Channel" + }, + "result": { + "description": "The result of the transfer attempt", + "required": true, + "type": "string" + }, + "is_external": { + "description": "Whether the transfer was externally initiated or not", + "required": true, + "type": "boolean" + }, + "transferer_first_leg_bridge": { + "description": "Bridge the transferer first leg is in", + "type": "Bridge" + }, + "transferer_second_leg_bridge": { + "description": "Bridge the transferer second leg is in", + "type": "Bridge" + }, + "destination_type": { + "description": "How the transfer was accomplished", + "required": true, + "type": "string" + }, + "destination_bridge": { + "description": "Bridge that survived the merge result", + "type": "string" + }, + "destination_application": { + "description": "Application that has been transferred into", + "type": "string" + }, + "destination_link_first_leg": { + "description": "First leg of a link transfer result", + "type": "Channel" + }, + "destination_link_second_leg": { + "description": "Second leg of a link transfer result", + "type": "Channel" + }, + "destination_threeway_channel": { + "description": "Transferer channel that survived the threeway result", + "type": "Channel" + }, + "destination_threeway_bridge": { + "description": "Bridge that survived the threeway result", + "type": "Bridge" + } + } + }, + "ChannelCreated": { + "id": "ChannelCreated", + "description": "Notification that a channel has been created.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelDestroyed": { + "id": "ChannelDestroyed", + "description": "Notification that a channel has been destroyed.", + "properties": { + "cause": { + "required": true, + "description": "Integer representation of the cause of the hangup", + "type": "int" + }, + "cause_txt": { + "required": true, + "description": "Text representation of the cause of the hangup", + "type": "string" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelEnteredBridge": { + "id": "ChannelEnteredBridge", + "description": "Notification that a channel has entered a bridge.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "channel": { + "type": "Channel" + } + } + }, + "ChannelLeftBridge": { + "id": "ChannelLeftBridge", + "description": "Notification that a channel has left a bridge.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelStateChange": { + "id": "ChannelStateChange", + "description": "Notification of a channel's state change.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelDtmfReceived": { + "id": "ChannelDtmfReceived", + "description": "DTMF received on a channel.\n\nThis event is sent when the DTMF ends. There is no notification about the start of DTMF", + "properties": { + "digit": { + "required": true, + "type": "string", + "description": "DTMF digit received (0-9, A-E, # or *)" + }, + "duration_ms": { + "required": true, + "type": "int", + "description": "Number of milliseconds DTMF was received" + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which DTMF was received" + } + } + }, + "ChannelDialplan": { + "id": "ChannelDialplan", + "description": "Channel changed location in the dialplan.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that changed dialplan location." + }, + "dialplan_app": { + "required": true, + "type": "string", + "description": "The application about to be executed." + }, + "dialplan_app_data": { + "required": true, + "type": "string", + "description": "The data to be passed to the application." + } + } + }, + "ChannelCallerId": { + "id": "ChannelCallerId", + "description": "Channel changed Caller ID.", + "properties": { + "caller_presentation": { + "required": true, + "type": "int", + "description": "The integer representation of the Caller Presentation value." + }, + "caller_presentation_txt": { + "required": true, + "type": "string", + "description": "The text representation of the Caller Presentation value." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that changed Caller ID." + } + } + }, + "ChannelUserevent": { + "id": "ChannelUserevent", + "description": "User-generated event with additional user-defined fields in the object.", + "properties": { + "eventname": { + "required": true, + "type": "string", + "description": "The name of the user event." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that signaled the user event." + }, + "userevent": { + "required": true, + "type": "object", + "description": "Custom Userevent data" + } + } + }, + "ChannelHangupRequest": { + "id": "ChannelHangupRequest", + "description": "A hangup was requested on the channel.", + "properties": { + "cause": { + "type": "int", + "description": "Integer representation of the cause of the hangup." + }, + "soft": { + "type": "boolean", + "description": "Whether the hangup request was a soft hangup request." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which the hangup was requested." + } + } + }, + "ChannelVarset": { + "id": "ChannelVarset", + "description": "Channel variable changed.", + "properties": { + "variable": { + "required": true, + "type": "string", + "description": "The variable that changed." + }, + "value": { + "required": true, + "type": "string", + "description": "The new value of the variable." + }, + "channel": { + "required": false, + "type": "Channel", + "description": "The channel on which the variable was set.\n\nIf missing, the variable is a global variable." + } + } + }, + "EndpointStateChange": { + "id": "EndpointStateChange", + "description": "Endpoint state changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + } + } + }, + "Dial": { + "id": "Dial", + "description": "Dialing state has changed.", + "properties": { + "caller": { + "required": false, + "type": "Channel", + "description": "The calling channel." + }, + "peer": { + "required": true, + "type": "Channel", + "description": "The dialed channel." + }, + "forward": { + "required": false, + "type": "string", + "description": "Forwarding target requested by the original dialed channel." + }, + "forwarded": { + "required": false, + "type": "Channel", + "description": "Channel that the caller has been forwarded to." + }, + "dialstring": { + "required": false, + "type": "string", + "description": "The dial string for calling the peer channel." + }, + "dialstatus": { + "required": true, + "type": "string", + "description": "Current status of the dialing attempt to the peer." + } + } + }, + "StasisEnd": { + "id": "StasisEnd", + "description": "Notification that a channel has left a Stasis application.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "StasisStart": { + "id": "StasisStart", + "description": "Notification that a channel has entered a Stasis application.", + "properties": { + "args": { + "required": true, + "type": "List[string]", + "description": "Arguments to the application" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_1_0/mailboxes.json b/codegen/src/main/resources/codegen-data/ari_1_1_0/mailboxes.json new file mode 100644 index 00000000..6824c4f3 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_1_0/mailboxes.json @@ -0,0 +1,134 @@ +{ + "_copyright": "Copyright (C) 2013, Digium, Inc.", + "_author": "Jonathan Rose ", + "_svn_revision": "$Revision$", + "apiVersion": "1.1.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/stasis", + "resourcePath": "/api-docs/mailboxes.{format}", + "apis": [ + { + "path": "/mailboxes", + "description": "Mailboxes", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all mailboxes.", + "nickname": "list", + "responseClass": "List[Mailbox]" + } + ] + }, + { + "path": "/mailboxes/{mailboxName}", + "description": "Mailbox state", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve the current state of a mailbox.", + "nickname": "get", + "responseClass": "Mailbox", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Change the state of a mailbox. (Note - implicitly creates the mailbox).", + "nickname": "update", + "responseClass": "void", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "oldMessages", + "description": "Count of old messages in the mailbox", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "newMessages", + "description": "Count of new messages in the mailbox", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "int" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Destroy a mailbox.", + "nickname": "delete", + "responseClass": "void", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + } + ] + } + ], + "models": { + "Mailbox": { + "id": "Mailbox", + "description": "Represents the state of a mailbox.", + "properties": { + "name": { + "type": "string", + "description": "Name of the mailbox.", + "required": true + }, + "old_messages": { + "type": "int", + "description": "Count of old messages in the mailbox.", + "required": true + }, + "new_messages": { + "type": "int", + "description": "Count of new messages in the mailbox.", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_1_0/playbacks.json b/codegen/src/main/resources/codegen-data/ari_1_1_0/playbacks.json new file mode 100644 index 00000000..848957dc --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_1_0/playbacks.json @@ -0,0 +1,155 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.1.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/stasis", + "resourcePath": "/api-docs/playbacks.{format}", + "apis": [ + { + "path": "/playbacks/{playbackId}", + "description": "Control object for a playback operation.", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a playback's details.", + "nickname": "get", + "responseClass": "Playback", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "The playback cannot be found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop a playback.", + "nickname": "stop", + "responseClass": "void", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "The playback cannot be found" + } + ] + } + ] + }, + { + "path": "/playbacks/{playbackId}/control", + "description": "Control object for a playback operation.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Control a playback.", + "nickname": "control", + "responseClass": "void", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "operation", + "description": "Operation to perform on the playback.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "restart", + "pause", + "unpause", + "reverse", + "forward" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "The provided operation parameter was invalid" + }, + { + "code": 404, + "reason": "The playback cannot be found" + }, + { + "code": 409, + "reason": "The operation cannot be performed in the playback's current state" + } +] + } + ] + } + ], + "models": { + "Playback": { + "id": "Playback", + "description": "Object representing the playback of media to a channel", + "properties": { + "id": { + "type": "string", + "description": "ID for this playback operation", + "required": true + }, + "media_uri": { + "type": "string", + "description": "URI for the media to play back.", + "required": true + }, + "target_uri": { + "type": "string", + "description": "URI for the channel or bridge to play the media on", + "required": true + }, + "language": { + "type": "string", + "description": "For media types that support multiple languages, the language requested for playback." + }, + "state": { + "type": "string", + "description": "Current state of the playback operation.", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "queued", + "playing", + "complete" + ] + } + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_1_0/recordings.json b/codegen/src/main/resources/codegen-data/ari_1_1_0/recordings.json new file mode 100644 index 00000000..665df4d0 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_1_0/recordings.json @@ -0,0 +1,326 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.1.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/stasis", + "resourcePath": "/api-docs/recordings.{format}", + "apis": [ + { + "path": "/recordings/stored", + "description": "Recordings", + "operations": [ + { + "httpMethod": "GET", + "summary": "List recordings that are complete.", + "nickname": "listStored", + "responseClass": "List[StoredRecording]" + } + ] + }, + { + "path": "/recordings/stored/{recordingName}", + "description": "Individual recording", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a stored recording's details.", + "nickname": "getStored", + "responseClass": "StoredRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Delete a stored recording.", + "nickname": "deleteStored", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}", + "description": "A recording that is in progress", + "operations": [ + { + "httpMethod": "GET", + "summary": "List live recordings.", + "nickname": "getLive", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop a live recording and discard it.", + "nickname": "cancel", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/stop", + "operations": [ + { + "httpMethod": "POST", + "summary": "Stop a live recording and store it.", + "nickname": "stop", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/pause", + "operations": [ + { + "httpMethod": "POST", + "summary": "Pause a live recording.", + "notes": "Pausing a recording suspends silence detection, which will be restarted when the recording is unpaused. Paused time is not included in the accounting for maxDurationSeconds.", + "nickname": "pause", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unpause a live recording.", + "nickname": "unpause", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/mute", + "operations": [ + { + "httpMethod": "POST", + "summary": "Mute a live recording.", + "notes": "Muting a recording suspends silence detection, which will be restarted when the recording is unmuted.", + "nickname": "mute", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unmute a live recording.", + "nickname": "unmute", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + } + ] + } + ], + "models": { + "StoredRecording": { + "id": "StoredRecording", + "description": "A past recording that may be played back.", + "properties": { + "name": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + }, + "LiveRecording": { + "id": "LiveRecording", + "description": "A recording that is in progress", + "properties": { + "name": { + "required": true, + "type": "string", + "description": "Base name for the recording" + }, + "format": { + "required": true, + "type": "string", + "description": "Recording format (wav, gsm, etc.)" + }, + "state": { + "required": false, + "type": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "queued", + "recording", + "paused", + "done", + "failed", + "canceled" + ] + } + }, + "cause": { + "required": false, + "type": "string", + "description": "Cause for recording failure if failed" + }, + "state": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_1_0/sounds.json b/codegen/src/main/resources/codegen-data/ari_1_1_0/sounds.json new file mode 100644 index 00000000..8c57a31b --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_1_0/sounds.json @@ -0,0 +1,99 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.1.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/stasis", + "resourcePath": "/api-docs/sounds.{format}", + "apis": [ + { + "path": "/sounds", + "description": "Sounds", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all sounds.", + "nickname": "list", + "responseClass": "List[Sound]", + "parameters": [ + { + "name": "lang", + "description": "Lookup sound for a specific language.", + "paramType": "query", + "dataType": "string", + "required": false + }, + { + "name": "format", + "description": "Lookup sound in a specific format.", + "paramType": "query", + "dataType": "string", + "required": false, + "__note": "core show translation can show translation paths between formats, along with relative costs. so this could be just installed format, or we could follow that for transcoded formats." + } + ] + } + ] + }, + { + "path": "/sounds/{soundId}", + "description": "Individual sound", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a sound's details.", + "nickname": "get", + "responseClass": "Sound", + "parameters": [ + { + "name": "soundId", + "description": "Sound's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ] + } + ] + } + ], + "models": { + "FormatLangPair": { + "id": "FormatLangPair", + "description": "Identifies the format and language of a sound file", + "properties": { + "language": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + }, + "Sound": { + "id": "Sound", + "description": "A media file that may be played back.", + "properties": { + "id": { + "required": true, + "description": "Sound's identifier.", + "type": "string" + }, + "text": { + "required": false, + "description": "Text description of the sound, usually the words spoken.", + "type": "string" + }, + "formats": { + "required": true, + "description": "The formats and languages in which this sound is available.", + "type": "List[FormatLangPair]" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_2_0/applications.json b/codegen/src/main/resources/codegen-data/ari_1_2_0/applications.json new file mode 100644 index 00000000..c75d0c61 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_2_0/applications.json @@ -0,0 +1,172 @@ +{ + "_copyright": "Copyright (C) 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.2.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/stasis", + "resourcePath": "/api-docs/applications.{format}", + "apis": [ + { + "path": "/applications", + "description": "Stasis applications", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all applications.", + "nickname": "list", + "responseClass": "List[Application]" + } + ] + }, + { + "path": "/applications/{applicationName}", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get details of an application.", + "nickname": "get", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Application does not exist." + } + ] + } + ] + }, + { + "path": "/applications/{applicationName}/subscription", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "POST", + "summary": "Subscribe an application to a event source.", + "notes": "Returns the state of the application after the subscriptions have changed", + "nickname": "subscribe", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "eventSource", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}/{resource}, deviceState:{deviceName}", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing parameter." + }, + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 422, + "reason": "Event source does not exist." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unsubscribe an application from an event source.", + "notes": "Returns the state of the application after the subscriptions have changed", + "nickname": "unsubscribe", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "eventSource", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}/{resource}, deviceState:{deviceName}", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing parameter; event source scheme not recognized." + }, + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 409, + "reason": "Application not subscribed to event source." + }, + { + "code": 422, + "reason": "Event source does not exist." + } + ] + } + ] + } + ], + "models": { + "Application": { + "id": "Application", + "description": "Details of a Stasis application", + "properties": { + "name": { + "type": "string", + "description": "Name of this application", + "required": true + }, + "channel_ids": { + "type": "List[string]", + "description": "Id's for channels subscribed to.", + "required": true + }, + "bridge_ids": { + "type": "List[string]", + "description": "Id's for bridges subscribed to.", + "required": true + }, + "endpoint_ids": { + "type": "List[string]", + "description": "{tech}/{resource} for endpoints subscribed to.", + "required": true + }, + "device_names": { + "type": "List[string]", + "description": "Names of the devices subscribed to.", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_2_0/asterisk.json b/codegen/src/main/resources/codegen-data/ari_1_2_0/asterisk.json new file mode 100644 index 00000000..b607d02a --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_2_0/asterisk.json @@ -0,0 +1,259 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.2.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/stasis", + "resourcePath": "/api-docs/asterisk.{format}", + "apis": [ + { + "path": "/asterisk/info", + "description": "Asterisk system information (similar to core show settings)", + "operations": [ + { + "httpMethod": "GET", + "summary": "Gets Asterisk system information.", + "nickname": "getInfo", + "responseClass": "AsteriskInfo", + "parameters": [ + { + "name": "only", + "description": "Filter information returned", + "paramType": "query", + "required": false, + "allowMultiple": true, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "build", + "system", + "config", + "status" + ] + } + } + ] + } + ] + }, + { + "path": "/asterisk/variable", + "description": "Global variables", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the value of a global variable.", + "nickname": "getGlobalVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "variable", + "description": "The variable to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + } + ] + }, + { + "httpMethod": "POST", + "summary": "Set the value of a global variable.", + "nickname": "setGlobalVar", + "responseClass": "void", + "parameters": [ + { + "name": "variable", + "description": "The variable to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + } + ] + } + ] + } + ], + "models": { + "BuildInfo": { + "id": "BuildInfo", + "description": "Info about how Asterisk was built", + "properties": { + "os": { + "required": true, + "type": "string", + "description": "OS Asterisk was built on." + }, + "kernel": { + "required": true, + "type": "string", + "description": "Kernel version Asterisk was built on." + }, + "options": { + "required": true, + "type": "string", + "description": "Compile time options, or empty string if default." + }, + "machine": { + "required": true, + "type": "string", + "description": "Machine architecture (x86_64, i686, ppc, etc.)" + }, + "date": { + "required": true, + "type": "string", + "description": "Date and time when Asterisk was built." + }, + "user": { + "required": true, + "type": "string", + "description": "Username that build Asterisk" + } + } + }, + "SystemInfo": { + "id": "SystemInfo", + "description": "Info about Asterisk", + "properties": { + "version": { + "required": true, + "type": "string", + "description": "Asterisk version." + }, + "entity_id": { + "required": true, + "type": "string", + "description": "" + } + } + }, + "SetId": { + "id": "SetId", + "description": "Effective user/group id", + "properties": { + "user": { + "required": true, + "type": "string", + "description": "Effective user id." + }, + "group": { + "required": true, + "type": "string", + "description": "Effective group id." + } + } + }, + "ConfigInfo": { + "id": "ConfigInfo", + "description": "Info about Asterisk configuration", + "properties": { + "name": { + "required": true, + "type": "string", + "description": "Asterisk system name." + }, + "default_language": { + "required": true, + "type": "string", + "description": "Default language for media playback." + }, + "max_channels": { + "required": false, + "type": "int", + "description": "Maximum number of simultaneous channels." + }, + "max_open_files": { + "required": false, + "type": "int", + "description": "Maximum number of open file handles (files, sockets)." + }, + "max_load": { + "required": false, + "type": "double", + "description": "Maximum load avg on system." + }, + "setid": { + "required": true, + "type": "SetId", + "description": "Effective user/group id for running Asterisk." + } + } + }, + "StatusInfo": { + "id": "StatusInfo", + "description": "Info about Asterisk status", + "properties": { + "startup_time": { + "required": true, + "type": "Date", + "description": "Time when Asterisk was started." + }, + "last_reload_time": { + "required": true, + "type": "Date", + "description": "Time when Asterisk was last reloaded." + } + } + }, + "AsteriskInfo": { + "id": "AsteriskInfo", + "description": "Asterisk system information", + "properties": { + "build": { + "required": false, + "type": "BuildInfo", + "description": "Info about how Asterisk was built" + }, + "system": { + "required": false, + "type": "SystemInfo", + "description": "Info about the system running Asterisk" + }, + "config": { + "required": false, + "type": "ConfigInfo", + "description": "Info about Asterisk configuration" + }, + "status": { + "required": false, + "type": "StatusInfo", + "description": "Info about Asterisk status" + } + } + }, + "Variable": { + "id": "Variable", + "description": "The value of a channel variable", + "properties": { + "value": { + "required": true, + "type": "string", + "description": "The value of the variable requested" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_2_0/bridges.json b/codegen/src/main/resources/codegen-data/ari_1_2_0/bridges.json new file mode 100644 index 00000000..8368af30 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_2_0/bridges.json @@ -0,0 +1,656 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.2.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/stasis", + "resourcePath": "/api-docs/bridges.{format}", + "apis": [ + { + "path": "/bridges", + "description": "Active bridges", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all active bridges in Asterisk.", + "nickname": "list", + "responseClass": "List[Bridge]" + }, + { + "httpMethod": "POST", + "summary": "Create a new bridge.", + "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", + "nickname": "create", + "responseClass": "Bridge", + "parameters": [ + { + "name": "type", + "description": "Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "bridgeId", + "description": "Unique ID to give to the bridge being created.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Name to give to the bridge being created.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}", + "description": "Individual bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Create a new bridge or updates an existing one.", + "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", + "nickname": "create_or_update_with_id", + "responseClass": "Bridge", + "parameters": [ + { + "name": "type", + "description": "Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media) to set.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "bridgeId", + "description": "Unique ID to give to the bridge being created.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Set the name of the bridge.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ] + }, + { + "httpMethod": "GET", + "summary": "Get bridge details.", + "nickname": "get", + "responseClass": "Bridge", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Shut down a bridge.", + "notes": "If any channels are in this bridge, they will be removed and resume whatever they were doing beforehand.", + "nickname": "destroy", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/addChannel", + "description": "Add a channel to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Add a channel to a bridge.", + "nickname": "addChannel", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channel", + "description": "Ids of channels to add to bridge", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "role", + "description": "Channel's role in the bridge", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Channel not found" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application; Channel currently recording" + }, + { + "code": 422, + "reason": "Channel not in Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/removeChannel", + "description": "Remove a channel from a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Remove a channel from a bridge.", + "nickname": "removeChannel", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channel", + "description": "Ids of channels to remove from bridge", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Channel not found" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + }, + { + "code": 422, + "reason": "Channel not in this bridge" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/moh", + "description": "Play music on hold to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play music on hold to a bridge or change the MOH class that is playing.", + "nickname": "startMoh", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "mohClass", + "description": "Channel's id", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing music on hold to a bridge.", + "notes": "This will only stop music on hold being played via POST bridges/{bridgeId}/moh.", + "nickname": "stopMoh", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/play", + "description": "Play media to the participants of a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media on a bridge.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "play", + "responseClass": "Playback", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media's URI to play.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of media to skip before playing.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "playbackId", + "description": "Playback Id.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/play/{playbackId}", + "description": "Play media to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media on a bridge.", + "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.)", + "nickname": "playWithId", + "responseClass": "Playback", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media's URI to play.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of media to skip before playing.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + + } + ] + }, + { + "path": "/bridges/{bridgeId}/record", + "description": "Record audio on a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start a recording.", + "notes": "This records the mixed audio from all channels participating in this bridge.", + "nickname": "record", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Recording's filename", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "maxDurationSeconds", + "description": "Maximum duration of the recording, in seconds. 0 for no limit.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "maxSilenceSeconds", + "description": "Maximum duration of silence, in seconds. 0 for no limit.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "ifExists", + "description": "Action to take if a recording with the same name already exists.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "fail", + "allowableValues": { + "valueType": "LIST", + "values": [ + "fail", + "overwrite", + "append" + ] + } + }, + { + "name": "beep", + "description": "Play beep when recording begins", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "terminateOn", + "description": "DTMF input to terminate recording.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "any", + "*", + "#" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge is not in a Stasis application; A recording with the same name already exists on the system and can not be overwritten because it is in progress or ifExists=fail" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + } + ], + "models": { + "Bridge": { + "id": "Bridge", + "description": "The merging of media from one or more channels.\n\nEveryone on the bridge receives the same audio.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for this bridge", + "required": true + }, + "technology": { + "type": "string", + "description": "Name of the current bridging technology", + "required": true + }, + "bridge_type": { + "type": "string", + "description": "Type of bridge technology", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "mixing", + "holding" + ] + } + }, + "bridge_class": { + "type": "string", + "description": "Bridging class", + "required": true + }, + "creator": { + "type": "string", + "description": "Entity that created the bridge", + "required": true + }, + "name": { + "type": "string", + "description": "Name the creator gave the bridge", + "required": true + }, + "channels": { + "type": "List[string]", + "description": "Ids of channels participating in this bridge", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_2_0/channels.json b/codegen/src/main/resources/codegen-data/ari_1_2_0/channels.json new file mode 100644 index 00000000..cc7feb6a --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_2_0/channels.json @@ -0,0 +1,1456 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.2.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/stasis", + "resourcePath": "/api-docs/channels.{format}", + "apis": [ + { + "path": "/channels", + "description": "Active channels", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all active channels in Asterisk.", + "nickname": "list", + "responseClass": "List[Channel]" + }, + { + "httpMethod": "POST", + "summary": "Create a new channel (originate).", + "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.", + "nickname": "originate", + "responseClass": "Channel", + "parameters": [ + { + "name": "endpoint", + "description": "Endpoint to call.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to dial after the endpoint answers", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to dial after the endpoint answers. If omitted, uses 'default'", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to dial after the endpoint answers. If omitted, uses 1", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "long" + }, + { + "name": "app", + "description": "The application that is subscribed to the originated channel, and passed to the Stasis application.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "callerId", + "description": "CallerID to use when dialing the endpoint or extension.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 30 + }, + { + "name": "variables", + "description": "The 'variables' key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { 'endpoint': 'SIP/Alice', 'variables': { 'CALLERID(name)': 'Alice' } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for originating a channel." + } + ] + } + ] + }, + { + "path": "/channels/{channelId}", + "description": "Active channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "Channel details.", + "nickname": "get", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + } + ] + }, + { + "httpMethod": "POST", + "summary": "Create a new channel (originate with id).", + "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.", + "nickname": "originateWithId", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "endpoint", + "description": "Endpoint to call.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to dial after the endpoint answers", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to dial after the endpoint answers. If omitted, uses 'default'", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to dial after the endpoint answers. If omitted, uses 1", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "long" + }, + { + "name": "app", + "description": "The application that is subscribed to the originated channel, and passed to the Stasis application.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "callerId", + "description": "CallerID to use when dialing the endpoint or extension.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 30 + }, + { + "name": "variables", + "description": "The 'variables' key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { 'endpoint': 'SIP/Alice', 'variables': { 'CALLERID(name)': 'Alice' } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for originating a channel." + } + ] + + }, + { + "httpMethod": "DELETE", + "summary": "Delete (i.e. hangup) a channel.", + "nickname": "hangup", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "reason", + "description": "Reason for hanging up the channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defalutValue": "normal", + "allowableValues": { + "valueType": "LIST", + "values": [ + "normal", + "busy", + "congestion" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid reason for hangup provided" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/continue", + "description": "Exit application; continue execution in the dialplan", + "operations": [ + { + "httpMethod": "POST", + "summary": "Exit application; continue execution in the dialplan.", + "nickname": "continueInDialplan", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/answer", + "description": "Answer a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Answer a channel.", + "nickname": "answer", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/ring", + "description": "Send a ringing indication to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Indicate ringing to a channel.", + "nickname": "ring", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop ringing indication on a channel if locally generated.", + "nickname": "ringStop", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/dtmf", + "description": "Send DTMF to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Send provided DTMF to a given channel.", + "nickname": "sendDTMF", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "dtmf", + "description": "DTMF To send.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "before", + "description": "Amount of time to wait before DTMF digits (specified in milliseconds) start.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0 + }, + { + "name": "between", + "description": "Amount of time in between DTMF digits (specified in milliseconds).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 100 + }, + { + "name": "duration", + "description": "Length of each DTMF digit (specified in milliseconds).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 100 + }, + { + "name": "after", + "description": "Amount of time to wait after DTMF digits (specified in milliseconds) end.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0 + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "DTMF is required" + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/mute", + "description": "Mute a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Mute a channel.", + "nickname": "mute", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "Direction in which to mute audio", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both", + "in", + "out" + ] + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unmute a channel.", + "nickname": "unmute", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "Direction in which to unmute audio", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both", + "in", + "out" + ] + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/hold", + "description": "Put a channel on hold", + "operations": [ + { + "httpMethod": "POST", + "summary": "Hold a channel.", + "nickname": "hold", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Remove a channel from hold.", + "nickname": "unhold", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/moh", + "description": "Play music on hold to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play music on hold to a channel.", + "notes": "Using media operations such as /play on a channel playing MOH in this manner will suspend MOH without resuming automatically. If continuing music on hold is desired, the stasis application must reinitiate music on hold.", + "nickname": "startMoh", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "mohClass", + "description": "Music on hold class to use", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing music on hold to a channel.", + "nickname": "stopMoh", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/silence", + "description": "Play silence to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play silence to a channel.", + "notes": "Using media operations such as /play on a channel playing silence in this manner will suspend silence without resuming automatically.", + "nickname": "startSilence", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing silence to a channel.", + "nickname": "stopSilence", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/play", + "description": "Play media to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "play", + "responseClass": "Playback", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media's URI to play.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of media to skip before playing.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000 + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/play/{playbackId}", + "description": "Play media to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media and specify the playbackId.", + "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.)", + "nickname": "playWithId", + "responseClass": "Playback", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media's URI to play.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of media to skip before playing.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000 + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/record", + "description": "Record audio from a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start a recording.", + "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.", + "nickname": "record", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Recording's filename", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "maxDurationSeconds", + "description": "Maximum duration of the recording, in seconds. 0 for no limit", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "maxSilenceSeconds", + "description": "Maximum duration of silence, in seconds. 0 for no limit", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "ifExists", + "description": "Action to take if a recording with the same name already exists.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "fail", + "allowableValues": { + "valueType": "LIST", + "values": [ + "fail", + "overwrite", + "append" + ] + } + }, + { + "name": "beep", + "description": "Play beep when recording begins", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "terminateOn", + "description": "DTMF input to terminate recording", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "any", + "*", + "#" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "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" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/variable", + "description": "Variables on a channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the value of a channel variable or function.", + "nickname": "getChannelVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The channel variable or function to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "POST", + "summary": "Set the value of a channel variable or function.", + "nickname": "setChannelVar", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The channel variable or function to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/snoop", + "description": "Snoop (spy/whisper) on a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start snooping.", + "notes": "Snoop (spy/whisper) on a specific channel.", + "nickname": "snoopChannel", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "spy", + "description": "Direction of audio to spy on", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "whisper", + "description": "Direction of audio to whisper into", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "app", + "description": "Application the snooping channel is placed into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "snoopId", + "description": "Unique ID to assign to snooping channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/snoop/{snoopId}", + "description": "Snoop (spy/whisper) on a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start snooping.", + "notes": "Snoop (spy/whisper) on a specific channel.", + "nickname": "snoopChannelWithId", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "snoopId", + "description": "Unique ID to assign to snooping channel", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "spy", + "description": "Direction of audio to spy on", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "whisper", + "description": "Direction of audio to whisper into", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "app", + "description": "Application the snooping channel is placed into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + } + ], + "models": { + "Dialed": { + "id": "Dialed", + "description": "Dialed channel information.", + "properties": {} + }, + "DialplanCEP": { + "id": "DialplanCEP", + "description": "Dialplan location (context/extension/priority)", + "properties": { + "context": { + "required": true, + "type": "string", + "description": "Context in the dialplan" + }, + "exten": { + "required": true, + "type": "string", + "description": "Extension in the dialplan" + }, + "priority": { + "required": true, + "type": "long", + "description": "Priority in the dialplan" + } + } + }, + "CallerID": { + "id": "CallerID", + "description": "Caller identification", + "properties": { + "name": { + "required": true, + "type": "string" + }, + "number": { + "required": true, + "type": "string" + } + } + }, + "Channel": { + "id": "Channel", + "description": "A specific communication connection between Asterisk and an Endpoint.", + "properties": { + "id": { + "required": true, + "type": "string", + "description": "Unique identifier of the channel.\n\nThis is the same as the Uniqueid field in AMI." + }, + "name": { + "required": true, + "type": "string", + "description": "Name of the channel (i.e. SIP/foo-0000a7e3)" + }, + "state": { + "required": true, + "type": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "Down", + "Rsrved", + "OffHook", + "Dialing", + "Ring", + "Ringing", + "Up", + "Busy", + "Dialing Offhook", + "Pre-ring", + "Unknown" + ] + } + }, + "caller": { + "required": true, + "type": "CallerID" + }, + "connected": { + "required": true, + "type": "CallerID" + }, + "accountcode": { + "required": true, + "type": "string" + }, + "dialplan": { + "required": true, + "type": "DialplanCEP", + "description": "Current location in the dialplan" + }, + "creationtime": { + "required": true, + "type": "Date", + "description": "Timestamp when channel was created" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_2_0/deviceStates.json b/codegen/src/main/resources/codegen-data/ari_1_2_0/deviceStates.json new file mode 100644 index 00000000..b58539ea --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_2_0/deviceStates.json @@ -0,0 +1,151 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "Kevin Harwell ", + "_svn_revision": "$Revision$", + "apiVersion": "1.2.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/stasis", + "resourcePath": "/api-docs/deviceStates.{format}", + "apis": [ + { + "path": "/deviceStates", + "description": "Device states", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all ARI controlled device states.", + "nickname": "list", + "responseClass": "List[DeviceState]" + } + ] + }, + { + "path": "/deviceStates/{deviceName}", + "description": "Device state", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve the current state of a device.", + "nickname": "get", + "responseClass": "DeviceState", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Change the state of a device controlled by ARI. (Note - implicitly creates the device state).", + "nickname": "update", + "responseClass": "void", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "deviceState", + "description": "Device state value", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "NOT_INUSE", + "INUSE", + "BUSY", + "INVALID", + "UNAVAILABLE", + "RINGING", + "RINGINUSE", + "ONHOLD" + ] + } + + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Device name is missing" + }, + { + "code": 409, + "reason": "Uncontrolled device specified" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Destroy a device-state controlled by ARI.", + "nickname": "delete", + "responseClass": "void", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Device name is missing" + }, + { + "code": 409, + "reason": "Uncontrolled device specified" + } + ] + } + ] + } + ], + "models": { + "DeviceState": { + "id": "DeviceState", + "description": "Represents the state of a device.", + "properties": { + "name": { + "type": "string", + "description": "Name of the device.", + "required": true + }, + "state": { + "type": "string", + "description": "Device's state", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "UNKNOWN", + "NOT_INUSE", + "INUSE", + "BUSY", + "INVALID", + "UNAVAILABLE", + "RINGING", + "RINGINUSE", + "ONHOLD" + ] + } + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_2_0/endpoints.json b/codegen/src/main/resources/codegen-data/ari_1_2_0/endpoints.json new file mode 100644 index 00000000..fbccd4d4 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_2_0/endpoints.json @@ -0,0 +1,117 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.2.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/stasis", + "resourcePath": "/api-docs/endpoints.{format}", + "apis": [ + { + "path": "/endpoints", + "description": "Asterisk endpoints", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all endpoints.", + "nickname": "list", + "responseClass": "List[Endpoint]" + } + ] + }, + { + "path": "/endpoints/{tech}", + "description": "Asterisk endpoints", + "operations": [ + { + "httpMethod": "GET", + "summary": "List available endoints for a given endpoint technology.", + "nickname": "listByTech", + "responseClass": "List[Endpoint]", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoints (sip,iax2,...)", + "paramType": "path", + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Endpoints not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}/{resource}", + "description": "Single endpoint", + "operations": [ + { + "httpMethod": "GET", + "summary": "Details for an endpoint.", + "nickname": "get", + "responseClass": "Endpoint", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "resource", + "description": "ID of the endpoint", + "paramType": "path", + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Endpoints not found" + } + ] + } + ] + } + ], + "models": { + "Endpoint": { + "id": "Endpoint", + "description": "An external device that may offer/accept calls to/from Asterisk.\n\nUnlike most resources, which have a single unique identifier, an endpoint is uniquely identified by the technology/resource pair.", + "properties": { + "technology": { + "type": "string", + "description": "Technology of the endpoint", + "required": true + }, + "resource": { + "type": "string", + "description": "Identifier of the endpoint, specific to the given technology.", + "required": true + }, + "state": { + "type": "string", + "description": "Endpoint's state", + "required": false, + "allowableValues": { + "valueType": "LIST", + "values": [ + "unknown", + "offline", + "online" + ] + } + }, + "channel_ids": { + "type": "List[string]", + "description": "Id's of channels associated with this endpoint", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_2_0/events.json b/codegen/src/main/resources/codegen-data/ari_1_2_0/events.json new file mode 100644 index 00000000..f19b0b18 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_2_0/events.json @@ -0,0 +1,647 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.2.0", + "swaggerVersion": "1.2", + "basePath": "http://localhost:8088/stasis", + "resourcePath": "/api-docs/events.{format}", + "apis": [ + { + "path": "/events", + "description": "Events from Asterisk to applications", + "operations": [ + { + "httpMethod": "GET", + "upgrade": "websocket", + "websocketProtocol": "ari", + "summary": "WebSocket connection for events.", + "nickname": "eventWebsocket", + "responseClass": "Message", + "parameters": [ + { + "name": "app", + "description": "Applications to subscribe to.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ] + } + ] + }, + { + "path": "/events/user/{eventName}", + "description": "Stasis application user events", + "operations": [ + { + "httpMethod": "POST", + "summary": "Generate a user event.", + "nickname": "userEvent", + "responseClass": "void", + "parameters": [ + { + "name": "eventName", + "description": "Event name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "application", + "description": "The name of the application that will receive this event", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "source", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}/{resource}, deviceState:{deviceName}", + "paramType": "query", + "required": false, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "variables", + "description": "custom key/value pairs added to the user event", + "paramType": "body", + "required": false, + "allowMultiple": false, + "dataType": "containers" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 422, + "reason": "Event source not found." + }, + { + "code": 400, + "reason": "Invalid even tsource URI or userevent data." + } + ] + } + ] + } + ], + "models": { + "Message": { + "id": "Message", + "description": "Base type for errors and events", + "discriminator": "type", + "properties": { + "type": { + "type": "string", + "required": true, + "description": "Indicates the type of this message." + } + }, + "subTypes": [ + "MissingParams", + "Event" + ] + }, + "MissingParams": { + "id": "MissingParams", + "description": "Error event sent when required params are missing.", + "properties": { + "params": { + "required": true, + "type": "List[string]", + "description": "A list of the missing parameters" + } + } + }, + "Event": { + "id": "Event", + "description": "Base type for asynchronous events from Asterisk.", + "properties": { + "application": { + "type": "string", + "description": "Name of the application receiving the event.", + "required": true + }, + "timestamp": { + "type": "Date", + "description": "Time at which this event was created.", + "required": false + } + }, + "subTypes": [ + "DeviceStateChanged", + "PlaybackStarted", + "PlaybackFinished", + "RecordingStarted", + "RecordingFinished", + "RecordingFailed", + "ApplicationReplaced", + "BridgeCreated", + "BridgeDestroyed", + "BridgeMerged", + "BridgeBlindTransfer", + "BridgeAttendedTransfer", + "ChannelCreated", + "ChannelDestroyed", + "ChannelEnteredBridge", + "ChannelLeftBridge", + "ChannelStateChange", + "ChannelDtmfReceived", + "ChannelDialplan", + "ChannelCallerId", + "ChannelUserevent", + "ChannelHangupRequest", + "ChannelVarset", + "EndpointStateChange", + "Dial", + "StasisEnd", + "StasisStart" + ] + }, + "DeviceStateChanged": { + "id": "DeviceStateChanged", + "description": "Notification that a device state has changed.", + "properties": { + "device_state": { + "type": "DeviceState", + "description": "Device state object", + "required": true + } + } + }, + "PlaybackStarted": { + "id": "PlaybackStarted", + "description": "Event showing the start of a media playback operation.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "PlaybackFinished": { + "id": "PlaybackFinished", + "description": "Event showing the completion of a media playback operation.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "RecordingStarted": { + "id": "RecordingStarted", + "extends": "Event", + "description": "Event showing the start of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "RecordingFinished": { + "id": "RecordingFinished", + "extends": "Event", + "description": "Event showing the completion of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "RecordingFailed": { + "id": "RecordingFailed", + "extends": "Event", + "description": "Event showing failure of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "ApplicationReplaced": { + "id": "ApplicationReplaced", + "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.", + "properties": {} + }, + "BridgeCreated": { + "id": "BridgeCreated", + "description": "Notification that a bridge has been created.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeDestroyed": { + "id": "BridgeDestroyed", + "description": "Notification that a bridge has been destroyed.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeMerged": { + "id": "BridgeMerged", + "description": "Notification that one bridge has merged into another.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "bridge_from": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeBlindTransfer": { + "id": "BridgeBlindTransfer", + "description": "Notification that a blind transfer has occurred.", + "properties": { + "channel": { + "description": "The channel performing the blind transfer", + "required": true, + "type": "Channel" + }, + "exten": { + "description": "The extension transferred to", + "required": true, + "type": "string" + }, + "context": { + "description": "The context transferred to", + "required": true, + "type": "string" + }, + "result": { + "description": "The result of the transfer attempt", + "required": true, + "type": "string" + }, + "is_external": { + "description": "Whether the transfer was externally initiated or not", + "required": true, + "type": "boolean" + }, + "bridge": { + "description": "The bridge being transferred", + "type": "Bridge" + } + } + }, + "BridgeAttendedTransfer": { + "id": "BridgeAttendedTransfer", + "description": "Notification that an attended transfer has occurred.", + "properties": { + "transferer_first_leg": { + "description": "First leg of the transferer", + "required": true, + "type": "Channel" + }, + "transferer_second_leg": { + "description": "Second leg of the transferer", + "required": true, + "type": "Channel" + }, + "result": { + "description": "The result of the transfer attempt", + "required": true, + "type": "string" + }, + "is_external": { + "description": "Whether the transfer was externally initiated or not", + "required": true, + "type": "boolean" + }, + "transferer_first_leg_bridge": { + "description": "Bridge the transferer first leg is in", + "type": "Bridge" + }, + "transferer_second_leg_bridge": { + "description": "Bridge the transferer second leg is in", + "type": "Bridge" + }, + "destination_type": { + "description": "How the transfer was accomplished", + "required": true, + "type": "string" + }, + "destination_bridge": { + "description": "Bridge that survived the merge result", + "type": "string" + }, + "destination_application": { + "description": "Application that has been transferred into", + "type": "string" + }, + "destination_link_first_leg": { + "description": "First leg of a link transfer result", + "type": "Channel" + }, + "destination_link_second_leg": { + "description": "Second leg of a link transfer result", + "type": "Channel" + }, + "destination_threeway_channel": { + "description": "Transferer channel that survived the threeway result", + "type": "Channel" + }, + "destination_threeway_bridge": { + "description": "Bridge that survived the threeway result", + "type": "Bridge" + } + } + }, + "ChannelCreated": { + "id": "ChannelCreated", + "description": "Notification that a channel has been created.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelDestroyed": { + "id": "ChannelDestroyed", + "description": "Notification that a channel has been destroyed.", + "properties": { + "cause": { + "required": true, + "description": "Integer representation of the cause of the hangup", + "type": "int" + }, + "cause_txt": { + "required": true, + "description": "Text representation of the cause of the hangup", + "type": "string" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelEnteredBridge": { + "id": "ChannelEnteredBridge", + "description": "Notification that a channel has entered a bridge.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "channel": { + "type": "Channel" + } + } + }, + "ChannelLeftBridge": { + "id": "ChannelLeftBridge", + "description": "Notification that a channel has left a bridge.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelStateChange": { + "id": "ChannelStateChange", + "description": "Notification of a channel's state change.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelDtmfReceived": { + "id": "ChannelDtmfReceived", + "description": "DTMF received on a channel.\n\nThis event is sent when the DTMF ends. There is no notification about the start of DTMF", + "properties": { + "digit": { + "required": true, + "type": "string", + "description": "DTMF digit received (0-9, A-E, # or *)" + }, + "duration_ms": { + "required": true, + "type": "int", + "description": "Number of milliseconds DTMF was received" + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which DTMF was received" + } + } + }, + "ChannelDialplan": { + "id": "ChannelDialplan", + "description": "Channel changed location in the dialplan.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that changed dialplan location." + }, + "dialplan_app": { + "required": true, + "type": "string", + "description": "The application about to be executed." + }, + "dialplan_app_data": { + "required": true, + "type": "string", + "description": "The data to be passed to the application." + } + } + }, + "ChannelCallerId": { + "id": "ChannelCallerId", + "description": "Channel changed Caller ID.", + "properties": { + "caller_presentation": { + "required": true, + "type": "int", + "description": "The integer representation of the Caller Presentation value." + }, + "caller_presentation_txt": { + "required": true, + "type": "string", + "description": "The text representation of the Caller Presentation value." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that changed Caller ID." + } + } + }, + "ChannelUserevent": { + "id": "ChannelUserevent", + "description": "User-generated event with additional user-defined fields in the object.", + "properties": { + "eventname": { + "required": true, + "type": "string", + "description": "The name of the user event." + }, + "channel": { + "required": false, + "type": "Channel", + "description": "A channel that is signaled with the user event." + }, + "bridge": { + "required": false, + "type": "Bridge", + "description": "A bridge that is signaled with the user event." + }, + "endpoint": { + "required": false, + "type": "Endpoint", + "description": "A endpoint that is signaled with the user event." + }, + "userevent": { + "required": true, + "type": "object", + "description": "Custom Userevent data" + } + } + }, + "ChannelHangupRequest": { + "id": "ChannelHangupRequest", + "description": "A hangup was requested on the channel.", + "properties": { + "cause": { + "type": "int", + "description": "Integer representation of the cause of the hangup." + }, + "soft": { + "type": "boolean", + "description": "Whether the hangup request was a soft hangup request." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which the hangup was requested." + } + } + }, + "ChannelVarset": { + "id": "ChannelVarset", + "description": "Channel variable changed.", + "properties": { + "variable": { + "required": true, + "type": "string", + "description": "The variable that changed." + }, + "value": { + "required": true, + "type": "string", + "description": "The new value of the variable." + }, + "channel": { + "required": false, + "type": "Channel", + "description": "The channel on which the variable was set.\n\nIf missing, the variable is a global variable." + } + } + }, + "EndpointStateChange": { + "id": "EndpointStateChange", + "description": "Endpoint state changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + } + } + }, + "Dial": { + "id": "Dial", + "description": "Dialing state has changed.", + "properties": { + "caller": { + "required": false, + "type": "Channel", + "description": "The calling channel." + }, + "peer": { + "required": true, + "type": "Channel", + "description": "The dialed channel." + }, + "forward": { + "required": false, + "type": "string", + "description": "Forwarding target requested by the original dialed channel." + }, + "forwarded": { + "required": false, + "type": "Channel", + "description": "Channel that the caller has been forwarded to." + }, + "dialstring": { + "required": false, + "type": "string", + "description": "The dial string for calling the peer channel." + }, + "dialstatus": { + "required": true, + "type": "string", + "description": "Current status of the dialing attempt to the peer." + } + } + }, + "StasisEnd": { + "id": "StasisEnd", + "description": "Notification that a channel has left a Stasis application.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "StasisStart": { + "id": "StasisStart", + "description": "Notification that a channel has entered a Stasis application.", + "properties": { + "args": { + "required": true, + "type": "List[string]", + "description": "Arguments to the application" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_2_0/mailboxes.json b/codegen/src/main/resources/codegen-data/ari_1_2_0/mailboxes.json new file mode 100644 index 00000000..b225d166 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_2_0/mailboxes.json @@ -0,0 +1,134 @@ +{ + "_copyright": "Copyright (C) 2013, Digium, Inc.", + "_author": "Jonathan Rose ", + "_svn_revision": "$Revision$", + "apiVersion": "1.2.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/stasis", + "resourcePath": "/api-docs/mailboxes.{format}", + "apis": [ + { + "path": "/mailboxes", + "description": "Mailboxes", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all mailboxes.", + "nickname": "list", + "responseClass": "List[Mailbox]" + } + ] + }, + { + "path": "/mailboxes/{mailboxName}", + "description": "Mailbox state", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve the current state of a mailbox.", + "nickname": "get", + "responseClass": "Mailbox", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Change the state of a mailbox. (Note - implicitly creates the mailbox).", + "nickname": "update", + "responseClass": "void", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "oldMessages", + "description": "Count of old messages in the mailbox", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "newMessages", + "description": "Count of new messages in the mailbox", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "int" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Destroy a mailbox.", + "nickname": "delete", + "responseClass": "void", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + } + ] + } + ], + "models": { + "Mailbox": { + "id": "Mailbox", + "description": "Represents the state of a mailbox.", + "properties": { + "name": { + "type": "string", + "description": "Name of the mailbox.", + "required": true + }, + "old_messages": { + "type": "int", + "description": "Count of old messages in the mailbox.", + "required": true + }, + "new_messages": { + "type": "int", + "description": "Count of new messages in the mailbox.", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_2_0/playbacks.json b/codegen/src/main/resources/codegen-data/ari_1_2_0/playbacks.json new file mode 100644 index 00000000..60d9ba12 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_2_0/playbacks.json @@ -0,0 +1,155 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.2.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/stasis", + "resourcePath": "/api-docs/playbacks.{format}", + "apis": [ + { + "path": "/playbacks/{playbackId}", + "description": "Control object for a playback operation.", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a playback's details.", + "nickname": "get", + "responseClass": "Playback", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "The playback cannot be found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop a playback.", + "nickname": "stop", + "responseClass": "void", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "The playback cannot be found" + } + ] + } + ] + }, + { + "path": "/playbacks/{playbackId}/control", + "description": "Control object for a playback operation.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Control a playback.", + "nickname": "control", + "responseClass": "void", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "operation", + "description": "Operation to perform on the playback.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "restart", + "pause", + "unpause", + "reverse", + "forward" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "The provided operation parameter was invalid" + }, + { + "code": 404, + "reason": "The playback cannot be found" + }, + { + "code": 409, + "reason": "The operation cannot be performed in the playback's current state" + } +] + } + ] + } + ], + "models": { + "Playback": { + "id": "Playback", + "description": "Object representing the playback of media to a channel", + "properties": { + "id": { + "type": "string", + "description": "ID for this playback operation", + "required": true + }, + "media_uri": { + "type": "string", + "description": "URI for the media to play back.", + "required": true + }, + "target_uri": { + "type": "string", + "description": "URI for the channel or bridge to play the media on", + "required": true + }, + "language": { + "type": "string", + "description": "For media types that support multiple languages, the language requested for playback." + }, + "state": { + "type": "string", + "description": "Current state of the playback operation.", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "queued", + "playing", + "complete" + ] + } + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_2_0/recordings.json b/codegen/src/main/resources/codegen-data/ari_1_2_0/recordings.json new file mode 100644 index 00000000..cbe68f32 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_2_0/recordings.json @@ -0,0 +1,331 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.2.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/stasis", + "resourcePath": "/api-docs/recordings.{format}", + "apis": [ + { + "path": "/recordings/stored", + "description": "Recordings", + "operations": [ + { + "httpMethod": "GET", + "summary": "List recordings that are complete.", + "nickname": "listStored", + "responseClass": "List[StoredRecording]" + } + ] + }, + { + "path": "/recordings/stored/{recordingName}", + "description": "Individual recording", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a stored recording's details.", + "nickname": "getStored", + "responseClass": "StoredRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Delete a stored recording.", + "nickname": "deleteStored", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}", + "description": "A recording that is in progress", + "operations": [ + { + "httpMethod": "GET", + "summary": "List live recordings.", + "nickname": "getLive", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop a live recording and discard it.", + "nickname": "cancel", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/stop", + "operations": [ + { + "httpMethod": "POST", + "summary": "Stop a live recording and store it.", + "nickname": "stop", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/pause", + "operations": [ + { + "httpMethod": "POST", + "summary": "Pause a live recording.", + "notes": "Pausing a recording suspends silence detection, which will be restarted when the recording is unpaused. Paused time is not included in the accounting for maxDurationSeconds.", + "nickname": "pause", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unpause a live recording.", + "nickname": "unpause", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/mute", + "operations": [ + { + "httpMethod": "POST", + "summary": "Mute a live recording.", + "notes": "Muting a recording suspends silence detection, which will be restarted when the recording is unmuted.", + "nickname": "mute", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unmute a live recording.", + "nickname": "unmute", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + } + ] + } + ], + "models": { + "StoredRecording": { + "id": "StoredRecording", + "description": "A past recording that may be played back.", + "properties": { + "name": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + }, + "LiveRecording": { + "id": "LiveRecording", + "description": "A recording that is in progress", + "properties": { + "name": { + "required": true, + "type": "string", + "description": "Base name for the recording" + }, + "format": { + "required": true, + "type": "string", + "description": "Recording format (wav, gsm, etc.)" + }, + "target_uri": { + "required": true, + "type": "string", + "description": "URI for the channel or bridge being recorded" + }, + "state": { + "required": false, + "type": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "queued", + "recording", + "paused", + "done", + "failed", + "canceled" + ] + } + }, + "cause": { + "required": false, + "type": "string", + "description": "Cause for recording failure if failed" + }, + "state": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_2_0/sounds.json b/codegen/src/main/resources/codegen-data/ari_1_2_0/sounds.json new file mode 100644 index 00000000..78984396 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_2_0/sounds.json @@ -0,0 +1,99 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.2.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/stasis", + "resourcePath": "/api-docs/sounds.{format}", + "apis": [ + { + "path": "/sounds", + "description": "Sounds", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all sounds.", + "nickname": "list", + "responseClass": "List[Sound]", + "parameters": [ + { + "name": "lang", + "description": "Lookup sound for a specific language.", + "paramType": "query", + "dataType": "string", + "required": false + }, + { + "name": "format", + "description": "Lookup sound in a specific format.", + "paramType": "query", + "dataType": "string", + "required": false, + "__note": "core show translation can show translation paths between formats, along with relative costs. so this could be just installed format, or we could follow that for transcoded formats." + } + ] + } + ] + }, + { + "path": "/sounds/{soundId}", + "description": "Individual sound", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a sound's details.", + "nickname": "get", + "responseClass": "Sound", + "parameters": [ + { + "name": "soundId", + "description": "Sound's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ] + } + ] + } + ], + "models": { + "FormatLangPair": { + "id": "FormatLangPair", + "description": "Identifies the format and language of a sound file", + "properties": { + "language": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + }, + "Sound": { + "id": "Sound", + "description": "A media file that may be played back.", + "properties": { + "id": { + "required": true, + "description": "Sound's identifier.", + "type": "string" + }, + "text": { + "required": false, + "description": "Text description of the sound, usually the words spoken.", + "type": "string" + }, + "formats": { + "required": true, + "description": "The formats and languages in which this sound is available.", + "type": "List[FormatLangPair]" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_3_0/applications.json b/codegen/src/main/resources/codegen-data/ari_1_3_0/applications.json new file mode 100644 index 00000000..4b3da538 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_3_0/applications.json @@ -0,0 +1,172 @@ +{ + "_copyright": "Copyright (C) 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.3.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/stasis", + "resourcePath": "/api-docs/applications.{format}", + "apis": [ + { + "path": "/applications", + "description": "Stasis applications", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all applications.", + "nickname": "list", + "responseClass": "List[Application]" + } + ] + }, + { + "path": "/applications/{applicationName}", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get details of an application.", + "nickname": "get", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Application does not exist." + } + ] + } + ] + }, + { + "path": "/applications/{applicationName}/subscription", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "POST", + "summary": "Subscribe an application to a event source.", + "notes": "Returns the state of the application after the subscriptions have changed", + "nickname": "subscribe", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "eventSource", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}/{resource}, deviceState:{deviceName}", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing parameter." + }, + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 422, + "reason": "Event source does not exist." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unsubscribe an application from an event source.", + "notes": "Returns the state of the application after the subscriptions have changed", + "nickname": "unsubscribe", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "eventSource", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}/{resource}, deviceState:{deviceName}", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing parameter; event source scheme not recognized." + }, + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 409, + "reason": "Application not subscribed to event source." + }, + { + "code": 422, + "reason": "Event source does not exist." + } + ] + } + ] + } + ], + "models": { + "Application": { + "id": "Application", + "description": "Details of a Stasis application", + "properties": { + "name": { + "type": "string", + "description": "Name of this application", + "required": true + }, + "channel_ids": { + "type": "List[string]", + "description": "Id's for channels subscribed to.", + "required": true + }, + "bridge_ids": { + "type": "List[string]", + "description": "Id's for bridges subscribed to.", + "required": true + }, + "endpoint_ids": { + "type": "List[string]", + "description": "{tech}/{resource} for endpoints subscribed to.", + "required": true + }, + "device_names": { + "type": "List[string]", + "description": "Names of the devices subscribed to.", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_3_0/asterisk.json b/codegen/src/main/resources/codegen-data/ari_1_3_0/asterisk.json new file mode 100644 index 00000000..97228f38 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_3_0/asterisk.json @@ -0,0 +1,259 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.3.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/stasis", + "resourcePath": "/api-docs/asterisk.{format}", + "apis": [ + { + "path": "/asterisk/info", + "description": "Asterisk system information (similar to core show settings)", + "operations": [ + { + "httpMethod": "GET", + "summary": "Gets Asterisk system information.", + "nickname": "getInfo", + "responseClass": "AsteriskInfo", + "parameters": [ + { + "name": "only", + "description": "Filter information returned", + "paramType": "query", + "required": false, + "allowMultiple": true, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "build", + "system", + "config", + "status" + ] + } + } + ] + } + ] + }, + { + "path": "/asterisk/variable", + "description": "Global variables", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the value of a global variable.", + "nickname": "getGlobalVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "variable", + "description": "The variable to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + } + ] + }, + { + "httpMethod": "POST", + "summary": "Set the value of a global variable.", + "nickname": "setGlobalVar", + "responseClass": "void", + "parameters": [ + { + "name": "variable", + "description": "The variable to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + } + ] + } + ] + } + ], + "models": { + "BuildInfo": { + "id": "BuildInfo", + "description": "Info about how Asterisk was built", + "properties": { + "os": { + "required": true, + "type": "string", + "description": "OS Asterisk was built on." + }, + "kernel": { + "required": true, + "type": "string", + "description": "Kernel version Asterisk was built on." + }, + "options": { + "required": true, + "type": "string", + "description": "Compile time options, or empty string if default." + }, + "machine": { + "required": true, + "type": "string", + "description": "Machine architecture (x86_64, i686, ppc, etc.)" + }, + "date": { + "required": true, + "type": "string", + "description": "Date and time when Asterisk was built." + }, + "user": { + "required": true, + "type": "string", + "description": "Username that build Asterisk" + } + } + }, + "SystemInfo": { + "id": "SystemInfo", + "description": "Info about Asterisk", + "properties": { + "version": { + "required": true, + "type": "string", + "description": "Asterisk version." + }, + "entity_id": { + "required": true, + "type": "string", + "description": "" + } + } + }, + "SetId": { + "id": "SetId", + "description": "Effective user/group id", + "properties": { + "user": { + "required": true, + "type": "string", + "description": "Effective user id." + }, + "group": { + "required": true, + "type": "string", + "description": "Effective group id." + } + } + }, + "ConfigInfo": { + "id": "ConfigInfo", + "description": "Info about Asterisk configuration", + "properties": { + "name": { + "required": true, + "type": "string", + "description": "Asterisk system name." + }, + "default_language": { + "required": true, + "type": "string", + "description": "Default language for media playback." + }, + "max_channels": { + "required": false, + "type": "int", + "description": "Maximum number of simultaneous channels." + }, + "max_open_files": { + "required": false, + "type": "int", + "description": "Maximum number of open file handles (files, sockets)." + }, + "max_load": { + "required": false, + "type": "double", + "description": "Maximum load avg on system." + }, + "setid": { + "required": true, + "type": "SetId", + "description": "Effective user/group id for running Asterisk." + } + } + }, + "StatusInfo": { + "id": "StatusInfo", + "description": "Info about Asterisk status", + "properties": { + "startup_time": { + "required": true, + "type": "Date", + "description": "Time when Asterisk was started." + }, + "last_reload_time": { + "required": true, + "type": "Date", + "description": "Time when Asterisk was last reloaded." + } + } + }, + "AsteriskInfo": { + "id": "AsteriskInfo", + "description": "Asterisk system information", + "properties": { + "build": { + "required": false, + "type": "BuildInfo", + "description": "Info about how Asterisk was built" + }, + "system": { + "required": false, + "type": "SystemInfo", + "description": "Info about the system running Asterisk" + }, + "config": { + "required": false, + "type": "ConfigInfo", + "description": "Info about Asterisk configuration" + }, + "status": { + "required": false, + "type": "StatusInfo", + "description": "Info about Asterisk status" + } + } + }, + "Variable": { + "id": "Variable", + "description": "The value of a channel variable", + "properties": { + "value": { + "required": true, + "type": "string", + "description": "The value of the variable requested" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_3_0/bridges.json b/codegen/src/main/resources/codegen-data/ari_1_3_0/bridges.json new file mode 100644 index 00000000..ccc64771 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_3_0/bridges.json @@ -0,0 +1,656 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.3.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/stasis", + "resourcePath": "/api-docs/bridges.{format}", + "apis": [ + { + "path": "/bridges", + "description": "Active bridges", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all active bridges in Asterisk.", + "nickname": "list", + "responseClass": "List[Bridge]" + }, + { + "httpMethod": "POST", + "summary": "Create a new bridge.", + "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", + "nickname": "create", + "responseClass": "Bridge", + "parameters": [ + { + "name": "type", + "description": "Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "bridgeId", + "description": "Unique ID to give to the bridge being created.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Name to give to the bridge being created.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}", + "description": "Individual bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Create a new bridge or updates an existing one.", + "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", + "nickname": "create_or_update_with_id", + "responseClass": "Bridge", + "parameters": [ + { + "name": "type", + "description": "Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media) to set.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "bridgeId", + "description": "Unique ID to give to the bridge being created.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Set the name of the bridge.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ] + }, + { + "httpMethod": "GET", + "summary": "Get bridge details.", + "nickname": "get", + "responseClass": "Bridge", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Shut down a bridge.", + "notes": "If any channels are in this bridge, they will be removed and resume whatever they were doing beforehand.", + "nickname": "destroy", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/addChannel", + "description": "Add a channel to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Add a channel to a bridge.", + "nickname": "addChannel", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channel", + "description": "Ids of channels to add to bridge", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "role", + "description": "Channel's role in the bridge", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Channel not found" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application; Channel currently recording" + }, + { + "code": 422, + "reason": "Channel not in Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/removeChannel", + "description": "Remove a channel from a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Remove a channel from a bridge.", + "nickname": "removeChannel", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channel", + "description": "Ids of channels to remove from bridge", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Channel not found" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + }, + { + "code": 422, + "reason": "Channel not in this bridge" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/moh", + "description": "Play music on hold to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play music on hold to a bridge or change the MOH class that is playing.", + "nickname": "startMoh", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "mohClass", + "description": "Channel's id", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing music on hold to a bridge.", + "notes": "This will only stop music on hold being played via POST bridges/{bridgeId}/moh.", + "nickname": "stopMoh", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/play", + "description": "Play media to the participants of a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media on a bridge.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "play", + "responseClass": "Playback", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media's URI to play.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of media to skip before playing.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "playbackId", + "description": "Playback Id.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/play/{playbackId}", + "description": "Play media to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media on a bridge.", + "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.)", + "nickname": "playWithId", + "responseClass": "Playback", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media's URI to play.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of media to skip before playing.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + + } + ] + }, + { + "path": "/bridges/{bridgeId}/record", + "description": "Record audio on a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start a recording.", + "notes": "This records the mixed audio from all channels participating in this bridge.", + "nickname": "record", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Recording's filename", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "maxDurationSeconds", + "description": "Maximum duration of the recording, in seconds. 0 for no limit.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "maxSilenceSeconds", + "description": "Maximum duration of silence, in seconds. 0 for no limit.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "ifExists", + "description": "Action to take if a recording with the same name already exists.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "fail", + "allowableValues": { + "valueType": "LIST", + "values": [ + "fail", + "overwrite", + "append" + ] + } + }, + { + "name": "beep", + "description": "Play beep when recording begins", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "terminateOn", + "description": "DTMF input to terminate recording.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "any", + "*", + "#" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge is not in a Stasis application; A recording with the same name already exists on the system and can not be overwritten because it is in progress or ifExists=fail" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + } + ], + "models": { + "Bridge": { + "id": "Bridge", + "description": "The merging of media from one or more channels.\n\nEveryone on the bridge receives the same audio.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for this bridge", + "required": true + }, + "technology": { + "type": "string", + "description": "Name of the current bridging technology", + "required": true + }, + "bridge_type": { + "type": "string", + "description": "Type of bridge technology", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "mixing", + "holding" + ] + } + }, + "bridge_class": { + "type": "string", + "description": "Bridging class", + "required": true + }, + "creator": { + "type": "string", + "description": "Entity that created the bridge", + "required": true + }, + "name": { + "type": "string", + "description": "Name the creator gave the bridge", + "required": true + }, + "channels": { + "type": "List[string]", + "description": "Ids of channels participating in this bridge", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_3_0/channels.json b/codegen/src/main/resources/codegen-data/ari_1_3_0/channels.json new file mode 100644 index 00000000..997c3450 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_3_0/channels.json @@ -0,0 +1,1456 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.3.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/stasis", + "resourcePath": "/api-docs/channels.{format}", + "apis": [ + { + "path": "/channels", + "description": "Active channels", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all active channels in Asterisk.", + "nickname": "list", + "responseClass": "List[Channel]" + }, + { + "httpMethod": "POST", + "summary": "Create a new channel (originate).", + "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.", + "nickname": "originate", + "responseClass": "Channel", + "parameters": [ + { + "name": "endpoint", + "description": "Endpoint to call.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to dial after the endpoint answers", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to dial after the endpoint answers. If omitted, uses 'default'", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to dial after the endpoint answers. If omitted, uses 1", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "long" + }, + { + "name": "app", + "description": "The application that is subscribed to the originated channel, and passed to the Stasis application.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "callerId", + "description": "CallerID to use when dialing the endpoint or extension.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 30 + }, + { + "name": "variables", + "description": "The 'variables' key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { 'endpoint': 'SIP/Alice', 'variables': { 'CALLERID(name)': 'Alice' } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for originating a channel." + } + ] + } + ] + }, + { + "path": "/channels/{channelId}", + "description": "Active channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "Channel details.", + "nickname": "get", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + } + ] + }, + { + "httpMethod": "POST", + "summary": "Create a new channel (originate with id).", + "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.", + "nickname": "originateWithId", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "endpoint", + "description": "Endpoint to call.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to dial after the endpoint answers", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to dial after the endpoint answers. If omitted, uses 'default'", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to dial after the endpoint answers. If omitted, uses 1", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "long" + }, + { + "name": "app", + "description": "The application that is subscribed to the originated channel, and passed to the Stasis application.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "callerId", + "description": "CallerID to use when dialing the endpoint or extension.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 30 + }, + { + "name": "variables", + "description": "The 'variables' key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { 'endpoint': 'SIP/Alice', 'variables': { 'CALLERID(name)': 'Alice' } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for originating a channel." + } + ] + + }, + { + "httpMethod": "DELETE", + "summary": "Delete (i.e. hangup) a channel.", + "nickname": "hangup", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "reason", + "description": "Reason for hanging up the channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defalutValue": "normal", + "allowableValues": { + "valueType": "LIST", + "values": [ + "normal", + "busy", + "congestion" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid reason for hangup provided" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/continue", + "description": "Exit application; continue execution in the dialplan", + "operations": [ + { + "httpMethod": "POST", + "summary": "Exit application; continue execution in the dialplan.", + "nickname": "continueInDialplan", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/answer", + "description": "Answer a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Answer a channel.", + "nickname": "answer", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/ring", + "description": "Send a ringing indication to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Indicate ringing to a channel.", + "nickname": "ring", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop ringing indication on a channel if locally generated.", + "nickname": "ringStop", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/dtmf", + "description": "Send DTMF to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Send provided DTMF to a given channel.", + "nickname": "sendDTMF", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "dtmf", + "description": "DTMF To send.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "before", + "description": "Amount of time to wait before DTMF digits (specified in milliseconds) start.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0 + }, + { + "name": "between", + "description": "Amount of time in between DTMF digits (specified in milliseconds).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 100 + }, + { + "name": "duration", + "description": "Length of each DTMF digit (specified in milliseconds).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 100 + }, + { + "name": "after", + "description": "Amount of time to wait after DTMF digits (specified in milliseconds) end.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0 + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "DTMF is required" + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/mute", + "description": "Mute a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Mute a channel.", + "nickname": "mute", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "Direction in which to mute audio", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both", + "in", + "out" + ] + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unmute a channel.", + "nickname": "unmute", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "Direction in which to unmute audio", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both", + "in", + "out" + ] + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/hold", + "description": "Put a channel on hold", + "operations": [ + { + "httpMethod": "POST", + "summary": "Hold a channel.", + "nickname": "hold", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Remove a channel from hold.", + "nickname": "unhold", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/moh", + "description": "Play music on hold to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play music on hold to a channel.", + "notes": "Using media operations such as /play on a channel playing MOH in this manner will suspend MOH without resuming automatically. If continuing music on hold is desired, the stasis application must reinitiate music on hold.", + "nickname": "startMoh", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "mohClass", + "description": "Music on hold class to use", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing music on hold to a channel.", + "nickname": "stopMoh", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/silence", + "description": "Play silence to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play silence to a channel.", + "notes": "Using media operations such as /play on a channel playing silence in this manner will suspend silence without resuming automatically.", + "nickname": "startSilence", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing silence to a channel.", + "nickname": "stopSilence", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/play", + "description": "Play media to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "play", + "responseClass": "Playback", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media's URI to play.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of media to skip before playing.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000 + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/play/{playbackId}", + "description": "Play media to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media and specify the playbackId.", + "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.)", + "nickname": "playWithId", + "responseClass": "Playback", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media's URI to play.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of media to skip before playing.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000 + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/record", + "description": "Record audio from a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start a recording.", + "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.", + "nickname": "record", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Recording's filename", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "maxDurationSeconds", + "description": "Maximum duration of the recording, in seconds. 0 for no limit", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "maxSilenceSeconds", + "description": "Maximum duration of silence, in seconds. 0 for no limit", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "ifExists", + "description": "Action to take if a recording with the same name already exists.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "fail", + "allowableValues": { + "valueType": "LIST", + "values": [ + "fail", + "overwrite", + "append" + ] + } + }, + { + "name": "beep", + "description": "Play beep when recording begins", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "terminateOn", + "description": "DTMF input to terminate recording", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "any", + "*", + "#" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "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" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/variable", + "description": "Variables on a channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the value of a channel variable or function.", + "nickname": "getChannelVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The channel variable or function to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "POST", + "summary": "Set the value of a channel variable or function.", + "nickname": "setChannelVar", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The channel variable or function to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/snoop", + "description": "Snoop (spy/whisper) on a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start snooping.", + "notes": "Snoop (spy/whisper) on a specific channel.", + "nickname": "snoopChannel", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "spy", + "description": "Direction of audio to spy on", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "whisper", + "description": "Direction of audio to whisper into", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "app", + "description": "Application the snooping channel is placed into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "snoopId", + "description": "Unique ID to assign to snooping channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/snoop/{snoopId}", + "description": "Snoop (spy/whisper) on a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start snooping.", + "notes": "Snoop (spy/whisper) on a specific channel.", + "nickname": "snoopChannelWithId", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "snoopId", + "description": "Unique ID to assign to snooping channel", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "spy", + "description": "Direction of audio to spy on", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "whisper", + "description": "Direction of audio to whisper into", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "app", + "description": "Application the snooping channel is placed into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + } + ], + "models": { + "Dialed": { + "id": "Dialed", + "description": "Dialed channel information.", + "properties": {} + }, + "DialplanCEP": { + "id": "DialplanCEP", + "description": "Dialplan location (context/extension/priority)", + "properties": { + "context": { + "required": true, + "type": "string", + "description": "Context in the dialplan" + }, + "exten": { + "required": true, + "type": "string", + "description": "Extension in the dialplan" + }, + "priority": { + "required": true, + "type": "long", + "description": "Priority in the dialplan" + } + } + }, + "CallerID": { + "id": "CallerID", + "description": "Caller identification", + "properties": { + "name": { + "required": true, + "type": "string" + }, + "number": { + "required": true, + "type": "string" + } + } + }, + "Channel": { + "id": "Channel", + "description": "A specific communication connection between Asterisk and an Endpoint.", + "properties": { + "id": { + "required": true, + "type": "string", + "description": "Unique identifier of the channel.\n\nThis is the same as the Uniqueid field in AMI." + }, + "name": { + "required": true, + "type": "string", + "description": "Name of the channel (i.e. SIP/foo-0000a7e3)" + }, + "state": { + "required": true, + "type": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "Down", + "Rsrved", + "OffHook", + "Dialing", + "Ring", + "Ringing", + "Up", + "Busy", + "Dialing Offhook", + "Pre-ring", + "Unknown" + ] + } + }, + "caller": { + "required": true, + "type": "CallerID" + }, + "connected": { + "required": true, + "type": "CallerID" + }, + "accountcode": { + "required": true, + "type": "string" + }, + "dialplan": { + "required": true, + "type": "DialplanCEP", + "description": "Current location in the dialplan" + }, + "creationtime": { + "required": true, + "type": "Date", + "description": "Timestamp when channel was created" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_3_0/deviceStates.json b/codegen/src/main/resources/codegen-data/ari_1_3_0/deviceStates.json new file mode 100644 index 00000000..f4097a82 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_3_0/deviceStates.json @@ -0,0 +1,151 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "Kevin Harwell ", + "_svn_revision": "$Revision$", + "apiVersion": "1.3.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/stasis", + "resourcePath": "/api-docs/deviceStates.{format}", + "apis": [ + { + "path": "/deviceStates", + "description": "Device states", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all ARI controlled device states.", + "nickname": "list", + "responseClass": "List[DeviceState]" + } + ] + }, + { + "path": "/deviceStates/{deviceName}", + "description": "Device state", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve the current state of a device.", + "nickname": "get", + "responseClass": "DeviceState", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Change the state of a device controlled by ARI. (Note - implicitly creates the device state).", + "nickname": "update", + "responseClass": "void", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "deviceState", + "description": "Device state value", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "NOT_INUSE", + "INUSE", + "BUSY", + "INVALID", + "UNAVAILABLE", + "RINGING", + "RINGINUSE", + "ONHOLD" + ] + } + + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Device name is missing" + }, + { + "code": 409, + "reason": "Uncontrolled device specified" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Destroy a device-state controlled by ARI.", + "nickname": "delete", + "responseClass": "void", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Device name is missing" + }, + { + "code": 409, + "reason": "Uncontrolled device specified" + } + ] + } + ] + } + ], + "models": { + "DeviceState": { + "id": "DeviceState", + "description": "Represents the state of a device.", + "properties": { + "name": { + "type": "string", + "description": "Name of the device.", + "required": true + }, + "state": { + "type": "string", + "description": "Device's state", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "UNKNOWN", + "NOT_INUSE", + "INUSE", + "BUSY", + "INVALID", + "UNAVAILABLE", + "RINGING", + "RINGINUSE", + "ONHOLD" + ] + } + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_3_0/endpoints.json b/codegen/src/main/resources/codegen-data/ari_1_3_0/endpoints.json new file mode 100644 index 00000000..948f03c7 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_3_0/endpoints.json @@ -0,0 +1,117 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.3.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/stasis", + "resourcePath": "/api-docs/endpoints.{format}", + "apis": [ + { + "path": "/endpoints", + "description": "Asterisk endpoints", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all endpoints.", + "nickname": "list", + "responseClass": "List[Endpoint]" + } + ] + }, + { + "path": "/endpoints/{tech}", + "description": "Asterisk endpoints", + "operations": [ + { + "httpMethod": "GET", + "summary": "List available endoints for a given endpoint technology.", + "nickname": "listByTech", + "responseClass": "List[Endpoint]", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoints (sip,iax2,...)", + "paramType": "path", + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Endpoints not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}/{resource}", + "description": "Single endpoint", + "operations": [ + { + "httpMethod": "GET", + "summary": "Details for an endpoint.", + "nickname": "get", + "responseClass": "Endpoint", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "resource", + "description": "ID of the endpoint", + "paramType": "path", + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Endpoints not found" + } + ] + } + ] + } + ], + "models": { + "Endpoint": { + "id": "Endpoint", + "description": "An external device that may offer/accept calls to/from Asterisk.\n\nUnlike most resources, which have a single unique identifier, an endpoint is uniquely identified by the technology/resource pair.", + "properties": { + "technology": { + "type": "string", + "description": "Technology of the endpoint", + "required": true + }, + "resource": { + "type": "string", + "description": "Identifier of the endpoint, specific to the given technology.", + "required": true + }, + "state": { + "type": "string", + "description": "Endpoint's state", + "required": false, + "allowableValues": { + "valueType": "LIST", + "values": [ + "unknown", + "offline", + "online" + ] + } + }, + "channel_ids": { + "type": "List[string]", + "description": "Id's of channels associated with this endpoint", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_3_0/events.json b/codegen/src/main/resources/codegen-data/ari_1_3_0/events.json new file mode 100644 index 00000000..9ac948b4 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_3_0/events.json @@ -0,0 +1,647 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.3.0", + "swaggerVersion": "1.2", + "basePath": "http://localhost:8088/stasis", + "resourcePath": "/api-docs/events.{format}", + "apis": [ + { + "path": "/events", + "description": "Events from Asterisk to applications", + "operations": [ + { + "httpMethod": "GET", + "upgrade": "websocket", + "websocketProtocol": "ari", + "summary": "WebSocket connection for events.", + "nickname": "eventWebsocket", + "responseClass": "Message", + "parameters": [ + { + "name": "app", + "description": "Applications to subscribe to.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ] + } + ] + }, + { + "path": "/events/user/{eventName}", + "description": "Stasis application user events", + "operations": [ + { + "httpMethod": "POST", + "summary": "Generate a user event.", + "nickname": "userEvent", + "responseClass": "void", + "parameters": [ + { + "name": "eventName", + "description": "Event name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "application", + "description": "The name of the application that will receive this event", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "source", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}/{resource}, deviceState:{deviceName}", + "paramType": "query", + "required": false, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "variables", + "description": "custom key/value pairs added to the user event", + "paramType": "body", + "required": false, + "allowMultiple": false, + "dataType": "containers" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 422, + "reason": "Event source not found." + }, + { + "code": 400, + "reason": "Invalid even tsource URI or userevent data." + } + ] + } + ] + } + ], + "models": { + "Message": { + "id": "Message", + "description": "Base type for errors and events", + "discriminator": "type", + "properties": { + "type": { + "type": "string", + "required": true, + "description": "Indicates the type of this message." + } + }, + "subTypes": [ + "MissingParams", + "Event" + ] + }, + "MissingParams": { + "id": "MissingParams", + "description": "Error event sent when required params are missing.", + "properties": { + "params": { + "required": true, + "type": "List[string]", + "description": "A list of the missing parameters" + } + } + }, + "Event": { + "id": "Event", + "description": "Base type for asynchronous events from Asterisk.", + "properties": { + "application": { + "type": "string", + "description": "Name of the application receiving the event.", + "required": true + }, + "timestamp": { + "type": "Date", + "description": "Time at which this event was created.", + "required": false + } + }, + "subTypes": [ + "DeviceStateChanged", + "PlaybackStarted", + "PlaybackFinished", + "RecordingStarted", + "RecordingFinished", + "RecordingFailed", + "ApplicationReplaced", + "BridgeCreated", + "BridgeDestroyed", + "BridgeMerged", + "BridgeBlindTransfer", + "BridgeAttendedTransfer", + "ChannelCreated", + "ChannelDestroyed", + "ChannelEnteredBridge", + "ChannelLeftBridge", + "ChannelStateChange", + "ChannelDtmfReceived", + "ChannelDialplan", + "ChannelCallerId", + "ChannelUserevent", + "ChannelHangupRequest", + "ChannelVarset", + "EndpointStateChange", + "Dial", + "StasisEnd", + "StasisStart" + ] + }, + "DeviceStateChanged": { + "id": "DeviceStateChanged", + "description": "Notification that a device state has changed.", + "properties": { + "device_state": { + "type": "DeviceState", + "description": "Device state object", + "required": true + } + } + }, + "PlaybackStarted": { + "id": "PlaybackStarted", + "description": "Event showing the start of a media playback operation.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "PlaybackFinished": { + "id": "PlaybackFinished", + "description": "Event showing the completion of a media playback operation.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "RecordingStarted": { + "id": "RecordingStarted", + "extends": "Event", + "description": "Event showing the start of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "RecordingFinished": { + "id": "RecordingFinished", + "extends": "Event", + "description": "Event showing the completion of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "RecordingFailed": { + "id": "RecordingFailed", + "extends": "Event", + "description": "Event showing failure of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "ApplicationReplaced": { + "id": "ApplicationReplaced", + "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.", + "properties": {} + }, + "BridgeCreated": { + "id": "BridgeCreated", + "description": "Notification that a bridge has been created.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeDestroyed": { + "id": "BridgeDestroyed", + "description": "Notification that a bridge has been destroyed.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeMerged": { + "id": "BridgeMerged", + "description": "Notification that one bridge has merged into another.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "bridge_from": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeBlindTransfer": { + "id": "BridgeBlindTransfer", + "description": "Notification that a blind transfer has occurred.", + "properties": { + "channel": { + "description": "The channel performing the blind transfer", + "required": true, + "type": "Channel" + }, + "exten": { + "description": "The extension transferred to", + "required": true, + "type": "string" + }, + "context": { + "description": "The context transferred to", + "required": true, + "type": "string" + }, + "result": { + "description": "The result of the transfer attempt", + "required": true, + "type": "string" + }, + "is_external": { + "description": "Whether the transfer was externally initiated or not", + "required": true, + "type": "boolean" + }, + "bridge": { + "description": "The bridge being transferred", + "type": "Bridge" + } + } + }, + "BridgeAttendedTransfer": { + "id": "BridgeAttendedTransfer", + "description": "Notification that an attended transfer has occurred.", + "properties": { + "transferer_first_leg": { + "description": "First leg of the transferer", + "required": true, + "type": "Channel" + }, + "transferer_second_leg": { + "description": "Second leg of the transferer", + "required": true, + "type": "Channel" + }, + "result": { + "description": "The result of the transfer attempt", + "required": true, + "type": "string" + }, + "is_external": { + "description": "Whether the transfer was externally initiated or not", + "required": true, + "type": "boolean" + }, + "transferer_first_leg_bridge": { + "description": "Bridge the transferer first leg is in", + "type": "Bridge" + }, + "transferer_second_leg_bridge": { + "description": "Bridge the transferer second leg is in", + "type": "Bridge" + }, + "destination_type": { + "description": "How the transfer was accomplished", + "required": true, + "type": "string" + }, + "destination_bridge": { + "description": "Bridge that survived the merge result", + "type": "string" + }, + "destination_application": { + "description": "Application that has been transferred into", + "type": "string" + }, + "destination_link_first_leg": { + "description": "First leg of a link transfer result", + "type": "Channel" + }, + "destination_link_second_leg": { + "description": "Second leg of a link transfer result", + "type": "Channel" + }, + "destination_threeway_channel": { + "description": "Transferer channel that survived the threeway result", + "type": "Channel" + }, + "destination_threeway_bridge": { + "description": "Bridge that survived the threeway result", + "type": "Bridge" + } + } + }, + "ChannelCreated": { + "id": "ChannelCreated", + "description": "Notification that a channel has been created.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelDestroyed": { + "id": "ChannelDestroyed", + "description": "Notification that a channel has been destroyed.", + "properties": { + "cause": { + "required": true, + "description": "Integer representation of the cause of the hangup", + "type": "int" + }, + "cause_txt": { + "required": true, + "description": "Text representation of the cause of the hangup", + "type": "string" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelEnteredBridge": { + "id": "ChannelEnteredBridge", + "description": "Notification that a channel has entered a bridge.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "channel": { + "type": "Channel" + } + } + }, + "ChannelLeftBridge": { + "id": "ChannelLeftBridge", + "description": "Notification that a channel has left a bridge.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelStateChange": { + "id": "ChannelStateChange", + "description": "Notification of a channel's state change.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelDtmfReceived": { + "id": "ChannelDtmfReceived", + "description": "DTMF received on a channel.\n\nThis event is sent when the DTMF ends. There is no notification about the start of DTMF", + "properties": { + "digit": { + "required": true, + "type": "string", + "description": "DTMF digit received (0-9, A-E, # or *)" + }, + "duration_ms": { + "required": true, + "type": "int", + "description": "Number of milliseconds DTMF was received" + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which DTMF was received" + } + } + }, + "ChannelDialplan": { + "id": "ChannelDialplan", + "description": "Channel changed location in the dialplan.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that changed dialplan location." + }, + "dialplan_app": { + "required": true, + "type": "string", + "description": "The application about to be executed." + }, + "dialplan_app_data": { + "required": true, + "type": "string", + "description": "The data to be passed to the application." + } + } + }, + "ChannelCallerId": { + "id": "ChannelCallerId", + "description": "Channel changed Caller ID.", + "properties": { + "caller_presentation": { + "required": true, + "type": "int", + "description": "The integer representation of the Caller Presentation value." + }, + "caller_presentation_txt": { + "required": true, + "type": "string", + "description": "The text representation of the Caller Presentation value." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that changed Caller ID." + } + } + }, + "ChannelUserevent": { + "id": "ChannelUserevent", + "description": "User-generated event with additional user-defined fields in the object.", + "properties": { + "eventname": { + "required": true, + "type": "string", + "description": "The name of the user event." + }, + "channel": { + "required": false, + "type": "Channel", + "description": "A channel that is signaled with the user event." + }, + "bridge": { + "required": false, + "type": "Bridge", + "description": "A bridge that is signaled with the user event." + }, + "endpoint": { + "required": false, + "type": "Endpoint", + "description": "A endpoint that is signaled with the user event." + }, + "userevent": { + "required": true, + "type": "object", + "description": "Custom Userevent data" + } + } + }, + "ChannelHangupRequest": { + "id": "ChannelHangupRequest", + "description": "A hangup was requested on the channel.", + "properties": { + "cause": { + "type": "int", + "description": "Integer representation of the cause of the hangup." + }, + "soft": { + "type": "boolean", + "description": "Whether the hangup request was a soft hangup request." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which the hangup was requested." + } + } + }, + "ChannelVarset": { + "id": "ChannelVarset", + "description": "Channel variable changed.", + "properties": { + "variable": { + "required": true, + "type": "string", + "description": "The variable that changed." + }, + "value": { + "required": true, + "type": "string", + "description": "The new value of the variable." + }, + "channel": { + "required": false, + "type": "Channel", + "description": "The channel on which the variable was set.\n\nIf missing, the variable is a global variable." + } + } + }, + "EndpointStateChange": { + "id": "EndpointStateChange", + "description": "Endpoint state changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + } + } + }, + "Dial": { + "id": "Dial", + "description": "Dialing state has changed.", + "properties": { + "caller": { + "required": false, + "type": "Channel", + "description": "The calling channel." + }, + "peer": { + "required": true, + "type": "Channel", + "description": "The dialed channel." + }, + "forward": { + "required": false, + "type": "string", + "description": "Forwarding target requested by the original dialed channel." + }, + "forwarded": { + "required": false, + "type": "Channel", + "description": "Channel that the caller has been forwarded to." + }, + "dialstring": { + "required": false, + "type": "string", + "description": "The dial string for calling the peer channel." + }, + "dialstatus": { + "required": true, + "type": "string", + "description": "Current status of the dialing attempt to the peer." + } + } + }, + "StasisEnd": { + "id": "StasisEnd", + "description": "Notification that a channel has left a Stasis application.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "StasisStart": { + "id": "StasisStart", + "description": "Notification that a channel has entered a Stasis application.", + "properties": { + "args": { + "required": true, + "type": "List[string]", + "description": "Arguments to the application" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_3_0/mailboxes.json b/codegen/src/main/resources/codegen-data/ari_1_3_0/mailboxes.json new file mode 100644 index 00000000..8f5c2690 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_3_0/mailboxes.json @@ -0,0 +1,134 @@ +{ + "_copyright": "Copyright (C) 2013, Digium, Inc.", + "_author": "Jonathan Rose ", + "_svn_revision": "$Revision$", + "apiVersion": "1.3.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/stasis", + "resourcePath": "/api-docs/mailboxes.{format}", + "apis": [ + { + "path": "/mailboxes", + "description": "Mailboxes", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all mailboxes.", + "nickname": "list", + "responseClass": "List[Mailbox]" + } + ] + }, + { + "path": "/mailboxes/{mailboxName}", + "description": "Mailbox state", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve the current state of a mailbox.", + "nickname": "get", + "responseClass": "Mailbox", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Change the state of a mailbox. (Note - implicitly creates the mailbox).", + "nickname": "update", + "responseClass": "void", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "oldMessages", + "description": "Count of old messages in the mailbox", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "newMessages", + "description": "Count of new messages in the mailbox", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "int" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Destroy a mailbox.", + "nickname": "delete", + "responseClass": "void", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + } + ] + } + ], + "models": { + "Mailbox": { + "id": "Mailbox", + "description": "Represents the state of a mailbox.", + "properties": { + "name": { + "type": "string", + "description": "Name of the mailbox.", + "required": true + }, + "old_messages": { + "type": "int", + "description": "Count of old messages in the mailbox.", + "required": true + }, + "new_messages": { + "type": "int", + "description": "Count of new messages in the mailbox.", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_3_0/playbacks.json b/codegen/src/main/resources/codegen-data/ari_1_3_0/playbacks.json new file mode 100644 index 00000000..9e77605c --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_3_0/playbacks.json @@ -0,0 +1,155 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.3.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/stasis", + "resourcePath": "/api-docs/playbacks.{format}", + "apis": [ + { + "path": "/playbacks/{playbackId}", + "description": "Control object for a playback operation.", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a playback's details.", + "nickname": "get", + "responseClass": "Playback", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "The playback cannot be found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop a playback.", + "nickname": "stop", + "responseClass": "void", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "The playback cannot be found" + } + ] + } + ] + }, + { + "path": "/playbacks/{playbackId}/control", + "description": "Control object for a playback operation.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Control a playback.", + "nickname": "control", + "responseClass": "void", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "operation", + "description": "Operation to perform on the playback.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "restart", + "pause", + "unpause", + "reverse", + "forward" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "The provided operation parameter was invalid" + }, + { + "code": 404, + "reason": "The playback cannot be found" + }, + { + "code": 409, + "reason": "The operation cannot be performed in the playback's current state" + } +] + } + ] + } + ], + "models": { + "Playback": { + "id": "Playback", + "description": "Object representing the playback of media to a channel", + "properties": { + "id": { + "type": "string", + "description": "ID for this playback operation", + "required": true + }, + "media_uri": { + "type": "string", + "description": "URI for the media to play back.", + "required": true + }, + "target_uri": { + "type": "string", + "description": "URI for the channel or bridge to play the media on", + "required": true + }, + "language": { + "type": "string", + "description": "For media types that support multiple languages, the language requested for playback." + }, + "state": { + "type": "string", + "description": "Current state of the playback operation.", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "queued", + "playing", + "complete" + ] + } + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_3_0/recordings.json b/codegen/src/main/resources/codegen-data/ari_1_3_0/recordings.json new file mode 100644 index 00000000..886d5651 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_3_0/recordings.json @@ -0,0 +1,331 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.3.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/stasis", + "resourcePath": "/api-docs/recordings.{format}", + "apis": [ + { + "path": "/recordings/stored", + "description": "Recordings", + "operations": [ + { + "httpMethod": "GET", + "summary": "List recordings that are complete.", + "nickname": "listStored", + "responseClass": "List[StoredRecording]" + } + ] + }, + { + "path": "/recordings/stored/{recordingName}", + "description": "Individual recording", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a stored recording's details.", + "nickname": "getStored", + "responseClass": "StoredRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Delete a stored recording.", + "nickname": "deleteStored", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}", + "description": "A recording that is in progress", + "operations": [ + { + "httpMethod": "GET", + "summary": "List live recordings.", + "nickname": "getLive", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop a live recording and discard it.", + "nickname": "cancel", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/stop", + "operations": [ + { + "httpMethod": "POST", + "summary": "Stop a live recording and store it.", + "nickname": "stop", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/pause", + "operations": [ + { + "httpMethod": "POST", + "summary": "Pause a live recording.", + "notes": "Pausing a recording suspends silence detection, which will be restarted when the recording is unpaused. Paused time is not included in the accounting for maxDurationSeconds.", + "nickname": "pause", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unpause a live recording.", + "nickname": "unpause", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/mute", + "operations": [ + { + "httpMethod": "POST", + "summary": "Mute a live recording.", + "notes": "Muting a recording suspends silence detection, which will be restarted when the recording is unmuted.", + "nickname": "mute", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unmute a live recording.", + "nickname": "unmute", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + } + ] + } + ], + "models": { + "StoredRecording": { + "id": "StoredRecording", + "description": "A past recording that may be played back.", + "properties": { + "name": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + }, + "LiveRecording": { + "id": "LiveRecording", + "description": "A recording that is in progress", + "properties": { + "name": { + "required": true, + "type": "string", + "description": "Base name for the recording" + }, + "format": { + "required": true, + "type": "string", + "description": "Recording format (wav, gsm, etc.)" + }, + "target_uri": { + "required": true, + "type": "string", + "description": "URI for the channel or bridge being recorded" + }, + "state": { + "required": false, + "type": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "queued", + "recording", + "paused", + "done", + "failed", + "canceled" + ] + } + }, + "cause": { + "required": false, + "type": "string", + "description": "Cause for recording failure if failed" + }, + "state": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_3_0/sounds.json b/codegen/src/main/resources/codegen-data/ari_1_3_0/sounds.json new file mode 100644 index 00000000..329a4298 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_3_0/sounds.json @@ -0,0 +1,99 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.3.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/stasis", + "resourcePath": "/api-docs/sounds.{format}", + "apis": [ + { + "path": "/sounds", + "description": "Sounds", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all sounds.", + "nickname": "list", + "responseClass": "List[Sound]", + "parameters": [ + { + "name": "lang", + "description": "Lookup sound for a specific language.", + "paramType": "query", + "dataType": "string", + "required": false + }, + { + "name": "format", + "description": "Lookup sound in a specific format.", + "paramType": "query", + "dataType": "string", + "required": false, + "__note": "core show translation can show translation paths between formats, along with relative costs. so this could be just installed format, or we could follow that for transcoded formats." + } + ] + } + ] + }, + { + "path": "/sounds/{soundId}", + "description": "Individual sound", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a sound's details.", + "nickname": "get", + "responseClass": "Sound", + "parameters": [ + { + "name": "soundId", + "description": "Sound's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ] + } + ] + } + ], + "models": { + "FormatLangPair": { + "id": "FormatLangPair", + "description": "Identifies the format and language of a sound file", + "properties": { + "language": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + }, + "Sound": { + "id": "Sound", + "description": "A media file that may be played back.", + "properties": { + "id": { + "required": true, + "description": "Sound's identifier.", + "type": "string" + }, + "text": { + "required": false, + "description": "Text description of the sound, usually the words spoken.", + "type": "string" + }, + "formats": { + "required": true, + "description": "The formats and languages in which this sound is available.", + "type": "List[FormatLangPair]" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_4_0/applications.json b/codegen/src/main/resources/codegen-data/ari_1_4_0/applications.json new file mode 100644 index 00000000..132dd641 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_4_0/applications.json @@ -0,0 +1,172 @@ +{ + "_copyright": "Copyright (C) 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.4.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/stasis", + "resourcePath": "/api-docs/applications.{format}", + "apis": [ + { + "path": "/applications", + "description": "Stasis applications", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all applications.", + "nickname": "list", + "responseClass": "List[Application]" + } + ] + }, + { + "path": "/applications/{applicationName}", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get details of an application.", + "nickname": "get", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Application does not exist." + } + ] + } + ] + }, + { + "path": "/applications/{applicationName}/subscription", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "POST", + "summary": "Subscribe an application to a event source.", + "notes": "Returns the state of the application after the subscriptions have changed", + "nickname": "subscribe", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "eventSource", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}/{resource}, deviceState:{deviceName}", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing parameter." + }, + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 422, + "reason": "Event source does not exist." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unsubscribe an application from an event source.", + "notes": "Returns the state of the application after the subscriptions have changed", + "nickname": "unsubscribe", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "eventSource", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}/{resource}, deviceState:{deviceName}", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing parameter; event source scheme not recognized." + }, + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 409, + "reason": "Application not subscribed to event source." + }, + { + "code": 422, + "reason": "Event source does not exist." + } + ] + } + ] + } + ], + "models": { + "Application": { + "id": "Application", + "description": "Details of a Stasis application", + "properties": { + "name": { + "type": "string", + "description": "Name of this application", + "required": true + }, + "channel_ids": { + "type": "List[string]", + "description": "Id's for channels subscribed to.", + "required": true + }, + "bridge_ids": { + "type": "List[string]", + "description": "Id's for bridges subscribed to.", + "required": true + }, + "endpoint_ids": { + "type": "List[string]", + "description": "{tech}/{resource} for endpoints subscribed to.", + "required": true + }, + "device_names": { + "type": "List[string]", + "description": "Names of the devices subscribed to.", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_4_0/asterisk.json b/codegen/src/main/resources/codegen-data/ari_1_4_0/asterisk.json new file mode 100644 index 00000000..75934a89 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_4_0/asterisk.json @@ -0,0 +1,259 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.4.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/stasis", + "resourcePath": "/api-docs/asterisk.{format}", + "apis": [ + { + "path": "/asterisk/info", + "description": "Asterisk system information (similar to core show settings)", + "operations": [ + { + "httpMethod": "GET", + "summary": "Gets Asterisk system information.", + "nickname": "getInfo", + "responseClass": "AsteriskInfo", + "parameters": [ + { + "name": "only", + "description": "Filter information returned", + "paramType": "query", + "required": false, + "allowMultiple": true, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "build", + "system", + "config", + "status" + ] + } + } + ] + } + ] + }, + { + "path": "/asterisk/variable", + "description": "Global variables", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the value of a global variable.", + "nickname": "getGlobalVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "variable", + "description": "The variable to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + } + ] + }, + { + "httpMethod": "POST", + "summary": "Set the value of a global variable.", + "nickname": "setGlobalVar", + "responseClass": "void", + "parameters": [ + { + "name": "variable", + "description": "The variable to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + } + ] + } + ] + } + ], + "models": { + "BuildInfo": { + "id": "BuildInfo", + "description": "Info about how Asterisk was built", + "properties": { + "os": { + "required": true, + "type": "string", + "description": "OS Asterisk was built on." + }, + "kernel": { + "required": true, + "type": "string", + "description": "Kernel version Asterisk was built on." + }, + "options": { + "required": true, + "type": "string", + "description": "Compile time options, or empty string if default." + }, + "machine": { + "required": true, + "type": "string", + "description": "Machine architecture (x86_64, i686, ppc, etc.)" + }, + "date": { + "required": true, + "type": "string", + "description": "Date and time when Asterisk was built." + }, + "user": { + "required": true, + "type": "string", + "description": "Username that build Asterisk" + } + } + }, + "SystemInfo": { + "id": "SystemInfo", + "description": "Info about Asterisk", + "properties": { + "version": { + "required": true, + "type": "string", + "description": "Asterisk version." + }, + "entity_id": { + "required": true, + "type": "string", + "description": "" + } + } + }, + "SetId": { + "id": "SetId", + "description": "Effective user/group id", + "properties": { + "user": { + "required": true, + "type": "string", + "description": "Effective user id." + }, + "group": { + "required": true, + "type": "string", + "description": "Effective group id." + } + } + }, + "ConfigInfo": { + "id": "ConfigInfo", + "description": "Info about Asterisk configuration", + "properties": { + "name": { + "required": true, + "type": "string", + "description": "Asterisk system name." + }, + "default_language": { + "required": true, + "type": "string", + "description": "Default language for media playback." + }, + "max_channels": { + "required": false, + "type": "int", + "description": "Maximum number of simultaneous channels." + }, + "max_open_files": { + "required": false, + "type": "int", + "description": "Maximum number of open file handles (files, sockets)." + }, + "max_load": { + "required": false, + "type": "double", + "description": "Maximum load avg on system." + }, + "setid": { + "required": true, + "type": "SetId", + "description": "Effective user/group id for running Asterisk." + } + } + }, + "StatusInfo": { + "id": "StatusInfo", + "description": "Info about Asterisk status", + "properties": { + "startup_time": { + "required": true, + "type": "Date", + "description": "Time when Asterisk was started." + }, + "last_reload_time": { + "required": true, + "type": "Date", + "description": "Time when Asterisk was last reloaded." + } + } + }, + "AsteriskInfo": { + "id": "AsteriskInfo", + "description": "Asterisk system information", + "properties": { + "build": { + "required": false, + "type": "BuildInfo", + "description": "Info about how Asterisk was built" + }, + "system": { + "required": false, + "type": "SystemInfo", + "description": "Info about the system running Asterisk" + }, + "config": { + "required": false, + "type": "ConfigInfo", + "description": "Info about Asterisk configuration" + }, + "status": { + "required": false, + "type": "StatusInfo", + "description": "Info about Asterisk status" + } + } + }, + "Variable": { + "id": "Variable", + "description": "The value of a channel variable", + "properties": { + "value": { + "required": true, + "type": "string", + "description": "The value of the variable requested" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_4_0/bridges.json b/codegen/src/main/resources/codegen-data/ari_1_4_0/bridges.json new file mode 100644 index 00000000..8d2de704 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_4_0/bridges.json @@ -0,0 +1,656 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.4.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/stasis", + "resourcePath": "/api-docs/bridges.{format}", + "apis": [ + { + "path": "/bridges", + "description": "Active bridges", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all active bridges in Asterisk.", + "nickname": "list", + "responseClass": "List[Bridge]" + }, + { + "httpMethod": "POST", + "summary": "Create a new bridge.", + "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", + "nickname": "create", + "responseClass": "Bridge", + "parameters": [ + { + "name": "type", + "description": "Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "bridgeId", + "description": "Unique ID to give to the bridge being created.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Name to give to the bridge being created.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}", + "description": "Individual bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Create a new bridge or updates an existing one.", + "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", + "nickname": "create_or_update_with_id", + "responseClass": "Bridge", + "parameters": [ + { + "name": "type", + "description": "Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media) to set.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "bridgeId", + "description": "Unique ID to give to the bridge being created.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Set the name of the bridge.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ] + }, + { + "httpMethod": "GET", + "summary": "Get bridge details.", + "nickname": "get", + "responseClass": "Bridge", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Shut down a bridge.", + "notes": "If any channels are in this bridge, they will be removed and resume whatever they were doing beforehand.", + "nickname": "destroy", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/addChannel", + "description": "Add a channel to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Add a channel to a bridge.", + "nickname": "addChannel", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channel", + "description": "Ids of channels to add to bridge", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "role", + "description": "Channel's role in the bridge", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Channel not found" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application; Channel currently recording" + }, + { + "code": 422, + "reason": "Channel not in Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/removeChannel", + "description": "Remove a channel from a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Remove a channel from a bridge.", + "nickname": "removeChannel", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channel", + "description": "Ids of channels to remove from bridge", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Channel not found" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + }, + { + "code": 422, + "reason": "Channel not in this bridge" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/moh", + "description": "Play music on hold to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play music on hold to a bridge or change the MOH class that is playing.", + "nickname": "startMoh", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "mohClass", + "description": "Channel's id", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing music on hold to a bridge.", + "notes": "This will only stop music on hold being played via POST bridges/{bridgeId}/moh.", + "nickname": "stopMoh", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/play", + "description": "Play media to the participants of a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media on a bridge.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "play", + "responseClass": "Playback", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media's URI to play.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of media to skip before playing.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "playbackId", + "description": "Playback Id.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/play/{playbackId}", + "description": "Play media to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media on a bridge.", + "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.)", + "nickname": "playWithId", + "responseClass": "Playback", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media's URI to play.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of media to skip before playing.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + + } + ] + }, + { + "path": "/bridges/{bridgeId}/record", + "description": "Record audio on a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start a recording.", + "notes": "This records the mixed audio from all channels participating in this bridge.", + "nickname": "record", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Recording's filename", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "maxDurationSeconds", + "description": "Maximum duration of the recording, in seconds. 0 for no limit.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "maxSilenceSeconds", + "description": "Maximum duration of silence, in seconds. 0 for no limit.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "ifExists", + "description": "Action to take if a recording with the same name already exists.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "fail", + "allowableValues": { + "valueType": "LIST", + "values": [ + "fail", + "overwrite", + "append" + ] + } + }, + { + "name": "beep", + "description": "Play beep when recording begins", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "terminateOn", + "description": "DTMF input to terminate recording.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "any", + "*", + "#" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge is not in a Stasis application; A recording with the same name already exists on the system and can not be overwritten because it is in progress or ifExists=fail" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + } + ], + "models": { + "Bridge": { + "id": "Bridge", + "description": "The merging of media from one or more channels.\n\nEveryone on the bridge receives the same audio.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for this bridge", + "required": true + }, + "technology": { + "type": "string", + "description": "Name of the current bridging technology", + "required": true + }, + "bridge_type": { + "type": "string", + "description": "Type of bridge technology", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "mixing", + "holding" + ] + } + }, + "bridge_class": { + "type": "string", + "description": "Bridging class", + "required": true + }, + "creator": { + "type": "string", + "description": "Entity that created the bridge", + "required": true + }, + "name": { + "type": "string", + "description": "Name the creator gave the bridge", + "required": true + }, + "channels": { + "type": "List[string]", + "description": "Ids of channels participating in this bridge", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_4_0/channels.json b/codegen/src/main/resources/codegen-data/ari_1_4_0/channels.json new file mode 100644 index 00000000..77ad3331 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_4_0/channels.json @@ -0,0 +1,1456 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.4.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/stasis", + "resourcePath": "/api-docs/channels.{format}", + "apis": [ + { + "path": "/channels", + "description": "Active channels", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all active channels in Asterisk.", + "nickname": "list", + "responseClass": "List[Channel]" + }, + { + "httpMethod": "POST", + "summary": "Create a new channel (originate).", + "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.", + "nickname": "originate", + "responseClass": "Channel", + "parameters": [ + { + "name": "endpoint", + "description": "Endpoint to call.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to dial after the endpoint answers", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to dial after the endpoint answers. If omitted, uses 'default'", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to dial after the endpoint answers. If omitted, uses 1", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "long" + }, + { + "name": "app", + "description": "The application that is subscribed to the originated channel, and passed to the Stasis application.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "callerId", + "description": "CallerID to use when dialing the endpoint or extension.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 30 + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for originating a channel." + } + ] + } + ] + }, + { + "path": "/channels/{channelId}", + "description": "Active channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "Channel details.", + "nickname": "get", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + } + ] + }, + { + "httpMethod": "POST", + "summary": "Create a new channel (originate with id).", + "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.", + "nickname": "originateWithId", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "endpoint", + "description": "Endpoint to call.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to dial after the endpoint answers", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to dial after the endpoint answers. If omitted, uses 'default'", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to dial after the endpoint answers. If omitted, uses 1", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "long" + }, + { + "name": "app", + "description": "The application that is subscribed to the originated channel, and passed to the Stasis application.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "callerId", + "description": "CallerID to use when dialing the endpoint or extension.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 30 + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for originating a channel." + } + ] + + }, + { + "httpMethod": "DELETE", + "summary": "Delete (i.e. hangup) a channel.", + "nickname": "hangup", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "reason", + "description": "Reason for hanging up the channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defalutValue": "normal", + "allowableValues": { + "valueType": "LIST", + "values": [ + "normal", + "busy", + "congestion" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid reason for hangup provided" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/continue", + "description": "Exit application; continue execution in the dialplan", + "operations": [ + { + "httpMethod": "POST", + "summary": "Exit application; continue execution in the dialplan.", + "nickname": "continueInDialplan", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/answer", + "description": "Answer a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Answer a channel.", + "nickname": "answer", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/ring", + "description": "Send a ringing indication to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Indicate ringing to a channel.", + "nickname": "ring", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop ringing indication on a channel if locally generated.", + "nickname": "ringStop", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/dtmf", + "description": "Send DTMF to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Send provided DTMF to a given channel.", + "nickname": "sendDTMF", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "dtmf", + "description": "DTMF To send.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "before", + "description": "Amount of time to wait before DTMF digits (specified in milliseconds) start.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0 + }, + { + "name": "between", + "description": "Amount of time in between DTMF digits (specified in milliseconds).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 100 + }, + { + "name": "duration", + "description": "Length of each DTMF digit (specified in milliseconds).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 100 + }, + { + "name": "after", + "description": "Amount of time to wait after DTMF digits (specified in milliseconds) end.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0 + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "DTMF is required" + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/mute", + "description": "Mute a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Mute a channel.", + "nickname": "mute", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "Direction in which to mute audio", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both", + "in", + "out" + ] + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unmute a channel.", + "nickname": "unmute", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "Direction in which to unmute audio", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both", + "in", + "out" + ] + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/hold", + "description": "Put a channel on hold", + "operations": [ + { + "httpMethod": "POST", + "summary": "Hold a channel.", + "nickname": "hold", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Remove a channel from hold.", + "nickname": "unhold", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/moh", + "description": "Play music on hold to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play music on hold to a channel.", + "notes": "Using media operations such as /play on a channel playing MOH in this manner will suspend MOH without resuming automatically. If continuing music on hold is desired, the stasis application must reinitiate music on hold.", + "nickname": "startMoh", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "mohClass", + "description": "Music on hold class to use", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing music on hold to a channel.", + "nickname": "stopMoh", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/silence", + "description": "Play silence to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play silence to a channel.", + "notes": "Using media operations such as /play on a channel playing silence in this manner will suspend silence without resuming automatically.", + "nickname": "startSilence", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing silence to a channel.", + "nickname": "stopSilence", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/play", + "description": "Play media to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "play", + "responseClass": "Playback", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media's URI to play.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of media to skip before playing.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000 + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/play/{playbackId}", + "description": "Play media to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media and specify the playbackId.", + "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.)", + "nickname": "playWithId", + "responseClass": "Playback", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media's URI to play.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of media to skip before playing.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000 + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/record", + "description": "Record audio from a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start a recording.", + "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.", + "nickname": "record", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Recording's filename", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "maxDurationSeconds", + "description": "Maximum duration of the recording, in seconds. 0 for no limit", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "maxSilenceSeconds", + "description": "Maximum duration of silence, in seconds. 0 for no limit", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "ifExists", + "description": "Action to take if a recording with the same name already exists.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "fail", + "allowableValues": { + "valueType": "LIST", + "values": [ + "fail", + "overwrite", + "append" + ] + } + }, + { + "name": "beep", + "description": "Play beep when recording begins", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "terminateOn", + "description": "DTMF input to terminate recording", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "any", + "*", + "#" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "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" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/variable", + "description": "Variables on a channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the value of a channel variable or function.", + "nickname": "getChannelVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The channel variable or function to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "POST", + "summary": "Set the value of a channel variable or function.", + "nickname": "setChannelVar", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The channel variable or function to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/snoop", + "description": "Snoop (spy/whisper) on a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start snooping.", + "notes": "Snoop (spy/whisper) on a specific channel.", + "nickname": "snoopChannel", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "spy", + "description": "Direction of audio to spy on", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "whisper", + "description": "Direction of audio to whisper into", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "app", + "description": "Application the snooping channel is placed into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "snoopId", + "description": "Unique ID to assign to snooping channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/snoop/{snoopId}", + "description": "Snoop (spy/whisper) on a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start snooping.", + "notes": "Snoop (spy/whisper) on a specific channel.", + "nickname": "snoopChannelWithId", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "snoopId", + "description": "Unique ID to assign to snooping channel", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "spy", + "description": "Direction of audio to spy on", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "whisper", + "description": "Direction of audio to whisper into", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "app", + "description": "Application the snooping channel is placed into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + } + ], + "models": { + "Dialed": { + "id": "Dialed", + "description": "Dialed channel information.", + "properties": {} + }, + "DialplanCEP": { + "id": "DialplanCEP", + "description": "Dialplan location (context/extension/priority)", + "properties": { + "context": { + "required": true, + "type": "string", + "description": "Context in the dialplan" + }, + "exten": { + "required": true, + "type": "string", + "description": "Extension in the dialplan" + }, + "priority": { + "required": true, + "type": "long", + "description": "Priority in the dialplan" + } + } + }, + "CallerID": { + "id": "CallerID", + "description": "Caller identification", + "properties": { + "name": { + "required": true, + "type": "string" + }, + "number": { + "required": true, + "type": "string" + } + } + }, + "Channel": { + "id": "Channel", + "description": "A specific communication connection between Asterisk and an Endpoint.", + "properties": { + "id": { + "required": true, + "type": "string", + "description": "Unique identifier of the channel.\n\nThis is the same as the Uniqueid field in AMI." + }, + "name": { + "required": true, + "type": "string", + "description": "Name of the channel (i.e. SIP/foo-0000a7e3)" + }, + "state": { + "required": true, + "type": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "Down", + "Rsrved", + "OffHook", + "Dialing", + "Ring", + "Ringing", + "Up", + "Busy", + "Dialing Offhook", + "Pre-ring", + "Unknown" + ] + } + }, + "caller": { + "required": true, + "type": "CallerID" + }, + "connected": { + "required": true, + "type": "CallerID" + }, + "accountcode": { + "required": true, + "type": "string" + }, + "dialplan": { + "required": true, + "type": "DialplanCEP", + "description": "Current location in the dialplan" + }, + "creationtime": { + "required": true, + "type": "Date", + "description": "Timestamp when channel was created" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_4_0/deviceStates.json b/codegen/src/main/resources/codegen-data/ari_1_4_0/deviceStates.json new file mode 100644 index 00000000..af03a8c8 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_4_0/deviceStates.json @@ -0,0 +1,151 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "Kevin Harwell ", + "_svn_revision": "$Revision$", + "apiVersion": "1.4.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/stasis", + "resourcePath": "/api-docs/deviceStates.{format}", + "apis": [ + { + "path": "/deviceStates", + "description": "Device states", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all ARI controlled device states.", + "nickname": "list", + "responseClass": "List[DeviceState]" + } + ] + }, + { + "path": "/deviceStates/{deviceName}", + "description": "Device state", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve the current state of a device.", + "nickname": "get", + "responseClass": "DeviceState", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Change the state of a device controlled by ARI. (Note - implicitly creates the device state).", + "nickname": "update", + "responseClass": "void", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "deviceState", + "description": "Device state value", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "NOT_INUSE", + "INUSE", + "BUSY", + "INVALID", + "UNAVAILABLE", + "RINGING", + "RINGINUSE", + "ONHOLD" + ] + } + + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Device name is missing" + }, + { + "code": 409, + "reason": "Uncontrolled device specified" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Destroy a device-state controlled by ARI.", + "nickname": "delete", + "responseClass": "void", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Device name is missing" + }, + { + "code": 409, + "reason": "Uncontrolled device specified" + } + ] + } + ] + } + ], + "models": { + "DeviceState": { + "id": "DeviceState", + "description": "Represents the state of a device.", + "properties": { + "name": { + "type": "string", + "description": "Name of the device.", + "required": true + }, + "state": { + "type": "string", + "description": "Device's state", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "UNKNOWN", + "NOT_INUSE", + "INUSE", + "BUSY", + "INVALID", + "UNAVAILABLE", + "RINGING", + "RINGINUSE", + "ONHOLD" + ] + } + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_4_0/endpoints.json b/codegen/src/main/resources/codegen-data/ari_1_4_0/endpoints.json new file mode 100644 index 00000000..12b9f2e1 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_4_0/endpoints.json @@ -0,0 +1,117 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.4.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/stasis", + "resourcePath": "/api-docs/endpoints.{format}", + "apis": [ + { + "path": "/endpoints", + "description": "Asterisk endpoints", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all endpoints.", + "nickname": "list", + "responseClass": "List[Endpoint]" + } + ] + }, + { + "path": "/endpoints/{tech}", + "description": "Asterisk endpoints", + "operations": [ + { + "httpMethod": "GET", + "summary": "List available endoints for a given endpoint technology.", + "nickname": "listByTech", + "responseClass": "List[Endpoint]", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoints (sip,iax2,...)", + "paramType": "path", + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Endpoints not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}/{resource}", + "description": "Single endpoint", + "operations": [ + { + "httpMethod": "GET", + "summary": "Details for an endpoint.", + "nickname": "get", + "responseClass": "Endpoint", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "resource", + "description": "ID of the endpoint", + "paramType": "path", + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Endpoints not found" + } + ] + } + ] + } + ], + "models": { + "Endpoint": { + "id": "Endpoint", + "description": "An external device that may offer/accept calls to/from Asterisk.\n\nUnlike most resources, which have a single unique identifier, an endpoint is uniquely identified by the technology/resource pair.", + "properties": { + "technology": { + "type": "string", + "description": "Technology of the endpoint", + "required": true + }, + "resource": { + "type": "string", + "description": "Identifier of the endpoint, specific to the given technology.", + "required": true + }, + "state": { + "type": "string", + "description": "Endpoint's state", + "required": false, + "allowableValues": { + "valueType": "LIST", + "values": [ + "unknown", + "offline", + "online" + ] + } + }, + "channel_ids": { + "type": "List[string]", + "description": "Id's of channels associated with this endpoint", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_4_0/events.json b/codegen/src/main/resources/codegen-data/ari_1_4_0/events.json new file mode 100644 index 00000000..cf93f4b0 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_4_0/events.json @@ -0,0 +1,676 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.4.0", + "swaggerVersion": "1.2", + "basePath": "http://localhost:8088/stasis", + "resourcePath": "/api-docs/events.{format}", + "apis": [ + { + "path": "/events", + "description": "Events from Asterisk to applications", + "operations": [ + { + "httpMethod": "GET", + "upgrade": "websocket", + "websocketProtocol": "ari", + "summary": "WebSocket connection for events.", + "nickname": "eventWebsocket", + "responseClass": "Message", + "parameters": [ + { + "name": "app", + "description": "Applications to subscribe to.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ] + } + ] + }, + { + "path": "/events/user/{eventName}", + "description": "Stasis application user events", + "operations": [ + { + "httpMethod": "POST", + "summary": "Generate a user event.", + "nickname": "userEvent", + "responseClass": "void", + "parameters": [ + { + "name": "eventName", + "description": "Event name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "application", + "description": "The name of the application that will receive this event", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "source", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}/{resource}, deviceState:{deviceName}", + "paramType": "query", + "required": false, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds custom key/value pairs to add to the user event. Ex. { \"variables\": { \"key\": \"value\" } }", + "paramType": "body", + "required": false, + "allowMultiple": false, + "dataType": "containers" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 422, + "reason": "Event source not found." + }, + { + "code": 400, + "reason": "Invalid even tsource URI or userevent data." + } + ] + } + ] + } + ], + "models": { + "Message": { + "id": "Message", + "description": "Base type for errors and events", + "discriminator": "type", + "properties": { + "type": { + "type": "string", + "required": true, + "description": "Indicates the type of this message." + } + }, + "subTypes": [ + "MissingParams", + "Event" + ] + }, + "MissingParams": { + "id": "MissingParams", + "description": "Error event sent when required params are missing.", + "properties": { + "params": { + "required": true, + "type": "List[string]", + "description": "A list of the missing parameters" + } + } + }, + "Event": { + "id": "Event", + "description": "Base type for asynchronous events from Asterisk.", + "properties": { + "application": { + "type": "string", + "description": "Name of the application receiving the event.", + "required": true + }, + "timestamp": { + "type": "Date", + "description": "Time at which this event was created.", + "required": false + } + }, + "subTypes": [ + "DeviceStateChanged", + "PlaybackStarted", + "PlaybackFinished", + "RecordingStarted", + "RecordingFinished", + "RecordingFailed", + "ApplicationReplaced", + "BridgeCreated", + "BridgeDestroyed", + "BridgeMerged", + "BridgeBlindTransfer", + "BridgeAttendedTransfer", + "ChannelCreated", + "ChannelDestroyed", + "ChannelEnteredBridge", + "ChannelLeftBridge", + "ChannelStateChange", + "ChannelDtmfReceived", + "ChannelDialplan", + "ChannelCallerId", + "ChannelUserevent", + "ChannelHangupRequest", + "ChannelVarset", + "ChannelTalkingStarted", + "ChannelTalkingFinished", + "EndpointStateChange", + "Dial", + "StasisEnd", + "StasisStart" + ] + }, + "DeviceStateChanged": { + "id": "DeviceStateChanged", + "description": "Notification that a device state has changed.", + "properties": { + "device_state": { + "type": "DeviceState", + "description": "Device state object", + "required": true + } + } + }, + "PlaybackStarted": { + "id": "PlaybackStarted", + "description": "Event showing the start of a media playback operation.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "PlaybackFinished": { + "id": "PlaybackFinished", + "description": "Event showing the completion of a media playback operation.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "RecordingStarted": { + "id": "RecordingStarted", + "extends": "Event", + "description": "Event showing the start of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "RecordingFinished": { + "id": "RecordingFinished", + "extends": "Event", + "description": "Event showing the completion of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "RecordingFailed": { + "id": "RecordingFailed", + "extends": "Event", + "description": "Event showing failure of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "ApplicationReplaced": { + "id": "ApplicationReplaced", + "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.", + "properties": {} + }, + "BridgeCreated": { + "id": "BridgeCreated", + "description": "Notification that a bridge has been created.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeDestroyed": { + "id": "BridgeDestroyed", + "description": "Notification that a bridge has been destroyed.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeMerged": { + "id": "BridgeMerged", + "description": "Notification that one bridge has merged into another.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "bridge_from": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeBlindTransfer": { + "id": "BridgeBlindTransfer", + "description": "Notification that a blind transfer has occurred.", + "properties": { + "channel": { + "description": "The channel performing the blind transfer", + "required": true, + "type": "Channel" + }, + "exten": { + "description": "The extension transferred to", + "required": true, + "type": "string" + }, + "context": { + "description": "The context transferred to", + "required": true, + "type": "string" + }, + "result": { + "description": "The result of the transfer attempt", + "required": true, + "type": "string" + }, + "is_external": { + "description": "Whether the transfer was externally initiated or not", + "required": true, + "type": "boolean" + }, + "bridge": { + "description": "The bridge being transferred", + "type": "Bridge" + } + } + }, + "BridgeAttendedTransfer": { + "id": "BridgeAttendedTransfer", + "description": "Notification that an attended transfer has occurred.", + "properties": { + "transferer_first_leg": { + "description": "First leg of the transferer", + "required": true, + "type": "Channel" + }, + "transferer_second_leg": { + "description": "Second leg of the transferer", + "required": true, + "type": "Channel" + }, + "result": { + "description": "The result of the transfer attempt", + "required": true, + "type": "string" + }, + "is_external": { + "description": "Whether the transfer was externally initiated or not", + "required": true, + "type": "boolean" + }, + "transferer_first_leg_bridge": { + "description": "Bridge the transferer first leg is in", + "type": "Bridge" + }, + "transferer_second_leg_bridge": { + "description": "Bridge the transferer second leg is in", + "type": "Bridge" + }, + "destination_type": { + "description": "How the transfer was accomplished", + "required": true, + "type": "string" + }, + "destination_bridge": { + "description": "Bridge that survived the merge result", + "type": "string" + }, + "destination_application": { + "description": "Application that has been transferred into", + "type": "string" + }, + "destination_link_first_leg": { + "description": "First leg of a link transfer result", + "type": "Channel" + }, + "destination_link_second_leg": { + "description": "Second leg of a link transfer result", + "type": "Channel" + }, + "destination_threeway_channel": { + "description": "Transferer channel that survived the threeway result", + "type": "Channel" + }, + "destination_threeway_bridge": { + "description": "Bridge that survived the threeway result", + "type": "Bridge" + } + } + }, + "ChannelCreated": { + "id": "ChannelCreated", + "description": "Notification that a channel has been created.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelDestroyed": { + "id": "ChannelDestroyed", + "description": "Notification that a channel has been destroyed.", + "properties": { + "cause": { + "required": true, + "description": "Integer representation of the cause of the hangup", + "type": "int" + }, + "cause_txt": { + "required": true, + "description": "Text representation of the cause of the hangup", + "type": "string" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelEnteredBridge": { + "id": "ChannelEnteredBridge", + "description": "Notification that a channel has entered a bridge.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "channel": { + "type": "Channel" + } + } + }, + "ChannelLeftBridge": { + "id": "ChannelLeftBridge", + "description": "Notification that a channel has left a bridge.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelStateChange": { + "id": "ChannelStateChange", + "description": "Notification of a channel's state change.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelDtmfReceived": { + "id": "ChannelDtmfReceived", + "description": "DTMF received on a channel.\n\nThis event is sent when the DTMF ends. There is no notification about the start of DTMF", + "properties": { + "digit": { + "required": true, + "type": "string", + "description": "DTMF digit received (0-9, A-E, # or *)" + }, + "duration_ms": { + "required": true, + "type": "int", + "description": "Number of milliseconds DTMF was received" + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which DTMF was received" + } + } + }, + "ChannelDialplan": { + "id": "ChannelDialplan", + "description": "Channel changed location in the dialplan.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that changed dialplan location." + }, + "dialplan_app": { + "required": true, + "type": "string", + "description": "The application about to be executed." + }, + "dialplan_app_data": { + "required": true, + "type": "string", + "description": "The data to be passed to the application." + } + } + }, + "ChannelCallerId": { + "id": "ChannelCallerId", + "description": "Channel changed Caller ID.", + "properties": { + "caller_presentation": { + "required": true, + "type": "int", + "description": "The integer representation of the Caller Presentation value." + }, + "caller_presentation_txt": { + "required": true, + "type": "string", + "description": "The text representation of the Caller Presentation value." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that changed Caller ID." + } + } + }, + "ChannelUserevent": { + "id": "ChannelUserevent", + "description": "User-generated event with additional user-defined fields in the object.", + "properties": { + "eventname": { + "required": true, + "type": "string", + "description": "The name of the user event." + }, + "channel": { + "required": false, + "type": "Channel", + "description": "A channel that is signaled with the user event." + }, + "bridge": { + "required": false, + "type": "Bridge", + "description": "A bridge that is signaled with the user event." + }, + "endpoint": { + "required": false, + "type": "Endpoint", + "description": "A endpoint that is signaled with the user event." + }, + "userevent": { + "required": true, + "type": "object", + "description": "Custom Userevent data" + } + } + }, + "ChannelHangupRequest": { + "id": "ChannelHangupRequest", + "description": "A hangup was requested on the channel.", + "properties": { + "cause": { + "type": "int", + "description": "Integer representation of the cause of the hangup." + }, + "soft": { + "type": "boolean", + "description": "Whether the hangup request was a soft hangup request." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which the hangup was requested." + } + } + }, + "ChannelVarset": { + "id": "ChannelVarset", + "description": "Channel variable changed.", + "properties": { + "variable": { + "required": true, + "type": "string", + "description": "The variable that changed." + }, + "value": { + "required": true, + "type": "string", + "description": "The new value of the variable." + }, + "channel": { + "required": false, + "type": "Channel", + "description": "The channel on which the variable was set.\n\nIf missing, the variable is a global variable." + } + } + }, + "ChannelTalkingStarted": { + "id": "ChannelTalkingStarted", + "description": "Talking was detected on the channel.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which talking started." + } + } + }, + "ChannelTalkingFinished": { + "id": "ChannelTalkingFinished", + "description": "Talking is no longer detected on the channel.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which talking completed." + }, + "duration": { + "required": true, + "type": "int", + "description": "The length of time, in milliseconds, that talking was detected on the channel" + } + } + }, + "EndpointStateChange": { + "id": "EndpointStateChange", + "description": "Endpoint state changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + } + } + }, + "Dial": { + "id": "Dial", + "description": "Dialing state has changed.", + "properties": { + "caller": { + "required": false, + "type": "Channel", + "description": "The calling channel." + }, + "peer": { + "required": true, + "type": "Channel", + "description": "The dialed channel." + }, + "forward": { + "required": false, + "type": "string", + "description": "Forwarding target requested by the original dialed channel." + }, + "forwarded": { + "required": false, + "type": "Channel", + "description": "Channel that the caller has been forwarded to." + }, + "dialstring": { + "required": false, + "type": "string", + "description": "The dial string for calling the peer channel." + }, + "dialstatus": { + "required": true, + "type": "string", + "description": "Current status of the dialing attempt to the peer." + } + } + }, + "StasisEnd": { + "id": "StasisEnd", + "description": "Notification that a channel has left a Stasis application.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "StasisStart": { + "id": "StasisStart", + "description": "Notification that a channel has entered a Stasis application.", + "properties": { + "args": { + "required": true, + "type": "List[string]", + "description": "Arguments to the application" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_4_0/mailboxes.json b/codegen/src/main/resources/codegen-data/ari_1_4_0/mailboxes.json new file mode 100644 index 00000000..63392c6f --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_4_0/mailboxes.json @@ -0,0 +1,134 @@ +{ + "_copyright": "Copyright (C) 2013, Digium, Inc.", + "_author": "Jonathan Rose ", + "_svn_revision": "$Revision$", + "apiVersion": "1.4.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/stasis", + "resourcePath": "/api-docs/mailboxes.{format}", + "apis": [ + { + "path": "/mailboxes", + "description": "Mailboxes", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all mailboxes.", + "nickname": "list", + "responseClass": "List[Mailbox]" + } + ] + }, + { + "path": "/mailboxes/{mailboxName}", + "description": "Mailbox state", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve the current state of a mailbox.", + "nickname": "get", + "responseClass": "Mailbox", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Change the state of a mailbox. (Note - implicitly creates the mailbox).", + "nickname": "update", + "responseClass": "void", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "oldMessages", + "description": "Count of old messages in the mailbox", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "newMessages", + "description": "Count of new messages in the mailbox", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "int" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Destroy a mailbox.", + "nickname": "delete", + "responseClass": "void", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + } + ] + } + ], + "models": { + "Mailbox": { + "id": "Mailbox", + "description": "Represents the state of a mailbox.", + "properties": { + "name": { + "type": "string", + "description": "Name of the mailbox.", + "required": true + }, + "old_messages": { + "type": "int", + "description": "Count of old messages in the mailbox.", + "required": true + }, + "new_messages": { + "type": "int", + "description": "Count of new messages in the mailbox.", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_4_0/playbacks.json b/codegen/src/main/resources/codegen-data/ari_1_4_0/playbacks.json new file mode 100644 index 00000000..9c4029cf --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_4_0/playbacks.json @@ -0,0 +1,155 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.4.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/stasis", + "resourcePath": "/api-docs/playbacks.{format}", + "apis": [ + { + "path": "/playbacks/{playbackId}", + "description": "Control object for a playback operation.", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a playback's details.", + "nickname": "get", + "responseClass": "Playback", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "The playback cannot be found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop a playback.", + "nickname": "stop", + "responseClass": "void", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "The playback cannot be found" + } + ] + } + ] + }, + { + "path": "/playbacks/{playbackId}/control", + "description": "Control object for a playback operation.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Control a playback.", + "nickname": "control", + "responseClass": "void", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "operation", + "description": "Operation to perform on the playback.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "restart", + "pause", + "unpause", + "reverse", + "forward" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "The provided operation parameter was invalid" + }, + { + "code": 404, + "reason": "The playback cannot be found" + }, + { + "code": 409, + "reason": "The operation cannot be performed in the playback's current state" + } +] + } + ] + } + ], + "models": { + "Playback": { + "id": "Playback", + "description": "Object representing the playback of media to a channel", + "properties": { + "id": { + "type": "string", + "description": "ID for this playback operation", + "required": true + }, + "media_uri": { + "type": "string", + "description": "URI for the media to play back.", + "required": true + }, + "target_uri": { + "type": "string", + "description": "URI for the channel or bridge to play the media on", + "required": true + }, + "language": { + "type": "string", + "description": "For media types that support multiple languages, the language requested for playback." + }, + "state": { + "type": "string", + "description": "Current state of the playback operation.", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "queued", + "playing", + "complete" + ] + } + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_4_0/recordings.json b/codegen/src/main/resources/codegen-data/ari_1_4_0/recordings.json new file mode 100644 index 00000000..1f825a2b --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_4_0/recordings.json @@ -0,0 +1,331 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.4.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/stasis", + "resourcePath": "/api-docs/recordings.{format}", + "apis": [ + { + "path": "/recordings/stored", + "description": "Recordings", + "operations": [ + { + "httpMethod": "GET", + "summary": "List recordings that are complete.", + "nickname": "listStored", + "responseClass": "List[StoredRecording]" + } + ] + }, + { + "path": "/recordings/stored/{recordingName}", + "description": "Individual recording", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a stored recording's details.", + "nickname": "getStored", + "responseClass": "StoredRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Delete a stored recording.", + "nickname": "deleteStored", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}", + "description": "A recording that is in progress", + "operations": [ + { + "httpMethod": "GET", + "summary": "List live recordings.", + "nickname": "getLive", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop a live recording and discard it.", + "nickname": "cancel", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/stop", + "operations": [ + { + "httpMethod": "POST", + "summary": "Stop a live recording and store it.", + "nickname": "stop", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/pause", + "operations": [ + { + "httpMethod": "POST", + "summary": "Pause a live recording.", + "notes": "Pausing a recording suspends silence detection, which will be restarted when the recording is unpaused. Paused time is not included in the accounting for maxDurationSeconds.", + "nickname": "pause", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unpause a live recording.", + "nickname": "unpause", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/mute", + "operations": [ + { + "httpMethod": "POST", + "summary": "Mute a live recording.", + "notes": "Muting a recording suspends silence detection, which will be restarted when the recording is unmuted.", + "nickname": "mute", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unmute a live recording.", + "nickname": "unmute", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + } + ] + } + ], + "models": { + "StoredRecording": { + "id": "StoredRecording", + "description": "A past recording that may be played back.", + "properties": { + "name": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + }, + "LiveRecording": { + "id": "LiveRecording", + "description": "A recording that is in progress", + "properties": { + "name": { + "required": true, + "type": "string", + "description": "Base name for the recording" + }, + "format": { + "required": true, + "type": "string", + "description": "Recording format (wav, gsm, etc.)" + }, + "target_uri": { + "required": true, + "type": "string", + "description": "URI for the channel or bridge being recorded" + }, + "state": { + "required": false, + "type": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "queued", + "recording", + "paused", + "done", + "failed", + "canceled" + ] + } + }, + "cause": { + "required": false, + "type": "string", + "description": "Cause for recording failure if failed" + }, + "state": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_4_0/sounds.json b/codegen/src/main/resources/codegen-data/ari_1_4_0/sounds.json new file mode 100644 index 00000000..0678e40d --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_4_0/sounds.json @@ -0,0 +1,99 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.4.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/stasis", + "resourcePath": "/api-docs/sounds.{format}", + "apis": [ + { + "path": "/sounds", + "description": "Sounds", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all sounds.", + "nickname": "list", + "responseClass": "List[Sound]", + "parameters": [ + { + "name": "lang", + "description": "Lookup sound for a specific language.", + "paramType": "query", + "dataType": "string", + "required": false + }, + { + "name": "format", + "description": "Lookup sound in a specific format.", + "paramType": "query", + "dataType": "string", + "required": false, + "__note": "core show translation can show translation paths between formats, along with relative costs. so this could be just installed format, or we could follow that for transcoded formats." + } + ] + } + ] + }, + { + "path": "/sounds/{soundId}", + "description": "Individual sound", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a sound's details.", + "nickname": "get", + "responseClass": "Sound", + "parameters": [ + { + "name": "soundId", + "description": "Sound's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ] + } + ] + } + ], + "models": { + "FormatLangPair": { + "id": "FormatLangPair", + "description": "Identifies the format and language of a sound file", + "properties": { + "language": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + }, + "Sound": { + "id": "Sound", + "description": "A media file that may be played back.", + "properties": { + "id": { + "required": true, + "description": "Sound's identifier.", + "type": "string" + }, + "text": { + "required": false, + "description": "Text description of the sound, usually the words spoken.", + "type": "string" + }, + "formats": { + "required": true, + "description": "The formats and languages in which this sound is available.", + "type": "List[FormatLangPair]" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_5_0/applications.json b/codegen/src/main/resources/codegen-data/ari_1_5_0/applications.json new file mode 100644 index 00000000..9ac1c238 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_5_0/applications.json @@ -0,0 +1,172 @@ +{ + "_copyright": "Copyright (C) 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.5.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/applications.{format}", + "apis": [ + { + "path": "/applications", + "description": "Stasis applications", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all applications.", + "nickname": "list", + "responseClass": "List[Application]" + } + ] + }, + { + "path": "/applications/{applicationName}", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get details of an application.", + "nickname": "get", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Application does not exist." + } + ] + } + ] + }, + { + "path": "/applications/{applicationName}/subscription", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "POST", + "summary": "Subscribe an application to a event source.", + "notes": "Returns the state of the application after the subscriptions have changed", + "nickname": "subscribe", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "eventSource", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing parameter." + }, + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 422, + "reason": "Event source does not exist." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unsubscribe an application from an event source.", + "notes": "Returns the state of the application after the subscriptions have changed", + "nickname": "unsubscribe", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "eventSource", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing parameter; event source scheme not recognized." + }, + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 409, + "reason": "Application not subscribed to event source." + }, + { + "code": 422, + "reason": "Event source does not exist." + } + ] + } + ] + } + ], + "models": { + "Application": { + "id": "Application", + "description": "Details of a Stasis application", + "properties": { + "name": { + "type": "string", + "description": "Name of this application", + "required": true + }, + "channel_ids": { + "type": "List[string]", + "description": "Id's for channels subscribed to.", + "required": true + }, + "bridge_ids": { + "type": "List[string]", + "description": "Id's for bridges subscribed to.", + "required": true + }, + "endpoint_ids": { + "type": "List[string]", + "description": "{tech}/{resource} for endpoints subscribed to.", + "required": true + }, + "device_names": { + "type": "List[string]", + "description": "Names of the devices subscribed to.", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_5_0/asterisk.json b/codegen/src/main/resources/codegen-data/ari_1_5_0/asterisk.json new file mode 100644 index 00000000..34e3894a --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_5_0/asterisk.json @@ -0,0 +1,259 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.5.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/asterisk.{format}", + "apis": [ + { + "path": "/asterisk/info", + "description": "Asterisk system information (similar to core show settings)", + "operations": [ + { + "httpMethod": "GET", + "summary": "Gets Asterisk system information.", + "nickname": "getInfo", + "responseClass": "AsteriskInfo", + "parameters": [ + { + "name": "only", + "description": "Filter information returned", + "paramType": "query", + "required": false, + "allowMultiple": true, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "build", + "system", + "config", + "status" + ] + } + } + ] + } + ] + }, + { + "path": "/asterisk/variable", + "description": "Global variables", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the value of a global variable.", + "nickname": "getGlobalVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "variable", + "description": "The variable to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + } + ] + }, + { + "httpMethod": "POST", + "summary": "Set the value of a global variable.", + "nickname": "setGlobalVar", + "responseClass": "void", + "parameters": [ + { + "name": "variable", + "description": "The variable to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + } + ] + } + ] + } + ], + "models": { + "BuildInfo": { + "id": "BuildInfo", + "description": "Info about how Asterisk was built", + "properties": { + "os": { + "required": true, + "type": "string", + "description": "OS Asterisk was built on." + }, + "kernel": { + "required": true, + "type": "string", + "description": "Kernel version Asterisk was built on." + }, + "options": { + "required": true, + "type": "string", + "description": "Compile time options, or empty string if default." + }, + "machine": { + "required": true, + "type": "string", + "description": "Machine architecture (x86_64, i686, ppc, etc.)" + }, + "date": { + "required": true, + "type": "string", + "description": "Date and time when Asterisk was built." + }, + "user": { + "required": true, + "type": "string", + "description": "Username that build Asterisk" + } + } + }, + "SystemInfo": { + "id": "SystemInfo", + "description": "Info about Asterisk", + "properties": { + "version": { + "required": true, + "type": "string", + "description": "Asterisk version." + }, + "entity_id": { + "required": true, + "type": "string", + "description": "" + } + } + }, + "SetId": { + "id": "SetId", + "description": "Effective user/group id", + "properties": { + "user": { + "required": true, + "type": "string", + "description": "Effective user id." + }, + "group": { + "required": true, + "type": "string", + "description": "Effective group id." + } + } + }, + "ConfigInfo": { + "id": "ConfigInfo", + "description": "Info about Asterisk configuration", + "properties": { + "name": { + "required": true, + "type": "string", + "description": "Asterisk system name." + }, + "default_language": { + "required": true, + "type": "string", + "description": "Default language for media playback." + }, + "max_channels": { + "required": false, + "type": "int", + "description": "Maximum number of simultaneous channels." + }, + "max_open_files": { + "required": false, + "type": "int", + "description": "Maximum number of open file handles (files, sockets)." + }, + "max_load": { + "required": false, + "type": "double", + "description": "Maximum load avg on system." + }, + "setid": { + "required": true, + "type": "SetId", + "description": "Effective user/group id for running Asterisk." + } + } + }, + "StatusInfo": { + "id": "StatusInfo", + "description": "Info about Asterisk status", + "properties": { + "startup_time": { + "required": true, + "type": "Date", + "description": "Time when Asterisk was started." + }, + "last_reload_time": { + "required": true, + "type": "Date", + "description": "Time when Asterisk was last reloaded." + } + } + }, + "AsteriskInfo": { + "id": "AsteriskInfo", + "description": "Asterisk system information", + "properties": { + "build": { + "required": false, + "type": "BuildInfo", + "description": "Info about how Asterisk was built" + }, + "system": { + "required": false, + "type": "SystemInfo", + "description": "Info about the system running Asterisk" + }, + "config": { + "required": false, + "type": "ConfigInfo", + "description": "Info about Asterisk configuration" + }, + "status": { + "required": false, + "type": "StatusInfo", + "description": "Info about Asterisk status" + } + } + }, + "Variable": { + "id": "Variable", + "description": "The value of a channel variable", + "properties": { + "value": { + "required": true, + "type": "string", + "description": "The value of the variable requested" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_5_0/bridges.json b/codegen/src/main/resources/codegen-data/ari_1_5_0/bridges.json new file mode 100644 index 00000000..de720672 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_5_0/bridges.json @@ -0,0 +1,656 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.5.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/bridges.{format}", + "apis": [ + { + "path": "/bridges", + "description": "Active bridges", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all active bridges in Asterisk.", + "nickname": "list", + "responseClass": "List[Bridge]" + }, + { + "httpMethod": "POST", + "summary": "Create a new bridge.", + "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", + "nickname": "create", + "responseClass": "Bridge", + "parameters": [ + { + "name": "type", + "description": "Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "bridgeId", + "description": "Unique ID to give to the bridge being created.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Name to give to the bridge being created.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}", + "description": "Individual bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Create a new bridge or updates an existing one.", + "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", + "nickname": "create_or_update_with_id", + "responseClass": "Bridge", + "parameters": [ + { + "name": "type", + "description": "Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media) to set.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "bridgeId", + "description": "Unique ID to give to the bridge being created.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Set the name of the bridge.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ] + }, + { + "httpMethod": "GET", + "summary": "Get bridge details.", + "nickname": "get", + "responseClass": "Bridge", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Shut down a bridge.", + "notes": "If any channels are in this bridge, they will be removed and resume whatever they were doing beforehand.", + "nickname": "destroy", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/addChannel", + "description": "Add a channel to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Add a channel to a bridge.", + "nickname": "addChannel", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channel", + "description": "Ids of channels to add to bridge", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "role", + "description": "Channel's role in the bridge", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Channel not found" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application; Channel currently recording" + }, + { + "code": 422, + "reason": "Channel not in Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/removeChannel", + "description": "Remove a channel from a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Remove a channel from a bridge.", + "nickname": "removeChannel", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channel", + "description": "Ids of channels to remove from bridge", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Channel not found" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + }, + { + "code": 422, + "reason": "Channel not in this bridge" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/moh", + "description": "Play music on hold to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play music on hold to a bridge or change the MOH class that is playing.", + "nickname": "startMoh", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "mohClass", + "description": "Channel's id", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing music on hold to a bridge.", + "notes": "This will only stop music on hold being played via POST bridges/{bridgeId}/moh.", + "nickname": "stopMoh", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/play", + "description": "Play media to the participants of a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media on a bridge.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "play", + "responseClass": "Playback", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media's URI to play.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of media to skip before playing.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "playbackId", + "description": "Playback Id.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/play/{playbackId}", + "description": "Play media to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media on a bridge.", + "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.)", + "nickname": "playWithId", + "responseClass": "Playback", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media's URI to play.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of media to skip before playing.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + + } + ] + }, + { + "path": "/bridges/{bridgeId}/record", + "description": "Record audio on a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start a recording.", + "notes": "This records the mixed audio from all channels participating in this bridge.", + "nickname": "record", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Recording's filename", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "maxDurationSeconds", + "description": "Maximum duration of the recording, in seconds. 0 for no limit.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "maxSilenceSeconds", + "description": "Maximum duration of silence, in seconds. 0 for no limit.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "ifExists", + "description": "Action to take if a recording with the same name already exists.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "fail", + "allowableValues": { + "valueType": "LIST", + "values": [ + "fail", + "overwrite", + "append" + ] + } + }, + { + "name": "beep", + "description": "Play beep when recording begins", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "terminateOn", + "description": "DTMF input to terminate recording.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "any", + "*", + "#" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge is not in a Stasis application; A recording with the same name already exists on the system and can not be overwritten because it is in progress or ifExists=fail" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + } + ], + "models": { + "Bridge": { + "id": "Bridge", + "description": "The merging of media from one or more channels.\n\nEveryone on the bridge receives the same audio.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for this bridge", + "required": true + }, + "technology": { + "type": "string", + "description": "Name of the current bridging technology", + "required": true + }, + "bridge_type": { + "type": "string", + "description": "Type of bridge technology", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "mixing", + "holding" + ] + } + }, + "bridge_class": { + "type": "string", + "description": "Bridging class", + "required": true + }, + "creator": { + "type": "string", + "description": "Entity that created the bridge", + "required": true + }, + "name": { + "type": "string", + "description": "Name the creator gave the bridge", + "required": true + }, + "channels": { + "type": "List[string]", + "description": "Ids of channels participating in this bridge", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_5_0/channels.json b/codegen/src/main/resources/codegen-data/ari_1_5_0/channels.json new file mode 100644 index 00000000..d88434b3 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_5_0/channels.json @@ -0,0 +1,1456 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.5.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/channels.{format}", + "apis": [ + { + "path": "/channels", + "description": "Active channels", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all active channels in Asterisk.", + "nickname": "list", + "responseClass": "List[Channel]" + }, + { + "httpMethod": "POST", + "summary": "Create a new channel (originate).", + "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.", + "nickname": "originate", + "responseClass": "Channel", + "parameters": [ + { + "name": "endpoint", + "description": "Endpoint to call.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to dial after the endpoint answers", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to dial after the endpoint answers. If omitted, uses 'default'", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to dial after the endpoint answers. If omitted, uses 1", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "long" + }, + { + "name": "app", + "description": "The application that is subscribed to the originated channel, and passed to the Stasis application.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "callerId", + "description": "CallerID to use when dialing the endpoint or extension.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 30 + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for originating a channel." + } + ] + } + ] + }, + { + "path": "/channels/{channelId}", + "description": "Active channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "Channel details.", + "nickname": "get", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + } + ] + }, + { + "httpMethod": "POST", + "summary": "Create a new channel (originate with id).", + "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.", + "nickname": "originateWithId", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "endpoint", + "description": "Endpoint to call.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to dial after the endpoint answers", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to dial after the endpoint answers. If omitted, uses 'default'", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to dial after the endpoint answers. If omitted, uses 1", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "long" + }, + { + "name": "app", + "description": "The application that is subscribed to the originated channel, and passed to the Stasis application.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "callerId", + "description": "CallerID to use when dialing the endpoint or extension.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 30 + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for originating a channel." + } + ] + + }, + { + "httpMethod": "DELETE", + "summary": "Delete (i.e. hangup) a channel.", + "nickname": "hangup", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "reason", + "description": "Reason for hanging up the channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defalutValue": "normal", + "allowableValues": { + "valueType": "LIST", + "values": [ + "normal", + "busy", + "congestion" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid reason for hangup provided" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/continue", + "description": "Exit application; continue execution in the dialplan", + "operations": [ + { + "httpMethod": "POST", + "summary": "Exit application; continue execution in the dialplan.", + "nickname": "continueInDialplan", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/answer", + "description": "Answer a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Answer a channel.", + "nickname": "answer", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/ring", + "description": "Send a ringing indication to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Indicate ringing to a channel.", + "nickname": "ring", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop ringing indication on a channel if locally generated.", + "nickname": "ringStop", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/dtmf", + "description": "Send DTMF to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Send provided DTMF to a given channel.", + "nickname": "sendDTMF", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "dtmf", + "description": "DTMF To send.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "before", + "description": "Amount of time to wait before DTMF digits (specified in milliseconds) start.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0 + }, + { + "name": "between", + "description": "Amount of time in between DTMF digits (specified in milliseconds).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 100 + }, + { + "name": "duration", + "description": "Length of each DTMF digit (specified in milliseconds).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 100 + }, + { + "name": "after", + "description": "Amount of time to wait after DTMF digits (specified in milliseconds) end.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0 + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "DTMF is required" + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/mute", + "description": "Mute a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Mute a channel.", + "nickname": "mute", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "Direction in which to mute audio", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both", + "in", + "out" + ] + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unmute a channel.", + "nickname": "unmute", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "Direction in which to unmute audio", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both", + "in", + "out" + ] + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/hold", + "description": "Put a channel on hold", + "operations": [ + { + "httpMethod": "POST", + "summary": "Hold a channel.", + "nickname": "hold", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Remove a channel from hold.", + "nickname": "unhold", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/moh", + "description": "Play music on hold to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play music on hold to a channel.", + "notes": "Using media operations such as /play on a channel playing MOH in this manner will suspend MOH without resuming automatically. If continuing music on hold is desired, the stasis application must reinitiate music on hold.", + "nickname": "startMoh", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "mohClass", + "description": "Music on hold class to use", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing music on hold to a channel.", + "nickname": "stopMoh", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/silence", + "description": "Play silence to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play silence to a channel.", + "notes": "Using media operations such as /play on a channel playing silence in this manner will suspend silence without resuming automatically.", + "nickname": "startSilence", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing silence to a channel.", + "nickname": "stopSilence", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/play", + "description": "Play media to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "play", + "responseClass": "Playback", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media's URI to play.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of media to skip before playing.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000 + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/play/{playbackId}", + "description": "Play media to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media and specify the playbackId.", + "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.)", + "nickname": "playWithId", + "responseClass": "Playback", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media's URI to play.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of media to skip before playing.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000 + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/record", + "description": "Record audio from a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start a recording.", + "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.", + "nickname": "record", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Recording's filename", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "maxDurationSeconds", + "description": "Maximum duration of the recording, in seconds. 0 for no limit", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "maxSilenceSeconds", + "description": "Maximum duration of silence, in seconds. 0 for no limit", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "ifExists", + "description": "Action to take if a recording with the same name already exists.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "fail", + "allowableValues": { + "valueType": "LIST", + "values": [ + "fail", + "overwrite", + "append" + ] + } + }, + { + "name": "beep", + "description": "Play beep when recording begins", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "terminateOn", + "description": "DTMF input to terminate recording", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "any", + "*", + "#" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "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" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/variable", + "description": "Variables on a channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the value of a channel variable or function.", + "nickname": "getChannelVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The channel variable or function to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "POST", + "summary": "Set the value of a channel variable or function.", + "nickname": "setChannelVar", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The channel variable or function to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/snoop", + "description": "Snoop (spy/whisper) on a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start snooping.", + "notes": "Snoop (spy/whisper) on a specific channel.", + "nickname": "snoopChannel", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "spy", + "description": "Direction of audio to spy on", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "whisper", + "description": "Direction of audio to whisper into", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "app", + "description": "Application the snooping channel is placed into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "snoopId", + "description": "Unique ID to assign to snooping channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/snoop/{snoopId}", + "description": "Snoop (spy/whisper) on a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start snooping.", + "notes": "Snoop (spy/whisper) on a specific channel.", + "nickname": "snoopChannelWithId", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "snoopId", + "description": "Unique ID to assign to snooping channel", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "spy", + "description": "Direction of audio to spy on", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "whisper", + "description": "Direction of audio to whisper into", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "app", + "description": "Application the snooping channel is placed into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + } + ], + "models": { + "Dialed": { + "id": "Dialed", + "description": "Dialed channel information.", + "properties": {} + }, + "DialplanCEP": { + "id": "DialplanCEP", + "description": "Dialplan location (context/extension/priority)", + "properties": { + "context": { + "required": true, + "type": "string", + "description": "Context in the dialplan" + }, + "exten": { + "required": true, + "type": "string", + "description": "Extension in the dialplan" + }, + "priority": { + "required": true, + "type": "long", + "description": "Priority in the dialplan" + } + } + }, + "CallerID": { + "id": "CallerID", + "description": "Caller identification", + "properties": { + "name": { + "required": true, + "type": "string" + }, + "number": { + "required": true, + "type": "string" + } + } + }, + "Channel": { + "id": "Channel", + "description": "A specific communication connection between Asterisk and an Endpoint.", + "properties": { + "id": { + "required": true, + "type": "string", + "description": "Unique identifier of the channel.\n\nThis is the same as the Uniqueid field in AMI." + }, + "name": { + "required": true, + "type": "string", + "description": "Name of the channel (i.e. SIP/foo-0000a7e3)" + }, + "state": { + "required": true, + "type": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "Down", + "Rsrved", + "OffHook", + "Dialing", + "Ring", + "Ringing", + "Up", + "Busy", + "Dialing Offhook", + "Pre-ring", + "Unknown" + ] + } + }, + "caller": { + "required": true, + "type": "CallerID" + }, + "connected": { + "required": true, + "type": "CallerID" + }, + "accountcode": { + "required": true, + "type": "string" + }, + "dialplan": { + "required": true, + "type": "DialplanCEP", + "description": "Current location in the dialplan" + }, + "creationtime": { + "required": true, + "type": "Date", + "description": "Timestamp when channel was created" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_5_0/deviceStates.json b/codegen/src/main/resources/codegen-data/ari_1_5_0/deviceStates.json new file mode 100644 index 00000000..c14b55de --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_5_0/deviceStates.json @@ -0,0 +1,151 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "Kevin Harwell ", + "_svn_revision": "$Revision$", + "apiVersion": "1.5.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/deviceStates.{format}", + "apis": [ + { + "path": "/deviceStates", + "description": "Device states", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all ARI controlled device states.", + "nickname": "list", + "responseClass": "List[DeviceState]" + } + ] + }, + { + "path": "/deviceStates/{deviceName}", + "description": "Device state", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve the current state of a device.", + "nickname": "get", + "responseClass": "DeviceState", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Change the state of a device controlled by ARI. (Note - implicitly creates the device state).", + "nickname": "update", + "responseClass": "void", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "deviceState", + "description": "Device state value", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "NOT_INUSE", + "INUSE", + "BUSY", + "INVALID", + "UNAVAILABLE", + "RINGING", + "RINGINUSE", + "ONHOLD" + ] + } + + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Device name is missing" + }, + { + "code": 409, + "reason": "Uncontrolled device specified" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Destroy a device-state controlled by ARI.", + "nickname": "delete", + "responseClass": "void", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Device name is missing" + }, + { + "code": 409, + "reason": "Uncontrolled device specified" + } + ] + } + ] + } + ], + "models": { + "DeviceState": { + "id": "DeviceState", + "description": "Represents the state of a device.", + "properties": { + "name": { + "type": "string", + "description": "Name of the device.", + "required": true + }, + "state": { + "type": "string", + "description": "Device's state", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "UNKNOWN", + "NOT_INUSE", + "INUSE", + "BUSY", + "INVALID", + "UNAVAILABLE", + "RINGING", + "RINGINUSE", + "ONHOLD" + ] + } + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_5_0/endpoints.json b/codegen/src/main/resources/codegen-data/ari_1_5_0/endpoints.json new file mode 100644 index 00000000..f30ce9a0 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_5_0/endpoints.json @@ -0,0 +1,275 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.5.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/endpoints.{format}", + "apis": [ + { + "path": "/endpoints", + "description": "Asterisk endpoints", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all endpoints.", + "nickname": "list", + "responseClass": "List[Endpoint]" + } + ] + }, + { + "path": "/endpoints/sendMessage", + "description": "Send a message to some technology URI or endpoint.", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Send a message to some technology URI or endpoint.", + "nickname": "sendMessage", + "responseClass": "void", + "parameters": [ + { + "name": "to", + "description": "The endpoint resource or technology specific URI to send the message to. Valid resources are sip, pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "from", + "description": "The endpoint resource or technology specific identity to send this message from. Valid resources are sip, pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "body", + "description": "The body of the message", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "descriptioni": "The \"variables\" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, pjsip and sip resource types will add the key/value pairs as SIP headers,", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Endpoint not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}", + "description": "Asterisk endpoints", + "operations": [ + { + "httpMethod": "GET", + "summary": "List available endoints for a given endpoint technology.", + "nickname": "listByTech", + "responseClass": "List[Endpoint]", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoints (sip,iax2,...)", + "paramType": "path", + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Endpoints not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}/{resource}", + "description": "Single endpoint", + "operations": [ + { + "httpMethod": "GET", + "summary": "Details for an endpoint.", + "nickname": "get", + "responseClass": "Endpoint", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "resource", + "description": "ID of the endpoint", + "paramType": "path", + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoints not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}/{resource}/sendMessage", + "description": "Send a message to some endpoint in a technology.", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Send a message to some endpoint in a technology.", + "nickname": "sendMessageToEndpoint", + "responseClass": "void", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "resource", + "description": "ID of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "from", + "description": "The endpoint resource or technology specific identity to send this message from. Valid resources are sip, pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "body", + "description": "The body of the message", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "descriptioni": "The \"variables\" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, pjsip and sip resource types will add the key/value pairs as SIP headers,", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoint not found" + } + ] + } + ] + } + ], + "models": { + "Endpoint": { + "id": "Endpoint", + "description": "An external device that may offer/accept calls to/from Asterisk.\n\nUnlike most resources, which have a single unique identifier, an endpoint is uniquely identified by the technology/resource pair.", + "properties": { + "technology": { + "type": "string", + "description": "Technology of the endpoint", + "required": true + }, + "resource": { + "type": "string", + "description": "Identifier of the endpoint, specific to the given technology.", + "required": true + }, + "state": { + "type": "string", + "description": "Endpoint's state", + "required": false, + "allowableValues": { + "valueType": "LIST", + "values": [ + "unknown", + "offline", + "online" + ] + } + }, + "channel_ids": { + "type": "List[string]", + "description": "Id's of channels associated with this endpoint", + "required": true + } + } + }, + "TextMessageVariable": { + "id": "TextMessageVariable", + "description": "A key/value pair variable in a text message.", + "properties": { + "key": { + "type": "string", + "description": "A unique key identifying the variable.", + "required": true + }, + "value": { + "type": "string", + "description": "The value of the variable.", + "required": true + } + } + }, + "TextMessage": { + "id": "TextMessage", + "description": "A text message.", + "properties": { + "from": { + "type": "string", + "description": "A technology specific URI specifying the source of the message. For sip and pjsip technologies, any SIP URI can be specified. For xmpp, the URI must correspond to the client connection being used to send the message.", + "required": true + }, + "to": { + "type": "string", + "description": "A technology specific URI specifying the destination of the message. Valid technologies include sip, pjsip, and xmp. The destination of a message should be an endpoint.", + "required": true + }, + "body": { + "type": "string", + "description": "The text of the message.", + "required": true + }, + "variables": { + "type": "List[TextMessageVariable]", + "description": "Technology specific key/value pairs associated with the message.", + "required": false + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_5_0/events.json b/codegen/src/main/resources/codegen-data/ari_1_5_0/events.json new file mode 100644 index 00000000..d75e84b9 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_5_0/events.json @@ -0,0 +1,717 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.5.0", + "swaggerVersion": "1.2", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/events.{format}", + "apis": [ + { + "path": "/events", + "description": "Events from Asterisk to applications", + "operations": [ + { + "httpMethod": "GET", + "upgrade": "websocket", + "websocketProtocol": "ari", + "summary": "WebSocket connection for events.", + "nickname": "eventWebsocket", + "responseClass": "Message", + "parameters": [ + { + "name": "app", + "description": "Applications to subscribe to.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ] + } + ] + }, + { + "path": "/events/user/{eventName}", + "description": "Stasis application user events", + "operations": [ + { + "httpMethod": "POST", + "summary": "Generate a user event.", + "nickname": "userEvent", + "responseClass": "void", + "parameters": [ + { + "name": "eventName", + "description": "Event name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "application", + "description": "The name of the application that will receive this event", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "source", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}/{resource}, deviceState:{deviceName}", + "paramType": "query", + "required": false, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds custom key/value pairs to add to the user event. Ex. { \"variables\": { \"key\": \"value\" } }", + "paramType": "body", + "required": false, + "allowMultiple": false, + "dataType": "containers" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 422, + "reason": "Event source not found." + }, + { + "code": 400, + "reason": "Invalid even tsource URI or userevent data." + } + ] + } + ] + } + ], + "models": { + "Message": { + "id": "Message", + "description": "Base type for errors and events", + "discriminator": "type", + "properties": { + "type": { + "type": "string", + "required": true, + "description": "Indicates the type of this message." + } + }, + "subTypes": [ + "MissingParams", + "Event" + ] + }, + "MissingParams": { + "id": "MissingParams", + "description": "Error event sent when required params are missing.", + "properties": { + "params": { + "required": true, + "type": "List[string]", + "description": "A list of the missing parameters" + } + } + }, + "Event": { + "id": "Event", + "description": "Base type for asynchronous events from Asterisk.", + "properties": { + "application": { + "type": "string", + "description": "Name of the application receiving the event.", + "required": true + }, + "timestamp": { + "type": "Date", + "description": "Time at which this event was created.", + "required": false + } + }, + "subTypes": [ + "DeviceStateChanged", + "PlaybackStarted", + "PlaybackFinished", + "RecordingStarted", + "RecordingFinished", + "RecordingFailed", + "ApplicationReplaced", + "BridgeCreated", + "BridgeDestroyed", + "BridgeMerged", + "BridgeBlindTransfer", + "BridgeAttendedTransfer", + "ChannelCreated", + "ChannelDestroyed", + "ChannelEnteredBridge", + "ChannelLeftBridge", + "ChannelStateChange", + "ChannelDtmfReceived", + "ChannelDialplan", + "ChannelCallerId", + "ChannelUserevent", + "ChannelHangupRequest", + "ChannelVarset", + "ChannelTalkingStarted", + "ChannelTalkingFinished", + "EndpointStateChange", + "Dial", + "StasisEnd", + "StasisStart", + "TextMessageReceived" + ] + }, + "DeviceStateChanged": { + "id": "DeviceStateChanged", + "description": "Notification that a device state has changed.", + "properties": { + "device_state": { + "type": "DeviceState", + "description": "Device state object", + "required": true + } + } + }, + "PlaybackStarted": { + "id": "PlaybackStarted", + "description": "Event showing the start of a media playback operation.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "PlaybackFinished": { + "id": "PlaybackFinished", + "description": "Event showing the completion of a media playback operation.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "RecordingStarted": { + "id": "RecordingStarted", + "description": "Event showing the start of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "RecordingFinished": { + "id": "RecordingFinished", + "description": "Event showing the completion of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "RecordingFailed": { + "id": "RecordingFailed", + "description": "Event showing failure of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "ApplicationReplaced": { + "id": "ApplicationReplaced", + "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.", + "properties": {} + }, + "BridgeCreated": { + "id": "BridgeCreated", + "description": "Notification that a bridge has been created.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeDestroyed": { + "id": "BridgeDestroyed", + "description": "Notification that a bridge has been destroyed.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeMerged": { + "id": "BridgeMerged", + "description": "Notification that one bridge has merged into another.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "bridge_from": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeBlindTransfer": { + "id": "BridgeBlindTransfer", + "description": "Notification that a blind transfer has occurred.", + "properties": { + "channel": { + "description": "The channel performing the blind transfer", + "required": true, + "type": "Channel" + }, + "replace_channel": { + "description": "The channel that is replacing transferer when the transferee(s) can not be transferred directly", + "required": false, + "type": "Channel" + }, + "transferee": { + "description": "The channel that is being transferred", + "required": false, + "type": "Channel" + }, + "exten": { + "description": "The extension transferred to", + "required": true, + "type": "string" + }, + "context": { + "description": "The context transferred to", + "required": true, + "type": "string" + }, + "result": { + "description": "The result of the transfer attempt", + "required": true, + "type": "string" + }, + "is_external": { + "description": "Whether the transfer was externally initiated or not", + "required": true, + "type": "boolean" + }, + "bridge": { + "description": "The bridge being transferred", + "type": "Bridge" + } + } + }, + "BridgeAttendedTransfer": { + "id": "BridgeAttendedTransfer", + "description": "Notification that an attended transfer has occurred.", + "properties": { + "transferer_first_leg": { + "description": "First leg of the transferer", + "required": true, + "type": "Channel" + }, + "transferer_second_leg": { + "description": "Second leg of the transferer", + "required": true, + "type": "Channel" + }, + "replace_channel": { + "description": "The channel that is replacing transferer_first_leg in the swap", + "required": false, + "type": "Channel" + }, + "transferee": { + "description": "The channel that is being transferred", + "required": false, + "type": "Channel" + }, + "transfer_target": { + "description": "The channel that is being transferred to", + "required": false, + "type": "Channel" + }, + "result": { + "description": "The result of the transfer attempt", + "required": true, + "type": "string" + }, + "is_external": { + "description": "Whether the transfer was externally initiated or not", + "required": true, + "type": "boolean" + }, + "transferer_first_leg_bridge": { + "description": "Bridge the transferer first leg is in", + "type": "Bridge" + }, + "transferer_second_leg_bridge": { + "description": "Bridge the transferer second leg is in", + "type": "Bridge" + }, + "destination_type": { + "description": "How the transfer was accomplished", + "required": true, + "type": "string" + }, + "destination_bridge": { + "description": "Bridge that survived the merge result", + "type": "string" + }, + "destination_application": { + "description": "Application that has been transferred into", + "type": "string" + }, + "destination_link_first_leg": { + "description": "First leg of a link transfer result", + "type": "Channel" + }, + "destination_link_second_leg": { + "description": "Second leg of a link transfer result", + "type": "Channel" + }, + "destination_threeway_channel": { + "description": "Transferer channel that survived the threeway result", + "type": "Channel" + }, + "destination_threeway_bridge": { + "description": "Bridge that survived the threeway result", + "type": "Bridge" + } + } + }, + "ChannelCreated": { + "id": "ChannelCreated", + "description": "Notification that a channel has been created.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelDestroyed": { + "id": "ChannelDestroyed", + "description": "Notification that a channel has been destroyed.", + "properties": { + "cause": { + "required": true, + "description": "Integer representation of the cause of the hangup", + "type": "int" + }, + "cause_txt": { + "required": true, + "description": "Text representation of the cause of the hangup", + "type": "string" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelEnteredBridge": { + "id": "ChannelEnteredBridge", + "description": "Notification that a channel has entered a bridge.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "channel": { + "type": "Channel" + } + } + }, + "ChannelLeftBridge": { + "id": "ChannelLeftBridge", + "description": "Notification that a channel has left a bridge.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelStateChange": { + "id": "ChannelStateChange", + "description": "Notification of a channel's state change.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelDtmfReceived": { + "id": "ChannelDtmfReceived", + "description": "DTMF received on a channel.\n\nThis event is sent when the DTMF ends. There is no notification about the start of DTMF", + "properties": { + "digit": { + "required": true, + "type": "string", + "description": "DTMF digit received (0-9, A-E, # or *)" + }, + "duration_ms": { + "required": true, + "type": "int", + "description": "Number of milliseconds DTMF was received" + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which DTMF was received" + } + } + }, + "ChannelDialplan": { + "id": "ChannelDialplan", + "description": "Channel changed location in the dialplan.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that changed dialplan location." + }, + "dialplan_app": { + "required": true, + "type": "string", + "description": "The application about to be executed." + }, + "dialplan_app_data": { + "required": true, + "type": "string", + "description": "The data to be passed to the application." + } + } + }, + "ChannelCallerId": { + "id": "ChannelCallerId", + "description": "Channel changed Caller ID.", + "properties": { + "caller_presentation": { + "required": true, + "type": "int", + "description": "The integer representation of the Caller Presentation value." + }, + "caller_presentation_txt": { + "required": true, + "type": "string", + "description": "The text representation of the Caller Presentation value." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that changed Caller ID." + } + } + }, + "ChannelUserevent": { + "id": "ChannelUserevent", + "description": "User-generated event with additional user-defined fields in the object.", + "properties": { + "eventname": { + "required": true, + "type": "string", + "description": "The name of the user event." + }, + "channel": { + "required": false, + "type": "Channel", + "description": "A channel that is signaled with the user event." + }, + "bridge": { + "required": false, + "type": "Bridge", + "description": "A bridge that is signaled with the user event." + }, + "endpoint": { + "required": false, + "type": "Endpoint", + "description": "A endpoint that is signaled with the user event." + }, + "userevent": { + "required": true, + "type": "object", + "description": "Custom Userevent data" + } + } + }, + "ChannelHangupRequest": { + "id": "ChannelHangupRequest", + "description": "A hangup was requested on the channel.", + "properties": { + "cause": { + "type": "int", + "description": "Integer representation of the cause of the hangup." + }, + "soft": { + "type": "boolean", + "description": "Whether the hangup request was a soft hangup request." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which the hangup was requested." + } + } + }, + "ChannelVarset": { + "id": "ChannelVarset", + "description": "Channel variable changed.", + "properties": { + "variable": { + "required": true, + "type": "string", + "description": "The variable that changed." + }, + "value": { + "required": true, + "type": "string", + "description": "The new value of the variable." + }, + "channel": { + "required": false, + "type": "Channel", + "description": "The channel on which the variable was set.\n\nIf missing, the variable is a global variable." + } + } + }, + "ChannelTalkingStarted": { + "id": "ChannelTalkingStarted", + "description": "Talking was detected on the channel.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which talking started." + } + } + }, + "ChannelTalkingFinished": { + "id": "ChannelTalkingFinished", + "description": "Talking is no longer detected on the channel.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which talking completed." + }, + "duration": { + "required": true, + "type": "int", + "description": "The length of time, in milliseconds, that talking was detected on the channel" + } + } + }, + "EndpointStateChange": { + "id": "EndpointStateChange", + "description": "Endpoint state changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + } + } + }, + "Dial": { + "id": "Dial", + "description": "Dialing state has changed.", + "properties": { + "caller": { + "required": false, + "type": "Channel", + "description": "The calling channel." + }, + "peer": { + "required": true, + "type": "Channel", + "description": "The dialed channel." + }, + "forward": { + "required": false, + "type": "string", + "description": "Forwarding target requested by the original dialed channel." + }, + "forwarded": { + "required": false, + "type": "Channel", + "description": "Channel that the caller has been forwarded to." + }, + "dialstring": { + "required": false, + "type": "string", + "description": "The dial string for calling the peer channel." + }, + "dialstatus": { + "required": true, + "type": "string", + "description": "Current status of the dialing attempt to the peer." + } + } + }, + "StasisEnd": { + "id": "StasisEnd", + "description": "Notification that a channel has left a Stasis application.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "StasisStart": { + "id": "StasisStart", + "description": "Notification that a channel has entered a Stasis application.", + "properties": { + "args": { + "required": true, + "type": "List[string]", + "description": "Arguments to the application" + }, + "channel": { + "required": true, + "type": "Channel" + }, + "replace_channel": { + "required": false, + "type": "Channel" + } + } + }, + "TextMessageReceived": { + "id": "TextMessageReceived", + "description": "A text message was received from an endpoint.", + "properties": { + "message": { + "required": true, + "type": "TextMessage" + }, + "endpoint": { + "required": false, + "type": "Endpoint" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_5_0/mailboxes.json b/codegen/src/main/resources/codegen-data/ari_1_5_0/mailboxes.json new file mode 100644 index 00000000..0deb5fb4 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_5_0/mailboxes.json @@ -0,0 +1,134 @@ +{ + "_copyright": "Copyright (C) 2013, Digium, Inc.", + "_author": "Jonathan Rose ", + "_svn_revision": "$Revision$", + "apiVersion": "1.5.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/mailboxes.{format}", + "apis": [ + { + "path": "/mailboxes", + "description": "Mailboxes", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all mailboxes.", + "nickname": "list", + "responseClass": "List[Mailbox]" + } + ] + }, + { + "path": "/mailboxes/{mailboxName}", + "description": "Mailbox state", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve the current state of a mailbox.", + "nickname": "get", + "responseClass": "Mailbox", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Change the state of a mailbox. (Note - implicitly creates the mailbox).", + "nickname": "update", + "responseClass": "void", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "oldMessages", + "description": "Count of old messages in the mailbox", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "newMessages", + "description": "Count of new messages in the mailbox", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "int" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Destroy a mailbox.", + "nickname": "delete", + "responseClass": "void", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + } + ] + } + ], + "models": { + "Mailbox": { + "id": "Mailbox", + "description": "Represents the state of a mailbox.", + "properties": { + "name": { + "type": "string", + "description": "Name of the mailbox.", + "required": true + }, + "old_messages": { + "type": "int", + "description": "Count of old messages in the mailbox.", + "required": true + }, + "new_messages": { + "type": "int", + "description": "Count of new messages in the mailbox.", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_5_0/playbacks.json b/codegen/src/main/resources/codegen-data/ari_1_5_0/playbacks.json new file mode 100644 index 00000000..f892fb3d --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_5_0/playbacks.json @@ -0,0 +1,155 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.5.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/playbacks.{format}", + "apis": [ + { + "path": "/playbacks/{playbackId}", + "description": "Control object for a playback operation.", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a playback's details.", + "nickname": "get", + "responseClass": "Playback", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "The playback cannot be found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop a playback.", + "nickname": "stop", + "responseClass": "void", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "The playback cannot be found" + } + ] + } + ] + }, + { + "path": "/playbacks/{playbackId}/control", + "description": "Control object for a playback operation.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Control a playback.", + "nickname": "control", + "responseClass": "void", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "operation", + "description": "Operation to perform on the playback.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "restart", + "pause", + "unpause", + "reverse", + "forward" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "The provided operation parameter was invalid" + }, + { + "code": 404, + "reason": "The playback cannot be found" + }, + { + "code": 409, + "reason": "The operation cannot be performed in the playback's current state" + } +] + } + ] + } + ], + "models": { + "Playback": { + "id": "Playback", + "description": "Object representing the playback of media to a channel", + "properties": { + "id": { + "type": "string", + "description": "ID for this playback operation", + "required": true + }, + "media_uri": { + "type": "string", + "description": "URI for the media to play back.", + "required": true + }, + "target_uri": { + "type": "string", + "description": "URI for the channel or bridge to play the media on", + "required": true + }, + "language": { + "type": "string", + "description": "For media types that support multiple languages, the language requested for playback." + }, + "state": { + "type": "string", + "description": "Current state of the playback operation.", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "queued", + "playing", + "complete" + ] + } + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_5_0/recordings.json b/codegen/src/main/resources/codegen-data/ari_1_5_0/recordings.json new file mode 100644 index 00000000..89c55d59 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_5_0/recordings.json @@ -0,0 +1,378 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.5.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/recordings.{format}", + "apis": [ + { + "path": "/recordings/stored", + "description": "Recordings", + "operations": [ + { + "httpMethod": "GET", + "summary": "List recordings that are complete.", + "nickname": "listStored", + "responseClass": "List[StoredRecording]" + } + ] + }, + { + "path": "/recordings/stored/{recordingName}", + "description": "Individual recording", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a stored recording's details.", + "nickname": "getStored", + "responseClass": "StoredRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Delete a stored recording.", + "nickname": "deleteStored", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/stored/{recordingName}/copy", + "description": "Copy an individual recording", + "operations": [ + { + "httpMethod": "POST", + "summary": "Copy a stored recording.", + "nickname": "copyStored", + "responseClass": "StoredRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording to copy", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "destinationRecordingName", + "description": "The destination name of the recording", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "A recording with the same name already exists on the system" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}", + "description": "A recording that is in progress", + "operations": [ + { + "httpMethod": "GET", + "summary": "List live recordings.", + "nickname": "getLive", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop a live recording and discard it.", + "nickname": "cancel", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/stop", + "operations": [ + { + "httpMethod": "POST", + "summary": "Stop a live recording and store it.", + "nickname": "stop", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/pause", + "operations": [ + { + "httpMethod": "POST", + "summary": "Pause a live recording.", + "notes": "Pausing a recording suspends silence detection, which will be restarted when the recording is unpaused. Paused time is not included in the accounting for maxDurationSeconds.", + "nickname": "pause", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unpause a live recording.", + "nickname": "unpause", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/mute", + "operations": [ + { + "httpMethod": "POST", + "summary": "Mute a live recording.", + "notes": "Muting a recording suspends silence detection, which will be restarted when the recording is unmuted.", + "nickname": "mute", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unmute a live recording.", + "nickname": "unmute", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + } + ] + } + ], + "models": { + "StoredRecording": { + "id": "StoredRecording", + "description": "A past recording that may be played back.", + "properties": { + "name": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + }, + "LiveRecording": { + "id": "LiveRecording", + "description": "A recording that is in progress", + "properties": { + "name": { + "required": true, + "type": "string", + "description": "Base name for the recording" + }, + "format": { + "required": true, + "type": "string", + "description": "Recording format (wav, gsm, etc.)" + }, + "target_uri": { + "required": true, + "type": "string", + "description": "URI for the channel or bridge being recorded" + }, + "state": { + "required": true, + "type": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "queued", + "recording", + "paused", + "done", + "failed", + "canceled" + ] + } + }, + "duration": { + "required": false, + "type": "int", + "description": "Duration in seconds of the recording" + }, + "talking_duration": { + "required": false, + "type": "int", + "description": "Duration of talking, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds." + }, + "silence_duration": { + "required": false, + "type": "int", + "description": "Duration of silence, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds." + }, + "cause": { + "required": false, + "type": "string", + "description": "Cause for recording failure if failed" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_5_0/sounds.json b/codegen/src/main/resources/codegen-data/ari_1_5_0/sounds.json new file mode 100644 index 00000000..dd0b7175 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_5_0/sounds.json @@ -0,0 +1,99 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.5.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/sounds.{format}", + "apis": [ + { + "path": "/sounds", + "description": "Sounds", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all sounds.", + "nickname": "list", + "responseClass": "List[Sound]", + "parameters": [ + { + "name": "lang", + "description": "Lookup sound for a specific language.", + "paramType": "query", + "dataType": "string", + "required": false + }, + { + "name": "format", + "description": "Lookup sound in a specific format.", + "paramType": "query", + "dataType": "string", + "required": false, + "__note": "core show translation can show translation paths between formats, along with relative costs. so this could be just installed format, or we could follow that for transcoded formats." + } + ] + } + ] + }, + { + "path": "/sounds/{soundId}", + "description": "Individual sound", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a sound's details.", + "nickname": "get", + "responseClass": "Sound", + "parameters": [ + { + "name": "soundId", + "description": "Sound's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ] + } + ] + } + ], + "models": { + "FormatLangPair": { + "id": "FormatLangPair", + "description": "Identifies the format and language of a sound file", + "properties": { + "language": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + }, + "Sound": { + "id": "Sound", + "description": "A media file that may be played back.", + "properties": { + "id": { + "required": true, + "description": "Sound's identifier.", + "type": "string" + }, + "text": { + "required": false, + "description": "Text description of the sound, usually the words spoken.", + "type": "string" + }, + "formats": { + "required": true, + "description": "The formats and languages in which this sound is available.", + "type": "List[FormatLangPair]" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_6_0/applications.json b/codegen/src/main/resources/codegen-data/ari_1_6_0/applications.json new file mode 100644 index 00000000..f6fe72ac --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_6_0/applications.json @@ -0,0 +1,172 @@ +{ + "_copyright": "Copyright (C) 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.6.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/applications.{format}", + "apis": [ + { + "path": "/applications", + "description": "Stasis applications", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all applications.", + "nickname": "list", + "responseClass": "List[Application]" + } + ] + }, + { + "path": "/applications/{applicationName}", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get details of an application.", + "nickname": "get", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Application does not exist." + } + ] + } + ] + }, + { + "path": "/applications/{applicationName}/subscription", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "POST", + "summary": "Subscribe an application to a event source.", + "notes": "Returns the state of the application after the subscriptions have changed", + "nickname": "subscribe", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "eventSource", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing parameter." + }, + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 422, + "reason": "Event source does not exist." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unsubscribe an application from an event source.", + "notes": "Returns the state of the application after the subscriptions have changed", + "nickname": "unsubscribe", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "eventSource", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing parameter; event source scheme not recognized." + }, + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 409, + "reason": "Application not subscribed to event source." + }, + { + "code": 422, + "reason": "Event source does not exist." + } + ] + } + ] + } + ], + "models": { + "Application": { + "id": "Application", + "description": "Details of a Stasis application", + "properties": { + "name": { + "type": "string", + "description": "Name of this application", + "required": true + }, + "channel_ids": { + "type": "List[string]", + "description": "Id's for channels subscribed to.", + "required": true + }, + "bridge_ids": { + "type": "List[string]", + "description": "Id's for bridges subscribed to.", + "required": true + }, + "endpoint_ids": { + "type": "List[string]", + "description": "{tech}/{resource} for endpoints subscribed to.", + "required": true + }, + "device_names": { + "type": "List[string]", + "description": "Names of the devices subscribed to.", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_6_0/asterisk.json b/codegen/src/main/resources/codegen-data/ari_1_6_0/asterisk.json new file mode 100644 index 00000000..f13b0493 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_6_0/asterisk.json @@ -0,0 +1,259 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.6.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/asterisk.{format}", + "apis": [ + { + "path": "/asterisk/info", + "description": "Asterisk system information (similar to core show settings)", + "operations": [ + { + "httpMethod": "GET", + "summary": "Gets Asterisk system information.", + "nickname": "getInfo", + "responseClass": "AsteriskInfo", + "parameters": [ + { + "name": "only", + "description": "Filter information returned", + "paramType": "query", + "required": false, + "allowMultiple": true, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "build", + "system", + "config", + "status" + ] + } + } + ] + } + ] + }, + { + "path": "/asterisk/variable", + "description": "Global variables", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the value of a global variable.", + "nickname": "getGlobalVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "variable", + "description": "The variable to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + } + ] + }, + { + "httpMethod": "POST", + "summary": "Set the value of a global variable.", + "nickname": "setGlobalVar", + "responseClass": "void", + "parameters": [ + { + "name": "variable", + "description": "The variable to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + } + ] + } + ] + } + ], + "models": { + "BuildInfo": { + "id": "BuildInfo", + "description": "Info about how Asterisk was built", + "properties": { + "os": { + "required": true, + "type": "string", + "description": "OS Asterisk was built on." + }, + "kernel": { + "required": true, + "type": "string", + "description": "Kernel version Asterisk was built on." + }, + "options": { + "required": true, + "type": "string", + "description": "Compile time options, or empty string if default." + }, + "machine": { + "required": true, + "type": "string", + "description": "Machine architecture (x86_64, i686, ppc, etc.)" + }, + "date": { + "required": true, + "type": "string", + "description": "Date and time when Asterisk was built." + }, + "user": { + "required": true, + "type": "string", + "description": "Username that build Asterisk" + } + } + }, + "SystemInfo": { + "id": "SystemInfo", + "description": "Info about Asterisk", + "properties": { + "version": { + "required": true, + "type": "string", + "description": "Asterisk version." + }, + "entity_id": { + "required": true, + "type": "string", + "description": "" + } + } + }, + "SetId": { + "id": "SetId", + "description": "Effective user/group id", + "properties": { + "user": { + "required": true, + "type": "string", + "description": "Effective user id." + }, + "group": { + "required": true, + "type": "string", + "description": "Effective group id." + } + } + }, + "ConfigInfo": { + "id": "ConfigInfo", + "description": "Info about Asterisk configuration", + "properties": { + "name": { + "required": true, + "type": "string", + "description": "Asterisk system name." + }, + "default_language": { + "required": true, + "type": "string", + "description": "Default language for media playback." + }, + "max_channels": { + "required": false, + "type": "int", + "description": "Maximum number of simultaneous channels." + }, + "max_open_files": { + "required": false, + "type": "int", + "description": "Maximum number of open file handles (files, sockets)." + }, + "max_load": { + "required": false, + "type": "double", + "description": "Maximum load avg on system." + }, + "setid": { + "required": true, + "type": "SetId", + "description": "Effective user/group id for running Asterisk." + } + } + }, + "StatusInfo": { + "id": "StatusInfo", + "description": "Info about Asterisk status", + "properties": { + "startup_time": { + "required": true, + "type": "Date", + "description": "Time when Asterisk was started." + }, + "last_reload_time": { + "required": true, + "type": "Date", + "description": "Time when Asterisk was last reloaded." + } + } + }, + "AsteriskInfo": { + "id": "AsteriskInfo", + "description": "Asterisk system information", + "properties": { + "build": { + "required": false, + "type": "BuildInfo", + "description": "Info about how Asterisk was built" + }, + "system": { + "required": false, + "type": "SystemInfo", + "description": "Info about the system running Asterisk" + }, + "config": { + "required": false, + "type": "ConfigInfo", + "description": "Info about Asterisk configuration" + }, + "status": { + "required": false, + "type": "StatusInfo", + "description": "Info about Asterisk status" + } + } + }, + "Variable": { + "id": "Variable", + "description": "The value of a channel variable", + "properties": { + "value": { + "required": true, + "type": "string", + "description": "The value of the variable requested" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_6_0/bridges.json b/codegen/src/main/resources/codegen-data/ari_1_6_0/bridges.json new file mode 100644 index 00000000..21708c83 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_6_0/bridges.json @@ -0,0 +1,656 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.6.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/bridges.{format}", + "apis": [ + { + "path": "/bridges", + "description": "Active bridges", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all active bridges in Asterisk.", + "nickname": "list", + "responseClass": "List[Bridge]" + }, + { + "httpMethod": "POST", + "summary": "Create a new bridge.", + "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", + "nickname": "create", + "responseClass": "Bridge", + "parameters": [ + { + "name": "type", + "description": "Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "bridgeId", + "description": "Unique ID to give to the bridge being created.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Name to give to the bridge being created.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}", + "description": "Individual bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Create a new bridge or updates an existing one.", + "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", + "nickname": "create_or_update_with_id", + "responseClass": "Bridge", + "parameters": [ + { + "name": "type", + "description": "Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media) to set.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "bridgeId", + "description": "Unique ID to give to the bridge being created.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Set the name of the bridge.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ] + }, + { + "httpMethod": "GET", + "summary": "Get bridge details.", + "nickname": "get", + "responseClass": "Bridge", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Shut down a bridge.", + "notes": "If any channels are in this bridge, they will be removed and resume whatever they were doing beforehand.", + "nickname": "destroy", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/addChannel", + "description": "Add a channel to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Add a channel to a bridge.", + "nickname": "addChannel", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channel", + "description": "Ids of channels to add to bridge", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "role", + "description": "Channel's role in the bridge", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Channel not found" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application; Channel currently recording" + }, + { + "code": 422, + "reason": "Channel not in Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/removeChannel", + "description": "Remove a channel from a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Remove a channel from a bridge.", + "nickname": "removeChannel", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channel", + "description": "Ids of channels to remove from bridge", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Channel not found" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + }, + { + "code": 422, + "reason": "Channel not in this bridge" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/moh", + "description": "Play music on hold to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play music on hold to a bridge or change the MOH class that is playing.", + "nickname": "startMoh", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "mohClass", + "description": "Channel's id", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing music on hold to a bridge.", + "notes": "This will only stop music on hold being played via POST bridges/{bridgeId}/moh.", + "nickname": "stopMoh", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/play", + "description": "Play media to the participants of a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media on a bridge.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "play", + "responseClass": "Playback", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media's URI to play.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of media to skip before playing.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "playbackId", + "description": "Playback Id.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/play/{playbackId}", + "description": "Play media to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media on a bridge.", + "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.)", + "nickname": "playWithId", + "responseClass": "Playback", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media's URI to play.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of media to skip before playing.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + + } + ] + }, + { + "path": "/bridges/{bridgeId}/record", + "description": "Record audio on a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start a recording.", + "notes": "This records the mixed audio from all channels participating in this bridge.", + "nickname": "record", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Recording's filename", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "maxDurationSeconds", + "description": "Maximum duration of the recording, in seconds. 0 for no limit.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "maxSilenceSeconds", + "description": "Maximum duration of silence, in seconds. 0 for no limit.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "ifExists", + "description": "Action to take if a recording with the same name already exists.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "fail", + "allowableValues": { + "valueType": "LIST", + "values": [ + "fail", + "overwrite", + "append" + ] + } + }, + { + "name": "beep", + "description": "Play beep when recording begins", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "terminateOn", + "description": "DTMF input to terminate recording.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "any", + "*", + "#" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge is not in a Stasis application; A recording with the same name already exists on the system and can not be overwritten because it is in progress or ifExists=fail" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + } + ], + "models": { + "Bridge": { + "id": "Bridge", + "description": "The merging of media from one or more channels.\n\nEveryone on the bridge receives the same audio.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for this bridge", + "required": true + }, + "technology": { + "type": "string", + "description": "Name of the current bridging technology", + "required": true + }, + "bridge_type": { + "type": "string", + "description": "Type of bridge technology", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "mixing", + "holding" + ] + } + }, + "bridge_class": { + "type": "string", + "description": "Bridging class", + "required": true + }, + "creator": { + "type": "string", + "description": "Entity that created the bridge", + "required": true + }, + "name": { + "type": "string", + "description": "Name the creator gave the bridge", + "required": true + }, + "channels": { + "type": "List[string]", + "description": "Ids of channels participating in this bridge", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_6_0/channels.json b/codegen/src/main/resources/codegen-data/ari_1_6_0/channels.json new file mode 100644 index 00000000..cd309db1 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_6_0/channels.json @@ -0,0 +1,1477 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.6.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/channels.{format}", + "apis": [ + { + "path": "/channels", + "description": "Active channels", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all active channels in Asterisk.", + "nickname": "list", + "responseClass": "List[Channel]" + }, + { + "httpMethod": "POST", + "summary": "Create a new channel (originate).", + "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.", + "nickname": "originate", + "responseClass": "Channel", + "parameters": [ + { + "name": "endpoint", + "description": "Endpoint to call.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to dial after the endpoint answers", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to dial after the endpoint answers. If omitted, uses 'default'", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to dial after the endpoint answers. If omitted, uses 1", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "long" + }, + { + "name": "app", + "description": "The application that is subscribed to the originated channel, and passed to the Stasis application.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "callerId", + "description": "CallerID to use when dialing the endpoint or extension.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 30 + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "The unique id of the channel which is originating this one.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for originating a channel." + } + ] + } + ] + }, + { + "path": "/channels/{channelId}", + "description": "Active channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "Channel details.", + "nickname": "get", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + } + ] + }, + { + "httpMethod": "POST", + "summary": "Create a new channel (originate with id).", + "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.", + "nickname": "originateWithId", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "endpoint", + "description": "Endpoint to call.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to dial after the endpoint answers", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to dial after the endpoint answers. If omitted, uses 'default'", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to dial after the endpoint answers. If omitted, uses 1", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "long" + }, + { + "name": "app", + "description": "The application that is subscribed to the originated channel, and passed to the Stasis application.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "callerId", + "description": "CallerID to use when dialing the endpoint or extension.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 30 + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "The unique id of the channel which is originating this one.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for originating a channel." + } + ] + + }, + { + "httpMethod": "DELETE", + "summary": "Delete (i.e. hangup) a channel.", + "nickname": "hangup", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "reason", + "description": "Reason for hanging up the channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defalutValue": "normal", + "allowableValues": { + "valueType": "LIST", + "values": [ + "normal", + "busy", + "congestion" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid reason for hangup provided" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/continue", + "description": "Exit application; continue execution in the dialplan", + "operations": [ + { + "httpMethod": "POST", + "summary": "Exit application; continue execution in the dialplan.", + "nickname": "continueInDialplan", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/answer", + "description": "Answer a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Answer a channel.", + "nickname": "answer", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/ring", + "description": "Send a ringing indication to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Indicate ringing to a channel.", + "nickname": "ring", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop ringing indication on a channel if locally generated.", + "nickname": "ringStop", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/dtmf", + "description": "Send DTMF to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Send provided DTMF to a given channel.", + "nickname": "sendDTMF", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "dtmf", + "description": "DTMF To send.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "before", + "description": "Amount of time to wait before DTMF digits (specified in milliseconds) start.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0 + }, + { + "name": "between", + "description": "Amount of time in between DTMF digits (specified in milliseconds).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 100 + }, + { + "name": "duration", + "description": "Length of each DTMF digit (specified in milliseconds).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 100 + }, + { + "name": "after", + "description": "Amount of time to wait after DTMF digits (specified in milliseconds) end.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0 + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "DTMF is required" + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/mute", + "description": "Mute a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Mute a channel.", + "nickname": "mute", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "Direction in which to mute audio", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both", + "in", + "out" + ] + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unmute a channel.", + "nickname": "unmute", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "Direction in which to unmute audio", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both", + "in", + "out" + ] + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/hold", + "description": "Put a channel on hold", + "operations": [ + { + "httpMethod": "POST", + "summary": "Hold a channel.", + "nickname": "hold", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Remove a channel from hold.", + "nickname": "unhold", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/moh", + "description": "Play music on hold to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play music on hold to a channel.", + "notes": "Using media operations such as /play on a channel playing MOH in this manner will suspend MOH without resuming automatically. If continuing music on hold is desired, the stasis application must reinitiate music on hold.", + "nickname": "startMoh", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "mohClass", + "description": "Music on hold class to use", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing music on hold to a channel.", + "nickname": "stopMoh", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/silence", + "description": "Play silence to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play silence to a channel.", + "notes": "Using media operations such as /play on a channel playing silence in this manner will suspend silence without resuming automatically.", + "nickname": "startSilence", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing silence to a channel.", + "nickname": "stopSilence", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/play", + "description": "Play media to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "play", + "responseClass": "Playback", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media's URI to play.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of media to skip before playing.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000 + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/play/{playbackId}", + "description": "Play media to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media and specify the playbackId.", + "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.)", + "nickname": "playWithId", + "responseClass": "Playback", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media's URI to play.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of media to skip before playing.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000 + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/record", + "description": "Record audio from a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start a recording.", + "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.", + "nickname": "record", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Recording's filename", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "maxDurationSeconds", + "description": "Maximum duration of the recording, in seconds. 0 for no limit", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "maxSilenceSeconds", + "description": "Maximum duration of silence, in seconds. 0 for no limit", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "ifExists", + "description": "Action to take if a recording with the same name already exists.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "fail", + "allowableValues": { + "valueType": "LIST", + "values": [ + "fail", + "overwrite", + "append" + ] + } + }, + { + "name": "beep", + "description": "Play beep when recording begins", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "terminateOn", + "description": "DTMF input to terminate recording", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "any", + "*", + "#" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "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" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/variable", + "description": "Variables on a channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the value of a channel variable or function.", + "nickname": "getChannelVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The channel variable or function to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "POST", + "summary": "Set the value of a channel variable or function.", + "nickname": "setChannelVar", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The channel variable or function to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/snoop", + "description": "Snoop (spy/whisper) on a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start snooping.", + "notes": "Snoop (spy/whisper) on a specific channel.", + "nickname": "snoopChannel", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "spy", + "description": "Direction of audio to spy on", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "whisper", + "description": "Direction of audio to whisper into", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "app", + "description": "Application the snooping channel is placed into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "snoopId", + "description": "Unique ID to assign to snooping channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/snoop/{snoopId}", + "description": "Snoop (spy/whisper) on a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start snooping.", + "notes": "Snoop (spy/whisper) on a specific channel.", + "nickname": "snoopChannelWithId", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "snoopId", + "description": "Unique ID to assign to snooping channel", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "spy", + "description": "Direction of audio to spy on", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "whisper", + "description": "Direction of audio to whisper into", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "app", + "description": "Application the snooping channel is placed into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + } + ], + "models": { + "Dialed": { + "id": "Dialed", + "description": "Dialed channel information.", + "properties": {} + }, + "DialplanCEP": { + "id": "DialplanCEP", + "description": "Dialplan location (context/extension/priority)", + "properties": { + "context": { + "required": true, + "type": "string", + "description": "Context in the dialplan" + }, + "exten": { + "required": true, + "type": "string", + "description": "Extension in the dialplan" + }, + "priority": { + "required": true, + "type": "long", + "description": "Priority in the dialplan" + } + } + }, + "CallerID": { + "id": "CallerID", + "description": "Caller identification", + "properties": { + "name": { + "required": true, + "type": "string" + }, + "number": { + "required": true, + "type": "string" + } + } + }, + "Channel": { + "id": "Channel", + "description": "A specific communication connection between Asterisk and an Endpoint.", + "properties": { + "id": { + "required": true, + "type": "string", + "description": "Unique identifier of the channel.\n\nThis is the same as the Uniqueid field in AMI." + }, + "name": { + "required": true, + "type": "string", + "description": "Name of the channel (i.e. SIP/foo-0000a7e3)" + }, + "state": { + "required": true, + "type": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "Down", + "Rsrved", + "OffHook", + "Dialing", + "Ring", + "Ringing", + "Up", + "Busy", + "Dialing Offhook", + "Pre-ring", + "Unknown" + ] + } + }, + "caller": { + "required": true, + "type": "CallerID" + }, + "connected": { + "required": true, + "type": "CallerID" + }, + "accountcode": { + "required": true, + "type": "string" + }, + "dialplan": { + "required": true, + "type": "DialplanCEP", + "description": "Current location in the dialplan" + }, + "creationtime": { + "required": true, + "type": "Date", + "description": "Timestamp when channel was created" + }, + "language": { + "required": true, + "type": "string", + "description": "The default spoken language" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_6_0/deviceStates.json b/codegen/src/main/resources/codegen-data/ari_1_6_0/deviceStates.json new file mode 100644 index 00000000..02d5d208 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_6_0/deviceStates.json @@ -0,0 +1,151 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "Kevin Harwell ", + "_svn_revision": "$Revision$", + "apiVersion": "1.6.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/deviceStates.{format}", + "apis": [ + { + "path": "/deviceStates", + "description": "Device states", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all ARI controlled device states.", + "nickname": "list", + "responseClass": "List[DeviceState]" + } + ] + }, + { + "path": "/deviceStates/{deviceName}", + "description": "Device state", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve the current state of a device.", + "nickname": "get", + "responseClass": "DeviceState", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Change the state of a device controlled by ARI. (Note - implicitly creates the device state).", + "nickname": "update", + "responseClass": "void", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "deviceState", + "description": "Device state value", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "NOT_INUSE", + "INUSE", + "BUSY", + "INVALID", + "UNAVAILABLE", + "RINGING", + "RINGINUSE", + "ONHOLD" + ] + } + + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Device name is missing" + }, + { + "code": 409, + "reason": "Uncontrolled device specified" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Destroy a device-state controlled by ARI.", + "nickname": "delete", + "responseClass": "void", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Device name is missing" + }, + { + "code": 409, + "reason": "Uncontrolled device specified" + } + ] + } + ] + } + ], + "models": { + "DeviceState": { + "id": "DeviceState", + "description": "Represents the state of a device.", + "properties": { + "name": { + "type": "string", + "description": "Name of the device.", + "required": true + }, + "state": { + "type": "string", + "description": "Device's state", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "UNKNOWN", + "NOT_INUSE", + "INUSE", + "BUSY", + "INVALID", + "UNAVAILABLE", + "RINGING", + "RINGINUSE", + "ONHOLD" + ] + } + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_6_0/endpoints.json b/codegen/src/main/resources/codegen-data/ari_1_6_0/endpoints.json new file mode 100644 index 00000000..e7b4ba73 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_6_0/endpoints.json @@ -0,0 +1,275 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.6.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/endpoints.{format}", + "apis": [ + { + "path": "/endpoints", + "description": "Asterisk endpoints", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all endpoints.", + "nickname": "list", + "responseClass": "List[Endpoint]" + } + ] + }, + { + "path": "/endpoints/sendMessage", + "description": "Send a message to some technology URI or endpoint.", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Send a message to some technology URI or endpoint.", + "nickname": "sendMessage", + "responseClass": "void", + "parameters": [ + { + "name": "to", + "description": "The endpoint resource or technology specific URI to send the message to. Valid resources are sip, pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "from", + "description": "The endpoint resource or technology specific identity to send this message from. Valid resources are sip, pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "body", + "description": "The body of the message", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "descriptioni": "The \"variables\" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, pjsip and sip resource types will add the key/value pairs as SIP headers,", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Endpoint not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}", + "description": "Asterisk endpoints", + "operations": [ + { + "httpMethod": "GET", + "summary": "List available endoints for a given endpoint technology.", + "nickname": "listByTech", + "responseClass": "List[Endpoint]", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoints (sip,iax2,...)", + "paramType": "path", + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Endpoints not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}/{resource}", + "description": "Single endpoint", + "operations": [ + { + "httpMethod": "GET", + "summary": "Details for an endpoint.", + "nickname": "get", + "responseClass": "Endpoint", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "resource", + "description": "ID of the endpoint", + "paramType": "path", + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoints not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}/{resource}/sendMessage", + "description": "Send a message to some endpoint in a technology.", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Send a message to some endpoint in a technology.", + "nickname": "sendMessageToEndpoint", + "responseClass": "void", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "resource", + "description": "ID of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "from", + "description": "The endpoint resource or technology specific identity to send this message from. Valid resources are sip, pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "body", + "description": "The body of the message", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "descriptioni": "The \"variables\" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, pjsip and sip resource types will add the key/value pairs as SIP headers,", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoint not found" + } + ] + } + ] + } + ], + "models": { + "Endpoint": { + "id": "Endpoint", + "description": "An external device that may offer/accept calls to/from Asterisk.\n\nUnlike most resources, which have a single unique identifier, an endpoint is uniquely identified by the technology/resource pair.", + "properties": { + "technology": { + "type": "string", + "description": "Technology of the endpoint", + "required": true + }, + "resource": { + "type": "string", + "description": "Identifier of the endpoint, specific to the given technology.", + "required": true + }, + "state": { + "type": "string", + "description": "Endpoint's state", + "required": false, + "allowableValues": { + "valueType": "LIST", + "values": [ + "unknown", + "offline", + "online" + ] + } + }, + "channel_ids": { + "type": "List[string]", + "description": "Id's of channels associated with this endpoint", + "required": true + } + } + }, + "TextMessageVariable": { + "id": "TextMessageVariable", + "description": "A key/value pair variable in a text message.", + "properties": { + "key": { + "type": "string", + "description": "A unique key identifying the variable.", + "required": true + }, + "value": { + "type": "string", + "description": "The value of the variable.", + "required": true + } + } + }, + "TextMessage": { + "id": "TextMessage", + "description": "A text message.", + "properties": { + "from": { + "type": "string", + "description": "A technology specific URI specifying the source of the message. For sip and pjsip technologies, any SIP URI can be specified. For xmpp, the URI must correspond to the client connection being used to send the message.", + "required": true + }, + "to": { + "type": "string", + "description": "A technology specific URI specifying the destination of the message. Valid technologies include sip, pjsip, and xmp. The destination of a message should be an endpoint.", + "required": true + }, + "body": { + "type": "string", + "description": "The text of the message.", + "required": true + }, + "variables": { + "type": "List[TextMessageVariable]", + "description": "Technology specific key/value pairs associated with the message.", + "required": false + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_6_0/events.json b/codegen/src/main/resources/codegen-data/ari_1_6_0/events.json new file mode 100644 index 00000000..1aceb71e --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_6_0/events.json @@ -0,0 +1,729 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.6.0", + "swaggerVersion": "1.2", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/events.{format}", + "apis": [ + { + "path": "/events", + "description": "Events from Asterisk to applications", + "operations": [ + { + "httpMethod": "GET", + "upgrade": "websocket", + "websocketProtocol": "ari", + "summary": "WebSocket connection for events.", + "nickname": "eventWebsocket", + "responseClass": "Message", + "parameters": [ + { + "name": "app", + "description": "Applications to subscribe to.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ] + } + ] + }, + { + "path": "/events/user/{eventName}", + "description": "Stasis application user events", + "operations": [ + { + "httpMethod": "POST", + "summary": "Generate a user event.", + "nickname": "userEvent", + "responseClass": "void", + "parameters": [ + { + "name": "eventName", + "description": "Event name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "application", + "description": "The name of the application that will receive this event", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "source", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}/{resource}, deviceState:{deviceName}", + "paramType": "query", + "required": false, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds custom key/value pairs to add to the user event. Ex. { \"variables\": { \"key\": \"value\" } }", + "paramType": "body", + "required": false, + "allowMultiple": false, + "dataType": "containers" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 422, + "reason": "Event source not found." + }, + { + "code": 400, + "reason": "Invalid even tsource URI or userevent data." + } + ] + } + ] + } + ], + "models": { + "Message": { + "id": "Message", + "description": "Base type for errors and events", + "discriminator": "type", + "properties": { + "type": { + "type": "string", + "required": true, + "description": "Indicates the type of this message." + } + }, + "subTypes": [ + "MissingParams", + "Event" + ] + }, + "MissingParams": { + "id": "MissingParams", + "description": "Error event sent when required params are missing.", + "properties": { + "params": { + "required": true, + "type": "List[string]", + "description": "A list of the missing parameters" + } + } + }, + "Event": { + "id": "Event", + "description": "Base type for asynchronous events from Asterisk.", + "properties": { + "application": { + "type": "string", + "description": "Name of the application receiving the event.", + "required": true + }, + "timestamp": { + "type": "Date", + "description": "Time at which this event was created.", + "required": false + } + }, + "subTypes": [ + "DeviceStateChanged", + "PlaybackStarted", + "PlaybackFinished", + "RecordingStarted", + "RecordingFinished", + "RecordingFailed", + "ApplicationReplaced", + "BridgeCreated", + "BridgeDestroyed", + "BridgeMerged", + "BridgeBlindTransfer", + "BridgeAttendedTransfer", + "ChannelCreated", + "ChannelDestroyed", + "ChannelEnteredBridge", + "ChannelLeftBridge", + "ChannelStateChange", + "ChannelDtmfReceived", + "ChannelDialplan", + "ChannelCallerId", + "ChannelUserevent", + "ChannelHangupRequest", + "ChannelVarset", + "ChannelTalkingStarted", + "ChannelTalkingFinished", + "EndpointStateChange", + "Dial", + "StasisEnd", + "StasisStart", + "TextMessageReceived", + "ChannelConnectedLine" + ] + }, + "DeviceStateChanged": { + "id": "DeviceStateChanged", + "description": "Notification that a device state has changed.", + "properties": { + "device_state": { + "type": "DeviceState", + "description": "Device state object", + "required": true + } + } + }, + "PlaybackStarted": { + "id": "PlaybackStarted", + "description": "Event showing the start of a media playback operation.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "PlaybackFinished": { + "id": "PlaybackFinished", + "description": "Event showing the completion of a media playback operation.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "RecordingStarted": { + "id": "RecordingStarted", + "description": "Event showing the start of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "RecordingFinished": { + "id": "RecordingFinished", + "description": "Event showing the completion of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "RecordingFailed": { + "id": "RecordingFailed", + "description": "Event showing failure of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "ApplicationReplaced": { + "id": "ApplicationReplaced", + "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.", + "properties": {} + }, + "BridgeCreated": { + "id": "BridgeCreated", + "description": "Notification that a bridge has been created.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeDestroyed": { + "id": "BridgeDestroyed", + "description": "Notification that a bridge has been destroyed.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeMerged": { + "id": "BridgeMerged", + "description": "Notification that one bridge has merged into another.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "bridge_from": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeBlindTransfer": { + "id": "BridgeBlindTransfer", + "description": "Notification that a blind transfer has occurred.", + "properties": { + "channel": { + "description": "The channel performing the blind transfer", + "required": true, + "type": "Channel" + }, + "replace_channel": { + "description": "The channel that is replacing transferer when the transferee(s) can not be transferred directly", + "required": false, + "type": "Channel" + }, + "transferee": { + "description": "The channel that is being transferred", + "required": false, + "type": "Channel" + }, + "exten": { + "description": "The extension transferred to", + "required": true, + "type": "string" + }, + "context": { + "description": "The context transferred to", + "required": true, + "type": "string" + }, + "result": { + "description": "The result of the transfer attempt", + "required": true, + "type": "string" + }, + "is_external": { + "description": "Whether the transfer was externally initiated or not", + "required": true, + "type": "boolean" + }, + "bridge": { + "description": "The bridge being transferred", + "type": "Bridge" + } + } + }, + "BridgeAttendedTransfer": { + "id": "BridgeAttendedTransfer", + "description": "Notification that an attended transfer has occurred.", + "properties": { + "transferer_first_leg": { + "description": "First leg of the transferer", + "required": true, + "type": "Channel" + }, + "transferer_second_leg": { + "description": "Second leg of the transferer", + "required": true, + "type": "Channel" + }, + "replace_channel": { + "description": "The channel that is replacing transferer_first_leg in the swap", + "required": false, + "type": "Channel" + }, + "transferee": { + "description": "The channel that is being transferred", + "required": false, + "type": "Channel" + }, + "transfer_target": { + "description": "The channel that is being transferred to", + "required": false, + "type": "Channel" + }, + "result": { + "description": "The result of the transfer attempt", + "required": true, + "type": "string" + }, + "is_external": { + "description": "Whether the transfer was externally initiated or not", + "required": true, + "type": "boolean" + }, + "transferer_first_leg_bridge": { + "description": "Bridge the transferer first leg is in", + "type": "Bridge" + }, + "transferer_second_leg_bridge": { + "description": "Bridge the transferer second leg is in", + "type": "Bridge" + }, + "destination_type": { + "description": "How the transfer was accomplished", + "required": true, + "type": "string" + }, + "destination_bridge": { + "description": "Bridge that survived the merge result", + "type": "string" + }, + "destination_application": { + "description": "Application that has been transferred into", + "type": "string" + }, + "destination_link_first_leg": { + "description": "First leg of a link transfer result", + "type": "Channel" + }, + "destination_link_second_leg": { + "description": "Second leg of a link transfer result", + "type": "Channel" + }, + "destination_threeway_channel": { + "description": "Transferer channel that survived the threeway result", + "type": "Channel" + }, + "destination_threeway_bridge": { + "description": "Bridge that survived the threeway result", + "type": "Bridge" + } + } + }, + "ChannelCreated": { + "id": "ChannelCreated", + "description": "Notification that a channel has been created.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelDestroyed": { + "id": "ChannelDestroyed", + "description": "Notification that a channel has been destroyed.", + "properties": { + "cause": { + "required": true, + "description": "Integer representation of the cause of the hangup", + "type": "int" + }, + "cause_txt": { + "required": true, + "description": "Text representation of the cause of the hangup", + "type": "string" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelEnteredBridge": { + "id": "ChannelEnteredBridge", + "description": "Notification that a channel has entered a bridge.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "channel": { + "type": "Channel" + } + } + }, + "ChannelLeftBridge": { + "id": "ChannelLeftBridge", + "description": "Notification that a channel has left a bridge.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelStateChange": { + "id": "ChannelStateChange", + "description": "Notification of a channel's state change.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelDtmfReceived": { + "id": "ChannelDtmfReceived", + "description": "DTMF received on a channel.\n\nThis event is sent when the DTMF ends. There is no notification about the start of DTMF", + "properties": { + "digit": { + "required": true, + "type": "string", + "description": "DTMF digit received (0-9, A-E, # or *)" + }, + "duration_ms": { + "required": true, + "type": "int", + "description": "Number of milliseconds DTMF was received" + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which DTMF was received" + } + } + }, + "ChannelDialplan": { + "id": "ChannelDialplan", + "description": "Channel changed location in the dialplan.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that changed dialplan location." + }, + "dialplan_app": { + "required": true, + "type": "string", + "description": "The application about to be executed." + }, + "dialplan_app_data": { + "required": true, + "type": "string", + "description": "The data to be passed to the application." + } + } + }, + "ChannelCallerId": { + "id": "ChannelCallerId", + "description": "Channel changed Caller ID.", + "properties": { + "caller_presentation": { + "required": true, + "type": "int", + "description": "The integer representation of the Caller Presentation value." + }, + "caller_presentation_txt": { + "required": true, + "type": "string", + "description": "The text representation of the Caller Presentation value." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that changed Caller ID." + } + } + }, + "ChannelUserevent": { + "id": "ChannelUserevent", + "description": "User-generated event with additional user-defined fields in the object.", + "properties": { + "eventname": { + "required": true, + "type": "string", + "description": "The name of the user event." + }, + "channel": { + "required": false, + "type": "Channel", + "description": "A channel that is signaled with the user event." + }, + "bridge": { + "required": false, + "type": "Bridge", + "description": "A bridge that is signaled with the user event." + }, + "endpoint": { + "required": false, + "type": "Endpoint", + "description": "A endpoint that is signaled with the user event." + }, + "userevent": { + "required": true, + "type": "object", + "description": "Custom Userevent data" + } + } + }, + "ChannelHangupRequest": { + "id": "ChannelHangupRequest", + "description": "A hangup was requested on the channel.", + "properties": { + "cause": { + "type": "int", + "description": "Integer representation of the cause of the hangup." + }, + "soft": { + "type": "boolean", + "description": "Whether the hangup request was a soft hangup request." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which the hangup was requested." + } + } + }, + "ChannelVarset": { + "id": "ChannelVarset", + "description": "Channel variable changed.", + "properties": { + "variable": { + "required": true, + "type": "string", + "description": "The variable that changed." + }, + "value": { + "required": true, + "type": "string", + "description": "The new value of the variable." + }, + "channel": { + "required": false, + "type": "Channel", + "description": "The channel on which the variable was set.\n\nIf missing, the variable is a global variable." + } + } + }, + "ChannelTalkingStarted": { + "id": "ChannelTalkingStarted", + "description": "Talking was detected on the channel.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which talking started." + } + } + }, + "ChannelTalkingFinished": { + "id": "ChannelTalkingFinished", + "description": "Talking is no longer detected on the channel.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which talking completed." + }, + "duration": { + "required": true, + "type": "int", + "description": "The length of time, in milliseconds, that talking was detected on the channel" + } + } + }, + "EndpointStateChange": { + "id": "EndpointStateChange", + "description": "Endpoint state changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + } + } + }, + "Dial": { + "id": "Dial", + "description": "Dialing state has changed.", + "properties": { + "caller": { + "required": false, + "type": "Channel", + "description": "The calling channel." + }, + "peer": { + "required": true, + "type": "Channel", + "description": "The dialed channel." + }, + "forward": { + "required": false, + "type": "string", + "description": "Forwarding target requested by the original dialed channel." + }, + "forwarded": { + "required": false, + "type": "Channel", + "description": "Channel that the caller has been forwarded to." + }, + "dialstring": { + "required": false, + "type": "string", + "description": "The dial string for calling the peer channel." + }, + "dialstatus": { + "required": true, + "type": "string", + "description": "Current status of the dialing attempt to the peer." + } + } + }, + "StasisEnd": { + "id": "StasisEnd", + "description": "Notification that a channel has left a Stasis application.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "StasisStart": { + "id": "StasisStart", + "description": "Notification that a channel has entered a Stasis application.", + "properties": { + "args": { + "required": true, + "type": "List[string]", + "description": "Arguments to the application" + }, + "channel": { + "required": true, + "type": "Channel" + }, + "replace_channel": { + "required": false, + "type": "Channel" + } + } + }, + "TextMessageReceived": { + "id": "TextMessageReceived", + "description": "A text message was received from an endpoint.", + "properties": { + "message": { + "required": true, + "type": "TextMessage" + }, + "endpoint": { + "required": false, + "type": "Endpoint" + } + } + }, + "ChannelConnectedLine": { + "id": "ChannelConnectedLine", + "description": "Channel changed Connected Line.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel whose connected line has changed." + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_6_0/mailboxes.json b/codegen/src/main/resources/codegen-data/ari_1_6_0/mailboxes.json new file mode 100644 index 00000000..87c6f034 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_6_0/mailboxes.json @@ -0,0 +1,134 @@ +{ + "_copyright": "Copyright (C) 2013, Digium, Inc.", + "_author": "Jonathan Rose ", + "_svn_revision": "$Revision$", + "apiVersion": "1.6.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/mailboxes.{format}", + "apis": [ + { + "path": "/mailboxes", + "description": "Mailboxes", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all mailboxes.", + "nickname": "list", + "responseClass": "List[Mailbox]" + } + ] + }, + { + "path": "/mailboxes/{mailboxName}", + "description": "Mailbox state", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve the current state of a mailbox.", + "nickname": "get", + "responseClass": "Mailbox", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Change the state of a mailbox. (Note - implicitly creates the mailbox).", + "nickname": "update", + "responseClass": "void", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "oldMessages", + "description": "Count of old messages in the mailbox", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "newMessages", + "description": "Count of new messages in the mailbox", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "int" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Destroy a mailbox.", + "nickname": "delete", + "responseClass": "void", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + } + ] + } + ], + "models": { + "Mailbox": { + "id": "Mailbox", + "description": "Represents the state of a mailbox.", + "properties": { + "name": { + "type": "string", + "description": "Name of the mailbox.", + "required": true + }, + "old_messages": { + "type": "int", + "description": "Count of old messages in the mailbox.", + "required": true + }, + "new_messages": { + "type": "int", + "description": "Count of new messages in the mailbox.", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_6_0/playbacks.json b/codegen/src/main/resources/codegen-data/ari_1_6_0/playbacks.json new file mode 100644 index 00000000..65ef5245 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_6_0/playbacks.json @@ -0,0 +1,155 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.6.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/playbacks.{format}", + "apis": [ + { + "path": "/playbacks/{playbackId}", + "description": "Control object for a playback operation.", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a playback's details.", + "nickname": "get", + "responseClass": "Playback", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "The playback cannot be found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop a playback.", + "nickname": "stop", + "responseClass": "void", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "The playback cannot be found" + } + ] + } + ] + }, + { + "path": "/playbacks/{playbackId}/control", + "description": "Control object for a playback operation.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Control a playback.", + "nickname": "control", + "responseClass": "void", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "operation", + "description": "Operation to perform on the playback.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "restart", + "pause", + "unpause", + "reverse", + "forward" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "The provided operation parameter was invalid" + }, + { + "code": 404, + "reason": "The playback cannot be found" + }, + { + "code": 409, + "reason": "The operation cannot be performed in the playback's current state" + } +] + } + ] + } + ], + "models": { + "Playback": { + "id": "Playback", + "description": "Object representing the playback of media to a channel", + "properties": { + "id": { + "type": "string", + "description": "ID for this playback operation", + "required": true + }, + "media_uri": { + "type": "string", + "description": "URI for the media to play back.", + "required": true + }, + "target_uri": { + "type": "string", + "description": "URI for the channel or bridge to play the media on", + "required": true + }, + "language": { + "type": "string", + "description": "For media types that support multiple languages, the language requested for playback." + }, + "state": { + "type": "string", + "description": "Current state of the playback operation.", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "queued", + "playing", + "complete" + ] + } + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_6_0/recordings.json b/codegen/src/main/resources/codegen-data/ari_1_6_0/recordings.json new file mode 100644 index 00000000..d96184bd --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_6_0/recordings.json @@ -0,0 +1,378 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.6.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/recordings.{format}", + "apis": [ + { + "path": "/recordings/stored", + "description": "Recordings", + "operations": [ + { + "httpMethod": "GET", + "summary": "List recordings that are complete.", + "nickname": "listStored", + "responseClass": "List[StoredRecording]" + } + ] + }, + { + "path": "/recordings/stored/{recordingName}", + "description": "Individual recording", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a stored recording's details.", + "nickname": "getStored", + "responseClass": "StoredRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Delete a stored recording.", + "nickname": "deleteStored", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/stored/{recordingName}/copy", + "description": "Copy an individual recording", + "operations": [ + { + "httpMethod": "POST", + "summary": "Copy a stored recording.", + "nickname": "copyStored", + "responseClass": "StoredRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording to copy", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "destinationRecordingName", + "description": "The destination name of the recording", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "A recording with the same name already exists on the system" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}", + "description": "A recording that is in progress", + "operations": [ + { + "httpMethod": "GET", + "summary": "List live recordings.", + "nickname": "getLive", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop a live recording and discard it.", + "nickname": "cancel", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/stop", + "operations": [ + { + "httpMethod": "POST", + "summary": "Stop a live recording and store it.", + "nickname": "stop", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/pause", + "operations": [ + { + "httpMethod": "POST", + "summary": "Pause a live recording.", + "notes": "Pausing a recording suspends silence detection, which will be restarted when the recording is unpaused. Paused time is not included in the accounting for maxDurationSeconds.", + "nickname": "pause", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unpause a live recording.", + "nickname": "unpause", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/mute", + "operations": [ + { + "httpMethod": "POST", + "summary": "Mute a live recording.", + "notes": "Muting a recording suspends silence detection, which will be restarted when the recording is unmuted.", + "nickname": "mute", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unmute a live recording.", + "nickname": "unmute", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + } + ] + } + ], + "models": { + "StoredRecording": { + "id": "StoredRecording", + "description": "A past recording that may be played back.", + "properties": { + "name": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + }, + "LiveRecording": { + "id": "LiveRecording", + "description": "A recording that is in progress", + "properties": { + "name": { + "required": true, + "type": "string", + "description": "Base name for the recording" + }, + "format": { + "required": true, + "type": "string", + "description": "Recording format (wav, gsm, etc.)" + }, + "target_uri": { + "required": true, + "type": "string", + "description": "URI for the channel or bridge being recorded" + }, + "state": { + "required": true, + "type": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "queued", + "recording", + "paused", + "done", + "failed", + "canceled" + ] + } + }, + "duration": { + "required": false, + "type": "int", + "description": "Duration in seconds of the recording" + }, + "talking_duration": { + "required": false, + "type": "int", + "description": "Duration of talking, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds." + }, + "silence_duration": { + "required": false, + "type": "int", + "description": "Duration of silence, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds." + }, + "cause": { + "required": false, + "type": "string", + "description": "Cause for recording failure if failed" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_6_0/sounds.json b/codegen/src/main/resources/codegen-data/ari_1_6_0/sounds.json new file mode 100644 index 00000000..906eb6bf --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_6_0/sounds.json @@ -0,0 +1,99 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.6.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/sounds.{format}", + "apis": [ + { + "path": "/sounds", + "description": "Sounds", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all sounds.", + "nickname": "list", + "responseClass": "List[Sound]", + "parameters": [ + { + "name": "lang", + "description": "Lookup sound for a specific language.", + "paramType": "query", + "dataType": "string", + "required": false + }, + { + "name": "format", + "description": "Lookup sound in a specific format.", + "paramType": "query", + "dataType": "string", + "required": false, + "__note": "core show translation can show translation paths between formats, along with relative costs. so this could be just installed format, or we could follow that for transcoded formats." + } + ] + } + ] + }, + { + "path": "/sounds/{soundId}", + "description": "Individual sound", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a sound's details.", + "nickname": "get", + "responseClass": "Sound", + "parameters": [ + { + "name": "soundId", + "description": "Sound's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ] + } + ] + } + ], + "models": { + "FormatLangPair": { + "id": "FormatLangPair", + "description": "Identifies the format and language of a sound file", + "properties": { + "language": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + }, + "Sound": { + "id": "Sound", + "description": "A media file that may be played back.", + "properties": { + "id": { + "required": true, + "description": "Sound's identifier.", + "type": "string" + }, + "text": { + "required": false, + "description": "Text description of the sound, usually the words spoken.", + "type": "string" + }, + "formats": { + "required": true, + "description": "The formats and languages in which this sound is available.", + "type": "List[FormatLangPair]" + } + } + } + } +} diff --git a/codegen-data/ari_1_10_0/applications.json b/codegen/src/main/resources/codegen-data/ari_1_7_0/applications.json similarity index 100% rename from codegen-data/ari_1_10_0/applications.json rename to codegen/src/main/resources/codegen-data/ari_1_7_0/applications.json diff --git a/codegen/src/main/resources/codegen-data/ari_1_7_0/asterisk.json b/codegen/src/main/resources/codegen-data/ari_1_7_0/asterisk.json new file mode 100644 index 00000000..263bfd61 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_7_0/asterisk.json @@ -0,0 +1,259 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.7.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/asterisk.{format}", + "apis": [ + { + "path": "/asterisk/info", + "description": "Asterisk system information (similar to core show settings)", + "operations": [ + { + "httpMethod": "GET", + "summary": "Gets Asterisk system information.", + "nickname": "getInfo", + "responseClass": "AsteriskInfo", + "parameters": [ + { + "name": "only", + "description": "Filter information returned", + "paramType": "query", + "required": false, + "allowMultiple": true, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "build", + "system", + "config", + "status" + ] + } + } + ] + } + ] + }, + { + "path": "/asterisk/variable", + "description": "Global variables", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the value of a global variable.", + "nickname": "getGlobalVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "variable", + "description": "The variable to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + } + ] + }, + { + "httpMethod": "POST", + "summary": "Set the value of a global variable.", + "nickname": "setGlobalVar", + "responseClass": "void", + "parameters": [ + { + "name": "variable", + "description": "The variable to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + } + ] + } + ] + } + ], + "models": { + "BuildInfo": { + "id": "BuildInfo", + "description": "Info about how Asterisk was built", + "properties": { + "os": { + "required": true, + "type": "string", + "description": "OS Asterisk was built on." + }, + "kernel": { + "required": true, + "type": "string", + "description": "Kernel version Asterisk was built on." + }, + "options": { + "required": true, + "type": "string", + "description": "Compile time options, or empty string if default." + }, + "machine": { + "required": true, + "type": "string", + "description": "Machine architecture (x86_64, i686, ppc, etc.)" + }, + "date": { + "required": true, + "type": "string", + "description": "Date and time when Asterisk was built." + }, + "user": { + "required": true, + "type": "string", + "description": "Username that build Asterisk" + } + } + }, + "SystemInfo": { + "id": "SystemInfo", + "description": "Info about Asterisk", + "properties": { + "version": { + "required": true, + "type": "string", + "description": "Asterisk version." + }, + "entity_id": { + "required": true, + "type": "string", + "description": "" + } + } + }, + "SetId": { + "id": "SetId", + "description": "Effective user/group id", + "properties": { + "user": { + "required": true, + "type": "string", + "description": "Effective user id." + }, + "group": { + "required": true, + "type": "string", + "description": "Effective group id." + } + } + }, + "ConfigInfo": { + "id": "ConfigInfo", + "description": "Info about Asterisk configuration", + "properties": { + "name": { + "required": true, + "type": "string", + "description": "Asterisk system name." + }, + "default_language": { + "required": true, + "type": "string", + "description": "Default language for media playback." + }, + "max_channels": { + "required": false, + "type": "int", + "description": "Maximum number of simultaneous channels." + }, + "max_open_files": { + "required": false, + "type": "int", + "description": "Maximum number of open file handles (files, sockets)." + }, + "max_load": { + "required": false, + "type": "double", + "description": "Maximum load avg on system." + }, + "setid": { + "required": true, + "type": "SetId", + "description": "Effective user/group id for running Asterisk." + } + } + }, + "StatusInfo": { + "id": "StatusInfo", + "description": "Info about Asterisk status", + "properties": { + "startup_time": { + "required": true, + "type": "Date", + "description": "Time when Asterisk was started." + }, + "last_reload_time": { + "required": true, + "type": "Date", + "description": "Time when Asterisk was last reloaded." + } + } + }, + "AsteriskInfo": { + "id": "AsteriskInfo", + "description": "Asterisk system information", + "properties": { + "build": { + "required": false, + "type": "BuildInfo", + "description": "Info about how Asterisk was built" + }, + "system": { + "required": false, + "type": "SystemInfo", + "description": "Info about the system running Asterisk" + }, + "config": { + "required": false, + "type": "ConfigInfo", + "description": "Info about Asterisk configuration" + }, + "status": { + "required": false, + "type": "StatusInfo", + "description": "Info about Asterisk status" + } + } + }, + "Variable": { + "id": "Variable", + "description": "The value of a channel variable", + "properties": { + "value": { + "required": true, + "type": "string", + "description": "The value of the variable requested" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_7_0/bridges.json b/codegen/src/main/resources/codegen-data/ari_1_7_0/bridges.json new file mode 100644 index 00000000..b608be6d --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_7_0/bridges.json @@ -0,0 +1,656 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.7.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/bridges.{format}", + "apis": [ + { + "path": "/bridges", + "description": "Active bridges", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all active bridges in Asterisk.", + "nickname": "list", + "responseClass": "List[Bridge]" + }, + { + "httpMethod": "POST", + "summary": "Create a new bridge.", + "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", + "nickname": "create", + "responseClass": "Bridge", + "parameters": [ + { + "name": "type", + "description": "Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "bridgeId", + "description": "Unique ID to give to the bridge being created.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Name to give to the bridge being created.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}", + "description": "Individual bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Create a new bridge or updates an existing one.", + "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", + "nickname": "createWithId", + "responseClass": "Bridge", + "parameters": [ + { + "name": "type", + "description": "Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media) to set.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "bridgeId", + "description": "Unique ID to give to the bridge being created.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Set the name of the bridge.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ] + }, + { + "httpMethod": "GET", + "summary": "Get bridge details.", + "nickname": "get", + "responseClass": "Bridge", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Shut down a bridge.", + "notes": "If any channels are in this bridge, they will be removed and resume whatever they were doing beforehand.", + "nickname": "destroy", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/addChannel", + "description": "Add a channel to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Add a channel to a bridge.", + "nickname": "addChannel", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channel", + "description": "Ids of channels to add to bridge", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "role", + "description": "Channel's role in the bridge", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Channel not found" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application; Channel currently recording" + }, + { + "code": 422, + "reason": "Channel not in Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/removeChannel", + "description": "Remove a channel from a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Remove a channel from a bridge.", + "nickname": "removeChannel", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channel", + "description": "Ids of channels to remove from bridge", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Channel not found" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + }, + { + "code": 422, + "reason": "Channel not in this bridge" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/moh", + "description": "Play music on hold to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play music on hold to a bridge or change the MOH class that is playing.", + "nickname": "startMoh", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "mohClass", + "description": "Channel's id", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing music on hold to a bridge.", + "notes": "This will only stop music on hold being played via POST bridges/{bridgeId}/moh.", + "nickname": "stopMoh", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/play", + "description": "Play media to the participants of a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media on a bridge.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "play", + "responseClass": "Playback", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media's URI to play.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of media to skip before playing.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "playbackId", + "description": "Playback Id.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/play/{playbackId}", + "description": "Play media to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media on a bridge.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "playWithId", + "responseClass": "Playback", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media's URI to play.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of media to skip before playing.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + + } + ] + }, + { + "path": "/bridges/{bridgeId}/record", + "description": "Record audio on a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start a recording.", + "notes": "This records the mixed audio from all channels participating in this bridge.", + "nickname": "record", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Recording's filename", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "maxDurationSeconds", + "description": "Maximum duration of the recording, in seconds. 0 for no limit.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "maxSilenceSeconds", + "description": "Maximum duration of silence, in seconds. 0 for no limit.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "ifExists", + "description": "Action to take if a recording with the same name already exists.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "fail", + "allowableValues": { + "valueType": "LIST", + "values": [ + "fail", + "overwrite", + "append" + ] + } + }, + { + "name": "beep", + "description": "Play beep when recording begins", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "terminateOn", + "description": "DTMF input to terminate recording.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "any", + "*", + "#" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge is not in a Stasis application; A recording with the same name already exists on the system and can not be overwritten because it is in progress or ifExists=fail" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + } + ], + "models": { + "Bridge": { + "id": "Bridge", + "description": "The merging of media from one or more channels.\n\nEveryone on the bridge receives the same audio.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for this bridge", + "required": true + }, + "technology": { + "type": "string", + "description": "Name of the current bridging technology", + "required": true + }, + "bridge_type": { + "type": "string", + "description": "Type of bridge technology", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "mixing", + "holding" + ] + } + }, + "bridge_class": { + "type": "string", + "description": "Bridging class", + "required": true + }, + "creator": { + "type": "string", + "description": "Entity that created the bridge", + "required": true + }, + "name": { + "type": "string", + "description": "Name the creator gave the bridge", + "required": true + }, + "channels": { + "type": "List[string]", + "description": "Ids of channels participating in this bridge", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_7_0/channels.json b/codegen/src/main/resources/codegen-data/ari_1_7_0/channels.json new file mode 100644 index 00000000..bc0879b5 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_7_0/channels.json @@ -0,0 +1,1550 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.7.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/channels.{format}", + "apis": [ + { + "path": "/channels", + "description": "Active channels", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all active channels in Asterisk.", + "nickname": "list", + "responseClass": "List[Channel]" + }, + { + "httpMethod": "POST", + "summary": "Create a new channel (originate).", + "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.", + "nickname": "originate", + "responseClass": "Channel", + "parameters": [ + { + "name": "endpoint", + "description": "Endpoint to call.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to dial after the endpoint answers. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to dial after the endpoint answers. If omitted, uses 'default'. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to dial after the endpoint answers. If omitted, uses 1. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "long" + }, + { + "name": "label", + "description": "The label to dial after the endpoint answers. Will supersede 'priority' if provided. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The application that is subscribed to the originated channel. When the channel is answered, it will be passed to this Stasis application. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "callerId", + "description": "CallerID to use when dialing the endpoint or extension.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 30 + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "The unique id of the channel which is originating this one.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for originating a channel." + } + ] + } + ] + }, + { + "path": "/channels/{channelId}", + "description": "Active channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "Channel details.", + "nickname": "get", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + } + ] + }, + { + "httpMethod": "POST", + "summary": "Create a new channel (originate with id).", + "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.", + "nickname": "originateWithId", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "endpoint", + "description": "Endpoint to call.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to dial after the endpoint answers. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to dial after the endpoint answers. If omitted, uses 'default'. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to dial after the endpoint answers. If omitted, uses 1. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "long" + }, + { + "name": "label", + "description": "The label to dial after the endpoint answers. Will supersede 'priority' if provided. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The application that is subscribed to the originated channel. When the channel is answered, it will be passed to this Stasis application. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "callerId", + "description": "CallerID to use when dialing the endpoint or extension.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 30 + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "The unique id of the channel which is originating this one.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for originating a channel." + } + ] + + }, + { + "httpMethod": "DELETE", + "summary": "Delete (i.e. hangup) a channel.", + "nickname": "hangup", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "reason", + "description": "Reason for hanging up the channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defalutValue": "normal", + "allowableValues": { + "valueType": "LIST", + "values": [ + "normal", + "busy", + "congestion", + "no_answer" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid reason for hangup provided" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/continue", + "description": "Exit application; continue execution in the dialplan", + "operations": [ + { + "httpMethod": "POST", + "summary": "Exit application; continue execution in the dialplan.", + "nickname": "continueInDialplan", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "label", + "description": "The label to continue to - will supersede 'priority' if both are provided.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/redirect", + "description": "Inform the channel that it should redirect itself to a different location. Note that this will almost certainly cause the channel to exit the application.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Redirect the channel to a different location.", + "nickname": "redirect", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "endpoint", + "description": "The endpoint to redirect the channel to", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Endpoint parameter not provided" + }, + { + "code": 404, + "reason": "Channel or endpoint not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 422, + "reason": "Endpoint is not the same type as the channel" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/answer", + "description": "Answer a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Answer a channel.", + "nickname": "answer", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/ring", + "description": "Send a ringing indication to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Indicate ringing to a channel.", + "nickname": "ring", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop ringing indication on a channel if locally generated.", + "nickname": "ringStop", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/dtmf", + "description": "Send DTMF to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Send provided DTMF to a given channel.", + "nickname": "sendDTMF", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "dtmf", + "description": "DTMF To send.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "before", + "description": "Amount of time to wait before DTMF digits (specified in milliseconds) start.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0 + }, + { + "name": "between", + "description": "Amount of time in between DTMF digits (specified in milliseconds).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 100 + }, + { + "name": "duration", + "description": "Length of each DTMF digit (specified in milliseconds).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 100 + }, + { + "name": "after", + "description": "Amount of time to wait after DTMF digits (specified in milliseconds) end.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0 + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "DTMF is required" + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/mute", + "description": "Mute a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Mute a channel.", + "nickname": "mute", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "Direction in which to mute audio", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both", + "in", + "out" + ] + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unmute a channel.", + "nickname": "unmute", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "Direction in which to unmute audio", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both", + "in", + "out" + ] + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/hold", + "description": "Put a channel on hold", + "operations": [ + { + "httpMethod": "POST", + "summary": "Hold a channel.", + "nickname": "hold", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Remove a channel from hold.", + "nickname": "unhold", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/moh", + "description": "Play music on hold to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play music on hold to a channel.", + "notes": "Using media operations such as /play on a channel playing MOH in this manner will suspend MOH without resuming automatically. If continuing music on hold is desired, the stasis application must reinitiate music on hold.", + "nickname": "startMoh", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "mohClass", + "description": "Music on hold class to use", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing music on hold to a channel.", + "nickname": "stopMoh", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/silence", + "description": "Play silence to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play silence to a channel.", + "notes": "Using media operations such as /play on a channel playing silence in this manner will suspend silence without resuming automatically.", + "nickname": "startSilence", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing silence to a channel.", + "nickname": "stopSilence", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/play", + "description": "Play media to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "play", + "responseClass": "Playback", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media's URI to play.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of media to skip before playing.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000 + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/play/{playbackId}", + "description": "Play media to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media and specify the playbackId.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "playWithId", + "responseClass": "Playback", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media's URI to play.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of media to skip before playing.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000 + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/record", + "description": "Record audio from a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start a recording.", + "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.", + "nickname": "record", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Recording's filename", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "maxDurationSeconds", + "description": "Maximum duration of the recording, in seconds. 0 for no limit", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "maxSilenceSeconds", + "description": "Maximum duration of silence, in seconds. 0 for no limit", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "ifExists", + "description": "Action to take if a recording with the same name already exists.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "fail", + "allowableValues": { + "valueType": "LIST", + "values": [ + "fail", + "overwrite", + "append" + ] + } + }, + { + "name": "beep", + "description": "Play beep when recording begins", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "terminateOn", + "description": "DTMF input to terminate recording", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "any", + "*", + "#" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "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" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/variable", + "description": "Variables on a channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the value of a channel variable or function.", + "nickname": "getChannelVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The channel variable or function to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Channel or variable not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "POST", + "summary": "Set the value of a channel variable or function.", + "nickname": "setChannelVar", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The channel variable or function to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/snoop", + "description": "Snoop (spy/whisper) on a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start snooping.", + "notes": "Snoop (spy/whisper) on a specific channel.", + "nickname": "snoopChannel", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "spy", + "description": "Direction of audio to spy on", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "whisper", + "description": "Direction of audio to whisper into", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "app", + "description": "Application the snooping channel is placed into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "snoopId", + "description": "Unique ID to assign to snooping channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/snoop/{snoopId}", + "description": "Snoop (spy/whisper) on a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start snooping.", + "notes": "Snoop (spy/whisper) on a specific channel.", + "nickname": "snoopChannelWithId", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "snoopId", + "description": "Unique ID to assign to snooping channel", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "spy", + "description": "Direction of audio to spy on", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "whisper", + "description": "Direction of audio to whisper into", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "app", + "description": "Application the snooping channel is placed into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + } + ], + "models": { + "Dialed": { + "id": "Dialed", + "description": "Dialed channel information.", + "properties": {} + }, + "DialplanCEP": { + "id": "DialplanCEP", + "description": "Dialplan location (context/extension/priority)", + "properties": { + "context": { + "required": true, + "type": "string", + "description": "Context in the dialplan" + }, + "exten": { + "required": true, + "type": "string", + "description": "Extension in the dialplan" + }, + "priority": { + "required": true, + "type": "long", + "description": "Priority in the dialplan" + } + } + }, + "CallerID": { + "id": "CallerID", + "description": "Caller identification", + "properties": { + "name": { + "required": true, + "type": "string" + }, + "number": { + "required": true, + "type": "string" + } + } + }, + "Channel": { + "id": "Channel", + "description": "A specific communication connection between Asterisk and an Endpoint.", + "properties": { + "id": { + "required": true, + "type": "string", + "description": "Unique identifier of the channel.\n\nThis is the same as the Uniqueid field in AMI." + }, + "name": { + "required": true, + "type": "string", + "description": "Name of the channel (i.e. SIP/foo-0000a7e3)" + }, + "state": { + "required": true, + "type": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "Down", + "Rsrved", + "OffHook", + "Dialing", + "Ring", + "Ringing", + "Up", + "Busy", + "Dialing Offhook", + "Pre-ring", + "Unknown" + ] + } + }, + "caller": { + "required": true, + "type": "CallerID" + }, + "connected": { + "required": true, + "type": "CallerID" + }, + "accountcode": { + "required": true, + "type": "string" + }, + "dialplan": { + "required": true, + "type": "DialplanCEP", + "description": "Current location in the dialplan" + }, + "creationtime": { + "required": true, + "type": "Date", + "description": "Timestamp when channel was created" + }, + "language": { + "required": true, + "type": "string", + "description": "The default spoken language" + } + } + } + } +} diff --git a/codegen-data/ari_1_10_0/deviceStates.json b/codegen/src/main/resources/codegen-data/ari_1_7_0/deviceStates.json similarity index 100% rename from codegen-data/ari_1_10_0/deviceStates.json rename to codegen/src/main/resources/codegen-data/ari_1_7_0/deviceStates.json diff --git a/codegen-data/ari_1_10_0/endpoints.json b/codegen/src/main/resources/codegen-data/ari_1_7_0/endpoints.json similarity index 100% rename from codegen-data/ari_1_10_0/endpoints.json rename to codegen/src/main/resources/codegen-data/ari_1_7_0/endpoints.json diff --git a/codegen/src/main/resources/codegen-data/ari_1_7_0/events.json b/codegen/src/main/resources/codegen-data/ari_1_7_0/events.json new file mode 100644 index 00000000..392b0ac7 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_7_0/events.json @@ -0,0 +1,758 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.7.0", + "swaggerVersion": "1.2", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/events.{format}", + "apis": [ + { + "path": "/events", + "description": "Events from Asterisk to applications", + "operations": [ + { + "httpMethod": "GET", + "upgrade": "websocket", + "websocketProtocol": "ari", + "summary": "WebSocket connection for events.", + "nickname": "eventWebsocket", + "responseClass": "Message", + "parameters": [ + { + "name": "app", + "description": "Applications to subscribe to.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ] + } + ] + }, + { + "path": "/events/user/{eventName}", + "description": "Stasis application user events", + "operations": [ + { + "httpMethod": "POST", + "summary": "Generate a user event.", + "nickname": "userEvent", + "responseClass": "void", + "parameters": [ + { + "name": "eventName", + "description": "Event name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "application", + "description": "The name of the application that will receive this event", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "source", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}/{resource}, deviceState:{deviceName}", + "paramType": "query", + "required": false, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds custom key/value pairs to add to the user event. Ex. { \"variables\": { \"key\": \"value\" } }", + "paramType": "body", + "required": false, + "allowMultiple": false, + "dataType": "containers" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 422, + "reason": "Event source not found." + }, + { + "code": 400, + "reason": "Invalid even tsource URI or userevent data." + } + ] + } + ] + } + ], + "models": { + "Message": { + "id": "Message", + "description": "Base type for errors and events", + "discriminator": "type", + "properties": { + "type": { + "type": "string", + "required": true, + "description": "Indicates the type of this message." + } + }, + "subTypes": [ + "MissingParams", + "Event" + ] + }, + "MissingParams": { + "id": "MissingParams", + "description": "Error event sent when required params are missing.", + "properties": { + "params": { + "required": true, + "type": "List[string]", + "description": "A list of the missing parameters" + } + } + }, + "Event": { + "id": "Event", + "description": "Base type for asynchronous events from Asterisk.", + "properties": { + "application": { + "type": "string", + "description": "Name of the application receiving the event.", + "required": true + }, + "timestamp": { + "type": "Date", + "description": "Time at which this event was created.", + "required": false + } + }, + "subTypes": [ + "DeviceStateChanged", + "PlaybackStarted", + "PlaybackFinished", + "RecordingStarted", + "RecordingFinished", + "RecordingFailed", + "ApplicationReplaced", + "BridgeCreated", + "BridgeDestroyed", + "BridgeMerged", + "BridgeBlindTransfer", + "BridgeAttendedTransfer", + "ChannelCreated", + "ChannelDestroyed", + "ChannelEnteredBridge", + "ChannelLeftBridge", + "ChannelStateChange", + "ChannelDtmfReceived", + "ChannelDialplan", + "ChannelCallerId", + "ChannelUserevent", + "ChannelHangupRequest", + "ChannelVarset", + "ChannelTalkingStarted", + "ChannelTalkingFinished", + "ChannelHold", + "ChannelUnhold", + "EndpointStateChange", + "Dial", + "StasisEnd", + "StasisStart", + "TextMessageReceived", + "ChannelConnectedLine" + ] + }, + "DeviceStateChanged": { + "id": "DeviceStateChanged", + "description": "Notification that a device state has changed.", + "properties": { + "device_state": { + "type": "DeviceState", + "description": "Device state object", + "required": true + } + } + }, + "PlaybackStarted": { + "id": "PlaybackStarted", + "description": "Event showing the start of a media playback operation.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "PlaybackFinished": { + "id": "PlaybackFinished", + "description": "Event showing the completion of a media playback operation.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "RecordingStarted": { + "id": "RecordingStarted", + "description": "Event showing the start of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "RecordingFinished": { + "id": "RecordingFinished", + "description": "Event showing the completion of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "RecordingFailed": { + "id": "RecordingFailed", + "description": "Event showing failure of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "ApplicationReplaced": { + "id": "ApplicationReplaced", + "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.", + "properties": {} + }, + "BridgeCreated": { + "id": "BridgeCreated", + "description": "Notification that a bridge has been created.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeDestroyed": { + "id": "BridgeDestroyed", + "description": "Notification that a bridge has been destroyed.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeMerged": { + "id": "BridgeMerged", + "description": "Notification that one bridge has merged into another.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "bridge_from": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeBlindTransfer": { + "id": "BridgeBlindTransfer", + "description": "Notification that a blind transfer has occurred.", + "properties": { + "channel": { + "description": "The channel performing the blind transfer", + "required": true, + "type": "Channel" + }, + "replace_channel": { + "description": "The channel that is replacing transferer when the transferee(s) can not be transferred directly", + "required": false, + "type": "Channel" + }, + "transferee": { + "description": "The channel that is being transferred", + "required": false, + "type": "Channel" + }, + "exten": { + "description": "The extension transferred to", + "required": true, + "type": "string" + }, + "context": { + "description": "The context transferred to", + "required": true, + "type": "string" + }, + "result": { + "description": "The result of the transfer attempt", + "required": true, + "type": "string" + }, + "is_external": { + "description": "Whether the transfer was externally initiated or not", + "required": true, + "type": "boolean" + }, + "bridge": { + "description": "The bridge being transferred", + "type": "Bridge" + } + } + }, + "BridgeAttendedTransfer": { + "id": "BridgeAttendedTransfer", + "description": "Notification that an attended transfer has occurred.", + "properties": { + "transferer_first_leg": { + "description": "First leg of the transferer", + "required": true, + "type": "Channel" + }, + "transferer_second_leg": { + "description": "Second leg of the transferer", + "required": true, + "type": "Channel" + }, + "replace_channel": { + "description": "The channel that is replacing transferer_first_leg in the swap", + "required": false, + "type": "Channel" + }, + "transferee": { + "description": "The channel that is being transferred", + "required": false, + "type": "Channel" + }, + "transfer_target": { + "description": "The channel that is being transferred to", + "required": false, + "type": "Channel" + }, + "result": { + "description": "The result of the transfer attempt", + "required": true, + "type": "string" + }, + "is_external": { + "description": "Whether the transfer was externally initiated or not", + "required": true, + "type": "boolean" + }, + "transferer_first_leg_bridge": { + "description": "Bridge the transferer first leg is in", + "type": "Bridge" + }, + "transferer_second_leg_bridge": { + "description": "Bridge the transferer second leg is in", + "type": "Bridge" + }, + "destination_type": { + "description": "How the transfer was accomplished", + "required": true, + "type": "string" + }, + "destination_bridge": { + "description": "Bridge that survived the merge result", + "type": "string" + }, + "destination_application": { + "description": "Application that has been transferred into", + "type": "string" + }, + "destination_link_first_leg": { + "description": "First leg of a link transfer result", + "type": "Channel" + }, + "destination_link_second_leg": { + "description": "Second leg of a link transfer result", + "type": "Channel" + }, + "destination_threeway_channel": { + "description": "Transferer channel that survived the threeway result", + "type": "Channel" + }, + "destination_threeway_bridge": { + "description": "Bridge that survived the threeway result", + "type": "Bridge" + } + } + }, + "ChannelCreated": { + "id": "ChannelCreated", + "description": "Notification that a channel has been created.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelDestroyed": { + "id": "ChannelDestroyed", + "description": "Notification that a channel has been destroyed.", + "properties": { + "cause": { + "required": true, + "description": "Integer representation of the cause of the hangup", + "type": "int" + }, + "cause_txt": { + "required": true, + "description": "Text representation of the cause of the hangup", + "type": "string" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelEnteredBridge": { + "id": "ChannelEnteredBridge", + "description": "Notification that a channel has entered a bridge.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "channel": { + "type": "Channel" + } + } + }, + "ChannelLeftBridge": { + "id": "ChannelLeftBridge", + "description": "Notification that a channel has left a bridge.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelStateChange": { + "id": "ChannelStateChange", + "description": "Notification of a channel's state change.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelDtmfReceived": { + "id": "ChannelDtmfReceived", + "description": "DTMF received on a channel.\n\nThis event is sent when the DTMF ends. There is no notification about the start of DTMF", + "properties": { + "digit": { + "required": true, + "type": "string", + "description": "DTMF digit received (0-9, A-E, # or *)" + }, + "duration_ms": { + "required": true, + "type": "int", + "description": "Number of milliseconds DTMF was received" + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which DTMF was received" + } + } + }, + "ChannelDialplan": { + "id": "ChannelDialplan", + "description": "Channel changed location in the dialplan.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that changed dialplan location." + }, + "dialplan_app": { + "required": true, + "type": "string", + "description": "The application about to be executed." + }, + "dialplan_app_data": { + "required": true, + "type": "string", + "description": "The data to be passed to the application." + } + } + }, + "ChannelCallerId": { + "id": "ChannelCallerId", + "description": "Channel changed Caller ID.", + "properties": { + "caller_presentation": { + "required": true, + "type": "int", + "description": "The integer representation of the Caller Presentation value." + }, + "caller_presentation_txt": { + "required": true, + "type": "string", + "description": "The text representation of the Caller Presentation value." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that changed Caller ID." + } + } + }, + "ChannelUserevent": { + "id": "ChannelUserevent", + "description": "User-generated event with additional user-defined fields in the object.", + "properties": { + "eventname": { + "required": true, + "type": "string", + "description": "The name of the user event." + }, + "channel": { + "required": false, + "type": "Channel", + "description": "A channel that is signaled with the user event." + }, + "bridge": { + "required": false, + "type": "Bridge", + "description": "A bridge that is signaled with the user event." + }, + "endpoint": { + "required": false, + "type": "Endpoint", + "description": "A endpoint that is signaled with the user event." + }, + "userevent": { + "required": true, + "type": "object", + "description": "Custom Userevent data" + } + } + }, + "ChannelHangupRequest": { + "id": "ChannelHangupRequest", + "description": "A hangup was requested on the channel.", + "properties": { + "cause": { + "type": "int", + "description": "Integer representation of the cause of the hangup." + }, + "soft": { + "type": "boolean", + "description": "Whether the hangup request was a soft hangup request." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which the hangup was requested." + } + } + }, + "ChannelVarset": { + "id": "ChannelVarset", + "description": "Channel variable changed.", + "properties": { + "variable": { + "required": true, + "type": "string", + "description": "The variable that changed." + }, + "value": { + "required": true, + "type": "string", + "description": "The new value of the variable." + }, + "channel": { + "required": false, + "type": "Channel", + "description": "The channel on which the variable was set.\n\nIf missing, the variable is a global variable." + } + } + }, + "ChannelHold": { + "id": "ChannelHold", + "description": "A channel initiated a media hold.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that initiated the hold event." + }, + "musicclass": { + "required": false, + "type": "string", + "description": "The music on hold class that the initiator requested." + } + } + }, + "ChannelUnhold": { + "id": "ChannelUnhold", + "description": "A channel initiated a media unhold.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that initiated the unhold event." + } + } + }, + "ChannelTalkingStarted": { + "id": "ChannelTalkingStarted", + "description": "Talking was detected on the channel.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which talking started." + } + } + }, + "ChannelTalkingFinished": { + "id": "ChannelTalkingFinished", + "description": "Talking is no longer detected on the channel.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which talking completed." + }, + "duration": { + "required": true, + "type": "int", + "description": "The length of time, in milliseconds, that talking was detected on the channel" + } + } + }, + "EndpointStateChange": { + "id": "EndpointStateChange", + "description": "Endpoint state changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + } + } + }, + "Dial": { + "id": "Dial", + "description": "Dialing state has changed.", + "properties": { + "caller": { + "required": false, + "type": "Channel", + "description": "The calling channel." + }, + "peer": { + "required": true, + "type": "Channel", + "description": "The dialed channel." + }, + "forward": { + "required": false, + "type": "string", + "description": "Forwarding target requested by the original dialed channel." + }, + "forwarded": { + "required": false, + "type": "Channel", + "description": "Channel that the caller has been forwarded to." + }, + "dialstring": { + "required": false, + "type": "string", + "description": "The dial string for calling the peer channel." + }, + "dialstatus": { + "required": true, + "type": "string", + "description": "Current status of the dialing attempt to the peer." + } + } + }, + "StasisEnd": { + "id": "StasisEnd", + "description": "Notification that a channel has left a Stasis application.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "StasisStart": { + "id": "StasisStart", + "description": "Notification that a channel has entered a Stasis application.", + "properties": { + "args": { + "required": true, + "type": "List[string]", + "description": "Arguments to the application" + }, + "channel": { + "required": true, + "type": "Channel" + }, + "replace_channel": { + "required": false, + "type": "Channel" + } + } + }, + "TextMessageReceived": { + "id": "TextMessageReceived", + "description": "A text message was received from an endpoint.", + "properties": { + "message": { + "required": true, + "type": "TextMessage" + }, + "endpoint": { + "required": false, + "type": "Endpoint" + } + } + }, + "ChannelConnectedLine": { + "id": "ChannelConnectedLine", + "description": "Channel changed Connected Line.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel whose connected line has changed." + } + } + } + } +} diff --git a/codegen-data/ari_1_10_0/mailboxes.json b/codegen/src/main/resources/codegen-data/ari_1_7_0/mailboxes.json similarity index 100% rename from codegen-data/ari_1_10_0/mailboxes.json rename to codegen/src/main/resources/codegen-data/ari_1_7_0/mailboxes.json diff --git a/codegen/src/main/resources/codegen-data/ari_1_7_0/playbacks.json b/codegen/src/main/resources/codegen-data/ari_1_7_0/playbacks.json new file mode 100644 index 00000000..63df3f24 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_7_0/playbacks.json @@ -0,0 +1,155 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.7.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/playbacks.{format}", + "apis": [ + { + "path": "/playbacks/{playbackId}", + "description": "Control object for a playback operation.", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a playback's details.", + "nickname": "get", + "responseClass": "Playback", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "The playback cannot be found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop a playback.", + "nickname": "stop", + "responseClass": "void", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "The playback cannot be found" + } + ] + } + ] + }, + { + "path": "/playbacks/{playbackId}/control", + "description": "Control object for a playback operation.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Control a playback.", + "nickname": "control", + "responseClass": "void", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "operation", + "description": "Operation to perform on the playback.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "restart", + "pause", + "unpause", + "reverse", + "forward" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "The provided operation parameter was invalid" + }, + { + "code": 404, + "reason": "The playback cannot be found" + }, + { + "code": 409, + "reason": "The operation cannot be performed in the playback's current state" + } +] + } + ] + } + ], + "models": { + "Playback": { + "id": "Playback", + "description": "Object representing the playback of media to a channel", + "properties": { + "id": { + "type": "string", + "description": "ID for this playback operation", + "required": true + }, + "media_uri": { + "type": "string", + "description": "URI for the media to play back.", + "required": true + }, + "target_uri": { + "type": "string", + "description": "URI for the channel or bridge to play the media on", + "required": true + }, + "language": { + "type": "string", + "description": "For media types that support multiple languages, the language requested for playback." + }, + "state": { + "type": "string", + "description": "Current state of the playback operation.", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "queued", + "playing", + "complete" + ] + } + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_1_7_0/recordings.json b/codegen/src/main/resources/codegen-data/ari_1_7_0/recordings.json new file mode 100644 index 00000000..51f0a21f --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_1_7_0/recordings.json @@ -0,0 +1,378 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "1.7.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/recordings.{format}", + "apis": [ + { + "path": "/recordings/stored", + "description": "Recordings", + "operations": [ + { + "httpMethod": "GET", + "summary": "List recordings that are complete.", + "nickname": "listStored", + "responseClass": "List[StoredRecording]" + } + ] + }, + { + "path": "/recordings/stored/{recordingName}", + "description": "Individual recording", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a stored recording's details.", + "nickname": "getStored", + "responseClass": "StoredRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Delete a stored recording.", + "nickname": "deleteStored", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/stored/{recordingName}/copy", + "description": "Copy an individual recording", + "operations": [ + { + "httpMethod": "POST", + "summary": "Copy a stored recording.", + "nickname": "copyStored", + "responseClass": "StoredRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording to copy", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "destinationRecordingName", + "description": "The destination name of the recording", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "A recording with the same name already exists on the system" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}", + "description": "A recording that is in progress", + "operations": [ + { + "httpMethod": "GET", + "summary": "List live recordings.", + "nickname": "getLive", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop a live recording and discard it.", + "nickname": "cancel", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/stop", + "operations": [ + { + "httpMethod": "POST", + "summary": "Stop a live recording and store it.", + "nickname": "stop", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/pause", + "operations": [ + { + "httpMethod": "POST", + "summary": "Pause a live recording.", + "notes": "Pausing a recording suspends silence detection, which will be restarted when the recording is unpaused. Paused time is not included in the accounting for maxDurationSeconds.", + "nickname": "pause", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unpause a live recording.", + "nickname": "unpause", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/mute", + "operations": [ + { + "httpMethod": "POST", + "summary": "Mute a live recording.", + "notes": "Muting a recording suspends silence detection, which will be restarted when the recording is unmuted.", + "nickname": "mute", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unmute a live recording.", + "nickname": "unmute", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + } + ] + } + ], + "models": { + "StoredRecording": { + "id": "StoredRecording", + "description": "A past recording that may be played back.", + "properties": { + "name": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + }, + "LiveRecording": { + "id": "LiveRecording", + "description": "A recording that is in progress", + "properties": { + "name": { + "required": true, + "type": "string", + "description": "Base name for the recording" + }, + "format": { + "required": true, + "type": "string", + "description": "Recording format (wav, gsm, etc.)" + }, + "target_uri": { + "required": true, + "type": "string", + "description": "URI for the channel or bridge being recorded" + }, + "state": { + "required": true, + "type": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "queued", + "recording", + "paused", + "done", + "failed", + "canceled" + ] + } + }, + "duration": { + "required": false, + "type": "int", + "description": "Duration in seconds of the recording" + }, + "talking_duration": { + "required": false, + "type": "int", + "description": "Duration of talking, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds." + }, + "silence_duration": { + "required": false, + "type": "int", + "description": "Duration of silence, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds." + }, + "cause": { + "required": false, + "type": "string", + "description": "Cause for recording failure if failed" + } + } + } + } +} diff --git a/codegen-data/ari_1_10_0/sounds.json b/codegen/src/main/resources/codegen-data/ari_1_7_0/sounds.json similarity index 100% rename from codegen-data/ari_1_10_0/sounds.json rename to codegen/src/main/resources/codegen-data/ari_1_7_0/sounds.json diff --git a/codegen-data/ari_1_8_0/applications.json b/codegen/src/main/resources/codegen-data/ari_1_8_0/applications.json similarity index 100% rename from codegen-data/ari_1_8_0/applications.json rename to codegen/src/main/resources/codegen-data/ari_1_8_0/applications.json diff --git a/codegen-data/ari_1_8_0/asterisk.json b/codegen/src/main/resources/codegen-data/ari_1_8_0/asterisk.json similarity index 100% rename from codegen-data/ari_1_8_0/asterisk.json rename to codegen/src/main/resources/codegen-data/ari_1_8_0/asterisk.json diff --git a/codegen-data/ari_1_8_0/bridges.json b/codegen/src/main/resources/codegen-data/ari_1_8_0/bridges.json similarity index 100% rename from codegen-data/ari_1_8_0/bridges.json rename to codegen/src/main/resources/codegen-data/ari_1_8_0/bridges.json diff --git a/codegen-data/ari_1_8_0/channels.json b/codegen/src/main/resources/codegen-data/ari_1_8_0/channels.json similarity index 100% rename from codegen-data/ari_1_8_0/channels.json rename to codegen/src/main/resources/codegen-data/ari_1_8_0/channels.json diff --git a/codegen-data/ari_1_8_0/deviceStates.json b/codegen/src/main/resources/codegen-data/ari_1_8_0/deviceStates.json similarity index 100% rename from codegen-data/ari_1_8_0/deviceStates.json rename to codegen/src/main/resources/codegen-data/ari_1_8_0/deviceStates.json diff --git a/codegen-data/ari_1_8_0/endpoints.json b/codegen/src/main/resources/codegen-data/ari_1_8_0/endpoints.json similarity index 100% rename from codegen-data/ari_1_8_0/endpoints.json rename to codegen/src/main/resources/codegen-data/ari_1_8_0/endpoints.json diff --git a/codegen-data/ari_1_8_0/events.json b/codegen/src/main/resources/codegen-data/ari_1_8_0/events.json similarity index 100% rename from codegen-data/ari_1_8_0/events.json rename to codegen/src/main/resources/codegen-data/ari_1_8_0/events.json diff --git a/codegen-data/ari_1_8_0/mailboxes.json b/codegen/src/main/resources/codegen-data/ari_1_8_0/mailboxes.json similarity index 100% rename from codegen-data/ari_1_8_0/mailboxes.json rename to codegen/src/main/resources/codegen-data/ari_1_8_0/mailboxes.json diff --git a/codegen-data/ari_1_8_0/playbacks.json b/codegen/src/main/resources/codegen-data/ari_1_8_0/playbacks.json similarity index 100% rename from codegen-data/ari_1_8_0/playbacks.json rename to codegen/src/main/resources/codegen-data/ari_1_8_0/playbacks.json diff --git a/codegen-data/ari_1_8_0/recordings.json b/codegen/src/main/resources/codegen-data/ari_1_8_0/recordings.json similarity index 100% rename from codegen-data/ari_1_8_0/recordings.json rename to codegen/src/main/resources/codegen-data/ari_1_8_0/recordings.json diff --git a/codegen-data/ari_1_8_0/sounds.json b/codegen/src/main/resources/codegen-data/ari_1_8_0/sounds.json similarity index 100% rename from codegen-data/ari_1_8_0/sounds.json rename to codegen/src/main/resources/codegen-data/ari_1_8_0/sounds.json diff --git a/codegen-data/ari_1_9_0/applications.json b/codegen/src/main/resources/codegen-data/ari_1_9_0/applications.json similarity index 100% rename from codegen-data/ari_1_9_0/applications.json rename to codegen/src/main/resources/codegen-data/ari_1_9_0/applications.json diff --git a/codegen-data/ari_1_9_0/asterisk.json b/codegen/src/main/resources/codegen-data/ari_1_9_0/asterisk.json similarity index 100% rename from codegen-data/ari_1_9_0/asterisk.json rename to codegen/src/main/resources/codegen-data/ari_1_9_0/asterisk.json diff --git a/codegen-data/ari_1_9_0/bridges.json b/codegen/src/main/resources/codegen-data/ari_1_9_0/bridges.json similarity index 100% rename from codegen-data/ari_1_9_0/bridges.json rename to codegen/src/main/resources/codegen-data/ari_1_9_0/bridges.json diff --git a/codegen-data/ari_1_9_0/channels.json b/codegen/src/main/resources/codegen-data/ari_1_9_0/channels.json similarity index 100% rename from codegen-data/ari_1_9_0/channels.json rename to codegen/src/main/resources/codegen-data/ari_1_9_0/channels.json diff --git a/codegen-data/ari_1_9_0/deviceStates.json b/codegen/src/main/resources/codegen-data/ari_1_9_0/deviceStates.json similarity index 100% rename from codegen-data/ari_1_9_0/deviceStates.json rename to codegen/src/main/resources/codegen-data/ari_1_9_0/deviceStates.json diff --git a/codegen-data/ari_1_9_0/endpoints.json b/codegen/src/main/resources/codegen-data/ari_1_9_0/endpoints.json similarity index 100% rename from codegen-data/ari_1_9_0/endpoints.json rename to codegen/src/main/resources/codegen-data/ari_1_9_0/endpoints.json diff --git a/codegen-data/ari_1_9_0/events.json b/codegen/src/main/resources/codegen-data/ari_1_9_0/events.json similarity index 100% rename from codegen-data/ari_1_9_0/events.json rename to codegen/src/main/resources/codegen-data/ari_1_9_0/events.json diff --git a/codegen-data/ari_1_9_0/mailboxes.json b/codegen/src/main/resources/codegen-data/ari_1_9_0/mailboxes.json similarity index 100% rename from codegen-data/ari_1_9_0/mailboxes.json rename to codegen/src/main/resources/codegen-data/ari_1_9_0/mailboxes.json diff --git a/codegen-data/ari_1_9_0/playbacks.json b/codegen/src/main/resources/codegen-data/ari_1_9_0/playbacks.json similarity index 100% rename from codegen-data/ari_1_9_0/playbacks.json rename to codegen/src/main/resources/codegen-data/ari_1_9_0/playbacks.json diff --git a/codegen-data/ari_1_9_0/recordings.json b/codegen/src/main/resources/codegen-data/ari_1_9_0/recordings.json similarity index 100% rename from codegen-data/ari_1_9_0/recordings.json rename to codegen/src/main/resources/codegen-data/ari_1_9_0/recordings.json diff --git a/codegen-data/ari_1_9_0/sounds.json b/codegen/src/main/resources/codegen-data/ari_1_9_0/sounds.json similarity index 100% rename from codegen-data/ari_1_9_0/sounds.json rename to codegen/src/main/resources/codegen-data/ari_1_9_0/sounds.json diff --git a/codegen/src/main/resources/codegen-data/ari_2_0_0/applications.json b/codegen/src/main/resources/codegen-data/ari_2_0_0/applications.json new file mode 100644 index 00000000..cdd69c41 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_2_0_0/applications.json @@ -0,0 +1,172 @@ +{ + "_copyright": "Copyright (C) 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/applications.{format}", + "apis": [ + { + "path": "/applications", + "description": "Stasis applications", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all applications.", + "nickname": "list", + "responseClass": "List[Application]" + } + ] + }, + { + "path": "/applications/{applicationName}", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get details of an application.", + "nickname": "get", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Application does not exist." + } + ] + } + ] + }, + { + "path": "/applications/{applicationName}/subscription", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "POST", + "summary": "Subscribe an application to a event source.", + "notes": "Returns the state of the application after the subscriptions have changed", + "nickname": "subscribe", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "eventSource", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing parameter." + }, + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 422, + "reason": "Event source does not exist." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unsubscribe an application from an event source.", + "notes": "Returns the state of the application after the subscriptions have changed", + "nickname": "unsubscribe", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "eventSource", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing parameter; event source scheme not recognized." + }, + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 409, + "reason": "Application not subscribed to event source." + }, + { + "code": 422, + "reason": "Event source does not exist." + } + ] + } + ] + } + ], + "models": { + "Application": { + "id": "Application", + "description": "Details of a Stasis application", + "properties": { + "name": { + "type": "string", + "description": "Name of this application", + "required": true + }, + "channel_ids": { + "type": "List[string]", + "description": "Id's for channels subscribed to.", + "required": true + }, + "bridge_ids": { + "type": "List[string]", + "description": "Id's for bridges subscribed to.", + "required": true + }, + "endpoint_ids": { + "type": "List[string]", + "description": "{tech}/{resource} for endpoints subscribed to.", + "required": true + }, + "device_names": { + "type": "List[string]", + "description": "Names of the devices subscribed to.", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_2_0_0/asterisk.json b/codegen/src/main/resources/codegen-data/ari_2_0_0/asterisk.json new file mode 100644 index 00000000..f40bf5c6 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_2_0_0/asterisk.json @@ -0,0 +1,692 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/asterisk.{format}", + "apis": [ + { + "path": "/asterisk/config/dynamic/{configClass}/{objectType}/{id}", + "description": "Asterisk dynamic configuration", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve a dynamic configuration object.", + "nickname": "getObject", + "responseClass": "List[ConfigTuple]", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to retrieve.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to retrieve.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "{configClass|objectType|id} not found" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Create or update a dynamic configuration object.", + "nickname": "updateObject", + "responseClass": "List[ConfigTuple]", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to create or update.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to create or update.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "fields", + "description": "The body object should have a value that is a list of ConfigTuples, which provide the fields to update. Ex. [ { \"attribute\": \"directmedia\", \"value\": \"false\" } ]", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Bad request body" + }, + { + "code": 403, + "reason": "Could not create or update object" + }, + { + "code": 404, + "reason": "{configClass|objectType} not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Delete a dynamic configuration object.", + "nickname": "deleteObject", + "responseClass": "void", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to delete.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to delete.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 403, + "reason": "Could not delete object" + }, + { + "code": 404, + "reason": "{configClass|objectType|id} not found" + } + ] + } + ] + }, + { + "path": "/asterisk/info", + "description": "Asterisk system information (similar to core show settings)", + "operations": [ + { + "httpMethod": "GET", + "summary": "Gets Asterisk system information.", + "nickname": "getInfo", + "responseClass": "AsteriskInfo", + "parameters": [ + { + "name": "only", + "description": "Filter information returned", + "paramType": "query", + "required": false, + "allowMultiple": true, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "build", + "system", + "config", + "status" + ] + } + } + ] + } + ] + }, + { + "path": "/asterisk/modules", + "description": "Asterisk modules", + "operations": [ + { + "httpMethod": "GET", + "summary": "List Asterisk modules.", + "nickname": "listModules", + "responseClass": "List[Module]" + } + ] + }, + { + "path": "/asterisk/modules/{moduleName}", + "description": "Asterisk module", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get Asterisk module information.", + "nickname": "getModule", + "responseClass": "Module", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module could not be found in running modules." + }, + { + "code": 409, + "reason": "Module information could not be retrieved." + } + ] + }, + { + "httpMethod": "POST", + "summary": "Load an Asterisk module.", + "nickname": "loadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 409, + "reason": "Module could not be loaded." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unload an Asterisk module.", + "nickname": "unloadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module not found in running modules." + }, + { + "code": 409, + "reason": "Module could not be unloaded." + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Reload an Asterisk module.", + "nickname": "reloadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module not found in running modules." + }, + { + "code": 409, + "reason": "Module could not be reloaded." + } + ] + } + ] + }, + { + "path": "/asterisk/logging", + "description": "Asterisk log channels", + "operations": [ + { + "httpMethod": "GET", + "summary": "Gets Asterisk log channel information.", + "nickname": "listLogChannels", + "responseClass": "List[LogChannel]" + } + ] + }, + { + "path": "/asterisk/logging/{logChannelName}", + "description": "Asterisk log channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Adds a log channel.", + "nickname": "addLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "The log channel to add", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "configuration", + "description": "levels of the log channel", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Bad request body" + }, + { + "code": 409, + "reason": "Log channel could not be created." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Deletes a log channel.", + "nickname": "deleteLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "Log channels name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Log channel does not exist." + } + ] + } + ] + }, + { + "path": "/asterisk/logging/{logChannelName}/rotate", + "description": "Asterisk log channel", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Rotates a log channel.", + "nickname": "rotateLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "Log channel's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Log channel does not exist." + } + ] + } + ] + }, + { + "path": "/asterisk/variable", + "description": "Global variables", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the value of a global variable.", + "nickname": "getGlobalVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "variable", + "description": "The variable to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + } + ] + }, + { + "httpMethod": "POST", + "summary": "Set the value of a global variable.", + "nickname": "setGlobalVar", + "responseClass": "void", + "parameters": [ + { + "name": "variable", + "description": "The variable to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + } + ] + } + ] + } + ], + "models": { + "BuildInfo": { + "id": "BuildInfo", + "description": "Info about how Asterisk was built", + "properties": { + "os": { + "required": true, + "type": "string", + "description": "OS Asterisk was built on." + }, + "kernel": { + "required": true, + "type": "string", + "description": "Kernel version Asterisk was built on." + }, + "options": { + "required": true, + "type": "string", + "description": "Compile time options, or empty string if default." + }, + "machine": { + "required": true, + "type": "string", + "description": "Machine architecture (x86_64, i686, ppc, etc.)" + }, + "date": { + "required": true, + "type": "string", + "description": "Date and time when Asterisk was built." + }, + "user": { + "required": true, + "type": "string", + "description": "Username that build Asterisk" + } + } + }, + "SystemInfo": { + "id": "SystemInfo", + "description": "Info about Asterisk", + "properties": { + "version": { + "required": true, + "type": "string", + "description": "Asterisk version." + }, + "entity_id": { + "required": true, + "type": "string", + "description": "" + } + } + }, + "SetId": { + "id": "SetId", + "description": "Effective user/group id", + "properties": { + "user": { + "required": true, + "type": "string", + "description": "Effective user id." + }, + "group": { + "required": true, + "type": "string", + "description": "Effective group id." + } + } + }, + "ConfigInfo": { + "id": "ConfigInfo", + "description": "Info about Asterisk configuration", + "properties": { + "name": { + "required": true, + "type": "string", + "description": "Asterisk system name." + }, + "default_language": { + "required": true, + "type": "string", + "description": "Default language for media playback." + }, + "max_channels": { + "required": false, + "type": "int", + "description": "Maximum number of simultaneous channels." + }, + "max_open_files": { + "required": false, + "type": "int", + "description": "Maximum number of open file handles (files, sockets)." + }, + "max_load": { + "required": false, + "type": "double", + "description": "Maximum load avg on system." + }, + "setid": { + "required": true, + "type": "SetId", + "description": "Effective user/group id for running Asterisk." + } + } + }, + "StatusInfo": { + "id": "StatusInfo", + "description": "Info about Asterisk status", + "properties": { + "startup_time": { + "required": true, + "type": "Date", + "description": "Time when Asterisk was started." + }, + "last_reload_time": { + "required": true, + "type": "Date", + "description": "Time when Asterisk was last reloaded." + } + } + }, + "AsteriskInfo": { + "id": "AsteriskInfo", + "description": "Asterisk system information", + "properties": { + "build": { + "required": false, + "type": "BuildInfo", + "description": "Info about how Asterisk was built" + }, + "system": { + "required": false, + "type": "SystemInfo", + "description": "Info about the system running Asterisk" + }, + "config": { + "required": false, + "type": "ConfigInfo", + "description": "Info about Asterisk configuration" + }, + "status": { + "required": false, + "type": "StatusInfo", + "description": "Info about Asterisk status" + } + } + }, + "Module": { + "id": "Module", + "description": "Details of an Asterisk module", + "properties": { + "name": { + "type": "string", + "description": "The name of this module", + "required": true + }, + "description": { + "type": "string", + "description": "The description of this module", + "required": true + }, + "use_count": { + "type": "int", + "description": "The number of times this module is being used", + "required": true + }, + "status": { + "type": "string", + "description": "The running status of this module", + "required": true + }, + "support_level": { + "type": "string", + "description": "The support state of this module", + "required": true + } + } + }, + "LogChannel": { + "id": "LogChannel", + "description": "Details of an Asterisk log channel", + "properties": { + "channel": { + "type": "string", + "description": "The log channel path", + "required": true + }, + "type": { + "type": "string", + "description": "Types of logs for the log channel", + "required": true + }, + "status": { + "type": "string", + "description": "Whether or not a log type is enabled", + "required": true + }, + "configuration": { + "type": "string", + "description": "The various log levels", + "required": true + } + } + }, + "Variable": { + "id": "Variable", + "description": "The value of a channel variable", + "properties": { + "value": { + "required": true, + "type": "string", + "description": "The value of the variable requested" + } + } + }, + "ConfigTuple": { + "id": "ConfigTuple", + "description": "A key/value pair that makes up part of a configuration object.", + "properties": { + "attribute": { + "required": true, + "type": "string", + "description": "A configuration object attribute." + }, + "value": { + "required": true, + "type": "string", + "description": "The value for the attribute." + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_2_0_0/bridges.json b/codegen/src/main/resources/codegen-data/ari_2_0_0/bridges.json new file mode 100644 index 00000000..03a1e7a6 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_2_0_0/bridges.json @@ -0,0 +1,738 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/bridges.{format}", + "apis": [ + { + "path": "/bridges", + "description": "Active bridges", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all active bridges in Asterisk.", + "nickname": "list", + "responseClass": "List[Bridge]" + }, + { + "httpMethod": "POST", + "summary": "Create a new bridge.", + "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", + "nickname": "create", + "responseClass": "Bridge", + "parameters": [ + { + "name": "type", + "description": "Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "bridgeId", + "description": "Unique ID to give to the bridge being created.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Name to give to the bridge being created.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}", + "description": "Individual bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Create a new bridge or updates an existing one.", + "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", + "nickname": "createWithId", + "responseClass": "Bridge", + "parameters": [ + { + "name": "type", + "description": "Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media) to set.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "bridgeId", + "description": "Unique ID to give to the bridge being created.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Set the name of the bridge.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ] + }, + { + "httpMethod": "GET", + "summary": "Get bridge details.", + "nickname": "get", + "responseClass": "Bridge", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Shut down a bridge.", + "notes": "If any channels are in this bridge, they will be removed and resume whatever they were doing beforehand.", + "nickname": "destroy", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/addChannel", + "description": "Add a channel to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Add a channel to a bridge.", + "nickname": "addChannel", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channel", + "description": "Ids of channels to add to bridge", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "role", + "description": "Channel's role in the bridge", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Channel not found" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application; Channel currently recording" + }, + { + "code": 422, + "reason": "Channel not in Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/removeChannel", + "description": "Remove a channel from a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Remove a channel from a bridge.", + "nickname": "removeChannel", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channel", + "description": "Ids of channels to remove from bridge", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Channel not found" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + }, + { + "code": 422, + "reason": "Channel not in this bridge" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/videoSource/{channelId}", + "description": "Set a channel as the video source in a multi-party bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Set a channel as the video source in a multi-party mixing bridge. This operation has no effect on bridges with two or fewer participants.", + "nickname": "setVideoSource", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge or Channel not found" + }, + { + "code": 409, + "reason": "Channel not in Stasis application" + }, + { + "code": 422, + "reason": "Channel not in this Bridge" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/videoSource", + "description": "Removes any explicit video source", + "operations": [ + { + "httpMethod": "DELETE", + "summary": "Removes any explicit video source in a multi-party mixing bridge. This operation has no effect on bridges with two or fewer participants. When no explicit video source is set, talk detection will be used to determine the active video stream.", + "nickname": "clearVideoSource", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/moh", + "description": "Play music on hold to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play music on hold to a bridge or change the MOH class that is playing.", + "nickname": "startMoh", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "mohClass", + "description": "Channel's id", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing music on hold to a bridge.", + "notes": "This will only stop music on hold being played via POST bridges/{bridgeId}/moh.", + "nickname": "stopMoh", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/play", + "description": "Play media to the participants of a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media on a bridge.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "play", + "responseClass": "Playback", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "playbackId", + "description": "Playback Id.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/play/{playbackId}", + "description": "Play media to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media on a bridge.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "playWithId", + "responseClass": "Playback", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + + } + ] + }, + { + "path": "/bridges/{bridgeId}/record", + "description": "Record audio on a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start a recording.", + "notes": "This records the mixed audio from all channels participating in this bridge.", + "nickname": "record", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Recording's filename", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "maxDurationSeconds", + "description": "Maximum duration of the recording, in seconds. 0 for no limit.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "maxSilenceSeconds", + "description": "Maximum duration of silence, in seconds. 0 for no limit.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "ifExists", + "description": "Action to take if a recording with the same name already exists.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "fail", + "allowableValues": { + "valueType": "LIST", + "values": [ + "fail", + "overwrite", + "append" + ] + } + }, + { + "name": "beep", + "description": "Play beep when recording begins", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "terminateOn", + "description": "DTMF input to terminate recording.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "any", + "*", + "#" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge is not in a Stasis application; A recording with the same name already exists on the system and can not be overwritten because it is in progress or ifExists=fail" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + } + ], + "models": { + "Bridge": { + "id": "Bridge", + "description": "The merging of media from one or more channels.\n\nEveryone on the bridge receives the same audio.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for this bridge", + "required": true + }, + "technology": { + "type": "string", + "description": "Name of the current bridging technology", + "required": true + }, + "bridge_type": { + "type": "string", + "description": "Type of bridge technology", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "mixing", + "holding" + ] + } + }, + "bridge_class": { + "type": "string", + "description": "Bridging class", + "required": true + }, + "creator": { + "type": "string", + "description": "Entity that created the bridge", + "required": true + }, + "name": { + "type": "string", + "description": "Name the creator gave the bridge", + "required": true + }, + "channels": { + "type": "List[string]", + "description": "Ids of channels participating in this bridge", + "required": true + }, + "video_mode": { + "type": "string", + "description": "The video mode the bridge is using. One of 'none', 'talker', or 'single'.", + "required": false + }, + "video_source_id": { + "type": "string", + "description": "The ID of the channel that is the source of video in this bridge, if one exists.", + "required": false + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_2_0_0/channels.json b/codegen/src/main/resources/codegen-data/ari_2_0_0/channels.json new file mode 100644 index 00000000..a254d565 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_2_0_0/channels.json @@ -0,0 +1,1772 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/channels.{format}", + "apis": [ + { + "path": "/channels", + "description": "Active channels", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all active channels in Asterisk.", + "nickname": "list", + "responseClass": "List[Channel]" + }, + { + "httpMethod": "POST", + "summary": "Create a new channel (originate).", + "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.", + "nickname": "originate", + "responseClass": "Channel", + "parameters": [ + { + "name": "endpoint", + "description": "Endpoint to call.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to dial after the endpoint answers. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to dial after the endpoint answers. If omitted, uses 'default'. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to dial after the endpoint answers. If omitted, uses 1. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "long" + }, + { + "name": "label", + "description": "The label to dial after the endpoint answers. Will supersede 'priority' if provided. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The application that is subscribed to the originated channel. When the channel is answered, it will be passed to this Stasis application. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "callerId", + "description": "CallerID to use when dialing the endpoint or extension.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 30 + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "The unique id of the channel which is originating this one.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "formats", + "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for originating a channel." + }, + { + "code": 409, + "reason": "Channel with given unique ID already exists." + } + ] + } + ] + }, + { + "path": "/channels/create", + "description": "Create a channel and place it in a Stasis app, but do not dial the channel yet.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Create channel.", + "nickname": "create", + "responseClass": "Channel", + "parameters": [ + { + "name": "endpoint", + "description": "Endpoint for channel communication", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "Stasis Application to place channel into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "Unique ID of the calling channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "formats", + "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 409, + "reason": "Channel with given unique ID already exists." + } + ] + } + ] + }, + { + "path": "/channels/{channelId}", + "description": "Active channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "Channel details.", + "nickname": "get", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + } + ] + }, + { + "httpMethod": "POST", + "summary": "Create a new channel (originate with id).", + "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.", + "nickname": "originateWithId", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "endpoint", + "description": "Endpoint to call.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to dial after the endpoint answers. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to dial after the endpoint answers. If omitted, uses 'default'. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to dial after the endpoint answers. If omitted, uses 1. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "long" + }, + { + "name": "label", + "description": "The label to dial after the endpoint answers. Will supersede 'priority' if provided. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The application that is subscribed to the originated channel. When the channel is answered, it will be passed to this Stasis application. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "callerId", + "description": "CallerID to use when dialing the endpoint or extension.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 30 + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "The unique id of the channel which is originating this one.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "formats", + "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for originating a channel." + }, + { + "code": 409, + "reason": "Channel with given unique ID already exists." + } + ] + + }, + { + "httpMethod": "DELETE", + "summary": "Delete (i.e. hangup) a channel.", + "nickname": "hangup", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "reason", + "description": "Reason for hanging up the channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defalutValue": "normal", + "allowableValues": { + "valueType": "LIST", + "values": [ + "normal", + "busy", + "congestion", + "no_answer" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid reason for hangup provided" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/continue", + "description": "Exit application; continue execution in the dialplan", + "operations": [ + { + "httpMethod": "POST", + "summary": "Exit application; continue execution in the dialplan.", + "nickname": "continueInDialplan", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "label", + "description": "The label to continue to - will supersede 'priority' if both are provided.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/redirect", + "description": "Inform the channel that it should redirect itself to a different location. Note that this will almost certainly cause the channel to exit the application.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Redirect the channel to a different location.", + "nickname": "redirect", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "endpoint", + "description": "The endpoint to redirect the channel to", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Endpoint parameter not provided" + }, + { + "code": 404, + "reason": "Channel or endpoint not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 422, + "reason": "Endpoint is not the same type as the channel" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/answer", + "description": "Answer a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Answer a channel.", + "nickname": "answer", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/ring", + "description": "Send a ringing indication to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Indicate ringing to a channel.", + "nickname": "ring", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop ringing indication on a channel if locally generated.", + "nickname": "ringStop", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/dtmf", + "description": "Send DTMF to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Send provided DTMF to a given channel.", + "nickname": "sendDTMF", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "dtmf", + "description": "DTMF To send.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "before", + "description": "Amount of time to wait before DTMF digits (specified in milliseconds) start.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0 + }, + { + "name": "between", + "description": "Amount of time in between DTMF digits (specified in milliseconds).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 100 + }, + { + "name": "duration", + "description": "Length of each DTMF digit (specified in milliseconds).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 100 + }, + { + "name": "after", + "description": "Amount of time to wait after DTMF digits (specified in milliseconds) end.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0 + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "DTMF is required" + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/mute", + "description": "Mute a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Mute a channel.", + "nickname": "mute", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "Direction in which to mute audio", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both", + "in", + "out" + ] + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unmute a channel.", + "nickname": "unmute", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "Direction in which to unmute audio", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both", + "in", + "out" + ] + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/hold", + "description": "Put a channel on hold", + "operations": [ + { + "httpMethod": "POST", + "summary": "Hold a channel.", + "nickname": "hold", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Remove a channel from hold.", + "nickname": "unhold", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/moh", + "description": "Play music on hold to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play music on hold to a channel.", + "notes": "Using media operations such as /play on a channel playing MOH in this manner will suspend MOH without resuming automatically. If continuing music on hold is desired, the stasis application must reinitiate music on hold.", + "nickname": "startMoh", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "mohClass", + "description": "Music on hold class to use", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing music on hold to a channel.", + "nickname": "stopMoh", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/silence", + "description": "Play silence to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play silence to a channel.", + "notes": "Using media operations such as /play on a channel playing silence in this manner will suspend silence without resuming automatically.", + "nickname": "startSilence", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing silence to a channel.", + "nickname": "stopSilence", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/play", + "description": "Play media to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "play", + "responseClass": "Playback", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000 + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/play/{playbackId}", + "description": "Play media to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media and specify the playbackId.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "playWithId", + "responseClass": "Playback", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000 + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/record", + "description": "Record audio from a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start a recording.", + "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.", + "nickname": "record", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Recording's filename", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "maxDurationSeconds", + "description": "Maximum duration of the recording, in seconds. 0 for no limit", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "maxSilenceSeconds", + "description": "Maximum duration of silence, in seconds. 0 for no limit", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "ifExists", + "description": "Action to take if a recording with the same name already exists.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "fail", + "allowableValues": { + "valueType": "LIST", + "values": [ + "fail", + "overwrite", + "append" + ] + } + }, + { + "name": "beep", + "description": "Play beep when recording begins", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "terminateOn", + "description": "DTMF input to terminate recording", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "any", + "*", + "#" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "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" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/variable", + "description": "Variables on a channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the value of a channel variable or function.", + "nickname": "getChannelVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The channel variable or function to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Channel or variable not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "POST", + "summary": "Set the value of a channel variable or function.", + "nickname": "setChannelVar", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The channel variable or function to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/snoop", + "description": "Snoop (spy/whisper) on a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start snooping.", + "notes": "Snoop (spy/whisper) on a specific channel.", + "nickname": "snoopChannel", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "spy", + "description": "Direction of audio to spy on", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "whisper", + "description": "Direction of audio to whisper into", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "app", + "description": "Application the snooping channel is placed into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "snoopId", + "description": "Unique ID to assign to snooping channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/snoop/{snoopId}", + "description": "Snoop (spy/whisper) on a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start snooping.", + "notes": "Snoop (spy/whisper) on a specific channel.", + "nickname": "snoopChannelWithId", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "snoopId", + "description": "Unique ID to assign to snooping channel", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "spy", + "description": "Direction of audio to spy on", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "whisper", + "description": "Direction of audio to whisper into", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "app", + "description": "Application the snooping channel is placed into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/dial", + "description": "Dial a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Dial a created channel.", + "nickname": "dial", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "caller", + "description": "Channel ID of caller", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Dial timeout", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel cannot be found." + }, + { + "code": 409, + "reason": "Channel cannot be dialed." + } + ] + } + ] + } + ], + "models": { + "Dialed": { + "id": "Dialed", + "description": "Dialed channel information.", + "properties": {} + }, + "DialplanCEP": { + "id": "DialplanCEP", + "description": "Dialplan location (context/extension/priority)", + "properties": { + "context": { + "required": true, + "type": "string", + "description": "Context in the dialplan" + }, + "exten": { + "required": true, + "type": "string", + "description": "Extension in the dialplan" + }, + "priority": { + "required": true, + "type": "long", + "description": "Priority in the dialplan" + } + } + }, + "CallerID": { + "id": "CallerID", + "description": "Caller identification", + "properties": { + "name": { + "required": true, + "type": "string" + }, + "number": { + "required": true, + "type": "string" + } + } + }, + "Channel": { + "id": "Channel", + "description": "A specific communication connection between Asterisk and an Endpoint.", + "properties": { + "id": { + "required": true, + "type": "string", + "description": "Unique identifier of the channel.\n\nThis is the same as the Uniqueid field in AMI." + }, + "name": { + "required": true, + "type": "string", + "description": "Name of the channel (i.e. SIP/foo-0000a7e3)" + }, + "state": { + "required": true, + "type": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "Down", + "Rsrved", + "OffHook", + "Dialing", + "Ring", + "Ringing", + "Up", + "Busy", + "Dialing Offhook", + "Pre-ring", + "Unknown" + ] + } + }, + "caller": { + "required": true, + "type": "CallerID" + }, + "connected": { + "required": true, + "type": "CallerID" + }, + "accountcode": { + "required": true, + "type": "string" + }, + "dialplan": { + "required": true, + "type": "DialplanCEP", + "description": "Current location in the dialplan" + }, + "creationtime": { + "required": true, + "type": "Date", + "description": "Timestamp when channel was created" + }, + "language": { + "required": true, + "type": "string", + "description": "The default spoken language" + }, + "channelvars": { + "required": false, + "type": "object", + "description": "Channel variables" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_2_0_0/deviceStates.json b/codegen/src/main/resources/codegen-data/ari_2_0_0/deviceStates.json new file mode 100644 index 00000000..94d5b93c --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_2_0_0/deviceStates.json @@ -0,0 +1,151 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "Kevin Harwell ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/deviceStates.{format}", + "apis": [ + { + "path": "/deviceStates", + "description": "Device states", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all ARI controlled device states.", + "nickname": "list", + "responseClass": "List[DeviceState]" + } + ] + }, + { + "path": "/deviceStates/{deviceName}", + "description": "Device state", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve the current state of a device.", + "nickname": "get", + "responseClass": "DeviceState", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Change the state of a device controlled by ARI. (Note - implicitly creates the device state).", + "nickname": "update", + "responseClass": "void", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "deviceState", + "description": "Device state value", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "NOT_INUSE", + "INUSE", + "BUSY", + "INVALID", + "UNAVAILABLE", + "RINGING", + "RINGINUSE", + "ONHOLD" + ] + } + + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Device name is missing" + }, + { + "code": 409, + "reason": "Uncontrolled device specified" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Destroy a device-state controlled by ARI.", + "nickname": "delete", + "responseClass": "void", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Device name is missing" + }, + { + "code": 409, + "reason": "Uncontrolled device specified" + } + ] + } + ] + } + ], + "models": { + "DeviceState": { + "id": "DeviceState", + "description": "Represents the state of a device.", + "properties": { + "name": { + "type": "string", + "description": "Name of the device.", + "required": true + }, + "state": { + "type": "string", + "description": "Device's state", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "UNKNOWN", + "NOT_INUSE", + "INUSE", + "BUSY", + "INVALID", + "UNAVAILABLE", + "RINGING", + "RINGINUSE", + "ONHOLD" + ] + } + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_2_0_0/endpoints.json b/codegen/src/main/resources/codegen-data/ari_2_0_0/endpoints.json new file mode 100644 index 00000000..264c0eb2 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_2_0_0/endpoints.json @@ -0,0 +1,279 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/endpoints.{format}", + "apis": [ + { + "path": "/endpoints", + "description": "Asterisk endpoints", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all endpoints.", + "nickname": "list", + "responseClass": "List[Endpoint]" + } + ] + }, + { + "path": "/endpoints/sendMessage", + "description": "Send a message to some technology URI or endpoint.", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Send a message to some technology URI or endpoint.", + "nickname": "sendMessage", + "responseClass": "void", + "parameters": [ + { + "name": "to", + "description": "The endpoint resource or technology specific URI to send the message to. Valid resources are sip, pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "from", + "description": "The endpoint resource or technology specific identity to send this message from. Valid resources are sip, pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "body", + "description": "The body of the message", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "descriptioni": "The \"variables\" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, pjsip and sip resource types will add the key/value pairs as SIP headers,", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoint not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}", + "description": "Asterisk endpoints", + "operations": [ + { + "httpMethod": "GET", + "summary": "List available endoints for a given endpoint technology.", + "nickname": "listByTech", + "responseClass": "List[Endpoint]", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoints (sip,iax2,...)", + "paramType": "path", + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Endpoints not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}/{resource}", + "description": "Single endpoint", + "operations": [ + { + "httpMethod": "GET", + "summary": "Details for an endpoint.", + "nickname": "get", + "responseClass": "Endpoint", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "resource", + "description": "ID of the endpoint", + "paramType": "path", + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoints not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}/{resource}/sendMessage", + "description": "Send a message to some endpoint in a technology.", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Send a message to some endpoint in a technology.", + "nickname": "sendMessageToEndpoint", + "responseClass": "void", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "resource", + "description": "ID of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "from", + "description": "The endpoint resource or technology specific identity to send this message from. Valid resources are sip, pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "body", + "description": "The body of the message", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "descriptioni": "The \"variables\" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, pjsip and sip resource types will add the key/value pairs as SIP headers,", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoint not found" + } + ] + } + ] + } + ], + "models": { + "Endpoint": { + "id": "Endpoint", + "description": "An external device that may offer/accept calls to/from Asterisk.\n\nUnlike most resources, which have a single unique identifier, an endpoint is uniquely identified by the technology/resource pair.", + "properties": { + "technology": { + "type": "string", + "description": "Technology of the endpoint", + "required": true + }, + "resource": { + "type": "string", + "description": "Identifier of the endpoint, specific to the given technology.", + "required": true + }, + "state": { + "type": "string", + "description": "Endpoint's state", + "required": false, + "allowableValues": { + "valueType": "LIST", + "values": [ + "unknown", + "offline", + "online" + ] + } + }, + "channel_ids": { + "type": "List[string]", + "description": "Id's of channels associated with this endpoint", + "required": true + } + } + }, + "TextMessageVariable": { + "id": "TextMessageVariable", + "description": "A key/value pair variable in a text message.", + "properties": { + "key": { + "type": "string", + "description": "A unique key identifying the variable.", + "required": true + }, + "value": { + "type": "string", + "description": "The value of the variable.", + "required": true + } + } + }, + "TextMessage": { + "id": "TextMessage", + "description": "A text message.", + "properties": { + "from": { + "type": "string", + "description": "A technology specific URI specifying the source of the message. For sip and pjsip technologies, any SIP URI can be specified. For xmpp, the URI must correspond to the client connection being used to send the message.", + "required": true + }, + "to": { + "type": "string", + "description": "A technology specific URI specifying the destination of the message. Valid technologies include sip, pjsip, and xmp. The destination of a message should be an endpoint.", + "required": true + }, + "body": { + "type": "string", + "description": "The text of the message.", + "required": true + }, + "variables": { + "type": "List[TextMessageVariable]", + "description": "Technology specific key/value pairs associated with the message.", + "required": false + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_2_0_0/events.json b/codegen/src/main/resources/codegen-data/ari_2_0_0/events.json new file mode 100644 index 00000000..9ebbac06 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_2_0_0/events.json @@ -0,0 +1,895 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.2", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/events.{format}", + "apis": [ + { + "path": "/events", + "description": "Events from Asterisk to applications", + "operations": [ + { + "httpMethod": "GET", + "upgrade": "websocket", + "websocketProtocol": "ari", + "summary": "WebSocket connection for events.", + "nickname": "eventWebsocket", + "responseClass": "Message", + "parameters": [ + { + "name": "app", + "description": "Applications to subscribe to.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "subscribeAll", + "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'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean" + } + ] + } + ] + }, + { + "path": "/events/user/{eventName}", + "description": "Stasis application user events", + "operations": [ + { + "httpMethod": "POST", + "summary": "Generate a user event.", + "nickname": "userEvent", + "responseClass": "void", + "parameters": [ + { + "name": "eventName", + "description": "Event name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "application", + "description": "The name of the application that will receive this event", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "source", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}/{resource}, deviceState:{deviceName}", + "paramType": "query", + "required": false, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds custom key/value pairs to add to the user event. Ex. { \"variables\": { \"key\": \"value\" } }", + "paramType": "body", + "required": false, + "allowMultiple": false, + "dataType": "containers" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 422, + "reason": "Event source not found." + }, + { + "code": 400, + "reason": "Invalid even tsource URI or userevent data." + } + ] + } + ] + } + ], + "models": { + "Message": { + "id": "Message", + "description": "Base type for errors and events", + "discriminator": "type", + "properties": { + "type": { + "type": "string", + "required": true, + "description": "Indicates the type of this message." + }, + "asterisk_id": { + "type": "string", + "required": false, + "description": "The unique ID for the Asterisk instance that raised this event." + } + }, + "subTypes": [ + "MissingParams", + "Event" + ] + }, + "MissingParams": { + "id": "MissingParams", + "description": "Error event sent when required params are missing.", + "properties": { + "params": { + "required": true, + "type": "List[string]", + "description": "A list of the missing parameters" + } + } + }, + "Event": { + "id": "Event", + "description": "Base type for asynchronous events from Asterisk.", + "properties": { + "application": { + "type": "string", + "description": "Name of the application receiving the event.", + "required": true + }, + "timestamp": { + "type": "Date", + "description": "Time at which this event was created.", + "required": false + } + }, + "subTypes": [ + "DeviceStateChanged", + "PlaybackStarted", + "PlaybackContinuing", + "PlaybackFinished", + "RecordingStarted", + "RecordingFinished", + "RecordingFailed", + "ApplicationReplaced", + "BridgeCreated", + "BridgeDestroyed", + "BridgeMerged", + "BridgeBlindTransfer", + "BridgeAttendedTransfer", + "BridgeVideoSourceChanged", + "ChannelCreated", + "ChannelDestroyed", + "ChannelEnteredBridge", + "ChannelLeftBridge", + "ChannelStateChange", + "ChannelDtmfReceived", + "ChannelDialplan", + "ChannelCallerId", + "ChannelUserevent", + "ChannelHangupRequest", + "ChannelVarset", + "ChannelTalkingStarted", + "ChannelTalkingFinished", + "ChannelHold", + "ChannelUnhold", + "ContactStatusChange", + "EndpointStateChange", + "Dial", + "StasisEnd", + "StasisStart", + "TextMessageReceived", + "ChannelConnectedLine", + "PeerStatusChange" + ] + }, + "ContactInfo": { + "id": "ContactInfo", + "description": "Detailed information about a contact on an endpoint.", + "properties": { + "uri": { + "type": "string", + "description": "The location of the contact.", + "required": true + }, + "contact_status": { + "type": "string", + "description": "The current status of the contact.", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "Unreachable", + "Reachable", + "Unknown", + "Created", + "Removed" + ] + } + }, + "aor": { + "type": "string", + "description": "The Address of Record this contact belongs to.", + "required": true + }, + "roundtrip_usec": { + "type": "string", + "description": "Current round trip time, in microseconds, for the contact.", + "required": false + } + } + }, + "Peer": { + "id": "Peer", + "description": "Detailed information about a remote peer that communicates with Asterisk.", + "properties": { + "peer_status": { + "type": "string", + "description": "The current state of the peer. Note that the values of the status are dependent on the underlying peer technology.", + "required": true + }, + "cause": { + "type": "string", + "description": "An optional reason associated with the change in peer_status.", + "required": false + }, + "address": { + "type": "string", + "description": "The IP address of the peer.", + "required": false + }, + "port": { + "type": "string", + "description": "The port of the peer.", + "required": false + }, + "time": { + "type": "string", + "description": "The last known time the peer was contacted.", + "required": false + } + } + }, + "DeviceStateChanged": { + "id": "DeviceStateChanged", + "description": "Notification that a device state has changed.", + "properties": { + "device_state": { + "type": "DeviceState", + "description": "Device state object", + "required": true + } + } + }, + "PlaybackStarted": { + "id": "PlaybackStarted", + "description": "Event showing the start of a media playback operation.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "PlaybackContinuing": { + "id": "PlaybackContinuing", + "description": "Event showing the continuation of a media playback operation from one media URI to the next in the list.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "PlaybackFinished": { + "id": "PlaybackFinished", + "description": "Event showing the completion of a media playback operation.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "RecordingStarted": { + "id": "RecordingStarted", + "description": "Event showing the start of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "RecordingFinished": { + "id": "RecordingFinished", + "description": "Event showing the completion of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "RecordingFailed": { + "id": "RecordingFailed", + "description": "Event showing failure of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "ApplicationReplaced": { + "id": "ApplicationReplaced", + "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.", + "properties": {} + }, + "BridgeCreated": { + "id": "BridgeCreated", + "description": "Notification that a bridge has been created.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeDestroyed": { + "id": "BridgeDestroyed", + "description": "Notification that a bridge has been destroyed.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeMerged": { + "id": "BridgeMerged", + "description": "Notification that one bridge has merged into another.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "bridge_from": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeVideoSourceChanged": { + "id": "BridgeVideoSourceChanged", + "description": "Notification that the source of video in a bridge has changed.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "old_video_source_id": { + "required": false, + "type": "string" + } + } + }, + "BridgeBlindTransfer": { + "id": "BridgeBlindTransfer", + "description": "Notification that a blind transfer has occurred.", + "properties": { + "channel": { + "description": "The channel performing the blind transfer", + "required": true, + "type": "Channel" + }, + "replace_channel": { + "description": "The channel that is replacing transferer when the transferee(s) can not be transferred directly", + "required": false, + "type": "Channel" + }, + "transferee": { + "description": "The channel that is being transferred", + "required": false, + "type": "Channel" + }, + "exten": { + "description": "The extension transferred to", + "required": true, + "type": "string" + }, + "context": { + "description": "The context transferred to", + "required": true, + "type": "string" + }, + "result": { + "description": "The result of the transfer attempt", + "required": true, + "type": "string" + }, + "is_external": { + "description": "Whether the transfer was externally initiated or not", + "required": true, + "type": "boolean" + }, + "bridge": { + "description": "The bridge being transferred", + "type": "Bridge" + } + } + }, + "BridgeAttendedTransfer": { + "id": "BridgeAttendedTransfer", + "description": "Notification that an attended transfer has occurred.", + "properties": { + "transferer_first_leg": { + "description": "First leg of the transferer", + "required": true, + "type": "Channel" + }, + "transferer_second_leg": { + "description": "Second leg of the transferer", + "required": true, + "type": "Channel" + }, + "replace_channel": { + "description": "The channel that is replacing transferer_first_leg in the swap", + "required": false, + "type": "Channel" + }, + "transferee": { + "description": "The channel that is being transferred", + "required": false, + "type": "Channel" + }, + "transfer_target": { + "description": "The channel that is being transferred to", + "required": false, + "type": "Channel" + }, + "result": { + "description": "The result of the transfer attempt", + "required": true, + "type": "string" + }, + "is_external": { + "description": "Whether the transfer was externally initiated or not", + "required": true, + "type": "boolean" + }, + "transferer_first_leg_bridge": { + "description": "Bridge the transferer first leg is in", + "type": "Bridge" + }, + "transferer_second_leg_bridge": { + "description": "Bridge the transferer second leg is in", + "type": "Bridge" + }, + "destination_type": { + "description": "How the transfer was accomplished", + "required": true, + "type": "string" + }, + "destination_bridge": { + "description": "Bridge that survived the merge result", + "type": "string" + }, + "destination_application": { + "description": "Application that has been transferred into", + "type": "string" + }, + "destination_link_first_leg": { + "description": "First leg of a link transfer result", + "type": "Channel" + }, + "destination_link_second_leg": { + "description": "Second leg of a link transfer result", + "type": "Channel" + }, + "destination_threeway_channel": { + "description": "Transferer channel that survived the threeway result", + "type": "Channel" + }, + "destination_threeway_bridge": { + "description": "Bridge that survived the threeway result", + "type": "Bridge" + } + } + }, + "ChannelCreated": { + "id": "ChannelCreated", + "description": "Notification that a channel has been created.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelDestroyed": { + "id": "ChannelDestroyed", + "description": "Notification that a channel has been destroyed.", + "properties": { + "cause": { + "required": true, + "description": "Integer representation of the cause of the hangup", + "type": "int" + }, + "cause_txt": { + "required": true, + "description": "Text representation of the cause of the hangup", + "type": "string" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelEnteredBridge": { + "id": "ChannelEnteredBridge", + "description": "Notification that a channel has entered a bridge.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "channel": { + "type": "Channel" + } + } + }, + "ChannelLeftBridge": { + "id": "ChannelLeftBridge", + "description": "Notification that a channel has left a bridge.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelStateChange": { + "id": "ChannelStateChange", + "description": "Notification of a channel's state change.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelDtmfReceived": { + "id": "ChannelDtmfReceived", + "description": "DTMF received on a channel.\n\nThis event is sent when the DTMF ends. There is no notification about the start of DTMF", + "properties": { + "digit": { + "required": true, + "type": "string", + "description": "DTMF digit received (0-9, A-E, # or *)" + }, + "duration_ms": { + "required": true, + "type": "int", + "description": "Number of milliseconds DTMF was received" + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which DTMF was received" + } + } + }, + "ChannelDialplan": { + "id": "ChannelDialplan", + "description": "Channel changed location in the dialplan.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that changed dialplan location." + }, + "dialplan_app": { + "required": true, + "type": "string", + "description": "The application about to be executed." + }, + "dialplan_app_data": { + "required": true, + "type": "string", + "description": "The data to be passed to the application." + } + } + }, + "ChannelCallerId": { + "id": "ChannelCallerId", + "description": "Channel changed Caller ID.", + "properties": { + "caller_presentation": { + "required": true, + "type": "int", + "description": "The integer representation of the Caller Presentation value." + }, + "caller_presentation_txt": { + "required": true, + "type": "string", + "description": "The text representation of the Caller Presentation value." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that changed Caller ID." + } + } + }, + "ChannelUserevent": { + "id": "ChannelUserevent", + "description": "User-generated event with additional user-defined fields in the object.", + "properties": { + "eventname": { + "required": true, + "type": "string", + "description": "The name of the user event." + }, + "channel": { + "required": false, + "type": "Channel", + "description": "A channel that is signaled with the user event." + }, + "bridge": { + "required": false, + "type": "Bridge", + "description": "A bridge that is signaled with the user event." + }, + "endpoint": { + "required": false, + "type": "Endpoint", + "description": "A endpoint that is signaled with the user event." + }, + "userevent": { + "required": true, + "type": "object", + "description": "Custom Userevent data" + } + } + }, + "ChannelHangupRequest": { + "id": "ChannelHangupRequest", + "description": "A hangup was requested on the channel.", + "properties": { + "cause": { + "type": "int", + "description": "Integer representation of the cause of the hangup." + }, + "soft": { + "type": "boolean", + "description": "Whether the hangup request was a soft hangup request." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which the hangup was requested." + } + } + }, + "ChannelVarset": { + "id": "ChannelVarset", + "description": "Channel variable changed.", + "properties": { + "variable": { + "required": true, + "type": "string", + "description": "The variable that changed." + }, + "value": { + "required": true, + "type": "string", + "description": "The new value of the variable." + }, + "channel": { + "required": false, + "type": "Channel", + "description": "The channel on which the variable was set.\n\nIf missing, the variable is a global variable." + } + } + }, + "ChannelHold": { + "id": "ChannelHold", + "description": "A channel initiated a media hold.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that initiated the hold event." + }, + "musicclass": { + "required": false, + "type": "string", + "description": "The music on hold class that the initiator requested." + } + } + }, + "ChannelUnhold": { + "id": "ChannelUnhold", + "description": "A channel initiated a media unhold.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that initiated the unhold event." + } + } + }, + "ChannelTalkingStarted": { + "id": "ChannelTalkingStarted", + "description": "Talking was detected on the channel.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which talking started." + } + } + }, + "ChannelTalkingFinished": { + "id": "ChannelTalkingFinished", + "description": "Talking is no longer detected on the channel.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which talking completed." + }, + "duration": { + "required": true, + "type": "int", + "description": "The length of time, in milliseconds, that talking was detected on the channel" + } + } + }, + "ContactStatusChange": { + "id": "ContactStatusChange", + "description": "The state of a contact on an endpoint has changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + }, + "contact_info": { + "required": true, + "type": "ContactInfo" + } + } + }, + "PeerStatusChange": { + "id": "PeerStatusChange", + "description": "The state of a peer associated with an endpoint has changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + }, + "peer": { + "required": true, + "type": "Peer" + } + } + }, + "EndpointStateChange": { + "id": "EndpointStateChange", + "description": "Endpoint state changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + } + } + }, + "Dial": { + "id": "Dial", + "description": "Dialing state has changed.", + "properties": { + "caller": { + "required": false, + "type": "Channel", + "description": "The calling channel." + }, + "peer": { + "required": true, + "type": "Channel", + "description": "The dialed channel." + }, + "forward": { + "required": false, + "type": "string", + "description": "Forwarding target requested by the original dialed channel." + }, + "forwarded": { + "required": false, + "type": "Channel", + "description": "Channel that the caller has been forwarded to." + }, + "dialstring": { + "required": false, + "type": "string", + "description": "The dial string for calling the peer channel." + }, + "dialstatus": { + "required": true, + "type": "string", + "description": "Current status of the dialing attempt to the peer." + } + } + }, + "StasisEnd": { + "id": "StasisEnd", + "description": "Notification that a channel has left a Stasis application.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "StasisStart": { + "id": "StasisStart", + "description": "Notification that a channel has entered a Stasis application.", + "properties": { + "args": { + "required": true, + "type": "List[string]", + "description": "Arguments to the application" + }, + "channel": { + "required": true, + "type": "Channel" + }, + "replace_channel": { + "required": false, + "type": "Channel" + } + } + }, + "TextMessageReceived": { + "id": "TextMessageReceived", + "description": "A text message was received from an endpoint.", + "properties": { + "message": { + "required": true, + "type": "TextMessage" + }, + "endpoint": { + "required": false, + "type": "Endpoint" + } + } + }, + "ChannelConnectedLine": { + "id": "ChannelConnectedLine", + "description": "Channel changed Connected Line.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel whose connected line has changed." + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_2_0_0/mailboxes.json b/codegen/src/main/resources/codegen-data/ari_2_0_0/mailboxes.json new file mode 100644 index 00000000..ed50019f --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_2_0_0/mailboxes.json @@ -0,0 +1,134 @@ +{ + "_copyright": "Copyright (C) 2013, Digium, Inc.", + "_author": "Jonathan Rose ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/mailboxes.{format}", + "apis": [ + { + "path": "/mailboxes", + "description": "Mailboxes", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all mailboxes.", + "nickname": "list", + "responseClass": "List[Mailbox]" + } + ] + }, + { + "path": "/mailboxes/{mailboxName}", + "description": "Mailbox state", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve the current state of a mailbox.", + "nickname": "get", + "responseClass": "Mailbox", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Change the state of a mailbox. (Note - implicitly creates the mailbox).", + "nickname": "update", + "responseClass": "void", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "oldMessages", + "description": "Count of old messages in the mailbox", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "newMessages", + "description": "Count of new messages in the mailbox", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "int" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Destroy a mailbox.", + "nickname": "delete", + "responseClass": "void", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + } + ] + } + ], + "models": { + "Mailbox": { + "id": "Mailbox", + "description": "Represents the state of a mailbox.", + "properties": { + "name": { + "type": "string", + "description": "Name of the mailbox.", + "required": true + }, + "old_messages": { + "type": "int", + "description": "Count of old messages in the mailbox.", + "required": true + }, + "new_messages": { + "type": "int", + "description": "Count of new messages in the mailbox.", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_2_0_0/playbacks.json b/codegen/src/main/resources/codegen-data/ari_2_0_0/playbacks.json new file mode 100644 index 00000000..3dc4e1da --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_2_0_0/playbacks.json @@ -0,0 +1,161 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/playbacks.{format}", + "apis": [ + { + "path": "/playbacks/{playbackId}", + "description": "Control object for a playback operation.", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a playback's details.", + "nickname": "get", + "responseClass": "Playback", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "The playback cannot be found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop a playback.", + "nickname": "stop", + "responseClass": "void", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "The playback cannot be found" + } + ] + } + ] + }, + { + "path": "/playbacks/{playbackId}/control", + "description": "Control object for a playback operation.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Control a playback.", + "nickname": "control", + "responseClass": "void", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "operation", + "description": "Operation to perform on the playback.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "restart", + "pause", + "unpause", + "reverse", + "forward" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "The provided operation parameter was invalid" + }, + { + "code": 404, + "reason": "The playback cannot be found" + }, + { + "code": 409, + "reason": "The operation cannot be performed in the playback's current state" + } +] + } + ] + } + ], + "models": { + "Playback": { + "id": "Playback", + "description": "Object representing the playback of media to a channel", + "properties": { + "id": { + "type": "string", + "description": "ID for this playback operation", + "required": true + }, + "media_uri": { + "type": "string", + "description": "The URI for the media currently being played back.", + "required": true + }, + "next_media_uri": { + "type": "string", + "description": "If a list of URIs is being played, the next media URI to be played back.", + "required": false + }, + "target_uri": { + "type": "string", + "description": "URI for the channel or bridge to play the media on", + "required": true + }, + "language": { + "type": "string", + "description": "For media types that support multiple languages, the language requested for playback." + }, + "state": { + "type": "string", + "description": "Current state of the playback operation.", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "queued", + "playing", + "continuing", + "done" + ] + } + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_2_0_0/recordings.json b/codegen/src/main/resources/codegen-data/ari_2_0_0/recordings.json new file mode 100644 index 00000000..d0b9630d --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_2_0_0/recordings.json @@ -0,0 +1,410 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/recordings.{format}", + "apis": [ + { + "path": "/recordings/stored", + "description": "Recordings", + "operations": [ + { + "httpMethod": "GET", + "summary": "List recordings that are complete.", + "nickname": "listStored", + "responseClass": "List[StoredRecording]" + } + ] + }, + { + "path": "/recordings/stored/{recordingName}", + "description": "Individual recording", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a stored recording's details.", + "nickname": "getStored", + "responseClass": "StoredRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Delete a stored recording.", + "nickname": "deleteStored", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/stored/{recordingName}/file", + "description": "The actual file associated with the stored recording", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the file associated with the stored recording.", + "nickname": "getStoredFile", + "responseClass": "binary", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 403, + "reason": "The recording file could not be opened" + }, + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/stored/{recordingName}/copy", + "description": "Copy an individual recording", + "operations": [ + { + "httpMethod": "POST", + "summary": "Copy a stored recording.", + "nickname": "copyStored", + "responseClass": "StoredRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording to copy", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "destinationRecordingName", + "description": "The destination name of the recording", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "A recording with the same name already exists on the system" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}", + "description": "A recording that is in progress", + "operations": [ + { + "httpMethod": "GET", + "summary": "List live recordings.", + "nickname": "getLive", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop a live recording and discard it.", + "nickname": "cancel", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/stop", + "operations": [ + { + "httpMethod": "POST", + "summary": "Stop a live recording and store it.", + "nickname": "stop", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/pause", + "operations": [ + { + "httpMethod": "POST", + "summary": "Pause a live recording.", + "notes": "Pausing a recording suspends silence detection, which will be restarted when the recording is unpaused. Paused time is not included in the accounting for maxDurationSeconds.", + "nickname": "pause", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unpause a live recording.", + "nickname": "unpause", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/mute", + "operations": [ + { + "httpMethod": "POST", + "summary": "Mute a live recording.", + "notes": "Muting a recording suspends silence detection, which will be restarted when the recording is unmuted.", + "nickname": "mute", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unmute a live recording.", + "nickname": "unmute", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + } + ] + } + ], + "models": { + "StoredRecording": { + "id": "StoredRecording", + "description": "A past recording that may be played back.", + "properties": { + "name": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + }, + "LiveRecording": { + "id": "LiveRecording", + "description": "A recording that is in progress", + "properties": { + "name": { + "required": true, + "type": "string", + "description": "Base name for the recording" + }, + "format": { + "required": true, + "type": "string", + "description": "Recording format (wav, gsm, etc.)" + }, + "target_uri": { + "required": true, + "type": "string", + "description": "URI for the channel or bridge being recorded" + }, + "state": { + "required": true, + "type": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "queued", + "recording", + "paused", + "done", + "failed", + "canceled" + ] + } + }, + "duration": { + "required": false, + "type": "int", + "description": "Duration in seconds of the recording" + }, + "talking_duration": { + "required": false, + "type": "int", + "description": "Duration of talking, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds." + }, + "silence_duration": { + "required": false, + "type": "int", + "description": "Duration of silence, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds." + }, + "cause": { + "required": false, + "type": "string", + "description": "Cause for recording failure if failed" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_2_0_0/sounds.json b/codegen/src/main/resources/codegen-data/ari_2_0_0/sounds.json new file mode 100644 index 00000000..8fbe1c57 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_2_0_0/sounds.json @@ -0,0 +1,99 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/sounds.{format}", + "apis": [ + { + "path": "/sounds", + "description": "Sounds", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all sounds.", + "nickname": "list", + "responseClass": "List[Sound]", + "parameters": [ + { + "name": "lang", + "description": "Lookup sound for a specific language.", + "paramType": "query", + "dataType": "string", + "required": false + }, + { + "name": "format", + "description": "Lookup sound in a specific format.", + "paramType": "query", + "dataType": "string", + "required": false, + "__note": "core show translation can show translation paths between formats, along with relative costs. so this could be just installed format, or we could follow that for transcoded formats." + } + ] + } + ] + }, + { + "path": "/sounds/{soundId}", + "description": "Individual sound", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a sound's details.", + "nickname": "get", + "responseClass": "Sound", + "parameters": [ + { + "name": "soundId", + "description": "Sound's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ] + } + ] + } + ], + "models": { + "FormatLangPair": { + "id": "FormatLangPair", + "description": "Identifies the format and language of a sound file", + "properties": { + "language": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + }, + "Sound": { + "id": "Sound", + "description": "A media file that may be played back.", + "properties": { + "id": { + "required": true, + "description": "Sound's identifier.", + "type": "string" + }, + "text": { + "required": false, + "description": "Text description of the sound, usually the words spoken.", + "type": "string" + }, + "formats": { + "required": true, + "description": "The formats and languages in which this sound is available.", + "type": "List[FormatLangPair]" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_3_0_0/applications.json b/codegen/src/main/resources/codegen-data/ari_3_0_0/applications.json new file mode 100644 index 00000000..cdd69c41 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_3_0_0/applications.json @@ -0,0 +1,172 @@ +{ + "_copyright": "Copyright (C) 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/applications.{format}", + "apis": [ + { + "path": "/applications", + "description": "Stasis applications", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all applications.", + "nickname": "list", + "responseClass": "List[Application]" + } + ] + }, + { + "path": "/applications/{applicationName}", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get details of an application.", + "nickname": "get", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Application does not exist." + } + ] + } + ] + }, + { + "path": "/applications/{applicationName}/subscription", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "POST", + "summary": "Subscribe an application to a event source.", + "notes": "Returns the state of the application after the subscriptions have changed", + "nickname": "subscribe", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "eventSource", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing parameter." + }, + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 422, + "reason": "Event source does not exist." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unsubscribe an application from an event source.", + "notes": "Returns the state of the application after the subscriptions have changed", + "nickname": "unsubscribe", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "eventSource", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing parameter; event source scheme not recognized." + }, + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 409, + "reason": "Application not subscribed to event source." + }, + { + "code": 422, + "reason": "Event source does not exist." + } + ] + } + ] + } + ], + "models": { + "Application": { + "id": "Application", + "description": "Details of a Stasis application", + "properties": { + "name": { + "type": "string", + "description": "Name of this application", + "required": true + }, + "channel_ids": { + "type": "List[string]", + "description": "Id's for channels subscribed to.", + "required": true + }, + "bridge_ids": { + "type": "List[string]", + "description": "Id's for bridges subscribed to.", + "required": true + }, + "endpoint_ids": { + "type": "List[string]", + "description": "{tech}/{resource} for endpoints subscribed to.", + "required": true + }, + "device_names": { + "type": "List[string]", + "description": "Names of the devices subscribed to.", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_3_0_0/asterisk.json b/codegen/src/main/resources/codegen-data/ari_3_0_0/asterisk.json new file mode 100644 index 00000000..f40bf5c6 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_3_0_0/asterisk.json @@ -0,0 +1,692 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/asterisk.{format}", + "apis": [ + { + "path": "/asterisk/config/dynamic/{configClass}/{objectType}/{id}", + "description": "Asterisk dynamic configuration", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve a dynamic configuration object.", + "nickname": "getObject", + "responseClass": "List[ConfigTuple]", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to retrieve.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to retrieve.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "{configClass|objectType|id} not found" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Create or update a dynamic configuration object.", + "nickname": "updateObject", + "responseClass": "List[ConfigTuple]", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to create or update.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to create or update.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "fields", + "description": "The body object should have a value that is a list of ConfigTuples, which provide the fields to update. Ex. [ { \"attribute\": \"directmedia\", \"value\": \"false\" } ]", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Bad request body" + }, + { + "code": 403, + "reason": "Could not create or update object" + }, + { + "code": 404, + "reason": "{configClass|objectType} not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Delete a dynamic configuration object.", + "nickname": "deleteObject", + "responseClass": "void", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to delete.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to delete.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 403, + "reason": "Could not delete object" + }, + { + "code": 404, + "reason": "{configClass|objectType|id} not found" + } + ] + } + ] + }, + { + "path": "/asterisk/info", + "description": "Asterisk system information (similar to core show settings)", + "operations": [ + { + "httpMethod": "GET", + "summary": "Gets Asterisk system information.", + "nickname": "getInfo", + "responseClass": "AsteriskInfo", + "parameters": [ + { + "name": "only", + "description": "Filter information returned", + "paramType": "query", + "required": false, + "allowMultiple": true, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "build", + "system", + "config", + "status" + ] + } + } + ] + } + ] + }, + { + "path": "/asterisk/modules", + "description": "Asterisk modules", + "operations": [ + { + "httpMethod": "GET", + "summary": "List Asterisk modules.", + "nickname": "listModules", + "responseClass": "List[Module]" + } + ] + }, + { + "path": "/asterisk/modules/{moduleName}", + "description": "Asterisk module", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get Asterisk module information.", + "nickname": "getModule", + "responseClass": "Module", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module could not be found in running modules." + }, + { + "code": 409, + "reason": "Module information could not be retrieved." + } + ] + }, + { + "httpMethod": "POST", + "summary": "Load an Asterisk module.", + "nickname": "loadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 409, + "reason": "Module could not be loaded." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unload an Asterisk module.", + "nickname": "unloadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module not found in running modules." + }, + { + "code": 409, + "reason": "Module could not be unloaded." + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Reload an Asterisk module.", + "nickname": "reloadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module not found in running modules." + }, + { + "code": 409, + "reason": "Module could not be reloaded." + } + ] + } + ] + }, + { + "path": "/asterisk/logging", + "description": "Asterisk log channels", + "operations": [ + { + "httpMethod": "GET", + "summary": "Gets Asterisk log channel information.", + "nickname": "listLogChannels", + "responseClass": "List[LogChannel]" + } + ] + }, + { + "path": "/asterisk/logging/{logChannelName}", + "description": "Asterisk log channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Adds a log channel.", + "nickname": "addLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "The log channel to add", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "configuration", + "description": "levels of the log channel", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Bad request body" + }, + { + "code": 409, + "reason": "Log channel could not be created." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Deletes a log channel.", + "nickname": "deleteLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "Log channels name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Log channel does not exist." + } + ] + } + ] + }, + { + "path": "/asterisk/logging/{logChannelName}/rotate", + "description": "Asterisk log channel", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Rotates a log channel.", + "nickname": "rotateLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "Log channel's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Log channel does not exist." + } + ] + } + ] + }, + { + "path": "/asterisk/variable", + "description": "Global variables", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the value of a global variable.", + "nickname": "getGlobalVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "variable", + "description": "The variable to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + } + ] + }, + { + "httpMethod": "POST", + "summary": "Set the value of a global variable.", + "nickname": "setGlobalVar", + "responseClass": "void", + "parameters": [ + { + "name": "variable", + "description": "The variable to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + } + ] + } + ] + } + ], + "models": { + "BuildInfo": { + "id": "BuildInfo", + "description": "Info about how Asterisk was built", + "properties": { + "os": { + "required": true, + "type": "string", + "description": "OS Asterisk was built on." + }, + "kernel": { + "required": true, + "type": "string", + "description": "Kernel version Asterisk was built on." + }, + "options": { + "required": true, + "type": "string", + "description": "Compile time options, or empty string if default." + }, + "machine": { + "required": true, + "type": "string", + "description": "Machine architecture (x86_64, i686, ppc, etc.)" + }, + "date": { + "required": true, + "type": "string", + "description": "Date and time when Asterisk was built." + }, + "user": { + "required": true, + "type": "string", + "description": "Username that build Asterisk" + } + } + }, + "SystemInfo": { + "id": "SystemInfo", + "description": "Info about Asterisk", + "properties": { + "version": { + "required": true, + "type": "string", + "description": "Asterisk version." + }, + "entity_id": { + "required": true, + "type": "string", + "description": "" + } + } + }, + "SetId": { + "id": "SetId", + "description": "Effective user/group id", + "properties": { + "user": { + "required": true, + "type": "string", + "description": "Effective user id." + }, + "group": { + "required": true, + "type": "string", + "description": "Effective group id." + } + } + }, + "ConfigInfo": { + "id": "ConfigInfo", + "description": "Info about Asterisk configuration", + "properties": { + "name": { + "required": true, + "type": "string", + "description": "Asterisk system name." + }, + "default_language": { + "required": true, + "type": "string", + "description": "Default language for media playback." + }, + "max_channels": { + "required": false, + "type": "int", + "description": "Maximum number of simultaneous channels." + }, + "max_open_files": { + "required": false, + "type": "int", + "description": "Maximum number of open file handles (files, sockets)." + }, + "max_load": { + "required": false, + "type": "double", + "description": "Maximum load avg on system." + }, + "setid": { + "required": true, + "type": "SetId", + "description": "Effective user/group id for running Asterisk." + } + } + }, + "StatusInfo": { + "id": "StatusInfo", + "description": "Info about Asterisk status", + "properties": { + "startup_time": { + "required": true, + "type": "Date", + "description": "Time when Asterisk was started." + }, + "last_reload_time": { + "required": true, + "type": "Date", + "description": "Time when Asterisk was last reloaded." + } + } + }, + "AsteriskInfo": { + "id": "AsteriskInfo", + "description": "Asterisk system information", + "properties": { + "build": { + "required": false, + "type": "BuildInfo", + "description": "Info about how Asterisk was built" + }, + "system": { + "required": false, + "type": "SystemInfo", + "description": "Info about the system running Asterisk" + }, + "config": { + "required": false, + "type": "ConfigInfo", + "description": "Info about Asterisk configuration" + }, + "status": { + "required": false, + "type": "StatusInfo", + "description": "Info about Asterisk status" + } + } + }, + "Module": { + "id": "Module", + "description": "Details of an Asterisk module", + "properties": { + "name": { + "type": "string", + "description": "The name of this module", + "required": true + }, + "description": { + "type": "string", + "description": "The description of this module", + "required": true + }, + "use_count": { + "type": "int", + "description": "The number of times this module is being used", + "required": true + }, + "status": { + "type": "string", + "description": "The running status of this module", + "required": true + }, + "support_level": { + "type": "string", + "description": "The support state of this module", + "required": true + } + } + }, + "LogChannel": { + "id": "LogChannel", + "description": "Details of an Asterisk log channel", + "properties": { + "channel": { + "type": "string", + "description": "The log channel path", + "required": true + }, + "type": { + "type": "string", + "description": "Types of logs for the log channel", + "required": true + }, + "status": { + "type": "string", + "description": "Whether or not a log type is enabled", + "required": true + }, + "configuration": { + "type": "string", + "description": "The various log levels", + "required": true + } + } + }, + "Variable": { + "id": "Variable", + "description": "The value of a channel variable", + "properties": { + "value": { + "required": true, + "type": "string", + "description": "The value of the variable requested" + } + } + }, + "ConfigTuple": { + "id": "ConfigTuple", + "description": "A key/value pair that makes up part of a configuration object.", + "properties": { + "attribute": { + "required": true, + "type": "string", + "description": "A configuration object attribute." + }, + "value": { + "required": true, + "type": "string", + "description": "The value for the attribute." + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_3_0_0/bridges.json b/codegen/src/main/resources/codegen-data/ari_3_0_0/bridges.json new file mode 100644 index 00000000..877fdf84 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_3_0_0/bridges.json @@ -0,0 +1,738 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/bridges.{format}", + "apis": [ + { + "path": "/bridges", + "description": "Active bridges", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all active bridges in Asterisk.", + "nickname": "list", + "responseClass": "List[Bridge]" + }, + { + "httpMethod": "POST", + "summary": "Create a new bridge.", + "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", + "nickname": "create", + "responseClass": "Bridge", + "parameters": [ + { + "name": "type", + "description": "Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media, video_sfu).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "bridgeId", + "description": "Unique ID to give to the bridge being created.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Name to give to the bridge being created.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}", + "description": "Individual bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Create a new bridge or updates an existing one.", + "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", + "nickname": "createWithId", + "responseClass": "Bridge", + "parameters": [ + { + "name": "type", + "description": "Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media, video_sfu) to set.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "bridgeId", + "description": "Unique ID to give to the bridge being created.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Set the name of the bridge.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ] + }, + { + "httpMethod": "GET", + "summary": "Get bridge details.", + "nickname": "get", + "responseClass": "Bridge", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Shut down a bridge.", + "notes": "If any channels are in this bridge, they will be removed and resume whatever they were doing beforehand.", + "nickname": "destroy", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/addChannel", + "description": "Add a channel to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Add a channel to a bridge.", + "nickname": "addChannel", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channel", + "description": "Ids of channels to add to bridge", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "role", + "description": "Channel's role in the bridge", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Channel not found" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application; Channel currently recording" + }, + { + "code": 422, + "reason": "Channel not in Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/removeChannel", + "description": "Remove a channel from a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Remove a channel from a bridge.", + "nickname": "removeChannel", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channel", + "description": "Ids of channels to remove from bridge", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Channel not found" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + }, + { + "code": 422, + "reason": "Channel not in this bridge" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/videoSource/{channelId}", + "description": "Set a channel as the video source in a multi-party bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Set a channel as the video source in a multi-party mixing bridge. This operation has no effect on bridges with two or fewer participants.", + "nickname": "setVideoSource", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge or Channel not found" + }, + { + "code": 409, + "reason": "Channel not in Stasis application" + }, + { + "code": 422, + "reason": "Channel not in this Bridge" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/videoSource", + "description": "Removes any explicit video source", + "operations": [ + { + "httpMethod": "DELETE", + "summary": "Removes any explicit video source in a multi-party mixing bridge. This operation has no effect on bridges with two or fewer participants. When no explicit video source is set, talk detection will be used to determine the active video stream.", + "nickname": "clearVideoSource", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/moh", + "description": "Play music on hold to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play music on hold to a bridge or change the MOH class that is playing.", + "nickname": "startMoh", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "mohClass", + "description": "Channel's id", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing music on hold to a bridge.", + "notes": "This will only stop music on hold being played via POST bridges/{bridgeId}/moh.", + "nickname": "stopMoh", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/play", + "description": "Play media to the participants of a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media on a bridge.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "play", + "responseClass": "Playback", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "playbackId", + "description": "Playback Id.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/play/{playbackId}", + "description": "Play media to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media on a bridge.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "playWithId", + "responseClass": "Playback", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + + } + ] + }, + { + "path": "/bridges/{bridgeId}/record", + "description": "Record audio on a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start a recording.", + "notes": "This records the mixed audio from all channels participating in this bridge.", + "nickname": "record", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Recording's filename", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "maxDurationSeconds", + "description": "Maximum duration of the recording, in seconds. 0 for no limit.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "maxSilenceSeconds", + "description": "Maximum duration of silence, in seconds. 0 for no limit.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "ifExists", + "description": "Action to take if a recording with the same name already exists.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "fail", + "allowableValues": { + "valueType": "LIST", + "values": [ + "fail", + "overwrite", + "append" + ] + } + }, + { + "name": "beep", + "description": "Play beep when recording begins", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "terminateOn", + "description": "DTMF input to terminate recording.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "any", + "*", + "#" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge is not in a Stasis application; A recording with the same name already exists on the system and can not be overwritten because it is in progress or ifExists=fail" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + } + ], + "models": { + "Bridge": { + "id": "Bridge", + "description": "The merging of media from one or more channels.\n\nEveryone on the bridge receives the same audio.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for this bridge", + "required": true + }, + "technology": { + "type": "string", + "description": "Name of the current bridging technology", + "required": true + }, + "bridge_type": { + "type": "string", + "description": "Type of bridge technology", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "mixing", + "holding" + ] + } + }, + "bridge_class": { + "type": "string", + "description": "Bridging class", + "required": true + }, + "creator": { + "type": "string", + "description": "Entity that created the bridge", + "required": true + }, + "name": { + "type": "string", + "description": "Name the creator gave the bridge", + "required": true + }, + "channels": { + "type": "List[string]", + "description": "Ids of channels participating in this bridge", + "required": true + }, + "video_mode": { + "type": "string", + "description": "The video mode the bridge is using. One of 'none', 'talker', or 'single'.", + "required": false + }, + "video_source_id": { + "type": "string", + "description": "The ID of the channel that is the source of video in this bridge, if one exists.", + "required": false + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_3_0_0/channels.json b/codegen/src/main/resources/codegen-data/ari_3_0_0/channels.json new file mode 100644 index 00000000..602606cf --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_3_0_0/channels.json @@ -0,0 +1,1773 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/channels.{format}", + "apis": [ + { + "path": "/channels", + "description": "Active channels", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all active channels in Asterisk.", + "nickname": "list", + "responseClass": "List[Channel]" + }, + { + "httpMethod": "POST", + "summary": "Create a new channel (originate).", + "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.", + "nickname": "originate", + "responseClass": "Channel", + "parameters": [ + { + "name": "endpoint", + "description": "Endpoint to call.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to dial after the endpoint answers. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to dial after the endpoint answers. If omitted, uses 'default'. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to dial after the endpoint answers. If omitted, uses 1. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "long" + }, + { + "name": "label", + "description": "The label to dial after the endpoint answers. Will supersede 'priority' if provided. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The application that is subscribed to the originated channel. When the channel is answered, it will be passed to this Stasis application. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "callerId", + "description": "CallerID to use when dialing the endpoint or extension.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 30 + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "The unique id of the channel which is originating this one.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "formats", + "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for originating a channel." + }, + { + "code": 409, + "reason": "Channel with given unique ID already exists." + } + ] + } + ] + }, + { + "path": "/channels/create", + "description": "Create a channel and place it in a Stasis app, but do not dial the channel yet.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Create channel.", + "nickname": "create", + "responseClass": "Channel", + "parameters": [ + { + "name": "endpoint", + "description": "Endpoint for channel communication", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "Stasis Application to place channel into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "Unique ID of the calling channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "formats", + "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 409, + "reason": "Channel with given unique ID already exists." + } + ] + } + ] + }, + { + "path": "/channels/{channelId}", + "description": "Active channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "Channel details.", + "nickname": "get", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + } + ] + }, + { + "httpMethod": "POST", + "summary": "Create a new channel (originate with id).", + "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.", + "nickname": "originateWithId", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "endpoint", + "description": "Endpoint to call.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to dial after the endpoint answers. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to dial after the endpoint answers. If omitted, uses 'default'. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to dial after the endpoint answers. If omitted, uses 1. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "long" + }, + { + "name": "label", + "description": "The label to dial after the endpoint answers. Will supersede 'priority' if provided. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The application that is subscribed to the originated channel. When the channel is answered, it will be passed to this Stasis application. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "callerId", + "description": "CallerID to use when dialing the endpoint or extension.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 30 + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "The unique id of the channel which is originating this one.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "formats", + "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for originating a channel." + }, + { + "code": 409, + "reason": "Channel with given unique ID already exists." + } + ] + + }, + { + "httpMethod": "DELETE", + "summary": "Delete (i.e. hangup) a channel.", + "nickname": "hangup", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "reason", + "description": "Reason for hanging up the channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defalutValue": "normal", + "allowableValues": { + "valueType": "LIST", + "values": [ + "normal", + "busy", + "congestion", + "no_answer", + "answered_elsewhere" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid reason for hangup provided" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/continue", + "description": "Exit application; continue execution in the dialplan", + "operations": [ + { + "httpMethod": "POST", + "summary": "Exit application; continue execution in the dialplan.", + "nickname": "continueInDialplan", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "label", + "description": "The label to continue to - will supersede 'priority' if both are provided.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/redirect", + "description": "Inform the channel that it should redirect itself to a different location. Note that this will almost certainly cause the channel to exit the application.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Redirect the channel to a different location.", + "nickname": "redirect", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "endpoint", + "description": "The endpoint to redirect the channel to", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Endpoint parameter not provided" + }, + { + "code": 404, + "reason": "Channel or endpoint not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 422, + "reason": "Endpoint is not the same type as the channel" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/answer", + "description": "Answer a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Answer a channel.", + "nickname": "answer", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/ring", + "description": "Send a ringing indication to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Indicate ringing to a channel.", + "nickname": "ring", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop ringing indication on a channel if locally generated.", + "nickname": "ringStop", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/dtmf", + "description": "Send DTMF to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Send provided DTMF to a given channel.", + "nickname": "sendDTMF", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "dtmf", + "description": "DTMF To send.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "before", + "description": "Amount of time to wait before DTMF digits (specified in milliseconds) start.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0 + }, + { + "name": "between", + "description": "Amount of time in between DTMF digits (specified in milliseconds).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 100 + }, + { + "name": "duration", + "description": "Length of each DTMF digit (specified in milliseconds).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 100 + }, + { + "name": "after", + "description": "Amount of time to wait after DTMF digits (specified in milliseconds) end.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0 + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "DTMF is required" + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/mute", + "description": "Mute a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Mute a channel.", + "nickname": "mute", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "Direction in which to mute audio", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both", + "in", + "out" + ] + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unmute a channel.", + "nickname": "unmute", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "Direction in which to unmute audio", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both", + "in", + "out" + ] + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/hold", + "description": "Put a channel on hold", + "operations": [ + { + "httpMethod": "POST", + "summary": "Hold a channel.", + "nickname": "hold", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Remove a channel from hold.", + "nickname": "unhold", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/moh", + "description": "Play music on hold to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play music on hold to a channel.", + "notes": "Using media operations such as /play on a channel playing MOH in this manner will suspend MOH without resuming automatically. If continuing music on hold is desired, the stasis application must reinitiate music on hold.", + "nickname": "startMoh", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "mohClass", + "description": "Music on hold class to use", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing music on hold to a channel.", + "nickname": "stopMoh", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/silence", + "description": "Play silence to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play silence to a channel.", + "notes": "Using media operations such as /play on a channel playing silence in this manner will suspend silence without resuming automatically.", + "nickname": "startSilence", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing silence to a channel.", + "nickname": "stopSilence", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/play", + "description": "Play media to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "play", + "responseClass": "Playback", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000 + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/play/{playbackId}", + "description": "Play media to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media and specify the playbackId.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "playWithId", + "responseClass": "Playback", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000 + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/record", + "description": "Record audio from a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start a recording.", + "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.", + "nickname": "record", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Recording's filename", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "maxDurationSeconds", + "description": "Maximum duration of the recording, in seconds. 0 for no limit", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "maxSilenceSeconds", + "description": "Maximum duration of silence, in seconds. 0 for no limit", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "ifExists", + "description": "Action to take if a recording with the same name already exists.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "fail", + "allowableValues": { + "valueType": "LIST", + "values": [ + "fail", + "overwrite", + "append" + ] + } + }, + { + "name": "beep", + "description": "Play beep when recording begins", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "terminateOn", + "description": "DTMF input to terminate recording", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "any", + "*", + "#" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "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" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/variable", + "description": "Variables on a channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the value of a channel variable or function.", + "nickname": "getChannelVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The channel variable or function to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Channel or variable not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "POST", + "summary": "Set the value of a channel variable or function.", + "nickname": "setChannelVar", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The channel variable or function to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/snoop", + "description": "Snoop (spy/whisper) on a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start snooping.", + "notes": "Snoop (spy/whisper) on a specific channel.", + "nickname": "snoopChannel", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "spy", + "description": "Direction of audio to spy on", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "whisper", + "description": "Direction of audio to whisper into", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "app", + "description": "Application the snooping channel is placed into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "snoopId", + "description": "Unique ID to assign to snooping channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/snoop/{snoopId}", + "description": "Snoop (spy/whisper) on a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start snooping.", + "notes": "Snoop (spy/whisper) on a specific channel.", + "nickname": "snoopChannelWithId", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "snoopId", + "description": "Unique ID to assign to snooping channel", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "spy", + "description": "Direction of audio to spy on", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "whisper", + "description": "Direction of audio to whisper into", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "app", + "description": "Application the snooping channel is placed into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/dial", + "description": "Dial a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Dial a created channel.", + "nickname": "dial", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "caller", + "description": "Channel ID of caller", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Dial timeout", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel cannot be found." + }, + { + "code": 409, + "reason": "Channel cannot be dialed." + } + ] + } + ] + } + ], + "models": { + "Dialed": { + "id": "Dialed", + "description": "Dialed channel information.", + "properties": {} + }, + "DialplanCEP": { + "id": "DialplanCEP", + "description": "Dialplan location (context/extension/priority)", + "properties": { + "context": { + "required": true, + "type": "string", + "description": "Context in the dialplan" + }, + "exten": { + "required": true, + "type": "string", + "description": "Extension in the dialplan" + }, + "priority": { + "required": true, + "type": "long", + "description": "Priority in the dialplan" + } + } + }, + "CallerID": { + "id": "CallerID", + "description": "Caller identification", + "properties": { + "name": { + "required": true, + "type": "string" + }, + "number": { + "required": true, + "type": "string" + } + } + }, + "Channel": { + "id": "Channel", + "description": "A specific communication connection between Asterisk and an Endpoint.", + "properties": { + "id": { + "required": true, + "type": "string", + "description": "Unique identifier of the channel.\n\nThis is the same as the Uniqueid field in AMI." + }, + "name": { + "required": true, + "type": "string", + "description": "Name of the channel (i.e. SIP/foo-0000a7e3)" + }, + "state": { + "required": true, + "type": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "Down", + "Rsrved", + "OffHook", + "Dialing", + "Ring", + "Ringing", + "Up", + "Busy", + "Dialing Offhook", + "Pre-ring", + "Unknown" + ] + } + }, + "caller": { + "required": true, + "type": "CallerID" + }, + "connected": { + "required": true, + "type": "CallerID" + }, + "accountcode": { + "required": true, + "type": "string" + }, + "dialplan": { + "required": true, + "type": "DialplanCEP", + "description": "Current location in the dialplan" + }, + "creationtime": { + "required": true, + "type": "Date", + "description": "Timestamp when channel was created" + }, + "language": { + "required": true, + "type": "string", + "description": "The default spoken language" + }, + "channelvars": { + "required": false, + "type": "object", + "description": "Channel variables" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_3_0_0/deviceStates.json b/codegen/src/main/resources/codegen-data/ari_3_0_0/deviceStates.json new file mode 100644 index 00000000..94d5b93c --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_3_0_0/deviceStates.json @@ -0,0 +1,151 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "Kevin Harwell ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/deviceStates.{format}", + "apis": [ + { + "path": "/deviceStates", + "description": "Device states", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all ARI controlled device states.", + "nickname": "list", + "responseClass": "List[DeviceState]" + } + ] + }, + { + "path": "/deviceStates/{deviceName}", + "description": "Device state", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve the current state of a device.", + "nickname": "get", + "responseClass": "DeviceState", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Change the state of a device controlled by ARI. (Note - implicitly creates the device state).", + "nickname": "update", + "responseClass": "void", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "deviceState", + "description": "Device state value", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "NOT_INUSE", + "INUSE", + "BUSY", + "INVALID", + "UNAVAILABLE", + "RINGING", + "RINGINUSE", + "ONHOLD" + ] + } + + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Device name is missing" + }, + { + "code": 409, + "reason": "Uncontrolled device specified" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Destroy a device-state controlled by ARI.", + "nickname": "delete", + "responseClass": "void", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Device name is missing" + }, + { + "code": 409, + "reason": "Uncontrolled device specified" + } + ] + } + ] + } + ], + "models": { + "DeviceState": { + "id": "DeviceState", + "description": "Represents the state of a device.", + "properties": { + "name": { + "type": "string", + "description": "Name of the device.", + "required": true + }, + "state": { + "type": "string", + "description": "Device's state", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "UNKNOWN", + "NOT_INUSE", + "INUSE", + "BUSY", + "INVALID", + "UNAVAILABLE", + "RINGING", + "RINGINUSE", + "ONHOLD" + ] + } + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_3_0_0/endpoints.json b/codegen/src/main/resources/codegen-data/ari_3_0_0/endpoints.json new file mode 100644 index 00000000..264c0eb2 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_3_0_0/endpoints.json @@ -0,0 +1,279 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/endpoints.{format}", + "apis": [ + { + "path": "/endpoints", + "description": "Asterisk endpoints", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all endpoints.", + "nickname": "list", + "responseClass": "List[Endpoint]" + } + ] + }, + { + "path": "/endpoints/sendMessage", + "description": "Send a message to some technology URI or endpoint.", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Send a message to some technology URI or endpoint.", + "nickname": "sendMessage", + "responseClass": "void", + "parameters": [ + { + "name": "to", + "description": "The endpoint resource or technology specific URI to send the message to. Valid resources are sip, pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "from", + "description": "The endpoint resource or technology specific identity to send this message from. Valid resources are sip, pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "body", + "description": "The body of the message", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "descriptioni": "The \"variables\" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, pjsip and sip resource types will add the key/value pairs as SIP headers,", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoint not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}", + "description": "Asterisk endpoints", + "operations": [ + { + "httpMethod": "GET", + "summary": "List available endoints for a given endpoint technology.", + "nickname": "listByTech", + "responseClass": "List[Endpoint]", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoints (sip,iax2,...)", + "paramType": "path", + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Endpoints not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}/{resource}", + "description": "Single endpoint", + "operations": [ + { + "httpMethod": "GET", + "summary": "Details for an endpoint.", + "nickname": "get", + "responseClass": "Endpoint", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "resource", + "description": "ID of the endpoint", + "paramType": "path", + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoints not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}/{resource}/sendMessage", + "description": "Send a message to some endpoint in a technology.", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Send a message to some endpoint in a technology.", + "nickname": "sendMessageToEndpoint", + "responseClass": "void", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "resource", + "description": "ID of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "from", + "description": "The endpoint resource or technology specific identity to send this message from. Valid resources are sip, pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "body", + "description": "The body of the message", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "descriptioni": "The \"variables\" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, pjsip and sip resource types will add the key/value pairs as SIP headers,", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoint not found" + } + ] + } + ] + } + ], + "models": { + "Endpoint": { + "id": "Endpoint", + "description": "An external device that may offer/accept calls to/from Asterisk.\n\nUnlike most resources, which have a single unique identifier, an endpoint is uniquely identified by the technology/resource pair.", + "properties": { + "technology": { + "type": "string", + "description": "Technology of the endpoint", + "required": true + }, + "resource": { + "type": "string", + "description": "Identifier of the endpoint, specific to the given technology.", + "required": true + }, + "state": { + "type": "string", + "description": "Endpoint's state", + "required": false, + "allowableValues": { + "valueType": "LIST", + "values": [ + "unknown", + "offline", + "online" + ] + } + }, + "channel_ids": { + "type": "List[string]", + "description": "Id's of channels associated with this endpoint", + "required": true + } + } + }, + "TextMessageVariable": { + "id": "TextMessageVariable", + "description": "A key/value pair variable in a text message.", + "properties": { + "key": { + "type": "string", + "description": "A unique key identifying the variable.", + "required": true + }, + "value": { + "type": "string", + "description": "The value of the variable.", + "required": true + } + } + }, + "TextMessage": { + "id": "TextMessage", + "description": "A text message.", + "properties": { + "from": { + "type": "string", + "description": "A technology specific URI specifying the source of the message. For sip and pjsip technologies, any SIP URI can be specified. For xmpp, the URI must correspond to the client connection being used to send the message.", + "required": true + }, + "to": { + "type": "string", + "description": "A technology specific URI specifying the destination of the message. Valid technologies include sip, pjsip, and xmp. The destination of a message should be an endpoint.", + "required": true + }, + "body": { + "type": "string", + "description": "The text of the message.", + "required": true + }, + "variables": { + "type": "List[TextMessageVariable]", + "description": "Technology specific key/value pairs associated with the message.", + "required": false + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_3_0_0/events.json b/codegen/src/main/resources/codegen-data/ari_3_0_0/events.json new file mode 100644 index 00000000..9ebbac06 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_3_0_0/events.json @@ -0,0 +1,895 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.2", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/events.{format}", + "apis": [ + { + "path": "/events", + "description": "Events from Asterisk to applications", + "operations": [ + { + "httpMethod": "GET", + "upgrade": "websocket", + "websocketProtocol": "ari", + "summary": "WebSocket connection for events.", + "nickname": "eventWebsocket", + "responseClass": "Message", + "parameters": [ + { + "name": "app", + "description": "Applications to subscribe to.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "subscribeAll", + "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'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean" + } + ] + } + ] + }, + { + "path": "/events/user/{eventName}", + "description": "Stasis application user events", + "operations": [ + { + "httpMethod": "POST", + "summary": "Generate a user event.", + "nickname": "userEvent", + "responseClass": "void", + "parameters": [ + { + "name": "eventName", + "description": "Event name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "application", + "description": "The name of the application that will receive this event", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "source", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}/{resource}, deviceState:{deviceName}", + "paramType": "query", + "required": false, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds custom key/value pairs to add to the user event. Ex. { \"variables\": { \"key\": \"value\" } }", + "paramType": "body", + "required": false, + "allowMultiple": false, + "dataType": "containers" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 422, + "reason": "Event source not found." + }, + { + "code": 400, + "reason": "Invalid even tsource URI or userevent data." + } + ] + } + ] + } + ], + "models": { + "Message": { + "id": "Message", + "description": "Base type for errors and events", + "discriminator": "type", + "properties": { + "type": { + "type": "string", + "required": true, + "description": "Indicates the type of this message." + }, + "asterisk_id": { + "type": "string", + "required": false, + "description": "The unique ID for the Asterisk instance that raised this event." + } + }, + "subTypes": [ + "MissingParams", + "Event" + ] + }, + "MissingParams": { + "id": "MissingParams", + "description": "Error event sent when required params are missing.", + "properties": { + "params": { + "required": true, + "type": "List[string]", + "description": "A list of the missing parameters" + } + } + }, + "Event": { + "id": "Event", + "description": "Base type for asynchronous events from Asterisk.", + "properties": { + "application": { + "type": "string", + "description": "Name of the application receiving the event.", + "required": true + }, + "timestamp": { + "type": "Date", + "description": "Time at which this event was created.", + "required": false + } + }, + "subTypes": [ + "DeviceStateChanged", + "PlaybackStarted", + "PlaybackContinuing", + "PlaybackFinished", + "RecordingStarted", + "RecordingFinished", + "RecordingFailed", + "ApplicationReplaced", + "BridgeCreated", + "BridgeDestroyed", + "BridgeMerged", + "BridgeBlindTransfer", + "BridgeAttendedTransfer", + "BridgeVideoSourceChanged", + "ChannelCreated", + "ChannelDestroyed", + "ChannelEnteredBridge", + "ChannelLeftBridge", + "ChannelStateChange", + "ChannelDtmfReceived", + "ChannelDialplan", + "ChannelCallerId", + "ChannelUserevent", + "ChannelHangupRequest", + "ChannelVarset", + "ChannelTalkingStarted", + "ChannelTalkingFinished", + "ChannelHold", + "ChannelUnhold", + "ContactStatusChange", + "EndpointStateChange", + "Dial", + "StasisEnd", + "StasisStart", + "TextMessageReceived", + "ChannelConnectedLine", + "PeerStatusChange" + ] + }, + "ContactInfo": { + "id": "ContactInfo", + "description": "Detailed information about a contact on an endpoint.", + "properties": { + "uri": { + "type": "string", + "description": "The location of the contact.", + "required": true + }, + "contact_status": { + "type": "string", + "description": "The current status of the contact.", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "Unreachable", + "Reachable", + "Unknown", + "Created", + "Removed" + ] + } + }, + "aor": { + "type": "string", + "description": "The Address of Record this contact belongs to.", + "required": true + }, + "roundtrip_usec": { + "type": "string", + "description": "Current round trip time, in microseconds, for the contact.", + "required": false + } + } + }, + "Peer": { + "id": "Peer", + "description": "Detailed information about a remote peer that communicates with Asterisk.", + "properties": { + "peer_status": { + "type": "string", + "description": "The current state of the peer. Note that the values of the status are dependent on the underlying peer technology.", + "required": true + }, + "cause": { + "type": "string", + "description": "An optional reason associated with the change in peer_status.", + "required": false + }, + "address": { + "type": "string", + "description": "The IP address of the peer.", + "required": false + }, + "port": { + "type": "string", + "description": "The port of the peer.", + "required": false + }, + "time": { + "type": "string", + "description": "The last known time the peer was contacted.", + "required": false + } + } + }, + "DeviceStateChanged": { + "id": "DeviceStateChanged", + "description": "Notification that a device state has changed.", + "properties": { + "device_state": { + "type": "DeviceState", + "description": "Device state object", + "required": true + } + } + }, + "PlaybackStarted": { + "id": "PlaybackStarted", + "description": "Event showing the start of a media playback operation.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "PlaybackContinuing": { + "id": "PlaybackContinuing", + "description": "Event showing the continuation of a media playback operation from one media URI to the next in the list.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "PlaybackFinished": { + "id": "PlaybackFinished", + "description": "Event showing the completion of a media playback operation.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "RecordingStarted": { + "id": "RecordingStarted", + "description": "Event showing the start of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "RecordingFinished": { + "id": "RecordingFinished", + "description": "Event showing the completion of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "RecordingFailed": { + "id": "RecordingFailed", + "description": "Event showing failure of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "ApplicationReplaced": { + "id": "ApplicationReplaced", + "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.", + "properties": {} + }, + "BridgeCreated": { + "id": "BridgeCreated", + "description": "Notification that a bridge has been created.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeDestroyed": { + "id": "BridgeDestroyed", + "description": "Notification that a bridge has been destroyed.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeMerged": { + "id": "BridgeMerged", + "description": "Notification that one bridge has merged into another.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "bridge_from": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeVideoSourceChanged": { + "id": "BridgeVideoSourceChanged", + "description": "Notification that the source of video in a bridge has changed.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "old_video_source_id": { + "required": false, + "type": "string" + } + } + }, + "BridgeBlindTransfer": { + "id": "BridgeBlindTransfer", + "description": "Notification that a blind transfer has occurred.", + "properties": { + "channel": { + "description": "The channel performing the blind transfer", + "required": true, + "type": "Channel" + }, + "replace_channel": { + "description": "The channel that is replacing transferer when the transferee(s) can not be transferred directly", + "required": false, + "type": "Channel" + }, + "transferee": { + "description": "The channel that is being transferred", + "required": false, + "type": "Channel" + }, + "exten": { + "description": "The extension transferred to", + "required": true, + "type": "string" + }, + "context": { + "description": "The context transferred to", + "required": true, + "type": "string" + }, + "result": { + "description": "The result of the transfer attempt", + "required": true, + "type": "string" + }, + "is_external": { + "description": "Whether the transfer was externally initiated or not", + "required": true, + "type": "boolean" + }, + "bridge": { + "description": "The bridge being transferred", + "type": "Bridge" + } + } + }, + "BridgeAttendedTransfer": { + "id": "BridgeAttendedTransfer", + "description": "Notification that an attended transfer has occurred.", + "properties": { + "transferer_first_leg": { + "description": "First leg of the transferer", + "required": true, + "type": "Channel" + }, + "transferer_second_leg": { + "description": "Second leg of the transferer", + "required": true, + "type": "Channel" + }, + "replace_channel": { + "description": "The channel that is replacing transferer_first_leg in the swap", + "required": false, + "type": "Channel" + }, + "transferee": { + "description": "The channel that is being transferred", + "required": false, + "type": "Channel" + }, + "transfer_target": { + "description": "The channel that is being transferred to", + "required": false, + "type": "Channel" + }, + "result": { + "description": "The result of the transfer attempt", + "required": true, + "type": "string" + }, + "is_external": { + "description": "Whether the transfer was externally initiated or not", + "required": true, + "type": "boolean" + }, + "transferer_first_leg_bridge": { + "description": "Bridge the transferer first leg is in", + "type": "Bridge" + }, + "transferer_second_leg_bridge": { + "description": "Bridge the transferer second leg is in", + "type": "Bridge" + }, + "destination_type": { + "description": "How the transfer was accomplished", + "required": true, + "type": "string" + }, + "destination_bridge": { + "description": "Bridge that survived the merge result", + "type": "string" + }, + "destination_application": { + "description": "Application that has been transferred into", + "type": "string" + }, + "destination_link_first_leg": { + "description": "First leg of a link transfer result", + "type": "Channel" + }, + "destination_link_second_leg": { + "description": "Second leg of a link transfer result", + "type": "Channel" + }, + "destination_threeway_channel": { + "description": "Transferer channel that survived the threeway result", + "type": "Channel" + }, + "destination_threeway_bridge": { + "description": "Bridge that survived the threeway result", + "type": "Bridge" + } + } + }, + "ChannelCreated": { + "id": "ChannelCreated", + "description": "Notification that a channel has been created.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelDestroyed": { + "id": "ChannelDestroyed", + "description": "Notification that a channel has been destroyed.", + "properties": { + "cause": { + "required": true, + "description": "Integer representation of the cause of the hangup", + "type": "int" + }, + "cause_txt": { + "required": true, + "description": "Text representation of the cause of the hangup", + "type": "string" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelEnteredBridge": { + "id": "ChannelEnteredBridge", + "description": "Notification that a channel has entered a bridge.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "channel": { + "type": "Channel" + } + } + }, + "ChannelLeftBridge": { + "id": "ChannelLeftBridge", + "description": "Notification that a channel has left a bridge.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelStateChange": { + "id": "ChannelStateChange", + "description": "Notification of a channel's state change.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelDtmfReceived": { + "id": "ChannelDtmfReceived", + "description": "DTMF received on a channel.\n\nThis event is sent when the DTMF ends. There is no notification about the start of DTMF", + "properties": { + "digit": { + "required": true, + "type": "string", + "description": "DTMF digit received (0-9, A-E, # or *)" + }, + "duration_ms": { + "required": true, + "type": "int", + "description": "Number of milliseconds DTMF was received" + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which DTMF was received" + } + } + }, + "ChannelDialplan": { + "id": "ChannelDialplan", + "description": "Channel changed location in the dialplan.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that changed dialplan location." + }, + "dialplan_app": { + "required": true, + "type": "string", + "description": "The application about to be executed." + }, + "dialplan_app_data": { + "required": true, + "type": "string", + "description": "The data to be passed to the application." + } + } + }, + "ChannelCallerId": { + "id": "ChannelCallerId", + "description": "Channel changed Caller ID.", + "properties": { + "caller_presentation": { + "required": true, + "type": "int", + "description": "The integer representation of the Caller Presentation value." + }, + "caller_presentation_txt": { + "required": true, + "type": "string", + "description": "The text representation of the Caller Presentation value." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that changed Caller ID." + } + } + }, + "ChannelUserevent": { + "id": "ChannelUserevent", + "description": "User-generated event with additional user-defined fields in the object.", + "properties": { + "eventname": { + "required": true, + "type": "string", + "description": "The name of the user event." + }, + "channel": { + "required": false, + "type": "Channel", + "description": "A channel that is signaled with the user event." + }, + "bridge": { + "required": false, + "type": "Bridge", + "description": "A bridge that is signaled with the user event." + }, + "endpoint": { + "required": false, + "type": "Endpoint", + "description": "A endpoint that is signaled with the user event." + }, + "userevent": { + "required": true, + "type": "object", + "description": "Custom Userevent data" + } + } + }, + "ChannelHangupRequest": { + "id": "ChannelHangupRequest", + "description": "A hangup was requested on the channel.", + "properties": { + "cause": { + "type": "int", + "description": "Integer representation of the cause of the hangup." + }, + "soft": { + "type": "boolean", + "description": "Whether the hangup request was a soft hangup request." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which the hangup was requested." + } + } + }, + "ChannelVarset": { + "id": "ChannelVarset", + "description": "Channel variable changed.", + "properties": { + "variable": { + "required": true, + "type": "string", + "description": "The variable that changed." + }, + "value": { + "required": true, + "type": "string", + "description": "The new value of the variable." + }, + "channel": { + "required": false, + "type": "Channel", + "description": "The channel on which the variable was set.\n\nIf missing, the variable is a global variable." + } + } + }, + "ChannelHold": { + "id": "ChannelHold", + "description": "A channel initiated a media hold.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that initiated the hold event." + }, + "musicclass": { + "required": false, + "type": "string", + "description": "The music on hold class that the initiator requested." + } + } + }, + "ChannelUnhold": { + "id": "ChannelUnhold", + "description": "A channel initiated a media unhold.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that initiated the unhold event." + } + } + }, + "ChannelTalkingStarted": { + "id": "ChannelTalkingStarted", + "description": "Talking was detected on the channel.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which talking started." + } + } + }, + "ChannelTalkingFinished": { + "id": "ChannelTalkingFinished", + "description": "Talking is no longer detected on the channel.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which talking completed." + }, + "duration": { + "required": true, + "type": "int", + "description": "The length of time, in milliseconds, that talking was detected on the channel" + } + } + }, + "ContactStatusChange": { + "id": "ContactStatusChange", + "description": "The state of a contact on an endpoint has changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + }, + "contact_info": { + "required": true, + "type": "ContactInfo" + } + } + }, + "PeerStatusChange": { + "id": "PeerStatusChange", + "description": "The state of a peer associated with an endpoint has changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + }, + "peer": { + "required": true, + "type": "Peer" + } + } + }, + "EndpointStateChange": { + "id": "EndpointStateChange", + "description": "Endpoint state changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + } + } + }, + "Dial": { + "id": "Dial", + "description": "Dialing state has changed.", + "properties": { + "caller": { + "required": false, + "type": "Channel", + "description": "The calling channel." + }, + "peer": { + "required": true, + "type": "Channel", + "description": "The dialed channel." + }, + "forward": { + "required": false, + "type": "string", + "description": "Forwarding target requested by the original dialed channel." + }, + "forwarded": { + "required": false, + "type": "Channel", + "description": "Channel that the caller has been forwarded to." + }, + "dialstring": { + "required": false, + "type": "string", + "description": "The dial string for calling the peer channel." + }, + "dialstatus": { + "required": true, + "type": "string", + "description": "Current status of the dialing attempt to the peer." + } + } + }, + "StasisEnd": { + "id": "StasisEnd", + "description": "Notification that a channel has left a Stasis application.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "StasisStart": { + "id": "StasisStart", + "description": "Notification that a channel has entered a Stasis application.", + "properties": { + "args": { + "required": true, + "type": "List[string]", + "description": "Arguments to the application" + }, + "channel": { + "required": true, + "type": "Channel" + }, + "replace_channel": { + "required": false, + "type": "Channel" + } + } + }, + "TextMessageReceived": { + "id": "TextMessageReceived", + "description": "A text message was received from an endpoint.", + "properties": { + "message": { + "required": true, + "type": "TextMessage" + }, + "endpoint": { + "required": false, + "type": "Endpoint" + } + } + }, + "ChannelConnectedLine": { + "id": "ChannelConnectedLine", + "description": "Channel changed Connected Line.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel whose connected line has changed." + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_3_0_0/mailboxes.json b/codegen/src/main/resources/codegen-data/ari_3_0_0/mailboxes.json new file mode 100644 index 00000000..ed50019f --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_3_0_0/mailboxes.json @@ -0,0 +1,134 @@ +{ + "_copyright": "Copyright (C) 2013, Digium, Inc.", + "_author": "Jonathan Rose ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/mailboxes.{format}", + "apis": [ + { + "path": "/mailboxes", + "description": "Mailboxes", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all mailboxes.", + "nickname": "list", + "responseClass": "List[Mailbox]" + } + ] + }, + { + "path": "/mailboxes/{mailboxName}", + "description": "Mailbox state", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve the current state of a mailbox.", + "nickname": "get", + "responseClass": "Mailbox", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Change the state of a mailbox. (Note - implicitly creates the mailbox).", + "nickname": "update", + "responseClass": "void", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "oldMessages", + "description": "Count of old messages in the mailbox", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "newMessages", + "description": "Count of new messages in the mailbox", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "int" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Destroy a mailbox.", + "nickname": "delete", + "responseClass": "void", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + } + ] + } + ], + "models": { + "Mailbox": { + "id": "Mailbox", + "description": "Represents the state of a mailbox.", + "properties": { + "name": { + "type": "string", + "description": "Name of the mailbox.", + "required": true + }, + "old_messages": { + "type": "int", + "description": "Count of old messages in the mailbox.", + "required": true + }, + "new_messages": { + "type": "int", + "description": "Count of new messages in the mailbox.", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_3_0_0/playbacks.json b/codegen/src/main/resources/codegen-data/ari_3_0_0/playbacks.json new file mode 100644 index 00000000..3dc4e1da --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_3_0_0/playbacks.json @@ -0,0 +1,161 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/playbacks.{format}", + "apis": [ + { + "path": "/playbacks/{playbackId}", + "description": "Control object for a playback operation.", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a playback's details.", + "nickname": "get", + "responseClass": "Playback", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "The playback cannot be found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop a playback.", + "nickname": "stop", + "responseClass": "void", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "The playback cannot be found" + } + ] + } + ] + }, + { + "path": "/playbacks/{playbackId}/control", + "description": "Control object for a playback operation.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Control a playback.", + "nickname": "control", + "responseClass": "void", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "operation", + "description": "Operation to perform on the playback.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "restart", + "pause", + "unpause", + "reverse", + "forward" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "The provided operation parameter was invalid" + }, + { + "code": 404, + "reason": "The playback cannot be found" + }, + { + "code": 409, + "reason": "The operation cannot be performed in the playback's current state" + } +] + } + ] + } + ], + "models": { + "Playback": { + "id": "Playback", + "description": "Object representing the playback of media to a channel", + "properties": { + "id": { + "type": "string", + "description": "ID for this playback operation", + "required": true + }, + "media_uri": { + "type": "string", + "description": "The URI for the media currently being played back.", + "required": true + }, + "next_media_uri": { + "type": "string", + "description": "If a list of URIs is being played, the next media URI to be played back.", + "required": false + }, + "target_uri": { + "type": "string", + "description": "URI for the channel or bridge to play the media on", + "required": true + }, + "language": { + "type": "string", + "description": "For media types that support multiple languages, the language requested for playback." + }, + "state": { + "type": "string", + "description": "Current state of the playback operation.", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "queued", + "playing", + "continuing", + "done" + ] + } + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_3_0_0/recordings.json b/codegen/src/main/resources/codegen-data/ari_3_0_0/recordings.json new file mode 100644 index 00000000..d0b9630d --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_3_0_0/recordings.json @@ -0,0 +1,410 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/recordings.{format}", + "apis": [ + { + "path": "/recordings/stored", + "description": "Recordings", + "operations": [ + { + "httpMethod": "GET", + "summary": "List recordings that are complete.", + "nickname": "listStored", + "responseClass": "List[StoredRecording]" + } + ] + }, + { + "path": "/recordings/stored/{recordingName}", + "description": "Individual recording", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a stored recording's details.", + "nickname": "getStored", + "responseClass": "StoredRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Delete a stored recording.", + "nickname": "deleteStored", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/stored/{recordingName}/file", + "description": "The actual file associated with the stored recording", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the file associated with the stored recording.", + "nickname": "getStoredFile", + "responseClass": "binary", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 403, + "reason": "The recording file could not be opened" + }, + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/stored/{recordingName}/copy", + "description": "Copy an individual recording", + "operations": [ + { + "httpMethod": "POST", + "summary": "Copy a stored recording.", + "nickname": "copyStored", + "responseClass": "StoredRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording to copy", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "destinationRecordingName", + "description": "The destination name of the recording", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "A recording with the same name already exists on the system" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}", + "description": "A recording that is in progress", + "operations": [ + { + "httpMethod": "GET", + "summary": "List live recordings.", + "nickname": "getLive", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop a live recording and discard it.", + "nickname": "cancel", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/stop", + "operations": [ + { + "httpMethod": "POST", + "summary": "Stop a live recording and store it.", + "nickname": "stop", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/pause", + "operations": [ + { + "httpMethod": "POST", + "summary": "Pause a live recording.", + "notes": "Pausing a recording suspends silence detection, which will be restarted when the recording is unpaused. Paused time is not included in the accounting for maxDurationSeconds.", + "nickname": "pause", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unpause a live recording.", + "nickname": "unpause", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/mute", + "operations": [ + { + "httpMethod": "POST", + "summary": "Mute a live recording.", + "notes": "Muting a recording suspends silence detection, which will be restarted when the recording is unmuted.", + "nickname": "mute", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unmute a live recording.", + "nickname": "unmute", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + } + ] + } + ], + "models": { + "StoredRecording": { + "id": "StoredRecording", + "description": "A past recording that may be played back.", + "properties": { + "name": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + }, + "LiveRecording": { + "id": "LiveRecording", + "description": "A recording that is in progress", + "properties": { + "name": { + "required": true, + "type": "string", + "description": "Base name for the recording" + }, + "format": { + "required": true, + "type": "string", + "description": "Recording format (wav, gsm, etc.)" + }, + "target_uri": { + "required": true, + "type": "string", + "description": "URI for the channel or bridge being recorded" + }, + "state": { + "required": true, + "type": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "queued", + "recording", + "paused", + "done", + "failed", + "canceled" + ] + } + }, + "duration": { + "required": false, + "type": "int", + "description": "Duration in seconds of the recording" + }, + "talking_duration": { + "required": false, + "type": "int", + "description": "Duration of talking, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds." + }, + "silence_duration": { + "required": false, + "type": "int", + "description": "Duration of silence, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds." + }, + "cause": { + "required": false, + "type": "string", + "description": "Cause for recording failure if failed" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_3_0_0/sounds.json b/codegen/src/main/resources/codegen-data/ari_3_0_0/sounds.json new file mode 100644 index 00000000..8fbe1c57 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_3_0_0/sounds.json @@ -0,0 +1,99 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/sounds.{format}", + "apis": [ + { + "path": "/sounds", + "description": "Sounds", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all sounds.", + "nickname": "list", + "responseClass": "List[Sound]", + "parameters": [ + { + "name": "lang", + "description": "Lookup sound for a specific language.", + "paramType": "query", + "dataType": "string", + "required": false + }, + { + "name": "format", + "description": "Lookup sound in a specific format.", + "paramType": "query", + "dataType": "string", + "required": false, + "__note": "core show translation can show translation paths between formats, along with relative costs. so this could be just installed format, or we could follow that for transcoded formats." + } + ] + } + ] + }, + { + "path": "/sounds/{soundId}", + "description": "Individual sound", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a sound's details.", + "nickname": "get", + "responseClass": "Sound", + "parameters": [ + { + "name": "soundId", + "description": "Sound's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ] + } + ] + } + ], + "models": { + "FormatLangPair": { + "id": "FormatLangPair", + "description": "Identifies the format and language of a sound file", + "properties": { + "language": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + }, + "Sound": { + "id": "Sound", + "description": "A media file that may be played back.", + "properties": { + "id": { + "required": true, + "description": "Sound's identifier.", + "type": "string" + }, + "text": { + "required": false, + "description": "Text description of the sound, usually the words spoken.", + "type": "string" + }, + "formats": { + "required": true, + "description": "The formats and languages in which this sound is available.", + "type": "List[FormatLangPair]" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_4_0_0/applications.json b/codegen/src/main/resources/codegen-data/ari_4_0_0/applications.json new file mode 100644 index 00000000..cdd69c41 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_4_0_0/applications.json @@ -0,0 +1,172 @@ +{ + "_copyright": "Copyright (C) 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/applications.{format}", + "apis": [ + { + "path": "/applications", + "description": "Stasis applications", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all applications.", + "nickname": "list", + "responseClass": "List[Application]" + } + ] + }, + { + "path": "/applications/{applicationName}", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get details of an application.", + "nickname": "get", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Application does not exist." + } + ] + } + ] + }, + { + "path": "/applications/{applicationName}/subscription", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "POST", + "summary": "Subscribe an application to a event source.", + "notes": "Returns the state of the application after the subscriptions have changed", + "nickname": "subscribe", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "eventSource", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing parameter." + }, + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 422, + "reason": "Event source does not exist." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unsubscribe an application from an event source.", + "notes": "Returns the state of the application after the subscriptions have changed", + "nickname": "unsubscribe", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "eventSource", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing parameter; event source scheme not recognized." + }, + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 409, + "reason": "Application not subscribed to event source." + }, + { + "code": 422, + "reason": "Event source does not exist." + } + ] + } + ] + } + ], + "models": { + "Application": { + "id": "Application", + "description": "Details of a Stasis application", + "properties": { + "name": { + "type": "string", + "description": "Name of this application", + "required": true + }, + "channel_ids": { + "type": "List[string]", + "description": "Id's for channels subscribed to.", + "required": true + }, + "bridge_ids": { + "type": "List[string]", + "description": "Id's for bridges subscribed to.", + "required": true + }, + "endpoint_ids": { + "type": "List[string]", + "description": "{tech}/{resource} for endpoints subscribed to.", + "required": true + }, + "device_names": { + "type": "List[string]", + "description": "Names of the devices subscribed to.", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_4_0_0/asterisk.json b/codegen/src/main/resources/codegen-data/ari_4_0_0/asterisk.json new file mode 100644 index 00000000..841e6cd8 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_4_0_0/asterisk.json @@ -0,0 +1,725 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/asterisk.{format}", + "apis": [ + { + "path": "/asterisk/config/dynamic/{configClass}/{objectType}/{id}", + "description": "Asterisk dynamic configuration", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve a dynamic configuration object.", + "nickname": "getObject", + "responseClass": "List[ConfigTuple]", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to retrieve.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to retrieve.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "{configClass|objectType|id} not found" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Create or update a dynamic configuration object.", + "nickname": "updateObject", + "responseClass": "List[ConfigTuple]", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to create or update.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to create or update.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "fields", + "description": "The body object should have a value that is a list of ConfigTuples, which provide the fields to update. Ex. [ { \"attribute\": \"directmedia\", \"value\": \"false\" } ]", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Bad request body" + }, + { + "code": 403, + "reason": "Could not create or update object" + }, + { + "code": 404, + "reason": "{configClass|objectType} not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Delete a dynamic configuration object.", + "nickname": "deleteObject", + "responseClass": "void", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to delete.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to delete.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 403, + "reason": "Could not delete object" + }, + { + "code": 404, + "reason": "{configClass|objectType|id} not found" + } + ] + } + ] + }, + { + "path": "/asterisk/info", + "description": "Asterisk system information (similar to core show settings)", + "operations": [ + { + "httpMethod": "GET", + "summary": "Gets Asterisk system information.", + "nickname": "getInfo", + "responseClass": "AsteriskInfo", + "parameters": [ + { + "name": "only", + "description": "Filter information returned", + "paramType": "query", + "required": false, + "allowMultiple": true, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "build", + "system", + "config", + "status" + ] + } + } + ] + } + ] + }, + { + "path": "/asterisk/ping", + "description": "Asterisk ping", + "operations": [ + { + "httpMethod": "GET", + "summary": "Response pong message.", + "nickname": "ping", + "responseClass": "AsteriskPing" + } + ] + }, + { + "path": "/asterisk/modules", + "description": "Asterisk modules", + "operations": [ + { + "httpMethod": "GET", + "summary": "List Asterisk modules.", + "nickname": "listModules", + "responseClass": "List[Module]" + } + ] + }, + { + "path": "/asterisk/modules/{moduleName}", + "description": "Asterisk module", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get Asterisk module information.", + "nickname": "getModule", + "responseClass": "Module", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module could not be found in running modules." + }, + { + "code": 409, + "reason": "Module information could not be retrieved." + } + ] + }, + { + "httpMethod": "POST", + "summary": "Load an Asterisk module.", + "nickname": "loadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 409, + "reason": "Module could not be loaded." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unload an Asterisk module.", + "nickname": "unloadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module not found in running modules." + }, + { + "code": 409, + "reason": "Module could not be unloaded." + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Reload an Asterisk module.", + "nickname": "reloadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module not found in running modules." + }, + { + "code": 409, + "reason": "Module could not be reloaded." + } + ] + } + ] + }, + { + "path": "/asterisk/logging", + "description": "Asterisk log channels", + "operations": [ + { + "httpMethod": "GET", + "summary": "Gets Asterisk log channel information.", + "nickname": "listLogChannels", + "responseClass": "List[LogChannel]" + } + ] + }, + { + "path": "/asterisk/logging/{logChannelName}", + "description": "Asterisk log channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Adds a log channel.", + "nickname": "addLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "The log channel to add", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "configuration", + "description": "levels of the log channel", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Bad request body" + }, + { + "code": 409, + "reason": "Log channel could not be created." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Deletes a log channel.", + "nickname": "deleteLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "Log channels name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Log channel does not exist." + } + ] + } + ] + }, + { + "path": "/asterisk/logging/{logChannelName}/rotate", + "description": "Asterisk log channel", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Rotates a log channel.", + "nickname": "rotateLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "Log channel's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Log channel does not exist." + } + ] + } + ] + }, + { + "path": "/asterisk/variable", + "description": "Global variables", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the value of a global variable.", + "nickname": "getGlobalVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "variable", + "description": "The variable to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + } + ] + }, + { + "httpMethod": "POST", + "summary": "Set the value of a global variable.", + "nickname": "setGlobalVar", + "responseClass": "void", + "parameters": [ + { + "name": "variable", + "description": "The variable to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + } + ] + } + ] + } + ], + "models": { + "BuildInfo": { + "id": "BuildInfo", + "description": "Info about how Asterisk was built", + "properties": { + "os": { + "required": true, + "type": "string", + "description": "OS Asterisk was built on." + }, + "kernel": { + "required": true, + "type": "string", + "description": "Kernel version Asterisk was built on." + }, + "options": { + "required": true, + "type": "string", + "description": "Compile time options, or empty string if default." + }, + "machine": { + "required": true, + "type": "string", + "description": "Machine architecture (x86_64, i686, ppc, etc.)" + }, + "date": { + "required": true, + "type": "string", + "description": "Date and time when Asterisk was built." + }, + "user": { + "required": true, + "type": "string", + "description": "Username that build Asterisk" + } + } + }, + "SystemInfo": { + "id": "SystemInfo", + "description": "Info about Asterisk", + "properties": { + "version": { + "required": true, + "type": "string", + "description": "Asterisk version." + }, + "entity_id": { + "required": true, + "type": "string", + "description": "" + } + } + }, + "SetId": { + "id": "SetId", + "description": "Effective user/group id", + "properties": { + "user": { + "required": true, + "type": "string", + "description": "Effective user id." + }, + "group": { + "required": true, + "type": "string", + "description": "Effective group id." + } + } + }, + "ConfigInfo": { + "id": "ConfigInfo", + "description": "Info about Asterisk configuration", + "properties": { + "name": { + "required": true, + "type": "string", + "description": "Asterisk system name." + }, + "default_language": { + "required": true, + "type": "string", + "description": "Default language for media playback." + }, + "max_channels": { + "required": false, + "type": "int", + "description": "Maximum number of simultaneous channels." + }, + "max_open_files": { + "required": false, + "type": "int", + "description": "Maximum number of open file handles (files, sockets)." + }, + "max_load": { + "required": false, + "type": "double", + "description": "Maximum load avg on system." + }, + "setid": { + "required": true, + "type": "SetId", + "description": "Effective user/group id for running Asterisk." + } + } + }, + "StatusInfo": { + "id": "StatusInfo", + "description": "Info about Asterisk status", + "properties": { + "startup_time": { + "required": true, + "type": "Date", + "description": "Time when Asterisk was started." + }, + "last_reload_time": { + "required": true, + "type": "Date", + "description": "Time when Asterisk was last reloaded." + } + } + }, + "AsteriskInfo": { + "id": "AsteriskInfo", + "description": "Asterisk system information", + "properties": { + "build": { + "required": false, + "type": "BuildInfo", + "description": "Info about how Asterisk was built" + }, + "system": { + "required": false, + "type": "SystemInfo", + "description": "Info about the system running Asterisk" + }, + "config": { + "required": false, + "type": "ConfigInfo", + "description": "Info about Asterisk configuration" + }, + "status": { + "required": false, + "type": "StatusInfo", + "description": "Info about Asterisk status" + } + } + }, + "AsteriskPing": { + "id": "AsteriskPing", + "description": "Asterisk ping information", + "properties": { + "asterisk_id": { + "required": true, + "type": "string", + "description": "Asterisk id info" + }, + "ping": { + "required": true, + "type": "string", + "description": "Always string value is pong" + }, + "timestamp": { + "required": true, + "type": "string", + "description": "The timestamp string of request received time" + } + } + }, + "Module": { + "id": "Module", + "description": "Details of an Asterisk module", + "properties": { + "name": { + "type": "string", + "description": "The name of this module", + "required": true + }, + "description": { + "type": "string", + "description": "The description of this module", + "required": true + }, + "use_count": { + "type": "int", + "description": "The number of times this module is being used", + "required": true + }, + "status": { + "type": "string", + "description": "The running status of this module", + "required": true + }, + "support_level": { + "type": "string", + "description": "The support state of this module", + "required": true + } + } + }, + "LogChannel": { + "id": "LogChannel", + "description": "Details of an Asterisk log channel", + "properties": { + "channel": { + "type": "string", + "description": "The log channel path", + "required": true + }, + "type": { + "type": "string", + "description": "Types of logs for the log channel", + "required": true + }, + "status": { + "type": "string", + "description": "Whether or not a log type is enabled", + "required": true + }, + "configuration": { + "type": "string", + "description": "The various log levels", + "required": true + } + } + }, + "Variable": { + "id": "Variable", + "description": "The value of a channel variable", + "properties": { + "value": { + "required": true, + "type": "string", + "description": "The value of the variable requested" + } + } + }, + "ConfigTuple": { + "id": "ConfigTuple", + "description": "A key/value pair that makes up part of a configuration object.", + "properties": { + "attribute": { + "required": true, + "type": "string", + "description": "A configuration object attribute." + }, + "value": { + "required": true, + "type": "string", + "description": "The value for the attribute." + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_4_0_0/bridges.json b/codegen/src/main/resources/codegen-data/ari_4_0_0/bridges.json new file mode 100644 index 00000000..04416c12 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_4_0_0/bridges.json @@ -0,0 +1,760 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/bridges.{format}", + "requiresModules": [ + "res_stasis_recording", + "res_stasis_playback" + ], + "apis": [ + { + "path": "/bridges", + "description": "Active bridges", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all active bridges in Asterisk.", + "nickname": "list", + "responseClass": "List[Bridge]" + }, + { + "httpMethod": "POST", + "summary": "Create a new bridge.", + "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", + "nickname": "create", + "responseClass": "Bridge", + "parameters": [ + { + "name": "type", + "description": "Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media, video_sfu).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "bridgeId", + "description": "Unique ID to give to the bridge being created.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Name to give to the bridge being created.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}", + "description": "Individual bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Create a new bridge or updates an existing one.", + "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", + "nickname": "createWithId", + "responseClass": "Bridge", + "parameters": [ + { + "name": "type", + "description": "Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media, video_sfu) to set.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "bridgeId", + "description": "Unique ID to give to the bridge being created.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Set the name of the bridge.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ] + }, + { + "httpMethod": "GET", + "summary": "Get bridge details.", + "nickname": "get", + "responseClass": "Bridge", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Shut down a bridge.", + "notes": "If any channels are in this bridge, they will be removed and resume whatever they were doing beforehand.", + "nickname": "destroy", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/addChannel", + "description": "Add a channel to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Add a channel to a bridge.", + "nickname": "addChannel", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channel", + "description": "Ids of channels to add to bridge", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "role", + "description": "Channel's role in the bridge", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "absorbDTMF", + "description": "Absorb DTMF coming from this channel, preventing it to pass through to the bridge", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "mute", + "description": "Mute audio from this channel, preventing it to pass through to the bridge", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Channel not found" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application; Channel currently recording" + }, + { + "code": 422, + "reason": "Channel not in Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/removeChannel", + "description": "Remove a channel from a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Remove a channel from a bridge.", + "nickname": "removeChannel", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channel", + "description": "Ids of channels to remove from bridge", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Channel not found" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + }, + { + "code": 422, + "reason": "Channel not in this bridge" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/videoSource/{channelId}", + "description": "Set a channel as the video source in a multi-party bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Set a channel as the video source in a multi-party mixing bridge. This operation has no effect on bridges with two or fewer participants.", + "nickname": "setVideoSource", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge or Channel not found" + }, + { + "code": 409, + "reason": "Channel not in Stasis application" + }, + { + "code": 422, + "reason": "Channel not in this Bridge" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/videoSource", + "description": "Removes any explicit video source", + "operations": [ + { + "httpMethod": "DELETE", + "summary": "Removes any explicit video source in a multi-party mixing bridge. This operation has no effect on bridges with two or fewer participants. When no explicit video source is set, talk detection will be used to determine the active video stream.", + "nickname": "clearVideoSource", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/moh", + "description": "Play music on hold to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play music on hold to a bridge or change the MOH class that is playing.", + "nickname": "startMoh", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "mohClass", + "description": "Channel's id", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing music on hold to a bridge.", + "notes": "This will only stop music on hold being played via POST bridges/{bridgeId}/moh.", + "nickname": "stopMoh", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/play", + "description": "Play media to the participants of a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media on a bridge.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "play", + "responseClass": "Playback", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "playbackId", + "description": "Playback Id.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/play/{playbackId}", + "description": "Play media to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media on a bridge.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "playWithId", + "responseClass": "Playback", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + + } + ] + }, + { + "path": "/bridges/{bridgeId}/record", + "description": "Record audio on a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start a recording.", + "notes": "This records the mixed audio from all channels participating in this bridge.", + "nickname": "record", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Recording's filename", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "maxDurationSeconds", + "description": "Maximum duration of the recording, in seconds. 0 for no limit.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "maxSilenceSeconds", + "description": "Maximum duration of silence, in seconds. 0 for no limit.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "ifExists", + "description": "Action to take if a recording with the same name already exists.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "fail", + "allowableValues": { + "valueType": "LIST", + "values": [ + "fail", + "overwrite", + "append" + ] + } + }, + { + "name": "beep", + "description": "Play beep when recording begins", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "terminateOn", + "description": "DTMF input to terminate recording.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "any", + "*", + "#" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge is not in a Stasis application; A recording with the same name already exists on the system and can not be overwritten because it is in progress or ifExists=fail" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + } + ], + "models": { + "Bridge": { + "id": "Bridge", + "description": "The merging of media from one or more channels.\n\nEveryone on the bridge receives the same audio.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for this bridge", + "required": true + }, + "technology": { + "type": "string", + "description": "Name of the current bridging technology", + "required": true + }, + "bridge_type": { + "type": "string", + "description": "Type of bridge technology", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "mixing", + "holding" + ] + } + }, + "bridge_class": { + "type": "string", + "description": "Bridging class", + "required": true + }, + "creator": { + "type": "string", + "description": "Entity that created the bridge", + "required": true + }, + "name": { + "type": "string", + "description": "Name the creator gave the bridge", + "required": true + }, + "channels": { + "type": "List[string]", + "description": "Ids of channels participating in this bridge", + "required": true + }, + "video_mode": { + "type": "string", + "description": "The video mode the bridge is using. One of 'none', 'talker', or 'single'.", + "required": false + }, + "video_source_id": { + "type": "string", + "description": "The ID of the channel that is the source of video in this bridge, if one exists.", + "required": false + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_4_0_0/channels.json b/codegen/src/main/resources/codegen-data/ari_4_0_0/channels.json new file mode 100644 index 00000000..08db2246 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_4_0_0/channels.json @@ -0,0 +1,1787 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/channels.{format}", + "requiresModules": [ + "res_stasis_answer", + "res_stasis_playback", + "res_stasis_recording", + "res_stasis_snoop" + ], + "apis": [ + { + "path": "/channels", + "description": "Active channels", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all active channels in Asterisk.", + "nickname": "list", + "responseClass": "List[Channel]" + }, + { + "httpMethod": "POST", + "summary": "Create a new channel (originate).", + "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.", + "nickname": "originate", + "responseClass": "Channel", + "parameters": [ + { + "name": "endpoint", + "description": "Endpoint to call.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to dial after the endpoint answers. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to dial after the endpoint answers. If omitted, uses 'default'. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to dial after the endpoint answers. If omitted, uses 1. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "long" + }, + { + "name": "label", + "description": "The label to dial after the endpoint answers. Will supersede 'priority' if provided. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The application that is subscribed to the originated channel. When the channel is answered, it will be passed to this Stasis application. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "callerId", + "description": "CallerID to use when dialing the endpoint or extension.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 30 + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "The unique id of the channel which is originating this one.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "formats", + "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for originating a channel." + }, + { + "code": 409, + "reason": "Channel with given unique ID already exists." + } + ] + } + ] + }, + { + "path": "/channels/create", + "description": "Create a channel and place it in a Stasis app, but do not dial the channel yet.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Create channel.", + "nickname": "create", + "responseClass": "Channel", + "parameters": [ + { + "name": "endpoint", + "description": "Endpoint for channel communication", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "Stasis Application to place channel into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "Unique ID of the calling channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "formats", + "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 409, + "reason": "Channel with given unique ID already exists." + } + ] + } + ] + }, + { + "path": "/channels/{channelId}", + "description": "Active channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "Channel details.", + "nickname": "get", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + } + ] + }, + { + "httpMethod": "POST", + "summary": "Create a new channel (originate with id).", + "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.", + "nickname": "originateWithId", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "endpoint", + "description": "Endpoint to call.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to dial after the endpoint answers. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to dial after the endpoint answers. If omitted, uses 'default'. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to dial after the endpoint answers. If omitted, uses 1. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "long" + }, + { + "name": "label", + "description": "The label to dial after the endpoint answers. Will supersede 'priority' if provided. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The application that is subscribed to the originated channel. When the channel is answered, it will be passed to this Stasis application. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "callerId", + "description": "CallerID to use when dialing the endpoint or extension.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 30 + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "The unique id of the channel which is originating this one.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "formats", + "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for originating a channel." + }, + { + "code": 409, + "reason": "Channel with given unique ID already exists." + } + ] + + }, + { + "httpMethod": "DELETE", + "summary": "Delete (i.e. hangup) a channel.", + "nickname": "hangup", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "reason", + "description": "Reason for hanging up the channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defalutValue": "normal", + "allowableValues": { + "valueType": "LIST", + "values": [ + "normal", + "busy", + "congestion", + "no_answer", + "timeout", + "rejected", + "unallocated", + "normal_unspecified", + "number_incomplete", + "codec_mismatch", + "interworking", + "failure", + "answered_elsewhere" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid reason for hangup provided" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/continue", + "description": "Exit application; continue execution in the dialplan", + "operations": [ + { + "httpMethod": "POST", + "summary": "Exit application; continue execution in the dialplan.", + "nickname": "continueInDialplan", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "label", + "description": "The label to continue to - will supersede 'priority' if both are provided.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/redirect", + "description": "Inform the channel that it should redirect itself to a different location. Note that this will almost certainly cause the channel to exit the application.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Redirect the channel to a different location.", + "nickname": "redirect", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "endpoint", + "description": "The endpoint to redirect the channel to", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Endpoint parameter not provided" + }, + { + "code": 404, + "reason": "Channel or endpoint not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 422, + "reason": "Endpoint is not the same type as the channel" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/answer", + "description": "Answer a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Answer a channel.", + "nickname": "answer", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/ring", + "description": "Send a ringing indication to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Indicate ringing to a channel.", + "nickname": "ring", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop ringing indication on a channel if locally generated.", + "nickname": "ringStop", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/dtmf", + "description": "Send DTMF to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Send provided DTMF to a given channel.", + "nickname": "sendDTMF", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "dtmf", + "description": "DTMF To send.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "before", + "description": "Amount of time to wait before DTMF digits (specified in milliseconds) start.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0 + }, + { + "name": "between", + "description": "Amount of time in between DTMF digits (specified in milliseconds).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 100 + }, + { + "name": "duration", + "description": "Length of each DTMF digit (specified in milliseconds).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 100 + }, + { + "name": "after", + "description": "Amount of time to wait after DTMF digits (specified in milliseconds) end.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0 + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "DTMF is required" + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/mute", + "description": "Mute a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Mute a channel.", + "nickname": "mute", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "Direction in which to mute audio", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both", + "in", + "out" + ] + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unmute a channel.", + "nickname": "unmute", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "Direction in which to unmute audio", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both", + "in", + "out" + ] + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/hold", + "description": "Put a channel on hold", + "operations": [ + { + "httpMethod": "POST", + "summary": "Hold a channel.", + "nickname": "hold", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Remove a channel from hold.", + "nickname": "unhold", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/moh", + "description": "Play music on hold to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play music on hold to a channel.", + "notes": "Using media operations such as /play on a channel playing MOH in this manner will suspend MOH without resuming automatically. If continuing music on hold is desired, the stasis application must reinitiate music on hold.", + "nickname": "startMoh", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "mohClass", + "description": "Music on hold class to use", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing music on hold to a channel.", + "nickname": "stopMoh", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/silence", + "description": "Play silence to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play silence to a channel.", + "notes": "Using media operations such as /play on a channel playing silence in this manner will suspend silence without resuming automatically.", + "nickname": "startSilence", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing silence to a channel.", + "nickname": "stopSilence", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/play", + "description": "Play media to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "play", + "responseClass": "Playback", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000 + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/play/{playbackId}", + "description": "Play media to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media and specify the playbackId.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "playWithId", + "responseClass": "Playback", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000 + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/record", + "description": "Record audio from a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start a recording.", + "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.", + "nickname": "record", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Recording's filename", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "maxDurationSeconds", + "description": "Maximum duration of the recording, in seconds. 0 for no limit", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "maxSilenceSeconds", + "description": "Maximum duration of silence, in seconds. 0 for no limit", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "ifExists", + "description": "Action to take if a recording with the same name already exists.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "fail", + "allowableValues": { + "valueType": "LIST", + "values": [ + "fail", + "overwrite", + "append" + ] + } + }, + { + "name": "beep", + "description": "Play beep when recording begins", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "terminateOn", + "description": "DTMF input to terminate recording", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "any", + "*", + "#" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "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" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/variable", + "description": "Variables on a channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the value of a channel variable or function.", + "nickname": "getChannelVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The channel variable or function to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Channel or variable not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "POST", + "summary": "Set the value of a channel variable or function.", + "nickname": "setChannelVar", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The channel variable or function to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/snoop", + "description": "Snoop (spy/whisper) on a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start snooping.", + "notes": "Snoop (spy/whisper) on a specific channel.", + "nickname": "snoopChannel", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "spy", + "description": "Direction of audio to spy on", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "whisper", + "description": "Direction of audio to whisper into", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "app", + "description": "Application the snooping channel is placed into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "snoopId", + "description": "Unique ID to assign to snooping channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/snoop/{snoopId}", + "description": "Snoop (spy/whisper) on a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start snooping.", + "notes": "Snoop (spy/whisper) on a specific channel.", + "nickname": "snoopChannelWithId", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "snoopId", + "description": "Unique ID to assign to snooping channel", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "spy", + "description": "Direction of audio to spy on", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "whisper", + "description": "Direction of audio to whisper into", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "app", + "description": "Application the snooping channel is placed into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/dial", + "description": "Dial a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Dial a created channel.", + "nickname": "dial", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "caller", + "description": "Channel ID of caller", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Dial timeout", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel cannot be found." + }, + { + "code": 409, + "reason": "Channel cannot be dialed." + } + ] + } + ] + } + ], + "models": { + "Dialed": { + "id": "Dialed", + "description": "Dialed channel information.", + "properties": {} + }, + "DialplanCEP": { + "id": "DialplanCEP", + "description": "Dialplan location (context/extension/priority)", + "properties": { + "context": { + "required": true, + "type": "string", + "description": "Context in the dialplan" + }, + "exten": { + "required": true, + "type": "string", + "description": "Extension in the dialplan" + }, + "priority": { + "required": true, + "type": "long", + "description": "Priority in the dialplan" + } + } + }, + "CallerID": { + "id": "CallerID", + "description": "Caller identification", + "properties": { + "name": { + "required": true, + "type": "string" + }, + "number": { + "required": true, + "type": "string" + } + } + }, + "Channel": { + "id": "Channel", + "description": "A specific communication connection between Asterisk and an Endpoint.", + "properties": { + "id": { + "required": true, + "type": "string", + "description": "Unique identifier of the channel.\n\nThis is the same as the Uniqueid field in AMI." + }, + "name": { + "required": true, + "type": "string", + "description": "Name of the channel (i.e. SIP/foo-0000a7e3)" + }, + "state": { + "required": true, + "type": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "Down", + "Rsrved", + "OffHook", + "Dialing", + "Ring", + "Ringing", + "Up", + "Busy", + "Dialing Offhook", + "Pre-ring", + "Unknown" + ] + } + }, + "caller": { + "required": true, + "type": "CallerID" + }, + "connected": { + "required": true, + "type": "CallerID" + }, + "accountcode": { + "required": true, + "type": "string" + }, + "dialplan": { + "required": true, + "type": "DialplanCEP", + "description": "Current location in the dialplan" + }, + "creationtime": { + "required": true, + "type": "Date", + "description": "Timestamp when channel was created" + }, + "language": { + "required": true, + "type": "string", + "description": "The default spoken language" + }, + "channelvars": { + "required": false, + "type": "object", + "description": "Channel variables" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_4_0_0/deviceStates.json b/codegen/src/main/resources/codegen-data/ari_4_0_0/deviceStates.json new file mode 100644 index 00000000..bd389355 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_4_0_0/deviceStates.json @@ -0,0 +1,154 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "Kevin Harwell ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/deviceStates.{format}", + "requiresModules": [ + "res_stasis_device_state" + ], + "apis": [ + { + "path": "/deviceStates", + "description": "Device states", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all ARI controlled device states.", + "nickname": "list", + "responseClass": "List[DeviceState]" + } + ] + }, + { + "path": "/deviceStates/{deviceName}", + "description": "Device state", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve the current state of a device.", + "nickname": "get", + "responseClass": "DeviceState", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Change the state of a device controlled by ARI. (Note - implicitly creates the device state).", + "nickname": "update", + "responseClass": "void", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "deviceState", + "description": "Device state value", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "NOT_INUSE", + "INUSE", + "BUSY", + "INVALID", + "UNAVAILABLE", + "RINGING", + "RINGINUSE", + "ONHOLD" + ] + } + + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Device name is missing" + }, + { + "code": 409, + "reason": "Uncontrolled device specified" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Destroy a device-state controlled by ARI.", + "nickname": "delete", + "responseClass": "void", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Device name is missing" + }, + { + "code": 409, + "reason": "Uncontrolled device specified" + } + ] + } + ] + } + ], + "models": { + "DeviceState": { + "id": "DeviceState", + "description": "Represents the state of a device.", + "properties": { + "name": { + "type": "string", + "description": "Name of the device.", + "required": true + }, + "state": { + "type": "string", + "description": "Device's state", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "UNKNOWN", + "NOT_INUSE", + "INUSE", + "BUSY", + "INVALID", + "UNAVAILABLE", + "RINGING", + "RINGINUSE", + "ONHOLD" + ] + } + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_4_0_0/endpoints.json b/codegen/src/main/resources/codegen-data/ari_4_0_0/endpoints.json new file mode 100644 index 00000000..264c0eb2 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_4_0_0/endpoints.json @@ -0,0 +1,279 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/endpoints.{format}", + "apis": [ + { + "path": "/endpoints", + "description": "Asterisk endpoints", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all endpoints.", + "nickname": "list", + "responseClass": "List[Endpoint]" + } + ] + }, + { + "path": "/endpoints/sendMessage", + "description": "Send a message to some technology URI or endpoint.", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Send a message to some technology URI or endpoint.", + "nickname": "sendMessage", + "responseClass": "void", + "parameters": [ + { + "name": "to", + "description": "The endpoint resource or technology specific URI to send the message to. Valid resources are sip, pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "from", + "description": "The endpoint resource or technology specific identity to send this message from. Valid resources are sip, pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "body", + "description": "The body of the message", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "descriptioni": "The \"variables\" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, pjsip and sip resource types will add the key/value pairs as SIP headers,", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoint not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}", + "description": "Asterisk endpoints", + "operations": [ + { + "httpMethod": "GET", + "summary": "List available endoints for a given endpoint technology.", + "nickname": "listByTech", + "responseClass": "List[Endpoint]", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoints (sip,iax2,...)", + "paramType": "path", + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Endpoints not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}/{resource}", + "description": "Single endpoint", + "operations": [ + { + "httpMethod": "GET", + "summary": "Details for an endpoint.", + "nickname": "get", + "responseClass": "Endpoint", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "resource", + "description": "ID of the endpoint", + "paramType": "path", + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoints not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}/{resource}/sendMessage", + "description": "Send a message to some endpoint in a technology.", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Send a message to some endpoint in a technology.", + "nickname": "sendMessageToEndpoint", + "responseClass": "void", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "resource", + "description": "ID of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "from", + "description": "The endpoint resource or technology specific identity to send this message from. Valid resources are sip, pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "body", + "description": "The body of the message", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "descriptioni": "The \"variables\" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, pjsip and sip resource types will add the key/value pairs as SIP headers,", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoint not found" + } + ] + } + ] + } + ], + "models": { + "Endpoint": { + "id": "Endpoint", + "description": "An external device that may offer/accept calls to/from Asterisk.\n\nUnlike most resources, which have a single unique identifier, an endpoint is uniquely identified by the technology/resource pair.", + "properties": { + "technology": { + "type": "string", + "description": "Technology of the endpoint", + "required": true + }, + "resource": { + "type": "string", + "description": "Identifier of the endpoint, specific to the given technology.", + "required": true + }, + "state": { + "type": "string", + "description": "Endpoint's state", + "required": false, + "allowableValues": { + "valueType": "LIST", + "values": [ + "unknown", + "offline", + "online" + ] + } + }, + "channel_ids": { + "type": "List[string]", + "description": "Id's of channels associated with this endpoint", + "required": true + } + } + }, + "TextMessageVariable": { + "id": "TextMessageVariable", + "description": "A key/value pair variable in a text message.", + "properties": { + "key": { + "type": "string", + "description": "A unique key identifying the variable.", + "required": true + }, + "value": { + "type": "string", + "description": "The value of the variable.", + "required": true + } + } + }, + "TextMessage": { + "id": "TextMessage", + "description": "A text message.", + "properties": { + "from": { + "type": "string", + "description": "A technology specific URI specifying the source of the message. For sip and pjsip technologies, any SIP URI can be specified. For xmpp, the URI must correspond to the client connection being used to send the message.", + "required": true + }, + "to": { + "type": "string", + "description": "A technology specific URI specifying the destination of the message. Valid technologies include sip, pjsip, and xmp. The destination of a message should be an endpoint.", + "required": true + }, + "body": { + "type": "string", + "description": "The text of the message.", + "required": true + }, + "variables": { + "type": "List[TextMessageVariable]", + "description": "Technology specific key/value pairs associated with the message.", + "required": false + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_4_0_0/events.json b/codegen/src/main/resources/codegen-data/ari_4_0_0/events.json new file mode 100644 index 00000000..d85d8d9f --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_4_0_0/events.json @@ -0,0 +1,898 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.2", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/events.{format}", + "requiresModules": [ + "res_http_websocket" + ], + "apis": [ + { + "path": "/events", + "description": "Events from Asterisk to applications", + "operations": [ + { + "httpMethod": "GET", + "upgrade": "websocket", + "websocketProtocol": "ari", + "summary": "WebSocket connection for events.", + "nickname": "eventWebsocket", + "responseClass": "Message", + "parameters": [ + { + "name": "app", + "description": "Applications to subscribe to.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "subscribeAll", + "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'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean" + } + ] + } + ] + }, + { + "path": "/events/user/{eventName}", + "description": "Stasis application user events", + "operations": [ + { + "httpMethod": "POST", + "summary": "Generate a user event.", + "nickname": "userEvent", + "responseClass": "void", + "parameters": [ + { + "name": "eventName", + "description": "Event name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "application", + "description": "The name of the application that will receive this event", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "source", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}/{resource}, deviceState:{deviceName}", + "paramType": "query", + "required": false, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds custom key/value pairs to add to the user event. Ex. { \"variables\": { \"key\": \"value\" } }", + "paramType": "body", + "required": false, + "allowMultiple": false, + "dataType": "containers" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 422, + "reason": "Event source not found." + }, + { + "code": 400, + "reason": "Invalid even tsource URI or userevent data." + } + ] + } + ] + } + ], + "models": { + "Message": { + "id": "Message", + "description": "Base type for errors and events", + "discriminator": "type", + "properties": { + "type": { + "type": "string", + "required": true, + "description": "Indicates the type of this message." + }, + "asterisk_id": { + "type": "string", + "required": false, + "description": "The unique ID for the Asterisk instance that raised this event." + } + }, + "subTypes": [ + "MissingParams", + "Event" + ] + }, + "MissingParams": { + "id": "MissingParams", + "description": "Error event sent when required params are missing.", + "properties": { + "params": { + "required": true, + "type": "List[string]", + "description": "A list of the missing parameters" + } + } + }, + "Event": { + "id": "Event", + "description": "Base type for asynchronous events from Asterisk.", + "properties": { + "application": { + "type": "string", + "description": "Name of the application receiving the event.", + "required": true + }, + "timestamp": { + "type": "Date", + "description": "Time at which this event was created.", + "required": false + } + }, + "subTypes": [ + "DeviceStateChanged", + "PlaybackStarted", + "PlaybackContinuing", + "PlaybackFinished", + "RecordingStarted", + "RecordingFinished", + "RecordingFailed", + "ApplicationReplaced", + "BridgeCreated", + "BridgeDestroyed", + "BridgeMerged", + "BridgeBlindTransfer", + "BridgeAttendedTransfer", + "BridgeVideoSourceChanged", + "ChannelCreated", + "ChannelDestroyed", + "ChannelEnteredBridge", + "ChannelLeftBridge", + "ChannelStateChange", + "ChannelDtmfReceived", + "ChannelDialplan", + "ChannelCallerId", + "ChannelUserevent", + "ChannelHangupRequest", + "ChannelVarset", + "ChannelTalkingStarted", + "ChannelTalkingFinished", + "ChannelHold", + "ChannelUnhold", + "ContactStatusChange", + "EndpointStateChange", + "Dial", + "StasisEnd", + "StasisStart", + "TextMessageReceived", + "ChannelConnectedLine", + "PeerStatusChange" + ] + }, + "ContactInfo": { + "id": "ContactInfo", + "description": "Detailed information about a contact on an endpoint.", + "properties": { + "uri": { + "type": "string", + "description": "The location of the contact.", + "required": true + }, + "contact_status": { + "type": "string", + "description": "The current status of the contact.", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "Unreachable", + "Reachable", + "Unknown", + "NonQualified", + "Removed" + ] + } + }, + "aor": { + "type": "string", + "description": "The Address of Record this contact belongs to.", + "required": true + }, + "roundtrip_usec": { + "type": "string", + "description": "Current round trip time, in microseconds, for the contact.", + "required": false + } + } + }, + "Peer": { + "id": "Peer", + "description": "Detailed information about a remote peer that communicates with Asterisk.", + "properties": { + "peer_status": { + "type": "string", + "description": "The current state of the peer. Note that the values of the status are dependent on the underlying peer technology.", + "required": true + }, + "cause": { + "type": "string", + "description": "An optional reason associated with the change in peer_status.", + "required": false + }, + "address": { + "type": "string", + "description": "The IP address of the peer.", + "required": false + }, + "port": { + "type": "string", + "description": "The port of the peer.", + "required": false + }, + "time": { + "type": "string", + "description": "The last known time the peer was contacted.", + "required": false + } + } + }, + "DeviceStateChanged": { + "id": "DeviceStateChanged", + "description": "Notification that a device state has changed.", + "properties": { + "device_state": { + "type": "DeviceState", + "description": "Device state object", + "required": true + } + } + }, + "PlaybackStarted": { + "id": "PlaybackStarted", + "description": "Event showing the start of a media playback operation.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "PlaybackContinuing": { + "id": "PlaybackContinuing", + "description": "Event showing the continuation of a media playback operation from one media URI to the next in the list.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "PlaybackFinished": { + "id": "PlaybackFinished", + "description": "Event showing the completion of a media playback operation.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "RecordingStarted": { + "id": "RecordingStarted", + "description": "Event showing the start of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "RecordingFinished": { + "id": "RecordingFinished", + "description": "Event showing the completion of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "RecordingFailed": { + "id": "RecordingFailed", + "description": "Event showing failure of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "ApplicationReplaced": { + "id": "ApplicationReplaced", + "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.", + "properties": {} + }, + "BridgeCreated": { + "id": "BridgeCreated", + "description": "Notification that a bridge has been created.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeDestroyed": { + "id": "BridgeDestroyed", + "description": "Notification that a bridge has been destroyed.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeMerged": { + "id": "BridgeMerged", + "description": "Notification that one bridge has merged into another.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "bridge_from": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeVideoSourceChanged": { + "id": "BridgeVideoSourceChanged", + "description": "Notification that the source of video in a bridge has changed.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "old_video_source_id": { + "required": false, + "type": "string" + } + } + }, + "BridgeBlindTransfer": { + "id": "BridgeBlindTransfer", + "description": "Notification that a blind transfer has occurred.", + "properties": { + "channel": { + "description": "The channel performing the blind transfer", + "required": true, + "type": "Channel" + }, + "replace_channel": { + "description": "The channel that is replacing transferer when the transferee(s) can not be transferred directly", + "required": false, + "type": "Channel" + }, + "transferee": { + "description": "The channel that is being transferred", + "required": false, + "type": "Channel" + }, + "exten": { + "description": "The extension transferred to", + "required": true, + "type": "string" + }, + "context": { + "description": "The context transferred to", + "required": true, + "type": "string" + }, + "result": { + "description": "The result of the transfer attempt", + "required": true, + "type": "string" + }, + "is_external": { + "description": "Whether the transfer was externally initiated or not", + "required": true, + "type": "boolean" + }, + "bridge": { + "description": "The bridge being transferred", + "type": "Bridge" + } + } + }, + "BridgeAttendedTransfer": { + "id": "BridgeAttendedTransfer", + "description": "Notification that an attended transfer has occurred.", + "properties": { + "transferer_first_leg": { + "description": "First leg of the transferer", + "required": true, + "type": "Channel" + }, + "transferer_second_leg": { + "description": "Second leg of the transferer", + "required": true, + "type": "Channel" + }, + "replace_channel": { + "description": "The channel that is replacing transferer_first_leg in the swap", + "required": false, + "type": "Channel" + }, + "transferee": { + "description": "The channel that is being transferred", + "required": false, + "type": "Channel" + }, + "transfer_target": { + "description": "The channel that is being transferred to", + "required": false, + "type": "Channel" + }, + "result": { + "description": "The result of the transfer attempt", + "required": true, + "type": "string" + }, + "is_external": { + "description": "Whether the transfer was externally initiated or not", + "required": true, + "type": "boolean" + }, + "transferer_first_leg_bridge": { + "description": "Bridge the transferer first leg is in", + "type": "Bridge" + }, + "transferer_second_leg_bridge": { + "description": "Bridge the transferer second leg is in", + "type": "Bridge" + }, + "destination_type": { + "description": "How the transfer was accomplished", + "required": true, + "type": "string" + }, + "destination_bridge": { + "description": "Bridge that survived the merge result", + "type": "string" + }, + "destination_application": { + "description": "Application that has been transferred into", + "type": "string" + }, + "destination_link_first_leg": { + "description": "First leg of a link transfer result", + "type": "Channel" + }, + "destination_link_second_leg": { + "description": "Second leg of a link transfer result", + "type": "Channel" + }, + "destination_threeway_channel": { + "description": "Transferer channel that survived the threeway result", + "type": "Channel" + }, + "destination_threeway_bridge": { + "description": "Bridge that survived the threeway result", + "type": "Bridge" + } + } + }, + "ChannelCreated": { + "id": "ChannelCreated", + "description": "Notification that a channel has been created.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelDestroyed": { + "id": "ChannelDestroyed", + "description": "Notification that a channel has been destroyed.", + "properties": { + "cause": { + "required": true, + "description": "Integer representation of the cause of the hangup", + "type": "int" + }, + "cause_txt": { + "required": true, + "description": "Text representation of the cause of the hangup", + "type": "string" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelEnteredBridge": { + "id": "ChannelEnteredBridge", + "description": "Notification that a channel has entered a bridge.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "channel": { + "type": "Channel" + } + } + }, + "ChannelLeftBridge": { + "id": "ChannelLeftBridge", + "description": "Notification that a channel has left a bridge.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelStateChange": { + "id": "ChannelStateChange", + "description": "Notification of a channel's state change.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelDtmfReceived": { + "id": "ChannelDtmfReceived", + "description": "DTMF received on a channel.\n\nThis event is sent when the DTMF ends. There is no notification about the start of DTMF", + "properties": { + "digit": { + "required": true, + "type": "string", + "description": "DTMF digit received (0-9, A-E, # or *)" + }, + "duration_ms": { + "required": true, + "type": "int", + "description": "Number of milliseconds DTMF was received" + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which DTMF was received" + } + } + }, + "ChannelDialplan": { + "id": "ChannelDialplan", + "description": "Channel changed location in the dialplan.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that changed dialplan location." + }, + "dialplan_app": { + "required": true, + "type": "string", + "description": "The application about to be executed." + }, + "dialplan_app_data": { + "required": true, + "type": "string", + "description": "The data to be passed to the application." + } + } + }, + "ChannelCallerId": { + "id": "ChannelCallerId", + "description": "Channel changed Caller ID.", + "properties": { + "caller_presentation": { + "required": true, + "type": "int", + "description": "The integer representation of the Caller Presentation value." + }, + "caller_presentation_txt": { + "required": true, + "type": "string", + "description": "The text representation of the Caller Presentation value." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that changed Caller ID." + } + } + }, + "ChannelUserevent": { + "id": "ChannelUserevent", + "description": "User-generated event with additional user-defined fields in the object.", + "properties": { + "eventname": { + "required": true, + "type": "string", + "description": "The name of the user event." + }, + "channel": { + "required": false, + "type": "Channel", + "description": "A channel that is signaled with the user event." + }, + "bridge": { + "required": false, + "type": "Bridge", + "description": "A bridge that is signaled with the user event." + }, + "endpoint": { + "required": false, + "type": "Endpoint", + "description": "A endpoint that is signaled with the user event." + }, + "userevent": { + "required": true, + "type": "object", + "description": "Custom Userevent data" + } + } + }, + "ChannelHangupRequest": { + "id": "ChannelHangupRequest", + "description": "A hangup was requested on the channel.", + "properties": { + "cause": { + "type": "int", + "description": "Integer representation of the cause of the hangup." + }, + "soft": { + "type": "boolean", + "description": "Whether the hangup request was a soft hangup request." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which the hangup was requested." + } + } + }, + "ChannelVarset": { + "id": "ChannelVarset", + "description": "Channel variable changed.", + "properties": { + "variable": { + "required": true, + "type": "string", + "description": "The variable that changed." + }, + "value": { + "required": true, + "type": "string", + "description": "The new value of the variable." + }, + "channel": { + "required": false, + "type": "Channel", + "description": "The channel on which the variable was set.\n\nIf missing, the variable is a global variable." + } + } + }, + "ChannelHold": { + "id": "ChannelHold", + "description": "A channel initiated a media hold.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that initiated the hold event." + }, + "musicclass": { + "required": false, + "type": "string", + "description": "The music on hold class that the initiator requested." + } + } + }, + "ChannelUnhold": { + "id": "ChannelUnhold", + "description": "A channel initiated a media unhold.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that initiated the unhold event." + } + } + }, + "ChannelTalkingStarted": { + "id": "ChannelTalkingStarted", + "description": "Talking was detected on the channel.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which talking started." + } + } + }, + "ChannelTalkingFinished": { + "id": "ChannelTalkingFinished", + "description": "Talking is no longer detected on the channel.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which talking completed." + }, + "duration": { + "required": true, + "type": "int", + "description": "The length of time, in milliseconds, that talking was detected on the channel" + } + } + }, + "ContactStatusChange": { + "id": "ContactStatusChange", + "description": "The state of a contact on an endpoint has changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + }, + "contact_info": { + "required": true, + "type": "ContactInfo" + } + } + }, + "PeerStatusChange": { + "id": "PeerStatusChange", + "description": "The state of a peer associated with an endpoint has changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + }, + "peer": { + "required": true, + "type": "Peer" + } + } + }, + "EndpointStateChange": { + "id": "EndpointStateChange", + "description": "Endpoint state changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + } + } + }, + "Dial": { + "id": "Dial", + "description": "Dialing state has changed.", + "properties": { + "caller": { + "required": false, + "type": "Channel", + "description": "The calling channel." + }, + "peer": { + "required": true, + "type": "Channel", + "description": "The dialed channel." + }, + "forward": { + "required": false, + "type": "string", + "description": "Forwarding target requested by the original dialed channel." + }, + "forwarded": { + "required": false, + "type": "Channel", + "description": "Channel that the caller has been forwarded to." + }, + "dialstring": { + "required": false, + "type": "string", + "description": "The dial string for calling the peer channel." + }, + "dialstatus": { + "required": true, + "type": "string", + "description": "Current status of the dialing attempt to the peer." + } + } + }, + "StasisEnd": { + "id": "StasisEnd", + "description": "Notification that a channel has left a Stasis application.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "StasisStart": { + "id": "StasisStart", + "description": "Notification that a channel has entered a Stasis application.", + "properties": { + "args": { + "required": true, + "type": "List[string]", + "description": "Arguments to the application" + }, + "channel": { + "required": true, + "type": "Channel" + }, + "replace_channel": { + "required": false, + "type": "Channel" + } + } + }, + "TextMessageReceived": { + "id": "TextMessageReceived", + "description": "A text message was received from an endpoint.", + "properties": { + "message": { + "required": true, + "type": "TextMessage" + }, + "endpoint": { + "required": false, + "type": "Endpoint" + } + } + }, + "ChannelConnectedLine": { + "id": "ChannelConnectedLine", + "description": "Channel changed Connected Line.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel whose connected line has changed." + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_4_0_0/mailboxes.json b/codegen/src/main/resources/codegen-data/ari_4_0_0/mailboxes.json new file mode 100644 index 00000000..8f5941b8 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_4_0_0/mailboxes.json @@ -0,0 +1,137 @@ +{ + "_copyright": "Copyright (C) 2013, Digium, Inc.", + "_author": "Jonathan Rose ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/mailboxes.{format}", + "requiresModules": [ + "res_stasis_mailbox" + ], + "apis": [ + { + "path": "/mailboxes", + "description": "Mailboxes", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all mailboxes.", + "nickname": "list", + "responseClass": "List[Mailbox]" + } + ] + }, + { + "path": "/mailboxes/{mailboxName}", + "description": "Mailbox state", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve the current state of a mailbox.", + "nickname": "get", + "responseClass": "Mailbox", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Change the state of a mailbox. (Note - implicitly creates the mailbox).", + "nickname": "update", + "responseClass": "void", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "oldMessages", + "description": "Count of old messages in the mailbox", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "newMessages", + "description": "Count of new messages in the mailbox", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "int" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Destroy a mailbox.", + "nickname": "delete", + "responseClass": "void", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + } + ] + } + ], + "models": { + "Mailbox": { + "id": "Mailbox", + "description": "Represents the state of a mailbox.", + "properties": { + "name": { + "type": "string", + "description": "Name of the mailbox.", + "required": true + }, + "old_messages": { + "type": "int", + "description": "Count of old messages in the mailbox.", + "required": true + }, + "new_messages": { + "type": "int", + "description": "Count of new messages in the mailbox.", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_4_0_0/playbacks.json b/codegen/src/main/resources/codegen-data/ari_4_0_0/playbacks.json new file mode 100644 index 00000000..a78dcae7 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_4_0_0/playbacks.json @@ -0,0 +1,164 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/playbacks.{format}", + "requiresModules": [ + "res_stasis_playback" + ], + "apis": [ + { + "path": "/playbacks/{playbackId}", + "description": "Control object for a playback operation.", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a playback's details.", + "nickname": "get", + "responseClass": "Playback", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "The playback cannot be found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop a playback.", + "nickname": "stop", + "responseClass": "void", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "The playback cannot be found" + } + ] + } + ] + }, + { + "path": "/playbacks/{playbackId}/control", + "description": "Control object for a playback operation.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Control a playback.", + "nickname": "control", + "responseClass": "void", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "operation", + "description": "Operation to perform on the playback.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "restart", + "pause", + "unpause", + "reverse", + "forward" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "The provided operation parameter was invalid" + }, + { + "code": 404, + "reason": "The playback cannot be found" + }, + { + "code": 409, + "reason": "The operation cannot be performed in the playback's current state" + } +] + } + ] + } + ], + "models": { + "Playback": { + "id": "Playback", + "description": "Object representing the playback of media to a channel", + "properties": { + "id": { + "type": "string", + "description": "ID for this playback operation", + "required": true + }, + "media_uri": { + "type": "string", + "description": "The URI for the media currently being played back.", + "required": true + }, + "next_media_uri": { + "type": "string", + "description": "If a list of URIs is being played, the next media URI to be played back.", + "required": false + }, + "target_uri": { + "type": "string", + "description": "URI for the channel or bridge to play the media on", + "required": true + }, + "language": { + "type": "string", + "description": "For media types that support multiple languages, the language requested for playback." + }, + "state": { + "type": "string", + "description": "Current state of the playback operation.", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "queued", + "playing", + "continuing", + "done" + ] + } + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_4_0_0/recordings.json b/codegen/src/main/resources/codegen-data/ari_4_0_0/recordings.json new file mode 100644 index 00000000..6ffd6d8e --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_4_0_0/recordings.json @@ -0,0 +1,413 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/recordings.{format}", + "requiresModules": [ + "res_stasis_recording" + ], + "apis": [ + { + "path": "/recordings/stored", + "description": "Recordings", + "operations": [ + { + "httpMethod": "GET", + "summary": "List recordings that are complete.", + "nickname": "listStored", + "responseClass": "List[StoredRecording]" + } + ] + }, + { + "path": "/recordings/stored/{recordingName}", + "description": "Individual recording", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a stored recording's details.", + "nickname": "getStored", + "responseClass": "StoredRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Delete a stored recording.", + "nickname": "deleteStored", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/stored/{recordingName}/file", + "description": "The actual file associated with the stored recording", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the file associated with the stored recording.", + "nickname": "getStoredFile", + "responseClass": "binary", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 403, + "reason": "The recording file could not be opened" + }, + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/stored/{recordingName}/copy", + "description": "Copy an individual recording", + "operations": [ + { + "httpMethod": "POST", + "summary": "Copy a stored recording.", + "nickname": "copyStored", + "responseClass": "StoredRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording to copy", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "destinationRecordingName", + "description": "The destination name of the recording", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "A recording with the same name already exists on the system" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}", + "description": "A recording that is in progress", + "operations": [ + { + "httpMethod": "GET", + "summary": "List live recordings.", + "nickname": "getLive", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop a live recording and discard it.", + "nickname": "cancel", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/stop", + "operations": [ + { + "httpMethod": "POST", + "summary": "Stop a live recording and store it.", + "nickname": "stop", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/pause", + "operations": [ + { + "httpMethod": "POST", + "summary": "Pause a live recording.", + "notes": "Pausing a recording suspends silence detection, which will be restarted when the recording is unpaused. Paused time is not included in the accounting for maxDurationSeconds.", + "nickname": "pause", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unpause a live recording.", + "nickname": "unpause", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/mute", + "operations": [ + { + "httpMethod": "POST", + "summary": "Mute a live recording.", + "notes": "Muting a recording suspends silence detection, which will be restarted when the recording is unmuted.", + "nickname": "mute", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unmute a live recording.", + "nickname": "unmute", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + } + ] + } + ], + "models": { + "StoredRecording": { + "id": "StoredRecording", + "description": "A past recording that may be played back.", + "properties": { + "name": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + }, + "LiveRecording": { + "id": "LiveRecording", + "description": "A recording that is in progress", + "properties": { + "name": { + "required": true, + "type": "string", + "description": "Base name for the recording" + }, + "format": { + "required": true, + "type": "string", + "description": "Recording format (wav, gsm, etc.)" + }, + "target_uri": { + "required": true, + "type": "string", + "description": "URI for the channel or bridge being recorded" + }, + "state": { + "required": true, + "type": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "queued", + "recording", + "paused", + "done", + "failed", + "canceled" + ] + } + }, + "duration": { + "required": false, + "type": "int", + "description": "Duration in seconds of the recording" + }, + "talking_duration": { + "required": false, + "type": "int", + "description": "Duration of talking, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds." + }, + "silence_duration": { + "required": false, + "type": "int", + "description": "Duration of silence, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds." + }, + "cause": { + "required": false, + "type": "string", + "description": "Cause for recording failure if failed" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_4_0_0/sounds.json b/codegen/src/main/resources/codegen-data/ari_4_0_0/sounds.json new file mode 100644 index 00000000..8fbe1c57 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_4_0_0/sounds.json @@ -0,0 +1,99 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/sounds.{format}", + "apis": [ + { + "path": "/sounds", + "description": "Sounds", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all sounds.", + "nickname": "list", + "responseClass": "List[Sound]", + "parameters": [ + { + "name": "lang", + "description": "Lookup sound for a specific language.", + "paramType": "query", + "dataType": "string", + "required": false + }, + { + "name": "format", + "description": "Lookup sound in a specific format.", + "paramType": "query", + "dataType": "string", + "required": false, + "__note": "core show translation can show translation paths between formats, along with relative costs. so this could be just installed format, or we could follow that for transcoded formats." + } + ] + } + ] + }, + { + "path": "/sounds/{soundId}", + "description": "Individual sound", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a sound's details.", + "nickname": "get", + "responseClass": "Sound", + "parameters": [ + { + "name": "soundId", + "description": "Sound's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ] + } + ] + } + ], + "models": { + "FormatLangPair": { + "id": "FormatLangPair", + "description": "Identifies the format and language of a sound file", + "properties": { + "language": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + }, + "Sound": { + "id": "Sound", + "description": "A media file that may be played back.", + "properties": { + "id": { + "required": true, + "description": "Sound's identifier.", + "type": "string" + }, + "text": { + "required": false, + "description": "Text description of the sound, usually the words spoken.", + "type": "string" + }, + "formats": { + "required": true, + "description": "The formats and languages in which this sound is available.", + "type": "List[FormatLangPair]" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_4_0_1/applications.json b/codegen/src/main/resources/codegen-data/ari_4_0_1/applications.json new file mode 100644 index 00000000..09c5cd5c --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_4_0_1/applications.json @@ -0,0 +1,223 @@ +{ + "_copyright": "Copyright (C) 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/applications.{format}", + "apis": [ + { + "path": "/applications", + "description": "Stasis applications", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all applications.", + "nickname": "list", + "responseClass": "List[Application]" + } + ] + }, + { + "path": "/applications/{applicationName}", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get details of an application.", + "nickname": "get", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Application does not exist." + } + ] + } + ] + }, + { + "path": "/applications/{applicationName}/subscription", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "POST", + "summary": "Subscribe an application to a event source.", + "notes": "Returns the state of the application after the subscriptions have changed", + "nickname": "subscribe", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "eventSource", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing parameter." + }, + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 422, + "reason": "Event source does not exist." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unsubscribe an application from an event source.", + "notes": "Returns the state of the application after the subscriptions have changed", + "nickname": "unsubscribe", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "eventSource", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing parameter; event source scheme not recognized." + }, + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 409, + "reason": "Application not subscribed to event source." + }, + { + "code": 422, + "reason": "Event source does not exist." + } + ] + } + ] + }, + { + "path": "/applications/{applicationName}/eventFilter", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Filter application events types.", + "notes": "Allowed and/or disallowed event type filtering can be done. The body (parameter) should specify a JSON key/value object that describes the type of event filtering needed. One, or both of the following keys can be designated:

\"allowed\" - Specifies an allowed list of event types
\"disallowed\" - Specifies a disallowed list of event types

Further, each of those key's value should be a JSON array that holds zero, or more JSON key/value objects. Each of these objects must contain the following key with an associated value:

\"type\" - The type name of the event to filter

The value must be the string name (case sensitive) of the event type that needs filtering. For example:

{ \"allowed\": [ { \"type\": \"StasisStart\" }, { \"type\": \"StasisEnd\" } ] }

As this specifies only an allowed list, then only those two event type messages are sent to the application. No other event messages are sent.

The following rules apply:

* If the body is empty, both the allowed and disallowed filters are set empty.
* If both list types are given then both are set to their respective values (note, specifying an empty array for a given type sets that type to empty).
* If only one list type is given then only that type is set. The other type is not updated.
* An empty \"allowed\" list means all events are allowed.
* An empty \"disallowed\" list means no events are disallowed.
* Disallowed events take precedence over allowed events if the event type is specified in both lists.", + "nickname": "filter", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "filter", + "description": "Specify which event types to allow/disallow", + "paramType": "body", + "required": false, + "dataType": "object", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Bad request." + }, + { + "code": 404, + "reason": "Application does not exist." + } + ] + } + ] + } + ], + "models": { + "Application": { + "id": "Application", + "description": "Details of a Stasis application", + "properties": { + "name": { + "type": "string", + "description": "Name of this application", + "required": true + }, + "channel_ids": { + "type": "List[string]", + "description": "Id's for channels subscribed to.", + "required": true + }, + "bridge_ids": { + "type": "List[string]", + "description": "Id's for bridges subscribed to.", + "required": true + }, + "endpoint_ids": { + "type": "List[string]", + "description": "{tech}/{resource} for endpoints subscribed to.", + "required": true + }, + "device_names": { + "type": "List[string]", + "description": "Names of the devices subscribed to.", + "required": true + }, + "events_allowed": { + "type": "List[object]", + "description": "Event types sent to the application.", + "required": true + }, + "events_disallowed": { + "type": "List[object]", + "description": "Event types not sent to the application.", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_4_0_1/asterisk.json b/codegen/src/main/resources/codegen-data/ari_4_0_1/asterisk.json new file mode 100644 index 00000000..841e6cd8 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_4_0_1/asterisk.json @@ -0,0 +1,725 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/asterisk.{format}", + "apis": [ + { + "path": "/asterisk/config/dynamic/{configClass}/{objectType}/{id}", + "description": "Asterisk dynamic configuration", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve a dynamic configuration object.", + "nickname": "getObject", + "responseClass": "List[ConfigTuple]", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to retrieve.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to retrieve.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "{configClass|objectType|id} not found" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Create or update a dynamic configuration object.", + "nickname": "updateObject", + "responseClass": "List[ConfigTuple]", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to create or update.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to create or update.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "fields", + "description": "The body object should have a value that is a list of ConfigTuples, which provide the fields to update. Ex. [ { \"attribute\": \"directmedia\", \"value\": \"false\" } ]", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Bad request body" + }, + { + "code": 403, + "reason": "Could not create or update object" + }, + { + "code": 404, + "reason": "{configClass|objectType} not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Delete a dynamic configuration object.", + "nickname": "deleteObject", + "responseClass": "void", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to delete.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to delete.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 403, + "reason": "Could not delete object" + }, + { + "code": 404, + "reason": "{configClass|objectType|id} not found" + } + ] + } + ] + }, + { + "path": "/asterisk/info", + "description": "Asterisk system information (similar to core show settings)", + "operations": [ + { + "httpMethod": "GET", + "summary": "Gets Asterisk system information.", + "nickname": "getInfo", + "responseClass": "AsteriskInfo", + "parameters": [ + { + "name": "only", + "description": "Filter information returned", + "paramType": "query", + "required": false, + "allowMultiple": true, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "build", + "system", + "config", + "status" + ] + } + } + ] + } + ] + }, + { + "path": "/asterisk/ping", + "description": "Asterisk ping", + "operations": [ + { + "httpMethod": "GET", + "summary": "Response pong message.", + "nickname": "ping", + "responseClass": "AsteriskPing" + } + ] + }, + { + "path": "/asterisk/modules", + "description": "Asterisk modules", + "operations": [ + { + "httpMethod": "GET", + "summary": "List Asterisk modules.", + "nickname": "listModules", + "responseClass": "List[Module]" + } + ] + }, + { + "path": "/asterisk/modules/{moduleName}", + "description": "Asterisk module", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get Asterisk module information.", + "nickname": "getModule", + "responseClass": "Module", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module could not be found in running modules." + }, + { + "code": 409, + "reason": "Module information could not be retrieved." + } + ] + }, + { + "httpMethod": "POST", + "summary": "Load an Asterisk module.", + "nickname": "loadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 409, + "reason": "Module could not be loaded." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unload an Asterisk module.", + "nickname": "unloadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module not found in running modules." + }, + { + "code": 409, + "reason": "Module could not be unloaded." + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Reload an Asterisk module.", + "nickname": "reloadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module not found in running modules." + }, + { + "code": 409, + "reason": "Module could not be reloaded." + } + ] + } + ] + }, + { + "path": "/asterisk/logging", + "description": "Asterisk log channels", + "operations": [ + { + "httpMethod": "GET", + "summary": "Gets Asterisk log channel information.", + "nickname": "listLogChannels", + "responseClass": "List[LogChannel]" + } + ] + }, + { + "path": "/asterisk/logging/{logChannelName}", + "description": "Asterisk log channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Adds a log channel.", + "nickname": "addLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "The log channel to add", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "configuration", + "description": "levels of the log channel", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Bad request body" + }, + { + "code": 409, + "reason": "Log channel could not be created." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Deletes a log channel.", + "nickname": "deleteLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "Log channels name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Log channel does not exist." + } + ] + } + ] + }, + { + "path": "/asterisk/logging/{logChannelName}/rotate", + "description": "Asterisk log channel", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Rotates a log channel.", + "nickname": "rotateLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "Log channel's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Log channel does not exist." + } + ] + } + ] + }, + { + "path": "/asterisk/variable", + "description": "Global variables", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the value of a global variable.", + "nickname": "getGlobalVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "variable", + "description": "The variable to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + } + ] + }, + { + "httpMethod": "POST", + "summary": "Set the value of a global variable.", + "nickname": "setGlobalVar", + "responseClass": "void", + "parameters": [ + { + "name": "variable", + "description": "The variable to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + } + ] + } + ] + } + ], + "models": { + "BuildInfo": { + "id": "BuildInfo", + "description": "Info about how Asterisk was built", + "properties": { + "os": { + "required": true, + "type": "string", + "description": "OS Asterisk was built on." + }, + "kernel": { + "required": true, + "type": "string", + "description": "Kernel version Asterisk was built on." + }, + "options": { + "required": true, + "type": "string", + "description": "Compile time options, or empty string if default." + }, + "machine": { + "required": true, + "type": "string", + "description": "Machine architecture (x86_64, i686, ppc, etc.)" + }, + "date": { + "required": true, + "type": "string", + "description": "Date and time when Asterisk was built." + }, + "user": { + "required": true, + "type": "string", + "description": "Username that build Asterisk" + } + } + }, + "SystemInfo": { + "id": "SystemInfo", + "description": "Info about Asterisk", + "properties": { + "version": { + "required": true, + "type": "string", + "description": "Asterisk version." + }, + "entity_id": { + "required": true, + "type": "string", + "description": "" + } + } + }, + "SetId": { + "id": "SetId", + "description": "Effective user/group id", + "properties": { + "user": { + "required": true, + "type": "string", + "description": "Effective user id." + }, + "group": { + "required": true, + "type": "string", + "description": "Effective group id." + } + } + }, + "ConfigInfo": { + "id": "ConfigInfo", + "description": "Info about Asterisk configuration", + "properties": { + "name": { + "required": true, + "type": "string", + "description": "Asterisk system name." + }, + "default_language": { + "required": true, + "type": "string", + "description": "Default language for media playback." + }, + "max_channels": { + "required": false, + "type": "int", + "description": "Maximum number of simultaneous channels." + }, + "max_open_files": { + "required": false, + "type": "int", + "description": "Maximum number of open file handles (files, sockets)." + }, + "max_load": { + "required": false, + "type": "double", + "description": "Maximum load avg on system." + }, + "setid": { + "required": true, + "type": "SetId", + "description": "Effective user/group id for running Asterisk." + } + } + }, + "StatusInfo": { + "id": "StatusInfo", + "description": "Info about Asterisk status", + "properties": { + "startup_time": { + "required": true, + "type": "Date", + "description": "Time when Asterisk was started." + }, + "last_reload_time": { + "required": true, + "type": "Date", + "description": "Time when Asterisk was last reloaded." + } + } + }, + "AsteriskInfo": { + "id": "AsteriskInfo", + "description": "Asterisk system information", + "properties": { + "build": { + "required": false, + "type": "BuildInfo", + "description": "Info about how Asterisk was built" + }, + "system": { + "required": false, + "type": "SystemInfo", + "description": "Info about the system running Asterisk" + }, + "config": { + "required": false, + "type": "ConfigInfo", + "description": "Info about Asterisk configuration" + }, + "status": { + "required": false, + "type": "StatusInfo", + "description": "Info about Asterisk status" + } + } + }, + "AsteriskPing": { + "id": "AsteriskPing", + "description": "Asterisk ping information", + "properties": { + "asterisk_id": { + "required": true, + "type": "string", + "description": "Asterisk id info" + }, + "ping": { + "required": true, + "type": "string", + "description": "Always string value is pong" + }, + "timestamp": { + "required": true, + "type": "string", + "description": "The timestamp string of request received time" + } + } + }, + "Module": { + "id": "Module", + "description": "Details of an Asterisk module", + "properties": { + "name": { + "type": "string", + "description": "The name of this module", + "required": true + }, + "description": { + "type": "string", + "description": "The description of this module", + "required": true + }, + "use_count": { + "type": "int", + "description": "The number of times this module is being used", + "required": true + }, + "status": { + "type": "string", + "description": "The running status of this module", + "required": true + }, + "support_level": { + "type": "string", + "description": "The support state of this module", + "required": true + } + } + }, + "LogChannel": { + "id": "LogChannel", + "description": "Details of an Asterisk log channel", + "properties": { + "channel": { + "type": "string", + "description": "The log channel path", + "required": true + }, + "type": { + "type": "string", + "description": "Types of logs for the log channel", + "required": true + }, + "status": { + "type": "string", + "description": "Whether or not a log type is enabled", + "required": true + }, + "configuration": { + "type": "string", + "description": "The various log levels", + "required": true + } + } + }, + "Variable": { + "id": "Variable", + "description": "The value of a channel variable", + "properties": { + "value": { + "required": true, + "type": "string", + "description": "The value of the variable requested" + } + } + }, + "ConfigTuple": { + "id": "ConfigTuple", + "description": "A key/value pair that makes up part of a configuration object.", + "properties": { + "attribute": { + "required": true, + "type": "string", + "description": "A configuration object attribute." + }, + "value": { + "required": true, + "type": "string", + "description": "The value for the attribute." + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_4_0_1/bridges.json b/codegen/src/main/resources/codegen-data/ari_4_0_1/bridges.json new file mode 100644 index 00000000..22743c3b --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_4_0_1/bridges.json @@ -0,0 +1,765 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/bridges.{format}", + "requiresModules": [ + "res_stasis_recording", + "res_stasis_playback" + ], + "apis": [ + { + "path": "/bridges", + "description": "Active bridges", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all active bridges in Asterisk.", + "nickname": "list", + "responseClass": "List[Bridge]" + }, + { + "httpMethod": "POST", + "summary": "Create a new bridge.", + "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", + "nickname": "create", + "responseClass": "Bridge", + "parameters": [ + { + "name": "type", + "description": "Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media, video_sfu).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "bridgeId", + "description": "Unique ID to give to the bridge being created.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Name to give to the bridge being created.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}", + "description": "Individual bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Create a new bridge or updates an existing one.", + "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", + "nickname": "createWithId", + "responseClass": "Bridge", + "parameters": [ + { + "name": "type", + "description": "Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media, video_sfu) to set.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "bridgeId", + "description": "Unique ID to give to the bridge being created.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Set the name of the bridge.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ] + }, + { + "httpMethod": "GET", + "summary": "Get bridge details.", + "nickname": "get", + "responseClass": "Bridge", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Shut down a bridge.", + "notes": "If any channels are in this bridge, they will be removed and resume whatever they were doing beforehand.", + "nickname": "destroy", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/addChannel", + "description": "Add a channel to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Add a channel to a bridge.", + "nickname": "addChannel", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channel", + "description": "Ids of channels to add to bridge", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "role", + "description": "Channel's role in the bridge", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "absorbDTMF", + "description": "Absorb DTMF coming from this channel, preventing it to pass through to the bridge", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "mute", + "description": "Mute audio from this channel, preventing it to pass through to the bridge", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Channel not found" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application; Channel currently recording" + }, + { + "code": 422, + "reason": "Channel not in Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/removeChannel", + "description": "Remove a channel from a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Remove a channel from a bridge.", + "nickname": "removeChannel", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channel", + "description": "Ids of channels to remove from bridge", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Channel not found" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + }, + { + "code": 422, + "reason": "Channel not in this bridge" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/videoSource/{channelId}", + "description": "Set a channel as the video source in a multi-party bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Set a channel as the video source in a multi-party mixing bridge. This operation has no effect on bridges with two or fewer participants.", + "nickname": "setVideoSource", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge or Channel not found" + }, + { + "code": 409, + "reason": "Channel not in Stasis application" + }, + { + "code": 422, + "reason": "Channel not in this Bridge" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/videoSource", + "description": "Removes any explicit video source", + "operations": [ + { + "httpMethod": "DELETE", + "summary": "Removes any explicit video source in a multi-party mixing bridge. This operation has no effect on bridges with two or fewer participants. When no explicit video source is set, talk detection will be used to determine the active video stream.", + "nickname": "clearVideoSource", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/moh", + "description": "Play music on hold to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play music on hold to a bridge or change the MOH class that is playing.", + "nickname": "startMoh", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "mohClass", + "description": "Channel's id", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing music on hold to a bridge.", + "notes": "This will only stop music on hold being played via POST bridges/{bridgeId}/moh.", + "nickname": "stopMoh", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/play", + "description": "Play media to the participants of a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media on a bridge.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "play", + "responseClass": "Playback", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "playbackId", + "description": "Playback Id.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/play/{playbackId}", + "description": "Play media to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media on a bridge.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "playWithId", + "responseClass": "Playback", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + + } + ] + }, + { + "path": "/bridges/{bridgeId}/record", + "description": "Record audio on a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start a recording.", + "notes": "This records the mixed audio from all channels participating in this bridge.", + "nickname": "record", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Recording's filename", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "maxDurationSeconds", + "description": "Maximum duration of the recording, in seconds. 0 for no limit.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "maxSilenceSeconds", + "description": "Maximum duration of silence, in seconds. 0 for no limit.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "ifExists", + "description": "Action to take if a recording with the same name already exists.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "fail", + "allowableValues": { + "valueType": "LIST", + "values": [ + "fail", + "overwrite", + "append" + ] + } + }, + { + "name": "beep", + "description": "Play beep when recording begins", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "terminateOn", + "description": "DTMF input to terminate recording.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "any", + "*", + "#" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge is not in a Stasis application; A recording with the same name already exists on the system and can not be overwritten because it is in progress or ifExists=fail" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + } + ], + "models": { + "Bridge": { + "id": "Bridge", + "description": "The merging of media from one or more channels.\n\nEveryone on the bridge receives the same audio.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for this bridge", + "required": true + }, + "technology": { + "type": "string", + "description": "Name of the current bridging technology", + "required": true + }, + "bridge_type": { + "type": "string", + "description": "Type of bridge technology", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "mixing", + "holding" + ] + } + }, + "bridge_class": { + "type": "string", + "description": "Bridging class", + "required": true + }, + "creator": { + "type": "string", + "description": "Entity that created the bridge", + "required": true + }, + "name": { + "type": "string", + "description": "Name the creator gave the bridge", + "required": true + }, + "channels": { + "type": "List[string]", + "description": "Ids of channels participating in this bridge", + "required": true + }, + "video_mode": { + "type": "string", + "description": "The video mode the bridge is using. One of 'none', 'talker', or 'single'.", + "required": false + }, + "video_source_id": { + "type": "string", + "description": "The ID of the channel that is the source of video in this bridge, if one exists.", + "required": false + }, + "creationtime": { + "required": true, + "type": "Date", + "description": "Timestamp when bridge was created" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_4_0_1/channels.json b/codegen/src/main/resources/codegen-data/ari_4_0_1/channels.json new file mode 100644 index 00000000..61619342 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_4_0_1/channels.json @@ -0,0 +1,1835 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/channels.{format}", + "requiresModules": [ + "res_stasis_answer", + "res_stasis_playback", + "res_stasis_recording", + "res_stasis_snoop" + ], + "apis": [ + { + "path": "/channels", + "description": "Active channels", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all active channels in Asterisk.", + "nickname": "list", + "responseClass": "List[Channel]" + }, + { + "httpMethod": "POST", + "summary": "Create a new channel (originate).", + "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.", + "nickname": "originate", + "responseClass": "Channel", + "parameters": [ + { + "name": "endpoint", + "description": "Endpoint to call.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to dial after the endpoint answers. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to dial after the endpoint answers. If omitted, uses 'default'. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to dial after the endpoint answers. If omitted, uses 1. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "long" + }, + { + "name": "label", + "description": "The label to dial after the endpoint answers. Will supersede 'priority' if provided. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The application that is subscribed to the originated channel. When the channel is answered, it will be passed to this Stasis application. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "callerId", + "description": "CallerID to use when dialing the endpoint or extension.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 30 + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "The unique id of the channel which is originating this one.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "formats", + "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for originating a channel." + }, + { + "code": 409, + "reason": "Channel with given unique ID already exists." + } + ] + } + ] + }, + { + "path": "/channels/create", + "description": "Create a channel and place it in a Stasis app, but do not dial the channel yet.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Create channel.", + "nickname": "create", + "responseClass": "Channel", + "parameters": [ + { + "name": "endpoint", + "description": "Endpoint for channel communication", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "Stasis Application to place channel into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "Unique ID of the calling channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "formats", + "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 409, + "reason": "Channel with given unique ID already exists." + } + ] + } + ] + }, + { + "path": "/channels/{channelId}", + "description": "Active channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "Channel details.", + "nickname": "get", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + } + ] + }, + { + "httpMethod": "POST", + "summary": "Create a new channel (originate with id).", + "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.", + "nickname": "originateWithId", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "endpoint", + "description": "Endpoint to call.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to dial after the endpoint answers. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to dial after the endpoint answers. If omitted, uses 'default'. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to dial after the endpoint answers. If omitted, uses 1. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "long" + }, + { + "name": "label", + "description": "The label to dial after the endpoint answers. Will supersede 'priority' if provided. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The application that is subscribed to the originated channel. When the channel is answered, it will be passed to this Stasis application. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "callerId", + "description": "CallerID to use when dialing the endpoint or extension.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 30 + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "The unique id of the channel which is originating this one.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "formats", + "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for originating a channel." + }, + { + "code": 409, + "reason": "Channel with given unique ID already exists." + } + ] + + }, + { + "httpMethod": "DELETE", + "summary": "Delete (i.e. hangup) a channel.", + "nickname": "hangup", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "reason", + "description": "Reason for hanging up the channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defalutValue": "normal", + "allowableValues": { + "valueType": "LIST", + "values": [ + "normal", + "busy", + "congestion", + "no_answer", + "timeout", + "rejected", + "unallocated", + "normal_unspecified", + "number_incomplete", + "codec_mismatch", + "interworking", + "failure", + "answered_elsewhere" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid reason for hangup provided" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/continue", + "description": "Exit application; continue execution in the dialplan", + "operations": [ + { + "httpMethod": "POST", + "summary": "Exit application; continue execution in the dialplan.", + "nickname": "continueInDialplan", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "label", + "description": "The label to continue to - will supersede 'priority' if both are provided.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/move", + "description": "Move the channel from one Stasis application to another.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Move the channel from one Stasis application to another.", + "nickname": "move", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The channel will be passed to this Stasis application.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": "404", + "reason": "Channel not found" + }, + { + "code": "409", + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/redirect", + "description": "Inform the channel that it should redirect itself to a different location. Note that this will almost certainly cause the channel to exit the application.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Redirect the channel to a different location.", + "nickname": "redirect", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "endpoint", + "description": "The endpoint to redirect the channel to", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Endpoint parameter not provided" + }, + { + "code": 404, + "reason": "Channel or endpoint not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 422, + "reason": "Endpoint is not the same type as the channel" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/answer", + "description": "Answer a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Answer a channel.", + "nickname": "answer", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/ring", + "description": "Send a ringing indication to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Indicate ringing to a channel.", + "nickname": "ring", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop ringing indication on a channel if locally generated.", + "nickname": "ringStop", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/dtmf", + "description": "Send DTMF to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Send provided DTMF to a given channel.", + "nickname": "sendDTMF", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "dtmf", + "description": "DTMF To send.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "before", + "description": "Amount of time to wait before DTMF digits (specified in milliseconds) start.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0 + }, + { + "name": "between", + "description": "Amount of time in between DTMF digits (specified in milliseconds).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 100 + }, + { + "name": "duration", + "description": "Length of each DTMF digit (specified in milliseconds).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 100 + }, + { + "name": "after", + "description": "Amount of time to wait after DTMF digits (specified in milliseconds) end.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0 + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "DTMF is required" + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/mute", + "description": "Mute a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Mute a channel.", + "nickname": "mute", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "Direction in which to mute audio", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both", + "in", + "out" + ] + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unmute a channel.", + "nickname": "unmute", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "Direction in which to unmute audio", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both", + "in", + "out" + ] + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/hold", + "description": "Put a channel on hold", + "operations": [ + { + "httpMethod": "POST", + "summary": "Hold a channel.", + "nickname": "hold", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Remove a channel from hold.", + "nickname": "unhold", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/moh", + "description": "Play music on hold to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play music on hold to a channel.", + "notes": "Using media operations such as /play on a channel playing MOH in this manner will suspend MOH without resuming automatically. If continuing music on hold is desired, the stasis application must reinitiate music on hold.", + "nickname": "startMoh", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "mohClass", + "description": "Music on hold class to use", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing music on hold to a channel.", + "nickname": "stopMoh", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/silence", + "description": "Play silence to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play silence to a channel.", + "notes": "Using media operations such as /play on a channel playing silence in this manner will suspend silence without resuming automatically.", + "nickname": "startSilence", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing silence to a channel.", + "nickname": "stopSilence", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/play", + "description": "Play media to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "play", + "responseClass": "Playback", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000 + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/play/{playbackId}", + "description": "Play media to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media and specify the playbackId.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "playWithId", + "responseClass": "Playback", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000 + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/record", + "description": "Record audio from a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start a recording.", + "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.", + "nickname": "record", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Recording's filename", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "maxDurationSeconds", + "description": "Maximum duration of the recording, in seconds. 0 for no limit", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "maxSilenceSeconds", + "description": "Maximum duration of silence, in seconds. 0 for no limit", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "ifExists", + "description": "Action to take if a recording with the same name already exists.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "fail", + "allowableValues": { + "valueType": "LIST", + "values": [ + "fail", + "overwrite", + "append" + ] + } + }, + { + "name": "beep", + "description": "Play beep when recording begins", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "terminateOn", + "description": "DTMF input to terminate recording", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "any", + "*", + "#" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "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" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/variable", + "description": "Variables on a channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the value of a channel variable or function.", + "nickname": "getChannelVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The channel variable or function to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Channel or variable not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "POST", + "summary": "Set the value of a channel variable or function.", + "nickname": "setChannelVar", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The channel variable or function to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/snoop", + "description": "Snoop (spy/whisper) on a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start snooping.", + "notes": "Snoop (spy/whisper) on a specific channel.", + "nickname": "snoopChannel", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "spy", + "description": "Direction of audio to spy on", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "whisper", + "description": "Direction of audio to whisper into", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "app", + "description": "Application the snooping channel is placed into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "snoopId", + "description": "Unique ID to assign to snooping channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/snoop/{snoopId}", + "description": "Snoop (spy/whisper) on a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start snooping.", + "notes": "Snoop (spy/whisper) on a specific channel.", + "nickname": "snoopChannelWithId", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "snoopId", + "description": "Unique ID to assign to snooping channel", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "spy", + "description": "Direction of audio to spy on", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "whisper", + "description": "Direction of audio to whisper into", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "app", + "description": "Application the snooping channel is placed into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/dial", + "description": "Dial a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Dial a created channel.", + "nickname": "dial", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "caller", + "description": "Channel ID of caller", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Dial timeout", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel cannot be found." + }, + { + "code": 409, + "reason": "Channel cannot be dialed." + } + ] + } + ] + } + ], + "models": { + "Dialed": { + "id": "Dialed", + "description": "Dialed channel information.", + "properties": {} + }, + "DialplanCEP": { + "id": "DialplanCEP", + "description": "Dialplan location (context/extension/priority)", + "properties": { + "context": { + "required": true, + "type": "string", + "description": "Context in the dialplan" + }, + "exten": { + "required": true, + "type": "string", + "description": "Extension in the dialplan" + }, + "priority": { + "required": true, + "type": "long", + "description": "Priority in the dialplan" + } + } + }, + "CallerID": { + "id": "CallerID", + "description": "Caller identification", + "properties": { + "name": { + "required": true, + "type": "string" + }, + "number": { + "required": true, + "type": "string" + } + } + }, + "Channel": { + "id": "Channel", + "description": "A specific communication connection between Asterisk and an Endpoint.", + "properties": { + "id": { + "required": true, + "type": "string", + "description": "Unique identifier of the channel.\n\nThis is the same as the Uniqueid field in AMI." + }, + "name": { + "required": true, + "type": "string", + "description": "Name of the channel (i.e. SIP/foo-0000a7e3)" + }, + "state": { + "required": true, + "type": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "Down", + "Rsrved", + "OffHook", + "Dialing", + "Ring", + "Ringing", + "Up", + "Busy", + "Dialing Offhook", + "Pre-ring", + "Unknown" + ] + } + }, + "caller": { + "required": true, + "type": "CallerID" + }, + "connected": { + "required": true, + "type": "CallerID" + }, + "accountcode": { + "required": true, + "type": "string" + }, + "dialplan": { + "required": true, + "type": "DialplanCEP", + "description": "Current location in the dialplan" + }, + "creationtime": { + "required": true, + "type": "Date", + "description": "Timestamp when channel was created" + }, + "language": { + "required": true, + "type": "string", + "description": "The default spoken language" + }, + "channelvars": { + "required": false, + "type": "object", + "description": "Channel variables" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_4_0_1/deviceStates.json b/codegen/src/main/resources/codegen-data/ari_4_0_1/deviceStates.json new file mode 100644 index 00000000..bd389355 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_4_0_1/deviceStates.json @@ -0,0 +1,154 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "Kevin Harwell ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/deviceStates.{format}", + "requiresModules": [ + "res_stasis_device_state" + ], + "apis": [ + { + "path": "/deviceStates", + "description": "Device states", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all ARI controlled device states.", + "nickname": "list", + "responseClass": "List[DeviceState]" + } + ] + }, + { + "path": "/deviceStates/{deviceName}", + "description": "Device state", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve the current state of a device.", + "nickname": "get", + "responseClass": "DeviceState", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Change the state of a device controlled by ARI. (Note - implicitly creates the device state).", + "nickname": "update", + "responseClass": "void", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "deviceState", + "description": "Device state value", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "NOT_INUSE", + "INUSE", + "BUSY", + "INVALID", + "UNAVAILABLE", + "RINGING", + "RINGINUSE", + "ONHOLD" + ] + } + + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Device name is missing" + }, + { + "code": 409, + "reason": "Uncontrolled device specified" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Destroy a device-state controlled by ARI.", + "nickname": "delete", + "responseClass": "void", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Device name is missing" + }, + { + "code": 409, + "reason": "Uncontrolled device specified" + } + ] + } + ] + } + ], + "models": { + "DeviceState": { + "id": "DeviceState", + "description": "Represents the state of a device.", + "properties": { + "name": { + "type": "string", + "description": "Name of the device.", + "required": true + }, + "state": { + "type": "string", + "description": "Device's state", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "UNKNOWN", + "NOT_INUSE", + "INUSE", + "BUSY", + "INVALID", + "UNAVAILABLE", + "RINGING", + "RINGINUSE", + "ONHOLD" + ] + } + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_4_0_1/endpoints.json b/codegen/src/main/resources/codegen-data/ari_4_0_1/endpoints.json new file mode 100644 index 00000000..264c0eb2 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_4_0_1/endpoints.json @@ -0,0 +1,279 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/endpoints.{format}", + "apis": [ + { + "path": "/endpoints", + "description": "Asterisk endpoints", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all endpoints.", + "nickname": "list", + "responseClass": "List[Endpoint]" + } + ] + }, + { + "path": "/endpoints/sendMessage", + "description": "Send a message to some technology URI or endpoint.", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Send a message to some technology URI or endpoint.", + "nickname": "sendMessage", + "responseClass": "void", + "parameters": [ + { + "name": "to", + "description": "The endpoint resource or technology specific URI to send the message to. Valid resources are sip, pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "from", + "description": "The endpoint resource or technology specific identity to send this message from. Valid resources are sip, pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "body", + "description": "The body of the message", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "descriptioni": "The \"variables\" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, pjsip and sip resource types will add the key/value pairs as SIP headers,", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoint not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}", + "description": "Asterisk endpoints", + "operations": [ + { + "httpMethod": "GET", + "summary": "List available endoints for a given endpoint technology.", + "nickname": "listByTech", + "responseClass": "List[Endpoint]", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoints (sip,iax2,...)", + "paramType": "path", + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Endpoints not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}/{resource}", + "description": "Single endpoint", + "operations": [ + { + "httpMethod": "GET", + "summary": "Details for an endpoint.", + "nickname": "get", + "responseClass": "Endpoint", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "resource", + "description": "ID of the endpoint", + "paramType": "path", + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoints not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}/{resource}/sendMessage", + "description": "Send a message to some endpoint in a technology.", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Send a message to some endpoint in a technology.", + "nickname": "sendMessageToEndpoint", + "responseClass": "void", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "resource", + "description": "ID of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "from", + "description": "The endpoint resource or technology specific identity to send this message from. Valid resources are sip, pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "body", + "description": "The body of the message", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "descriptioni": "The \"variables\" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, pjsip and sip resource types will add the key/value pairs as SIP headers,", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoint not found" + } + ] + } + ] + } + ], + "models": { + "Endpoint": { + "id": "Endpoint", + "description": "An external device that may offer/accept calls to/from Asterisk.\n\nUnlike most resources, which have a single unique identifier, an endpoint is uniquely identified by the technology/resource pair.", + "properties": { + "technology": { + "type": "string", + "description": "Technology of the endpoint", + "required": true + }, + "resource": { + "type": "string", + "description": "Identifier of the endpoint, specific to the given technology.", + "required": true + }, + "state": { + "type": "string", + "description": "Endpoint's state", + "required": false, + "allowableValues": { + "valueType": "LIST", + "values": [ + "unknown", + "offline", + "online" + ] + } + }, + "channel_ids": { + "type": "List[string]", + "description": "Id's of channels associated with this endpoint", + "required": true + } + } + }, + "TextMessageVariable": { + "id": "TextMessageVariable", + "description": "A key/value pair variable in a text message.", + "properties": { + "key": { + "type": "string", + "description": "A unique key identifying the variable.", + "required": true + }, + "value": { + "type": "string", + "description": "The value of the variable.", + "required": true + } + } + }, + "TextMessage": { + "id": "TextMessage", + "description": "A text message.", + "properties": { + "from": { + "type": "string", + "description": "A technology specific URI specifying the source of the message. For sip and pjsip technologies, any SIP URI can be specified. For xmpp, the URI must correspond to the client connection being used to send the message.", + "required": true + }, + "to": { + "type": "string", + "description": "A technology specific URI specifying the destination of the message. Valid technologies include sip, pjsip, and xmp. The destination of a message should be an endpoint.", + "required": true + }, + "body": { + "type": "string", + "description": "The text of the message.", + "required": true + }, + "variables": { + "type": "List[TextMessageVariable]", + "description": "Technology specific key/value pairs associated with the message.", + "required": false + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_4_0_1/events.json b/codegen/src/main/resources/codegen-data/ari_4_0_1/events.json new file mode 100644 index 00000000..c9822f6c --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_4_0_1/events.json @@ -0,0 +1,918 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.2", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/events.{format}", + "requiresModules": [ + "res_http_websocket" + ], + "apis": [ + { + "path": "/events", + "description": "Events from Asterisk to applications", + "operations": [ + { + "httpMethod": "GET", + "upgrade": "websocket", + "websocketProtocol": "ari", + "summary": "WebSocket connection for events.", + "nickname": "eventWebsocket", + "responseClass": "Message", + "parameters": [ + { + "name": "app", + "description": "Applications to subscribe to.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "subscribeAll", + "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'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean" + } + ] + } + ] + }, + { + "path": "/events/user/{eventName}", + "description": "Stasis application user events", + "operations": [ + { + "httpMethod": "POST", + "summary": "Generate a user event.", + "nickname": "userEvent", + "responseClass": "void", + "parameters": [ + { + "name": "eventName", + "description": "Event name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "application", + "description": "The name of the application that will receive this event", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "source", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}/{resource}, deviceState:{deviceName}", + "paramType": "query", + "required": false, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds custom key/value pairs to add to the user event. Ex. { \"variables\": { \"key\": \"value\" } }", + "paramType": "body", + "required": false, + "allowMultiple": false, + "dataType": "containers" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 422, + "reason": "Event source not found." + }, + { + "code": 400, + "reason": "Invalid even tsource URI or userevent data." + } + ] + } + ] + } + ], + "models": { + "Message": { + "id": "Message", + "description": "Base type for errors and events", + "discriminator": "type", + "properties": { + "type": { + "type": "string", + "required": true, + "description": "Indicates the type of this message." + }, + "asterisk_id": { + "type": "string", + "required": false, + "description": "The unique ID for the Asterisk instance that raised this event." + } + }, + "subTypes": [ + "MissingParams", + "Event" + ] + }, + "MissingParams": { + "id": "MissingParams", + "description": "Error event sent when required params are missing.", + "properties": { + "params": { + "required": true, + "type": "List[string]", + "description": "A list of the missing parameters" + } + } + }, + "Event": { + "id": "Event", + "description": "Base type for asynchronous events from Asterisk.", + "properties": { + "application": { + "type": "string", + "description": "Name of the application receiving the event.", + "required": true + }, + "timestamp": { + "type": "Date", + "description": "Time at which this event was created.", + "required": true + } + }, + "subTypes": [ + "DeviceStateChanged", + "PlaybackStarted", + "PlaybackContinuing", + "PlaybackFinished", + "RecordingStarted", + "RecordingFinished", + "RecordingFailed", + "ApplicationMoveFailed", + "ApplicationReplaced", + "BridgeCreated", + "BridgeDestroyed", + "BridgeMerged", + "BridgeBlindTransfer", + "BridgeAttendedTransfer", + "BridgeVideoSourceChanged", + "ChannelCreated", + "ChannelDestroyed", + "ChannelEnteredBridge", + "ChannelLeftBridge", + "ChannelStateChange", + "ChannelDtmfReceived", + "ChannelDialplan", + "ChannelCallerId", + "ChannelUserevent", + "ChannelHangupRequest", + "ChannelVarset", + "ChannelTalkingStarted", + "ChannelTalkingFinished", + "ChannelHold", + "ChannelUnhold", + "ContactStatusChange", + "EndpointStateChange", + "Dial", + "StasisEnd", + "StasisStart", + "TextMessageReceived", + "ChannelConnectedLine", + "PeerStatusChange" + ] + }, + "ContactInfo": { + "id": "ContactInfo", + "description": "Detailed information about a contact on an endpoint.", + "properties": { + "uri": { + "type": "string", + "description": "The location of the contact.", + "required": true + }, + "contact_status": { + "type": "string", + "description": "The current status of the contact.", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "Unreachable", + "Reachable", + "Unknown", + "NonQualified", + "Removed" + ] + } + }, + "aor": { + "type": "string", + "description": "The Address of Record this contact belongs to.", + "required": true + }, + "roundtrip_usec": { + "type": "string", + "description": "Current round trip time, in microseconds, for the contact.", + "required": false + } + } + }, + "Peer": { + "id": "Peer", + "description": "Detailed information about a remote peer that communicates with Asterisk.", + "properties": { + "peer_status": { + "type": "string", + "description": "The current state of the peer. Note that the values of the status are dependent on the underlying peer technology.", + "required": true + }, + "cause": { + "type": "string", + "description": "An optional reason associated with the change in peer_status.", + "required": false + }, + "address": { + "type": "string", + "description": "The IP address of the peer.", + "required": false + }, + "port": { + "type": "string", + "description": "The port of the peer.", + "required": false + }, + "time": { + "type": "string", + "description": "The last known time the peer was contacted.", + "required": false + } + } + }, + "DeviceStateChanged": { + "id": "DeviceStateChanged", + "description": "Notification that a device state has changed.", + "properties": { + "device_state": { + "type": "DeviceState", + "description": "Device state object", + "required": true + } + } + }, + "PlaybackStarted": { + "id": "PlaybackStarted", + "description": "Event showing the start of a media playback operation.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "PlaybackContinuing": { + "id": "PlaybackContinuing", + "description": "Event showing the continuation of a media playback operation from one media URI to the next in the list.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "PlaybackFinished": { + "id": "PlaybackFinished", + "description": "Event showing the completion of a media playback operation.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "RecordingStarted": { + "id": "RecordingStarted", + "description": "Event showing the start of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "RecordingFinished": { + "id": "RecordingFinished", + "description": "Event showing the completion of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "RecordingFailed": { + "id": "RecordingFailed", + "description": "Event showing failure of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "ApplicationMoveFailed": { + "id": "ApplicationMoveFailed", + "description": "Notification that trying to move a channel to another Stasis application failed.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + }, + "destination": { + "required": true, + "type": "string" + }, + "args": { + "required": true, + "type": "List[string]", + "description": "Arguments to the application" + } + } + }, + "ApplicationReplaced": { + "id": "ApplicationReplaced", + "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.", + "properties": {} + }, + "BridgeCreated": { + "id": "BridgeCreated", + "description": "Notification that a bridge has been created.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeDestroyed": { + "id": "BridgeDestroyed", + "description": "Notification that a bridge has been destroyed.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeMerged": { + "id": "BridgeMerged", + "description": "Notification that one bridge has merged into another.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "bridge_from": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeVideoSourceChanged": { + "id": "BridgeVideoSourceChanged", + "description": "Notification that the source of video in a bridge has changed.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "old_video_source_id": { + "required": false, + "type": "string" + } + } + }, + "BridgeBlindTransfer": { + "id": "BridgeBlindTransfer", + "description": "Notification that a blind transfer has occurred.", + "properties": { + "channel": { + "description": "The channel performing the blind transfer", + "required": true, + "type": "Channel" + }, + "replace_channel": { + "description": "The channel that is replacing transferer when the transferee(s) can not be transferred directly", + "required": false, + "type": "Channel" + }, + "transferee": { + "description": "The channel that is being transferred", + "required": false, + "type": "Channel" + }, + "exten": { + "description": "The extension transferred to", + "required": true, + "type": "string" + }, + "context": { + "description": "The context transferred to", + "required": true, + "type": "string" + }, + "result": { + "description": "The result of the transfer attempt", + "required": true, + "type": "string" + }, + "is_external": { + "description": "Whether the transfer was externally initiated or not", + "required": true, + "type": "boolean" + }, + "bridge": { + "description": "The bridge being transferred", + "type": "Bridge" + } + } + }, + "BridgeAttendedTransfer": { + "id": "BridgeAttendedTransfer", + "description": "Notification that an attended transfer has occurred.", + "properties": { + "transferer_first_leg": { + "description": "First leg of the transferer", + "required": true, + "type": "Channel" + }, + "transferer_second_leg": { + "description": "Second leg of the transferer", + "required": true, + "type": "Channel" + }, + "replace_channel": { + "description": "The channel that is replacing transferer_first_leg in the swap", + "required": false, + "type": "Channel" + }, + "transferee": { + "description": "The channel that is being transferred", + "required": false, + "type": "Channel" + }, + "transfer_target": { + "description": "The channel that is being transferred to", + "required": false, + "type": "Channel" + }, + "result": { + "description": "The result of the transfer attempt", + "required": true, + "type": "string" + }, + "is_external": { + "description": "Whether the transfer was externally initiated or not", + "required": true, + "type": "boolean" + }, + "transferer_first_leg_bridge": { + "description": "Bridge the transferer first leg is in", + "type": "Bridge" + }, + "transferer_second_leg_bridge": { + "description": "Bridge the transferer second leg is in", + "type": "Bridge" + }, + "destination_type": { + "description": "How the transfer was accomplished", + "required": true, + "type": "string" + }, + "destination_bridge": { + "description": "Bridge that survived the merge result", + "type": "string" + }, + "destination_application": { + "description": "Application that has been transferred into", + "type": "string" + }, + "destination_link_first_leg": { + "description": "First leg of a link transfer result", + "type": "Channel" + }, + "destination_link_second_leg": { + "description": "Second leg of a link transfer result", + "type": "Channel" + }, + "destination_threeway_channel": { + "description": "Transferer channel that survived the threeway result", + "type": "Channel" + }, + "destination_threeway_bridge": { + "description": "Bridge that survived the threeway result", + "type": "Bridge" + } + } + }, + "ChannelCreated": { + "id": "ChannelCreated", + "description": "Notification that a channel has been created.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelDestroyed": { + "id": "ChannelDestroyed", + "description": "Notification that a channel has been destroyed.", + "properties": { + "cause": { + "required": true, + "description": "Integer representation of the cause of the hangup", + "type": "int" + }, + "cause_txt": { + "required": true, + "description": "Text representation of the cause of the hangup", + "type": "string" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelEnteredBridge": { + "id": "ChannelEnteredBridge", + "description": "Notification that a channel has entered a bridge.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "channel": { + "type": "Channel" + } + } + }, + "ChannelLeftBridge": { + "id": "ChannelLeftBridge", + "description": "Notification that a channel has left a bridge.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelStateChange": { + "id": "ChannelStateChange", + "description": "Notification of a channel's state change.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelDtmfReceived": { + "id": "ChannelDtmfReceived", + "description": "DTMF received on a channel.\n\nThis event is sent when the DTMF ends. There is no notification about the start of DTMF", + "properties": { + "digit": { + "required": true, + "type": "string", + "description": "DTMF digit received (0-9, A-E, # or *)" + }, + "duration_ms": { + "required": true, + "type": "int", + "description": "Number of milliseconds DTMF was received" + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which DTMF was received" + } + } + }, + "ChannelDialplan": { + "id": "ChannelDialplan", + "description": "Channel changed location in the dialplan.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that changed dialplan location." + }, + "dialplan_app": { + "required": true, + "type": "string", + "description": "The application about to be executed." + }, + "dialplan_app_data": { + "required": true, + "type": "string", + "description": "The data to be passed to the application." + } + } + }, + "ChannelCallerId": { + "id": "ChannelCallerId", + "description": "Channel changed Caller ID.", + "properties": { + "caller_presentation": { + "required": true, + "type": "int", + "description": "The integer representation of the Caller Presentation value." + }, + "caller_presentation_txt": { + "required": true, + "type": "string", + "description": "The text representation of the Caller Presentation value." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that changed Caller ID." + } + } + }, + "ChannelUserevent": { + "id": "ChannelUserevent", + "description": "User-generated event with additional user-defined fields in the object.", + "properties": { + "eventname": { + "required": true, + "type": "string", + "description": "The name of the user event." + }, + "channel": { + "required": false, + "type": "Channel", + "description": "A channel that is signaled with the user event." + }, + "bridge": { + "required": false, + "type": "Bridge", + "description": "A bridge that is signaled with the user event." + }, + "endpoint": { + "required": false, + "type": "Endpoint", + "description": "A endpoint that is signaled with the user event." + }, + "userevent": { + "required": true, + "type": "object", + "description": "Custom Userevent data" + } + } + }, + "ChannelHangupRequest": { + "id": "ChannelHangupRequest", + "description": "A hangup was requested on the channel.", + "properties": { + "cause": { + "type": "int", + "description": "Integer representation of the cause of the hangup." + }, + "soft": { + "type": "boolean", + "description": "Whether the hangup request was a soft hangup request." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which the hangup was requested." + } + } + }, + "ChannelVarset": { + "id": "ChannelVarset", + "description": "Channel variable changed.", + "properties": { + "variable": { + "required": true, + "type": "string", + "description": "The variable that changed." + }, + "value": { + "required": true, + "type": "string", + "description": "The new value of the variable." + }, + "channel": { + "required": false, + "type": "Channel", + "description": "The channel on which the variable was set.\n\nIf missing, the variable is a global variable." + } + } + }, + "ChannelHold": { + "id": "ChannelHold", + "description": "A channel initiated a media hold.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that initiated the hold event." + }, + "musicclass": { + "required": false, + "type": "string", + "description": "The music on hold class that the initiator requested." + } + } + }, + "ChannelUnhold": { + "id": "ChannelUnhold", + "description": "A channel initiated a media unhold.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that initiated the unhold event." + } + } + }, + "ChannelTalkingStarted": { + "id": "ChannelTalkingStarted", + "description": "Talking was detected on the channel.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which talking started." + } + } + }, + "ChannelTalkingFinished": { + "id": "ChannelTalkingFinished", + "description": "Talking is no longer detected on the channel.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which talking completed." + }, + "duration": { + "required": true, + "type": "int", + "description": "The length of time, in milliseconds, that talking was detected on the channel" + } + } + }, + "ContactStatusChange": { + "id": "ContactStatusChange", + "description": "The state of a contact on an endpoint has changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + }, + "contact_info": { + "required": true, + "type": "ContactInfo" + } + } + }, + "PeerStatusChange": { + "id": "PeerStatusChange", + "description": "The state of a peer associated with an endpoint has changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + }, + "peer": { + "required": true, + "type": "Peer" + } + } + }, + "EndpointStateChange": { + "id": "EndpointStateChange", + "description": "Endpoint state changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + } + } + }, + "Dial": { + "id": "Dial", + "description": "Dialing state has changed.", + "properties": { + "caller": { + "required": false, + "type": "Channel", + "description": "The calling channel." + }, + "peer": { + "required": true, + "type": "Channel", + "description": "The dialed channel." + }, + "forward": { + "required": false, + "type": "string", + "description": "Forwarding target requested by the original dialed channel." + }, + "forwarded": { + "required": false, + "type": "Channel", + "description": "Channel that the caller has been forwarded to." + }, + "dialstring": { + "required": false, + "type": "string", + "description": "The dial string for calling the peer channel." + }, + "dialstatus": { + "required": true, + "type": "string", + "description": "Current status of the dialing attempt to the peer." + } + } + }, + "StasisEnd": { + "id": "StasisEnd", + "description": "Notification that a channel has left a Stasis application.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "StasisStart": { + "id": "StasisStart", + "description": "Notification that a channel has entered a Stasis application.", + "properties": { + "args": { + "required": true, + "type": "List[string]", + "description": "Arguments to the application" + }, + "channel": { + "required": true, + "type": "Channel" + }, + "replace_channel": { + "required": false, + "type": "Channel" + } + } + }, + "TextMessageReceived": { + "id": "TextMessageReceived", + "description": "A text message was received from an endpoint.", + "properties": { + "message": { + "required": true, + "type": "TextMessage" + }, + "endpoint": { + "required": false, + "type": "Endpoint" + } + } + }, + "ChannelConnectedLine": { + "id": "ChannelConnectedLine", + "description": "Channel changed Connected Line.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel whose connected line has changed." + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_4_0_1/mailboxes.json b/codegen/src/main/resources/codegen-data/ari_4_0_1/mailboxes.json new file mode 100644 index 00000000..8f5941b8 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_4_0_1/mailboxes.json @@ -0,0 +1,137 @@ +{ + "_copyright": "Copyright (C) 2013, Digium, Inc.", + "_author": "Jonathan Rose ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/mailboxes.{format}", + "requiresModules": [ + "res_stasis_mailbox" + ], + "apis": [ + { + "path": "/mailboxes", + "description": "Mailboxes", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all mailboxes.", + "nickname": "list", + "responseClass": "List[Mailbox]" + } + ] + }, + { + "path": "/mailboxes/{mailboxName}", + "description": "Mailbox state", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve the current state of a mailbox.", + "nickname": "get", + "responseClass": "Mailbox", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Change the state of a mailbox. (Note - implicitly creates the mailbox).", + "nickname": "update", + "responseClass": "void", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "oldMessages", + "description": "Count of old messages in the mailbox", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "newMessages", + "description": "Count of new messages in the mailbox", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "int" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Destroy a mailbox.", + "nickname": "delete", + "responseClass": "void", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + } + ] + } + ], + "models": { + "Mailbox": { + "id": "Mailbox", + "description": "Represents the state of a mailbox.", + "properties": { + "name": { + "type": "string", + "description": "Name of the mailbox.", + "required": true + }, + "old_messages": { + "type": "int", + "description": "Count of old messages in the mailbox.", + "required": true + }, + "new_messages": { + "type": "int", + "description": "Count of new messages in the mailbox.", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_4_0_1/playbacks.json b/codegen/src/main/resources/codegen-data/ari_4_0_1/playbacks.json new file mode 100644 index 00000000..a78dcae7 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_4_0_1/playbacks.json @@ -0,0 +1,164 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/playbacks.{format}", + "requiresModules": [ + "res_stasis_playback" + ], + "apis": [ + { + "path": "/playbacks/{playbackId}", + "description": "Control object for a playback operation.", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a playback's details.", + "nickname": "get", + "responseClass": "Playback", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "The playback cannot be found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop a playback.", + "nickname": "stop", + "responseClass": "void", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "The playback cannot be found" + } + ] + } + ] + }, + { + "path": "/playbacks/{playbackId}/control", + "description": "Control object for a playback operation.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Control a playback.", + "nickname": "control", + "responseClass": "void", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "operation", + "description": "Operation to perform on the playback.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "restart", + "pause", + "unpause", + "reverse", + "forward" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "The provided operation parameter was invalid" + }, + { + "code": 404, + "reason": "The playback cannot be found" + }, + { + "code": 409, + "reason": "The operation cannot be performed in the playback's current state" + } +] + } + ] + } + ], + "models": { + "Playback": { + "id": "Playback", + "description": "Object representing the playback of media to a channel", + "properties": { + "id": { + "type": "string", + "description": "ID for this playback operation", + "required": true + }, + "media_uri": { + "type": "string", + "description": "The URI for the media currently being played back.", + "required": true + }, + "next_media_uri": { + "type": "string", + "description": "If a list of URIs is being played, the next media URI to be played back.", + "required": false + }, + "target_uri": { + "type": "string", + "description": "URI for the channel or bridge to play the media on", + "required": true + }, + "language": { + "type": "string", + "description": "For media types that support multiple languages, the language requested for playback." + }, + "state": { + "type": "string", + "description": "Current state of the playback operation.", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "queued", + "playing", + "continuing", + "done" + ] + } + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_4_0_1/recordings.json b/codegen/src/main/resources/codegen-data/ari_4_0_1/recordings.json new file mode 100644 index 00000000..6ffd6d8e --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_4_0_1/recordings.json @@ -0,0 +1,413 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/recordings.{format}", + "requiresModules": [ + "res_stasis_recording" + ], + "apis": [ + { + "path": "/recordings/stored", + "description": "Recordings", + "operations": [ + { + "httpMethod": "GET", + "summary": "List recordings that are complete.", + "nickname": "listStored", + "responseClass": "List[StoredRecording]" + } + ] + }, + { + "path": "/recordings/stored/{recordingName}", + "description": "Individual recording", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a stored recording's details.", + "nickname": "getStored", + "responseClass": "StoredRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Delete a stored recording.", + "nickname": "deleteStored", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/stored/{recordingName}/file", + "description": "The actual file associated with the stored recording", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the file associated with the stored recording.", + "nickname": "getStoredFile", + "responseClass": "binary", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 403, + "reason": "The recording file could not be opened" + }, + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/stored/{recordingName}/copy", + "description": "Copy an individual recording", + "operations": [ + { + "httpMethod": "POST", + "summary": "Copy a stored recording.", + "nickname": "copyStored", + "responseClass": "StoredRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording to copy", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "destinationRecordingName", + "description": "The destination name of the recording", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "A recording with the same name already exists on the system" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}", + "description": "A recording that is in progress", + "operations": [ + { + "httpMethod": "GET", + "summary": "List live recordings.", + "nickname": "getLive", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop a live recording and discard it.", + "nickname": "cancel", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/stop", + "operations": [ + { + "httpMethod": "POST", + "summary": "Stop a live recording and store it.", + "nickname": "stop", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/pause", + "operations": [ + { + "httpMethod": "POST", + "summary": "Pause a live recording.", + "notes": "Pausing a recording suspends silence detection, which will be restarted when the recording is unpaused. Paused time is not included in the accounting for maxDurationSeconds.", + "nickname": "pause", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unpause a live recording.", + "nickname": "unpause", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/mute", + "operations": [ + { + "httpMethod": "POST", + "summary": "Mute a live recording.", + "notes": "Muting a recording suspends silence detection, which will be restarted when the recording is unmuted.", + "nickname": "mute", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unmute a live recording.", + "nickname": "unmute", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + } + ] + } + ], + "models": { + "StoredRecording": { + "id": "StoredRecording", + "description": "A past recording that may be played back.", + "properties": { + "name": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + }, + "LiveRecording": { + "id": "LiveRecording", + "description": "A recording that is in progress", + "properties": { + "name": { + "required": true, + "type": "string", + "description": "Base name for the recording" + }, + "format": { + "required": true, + "type": "string", + "description": "Recording format (wav, gsm, etc.)" + }, + "target_uri": { + "required": true, + "type": "string", + "description": "URI for the channel or bridge being recorded" + }, + "state": { + "required": true, + "type": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "queued", + "recording", + "paused", + "done", + "failed", + "canceled" + ] + } + }, + "duration": { + "required": false, + "type": "int", + "description": "Duration in seconds of the recording" + }, + "talking_duration": { + "required": false, + "type": "int", + "description": "Duration of talking, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds." + }, + "silence_duration": { + "required": false, + "type": "int", + "description": "Duration of silence, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds." + }, + "cause": { + "required": false, + "type": "string", + "description": "Cause for recording failure if failed" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_4_0_1/sounds.json b/codegen/src/main/resources/codegen-data/ari_4_0_1/sounds.json new file mode 100644 index 00000000..8fbe1c57 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_4_0_1/sounds.json @@ -0,0 +1,99 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/sounds.{format}", + "apis": [ + { + "path": "/sounds", + "description": "Sounds", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all sounds.", + "nickname": "list", + "responseClass": "List[Sound]", + "parameters": [ + { + "name": "lang", + "description": "Lookup sound for a specific language.", + "paramType": "query", + "dataType": "string", + "required": false + }, + { + "name": "format", + "description": "Lookup sound in a specific format.", + "paramType": "query", + "dataType": "string", + "required": false, + "__note": "core show translation can show translation paths between formats, along with relative costs. so this could be just installed format, or we could follow that for transcoded formats." + } + ] + } + ] + }, + { + "path": "/sounds/{soundId}", + "description": "Individual sound", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a sound's details.", + "nickname": "get", + "responseClass": "Sound", + "parameters": [ + { + "name": "soundId", + "description": "Sound's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ] + } + ] + } + ], + "models": { + "FormatLangPair": { + "id": "FormatLangPair", + "description": "Identifies the format and language of a sound file", + "properties": { + "language": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + }, + "Sound": { + "id": "Sound", + "description": "A media file that may be played back.", + "properties": { + "id": { + "required": true, + "description": "Sound's identifier.", + "type": "string" + }, + "text": { + "required": false, + "description": "Text description of the sound, usually the words spoken.", + "type": "string" + }, + "formats": { + "required": true, + "description": "The formats and languages in which this sound is available.", + "type": "List[FormatLangPair]" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_4_0_2/applications.json b/codegen/src/main/resources/codegen-data/ari_4_0_2/applications.json new file mode 100644 index 00000000..09c5cd5c --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_4_0_2/applications.json @@ -0,0 +1,223 @@ +{ + "_copyright": "Copyright (C) 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/applications.{format}", + "apis": [ + { + "path": "/applications", + "description": "Stasis applications", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all applications.", + "nickname": "list", + "responseClass": "List[Application]" + } + ] + }, + { + "path": "/applications/{applicationName}", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get details of an application.", + "nickname": "get", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Application does not exist." + } + ] + } + ] + }, + { + "path": "/applications/{applicationName}/subscription", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "POST", + "summary": "Subscribe an application to a event source.", + "notes": "Returns the state of the application after the subscriptions have changed", + "nickname": "subscribe", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "eventSource", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing parameter." + }, + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 422, + "reason": "Event source does not exist." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unsubscribe an application from an event source.", + "notes": "Returns the state of the application after the subscriptions have changed", + "nickname": "unsubscribe", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "eventSource", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing parameter; event source scheme not recognized." + }, + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 409, + "reason": "Application not subscribed to event source." + }, + { + "code": 422, + "reason": "Event source does not exist." + } + ] + } + ] + }, + { + "path": "/applications/{applicationName}/eventFilter", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Filter application events types.", + "notes": "Allowed and/or disallowed event type filtering can be done. The body (parameter) should specify a JSON key/value object that describes the type of event filtering needed. One, or both of the following keys can be designated:

\"allowed\" - Specifies an allowed list of event types
\"disallowed\" - Specifies a disallowed list of event types

Further, each of those key's value should be a JSON array that holds zero, or more JSON key/value objects. Each of these objects must contain the following key with an associated value:

\"type\" - The type name of the event to filter

The value must be the string name (case sensitive) of the event type that needs filtering. For example:

{ \"allowed\": [ { \"type\": \"StasisStart\" }, { \"type\": \"StasisEnd\" } ] }

As this specifies only an allowed list, then only those two event type messages are sent to the application. No other event messages are sent.

The following rules apply:

* If the body is empty, both the allowed and disallowed filters are set empty.
* If both list types are given then both are set to their respective values (note, specifying an empty array for a given type sets that type to empty).
* If only one list type is given then only that type is set. The other type is not updated.
* An empty \"allowed\" list means all events are allowed.
* An empty \"disallowed\" list means no events are disallowed.
* Disallowed events take precedence over allowed events if the event type is specified in both lists.", + "nickname": "filter", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "filter", + "description": "Specify which event types to allow/disallow", + "paramType": "body", + "required": false, + "dataType": "object", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Bad request." + }, + { + "code": 404, + "reason": "Application does not exist." + } + ] + } + ] + } + ], + "models": { + "Application": { + "id": "Application", + "description": "Details of a Stasis application", + "properties": { + "name": { + "type": "string", + "description": "Name of this application", + "required": true + }, + "channel_ids": { + "type": "List[string]", + "description": "Id's for channels subscribed to.", + "required": true + }, + "bridge_ids": { + "type": "List[string]", + "description": "Id's for bridges subscribed to.", + "required": true + }, + "endpoint_ids": { + "type": "List[string]", + "description": "{tech}/{resource} for endpoints subscribed to.", + "required": true + }, + "device_names": { + "type": "List[string]", + "description": "Names of the devices subscribed to.", + "required": true + }, + "events_allowed": { + "type": "List[object]", + "description": "Event types sent to the application.", + "required": true + }, + "events_disallowed": { + "type": "List[object]", + "description": "Event types not sent to the application.", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_4_0_2/asterisk.json b/codegen/src/main/resources/codegen-data/ari_4_0_2/asterisk.json new file mode 100644 index 00000000..841e6cd8 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_4_0_2/asterisk.json @@ -0,0 +1,725 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/asterisk.{format}", + "apis": [ + { + "path": "/asterisk/config/dynamic/{configClass}/{objectType}/{id}", + "description": "Asterisk dynamic configuration", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve a dynamic configuration object.", + "nickname": "getObject", + "responseClass": "List[ConfigTuple]", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to retrieve.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to retrieve.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "{configClass|objectType|id} not found" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Create or update a dynamic configuration object.", + "nickname": "updateObject", + "responseClass": "List[ConfigTuple]", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to create or update.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to create or update.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "fields", + "description": "The body object should have a value that is a list of ConfigTuples, which provide the fields to update. Ex. [ { \"attribute\": \"directmedia\", \"value\": \"false\" } ]", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Bad request body" + }, + { + "code": 403, + "reason": "Could not create or update object" + }, + { + "code": 404, + "reason": "{configClass|objectType} not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Delete a dynamic configuration object.", + "nickname": "deleteObject", + "responseClass": "void", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to delete.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to delete.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 403, + "reason": "Could not delete object" + }, + { + "code": 404, + "reason": "{configClass|objectType|id} not found" + } + ] + } + ] + }, + { + "path": "/asterisk/info", + "description": "Asterisk system information (similar to core show settings)", + "operations": [ + { + "httpMethod": "GET", + "summary": "Gets Asterisk system information.", + "nickname": "getInfo", + "responseClass": "AsteriskInfo", + "parameters": [ + { + "name": "only", + "description": "Filter information returned", + "paramType": "query", + "required": false, + "allowMultiple": true, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "build", + "system", + "config", + "status" + ] + } + } + ] + } + ] + }, + { + "path": "/asterisk/ping", + "description": "Asterisk ping", + "operations": [ + { + "httpMethod": "GET", + "summary": "Response pong message.", + "nickname": "ping", + "responseClass": "AsteriskPing" + } + ] + }, + { + "path": "/asterisk/modules", + "description": "Asterisk modules", + "operations": [ + { + "httpMethod": "GET", + "summary": "List Asterisk modules.", + "nickname": "listModules", + "responseClass": "List[Module]" + } + ] + }, + { + "path": "/asterisk/modules/{moduleName}", + "description": "Asterisk module", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get Asterisk module information.", + "nickname": "getModule", + "responseClass": "Module", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module could not be found in running modules." + }, + { + "code": 409, + "reason": "Module information could not be retrieved." + } + ] + }, + { + "httpMethod": "POST", + "summary": "Load an Asterisk module.", + "nickname": "loadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 409, + "reason": "Module could not be loaded." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unload an Asterisk module.", + "nickname": "unloadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module not found in running modules." + }, + { + "code": 409, + "reason": "Module could not be unloaded." + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Reload an Asterisk module.", + "nickname": "reloadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module not found in running modules." + }, + { + "code": 409, + "reason": "Module could not be reloaded." + } + ] + } + ] + }, + { + "path": "/asterisk/logging", + "description": "Asterisk log channels", + "operations": [ + { + "httpMethod": "GET", + "summary": "Gets Asterisk log channel information.", + "nickname": "listLogChannels", + "responseClass": "List[LogChannel]" + } + ] + }, + { + "path": "/asterisk/logging/{logChannelName}", + "description": "Asterisk log channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Adds a log channel.", + "nickname": "addLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "The log channel to add", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "configuration", + "description": "levels of the log channel", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Bad request body" + }, + { + "code": 409, + "reason": "Log channel could not be created." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Deletes a log channel.", + "nickname": "deleteLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "Log channels name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Log channel does not exist." + } + ] + } + ] + }, + { + "path": "/asterisk/logging/{logChannelName}/rotate", + "description": "Asterisk log channel", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Rotates a log channel.", + "nickname": "rotateLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "Log channel's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Log channel does not exist." + } + ] + } + ] + }, + { + "path": "/asterisk/variable", + "description": "Global variables", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the value of a global variable.", + "nickname": "getGlobalVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "variable", + "description": "The variable to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + } + ] + }, + { + "httpMethod": "POST", + "summary": "Set the value of a global variable.", + "nickname": "setGlobalVar", + "responseClass": "void", + "parameters": [ + { + "name": "variable", + "description": "The variable to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + } + ] + } + ] + } + ], + "models": { + "BuildInfo": { + "id": "BuildInfo", + "description": "Info about how Asterisk was built", + "properties": { + "os": { + "required": true, + "type": "string", + "description": "OS Asterisk was built on." + }, + "kernel": { + "required": true, + "type": "string", + "description": "Kernel version Asterisk was built on." + }, + "options": { + "required": true, + "type": "string", + "description": "Compile time options, or empty string if default." + }, + "machine": { + "required": true, + "type": "string", + "description": "Machine architecture (x86_64, i686, ppc, etc.)" + }, + "date": { + "required": true, + "type": "string", + "description": "Date and time when Asterisk was built." + }, + "user": { + "required": true, + "type": "string", + "description": "Username that build Asterisk" + } + } + }, + "SystemInfo": { + "id": "SystemInfo", + "description": "Info about Asterisk", + "properties": { + "version": { + "required": true, + "type": "string", + "description": "Asterisk version." + }, + "entity_id": { + "required": true, + "type": "string", + "description": "" + } + } + }, + "SetId": { + "id": "SetId", + "description": "Effective user/group id", + "properties": { + "user": { + "required": true, + "type": "string", + "description": "Effective user id." + }, + "group": { + "required": true, + "type": "string", + "description": "Effective group id." + } + } + }, + "ConfigInfo": { + "id": "ConfigInfo", + "description": "Info about Asterisk configuration", + "properties": { + "name": { + "required": true, + "type": "string", + "description": "Asterisk system name." + }, + "default_language": { + "required": true, + "type": "string", + "description": "Default language for media playback." + }, + "max_channels": { + "required": false, + "type": "int", + "description": "Maximum number of simultaneous channels." + }, + "max_open_files": { + "required": false, + "type": "int", + "description": "Maximum number of open file handles (files, sockets)." + }, + "max_load": { + "required": false, + "type": "double", + "description": "Maximum load avg on system." + }, + "setid": { + "required": true, + "type": "SetId", + "description": "Effective user/group id for running Asterisk." + } + } + }, + "StatusInfo": { + "id": "StatusInfo", + "description": "Info about Asterisk status", + "properties": { + "startup_time": { + "required": true, + "type": "Date", + "description": "Time when Asterisk was started." + }, + "last_reload_time": { + "required": true, + "type": "Date", + "description": "Time when Asterisk was last reloaded." + } + } + }, + "AsteriskInfo": { + "id": "AsteriskInfo", + "description": "Asterisk system information", + "properties": { + "build": { + "required": false, + "type": "BuildInfo", + "description": "Info about how Asterisk was built" + }, + "system": { + "required": false, + "type": "SystemInfo", + "description": "Info about the system running Asterisk" + }, + "config": { + "required": false, + "type": "ConfigInfo", + "description": "Info about Asterisk configuration" + }, + "status": { + "required": false, + "type": "StatusInfo", + "description": "Info about Asterisk status" + } + } + }, + "AsteriskPing": { + "id": "AsteriskPing", + "description": "Asterisk ping information", + "properties": { + "asterisk_id": { + "required": true, + "type": "string", + "description": "Asterisk id info" + }, + "ping": { + "required": true, + "type": "string", + "description": "Always string value is pong" + }, + "timestamp": { + "required": true, + "type": "string", + "description": "The timestamp string of request received time" + } + } + }, + "Module": { + "id": "Module", + "description": "Details of an Asterisk module", + "properties": { + "name": { + "type": "string", + "description": "The name of this module", + "required": true + }, + "description": { + "type": "string", + "description": "The description of this module", + "required": true + }, + "use_count": { + "type": "int", + "description": "The number of times this module is being used", + "required": true + }, + "status": { + "type": "string", + "description": "The running status of this module", + "required": true + }, + "support_level": { + "type": "string", + "description": "The support state of this module", + "required": true + } + } + }, + "LogChannel": { + "id": "LogChannel", + "description": "Details of an Asterisk log channel", + "properties": { + "channel": { + "type": "string", + "description": "The log channel path", + "required": true + }, + "type": { + "type": "string", + "description": "Types of logs for the log channel", + "required": true + }, + "status": { + "type": "string", + "description": "Whether or not a log type is enabled", + "required": true + }, + "configuration": { + "type": "string", + "description": "The various log levels", + "required": true + } + } + }, + "Variable": { + "id": "Variable", + "description": "The value of a channel variable", + "properties": { + "value": { + "required": true, + "type": "string", + "description": "The value of the variable requested" + } + } + }, + "ConfigTuple": { + "id": "ConfigTuple", + "description": "A key/value pair that makes up part of a configuration object.", + "properties": { + "attribute": { + "required": true, + "type": "string", + "description": "A configuration object attribute." + }, + "value": { + "required": true, + "type": "string", + "description": "The value for the attribute." + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_4_0_2/bridges.json b/codegen/src/main/resources/codegen-data/ari_4_0_2/bridges.json new file mode 100644 index 00000000..22743c3b --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_4_0_2/bridges.json @@ -0,0 +1,765 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/bridges.{format}", + "requiresModules": [ + "res_stasis_recording", + "res_stasis_playback" + ], + "apis": [ + { + "path": "/bridges", + "description": "Active bridges", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all active bridges in Asterisk.", + "nickname": "list", + "responseClass": "List[Bridge]" + }, + { + "httpMethod": "POST", + "summary": "Create a new bridge.", + "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", + "nickname": "create", + "responseClass": "Bridge", + "parameters": [ + { + "name": "type", + "description": "Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media, video_sfu).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "bridgeId", + "description": "Unique ID to give to the bridge being created.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Name to give to the bridge being created.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}", + "description": "Individual bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Create a new bridge or updates an existing one.", + "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", + "nickname": "createWithId", + "responseClass": "Bridge", + "parameters": [ + { + "name": "type", + "description": "Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media, video_sfu) to set.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "bridgeId", + "description": "Unique ID to give to the bridge being created.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Set the name of the bridge.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ] + }, + { + "httpMethod": "GET", + "summary": "Get bridge details.", + "nickname": "get", + "responseClass": "Bridge", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Shut down a bridge.", + "notes": "If any channels are in this bridge, they will be removed and resume whatever they were doing beforehand.", + "nickname": "destroy", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/addChannel", + "description": "Add a channel to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Add a channel to a bridge.", + "nickname": "addChannel", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channel", + "description": "Ids of channels to add to bridge", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "role", + "description": "Channel's role in the bridge", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "absorbDTMF", + "description": "Absorb DTMF coming from this channel, preventing it to pass through to the bridge", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "mute", + "description": "Mute audio from this channel, preventing it to pass through to the bridge", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Channel not found" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application; Channel currently recording" + }, + { + "code": 422, + "reason": "Channel not in Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/removeChannel", + "description": "Remove a channel from a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Remove a channel from a bridge.", + "nickname": "removeChannel", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channel", + "description": "Ids of channels to remove from bridge", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Channel not found" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + }, + { + "code": 422, + "reason": "Channel not in this bridge" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/videoSource/{channelId}", + "description": "Set a channel as the video source in a multi-party bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Set a channel as the video source in a multi-party mixing bridge. This operation has no effect on bridges with two or fewer participants.", + "nickname": "setVideoSource", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge or Channel not found" + }, + { + "code": 409, + "reason": "Channel not in Stasis application" + }, + { + "code": 422, + "reason": "Channel not in this Bridge" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/videoSource", + "description": "Removes any explicit video source", + "operations": [ + { + "httpMethod": "DELETE", + "summary": "Removes any explicit video source in a multi-party mixing bridge. This operation has no effect on bridges with two or fewer participants. When no explicit video source is set, talk detection will be used to determine the active video stream.", + "nickname": "clearVideoSource", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/moh", + "description": "Play music on hold to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play music on hold to a bridge or change the MOH class that is playing.", + "nickname": "startMoh", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "mohClass", + "description": "Channel's id", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing music on hold to a bridge.", + "notes": "This will only stop music on hold being played via POST bridges/{bridgeId}/moh.", + "nickname": "stopMoh", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/play", + "description": "Play media to the participants of a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media on a bridge.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "play", + "responseClass": "Playback", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "playbackId", + "description": "Playback Id.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/play/{playbackId}", + "description": "Play media to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media on a bridge.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "playWithId", + "responseClass": "Playback", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + + } + ] + }, + { + "path": "/bridges/{bridgeId}/record", + "description": "Record audio on a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start a recording.", + "notes": "This records the mixed audio from all channels participating in this bridge.", + "nickname": "record", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Recording's filename", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "maxDurationSeconds", + "description": "Maximum duration of the recording, in seconds. 0 for no limit.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "maxSilenceSeconds", + "description": "Maximum duration of silence, in seconds. 0 for no limit.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "ifExists", + "description": "Action to take if a recording with the same name already exists.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "fail", + "allowableValues": { + "valueType": "LIST", + "values": [ + "fail", + "overwrite", + "append" + ] + } + }, + { + "name": "beep", + "description": "Play beep when recording begins", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "terminateOn", + "description": "DTMF input to terminate recording.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "any", + "*", + "#" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge is not in a Stasis application; A recording with the same name already exists on the system and can not be overwritten because it is in progress or ifExists=fail" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + } + ], + "models": { + "Bridge": { + "id": "Bridge", + "description": "The merging of media from one or more channels.\n\nEveryone on the bridge receives the same audio.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for this bridge", + "required": true + }, + "technology": { + "type": "string", + "description": "Name of the current bridging technology", + "required": true + }, + "bridge_type": { + "type": "string", + "description": "Type of bridge technology", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "mixing", + "holding" + ] + } + }, + "bridge_class": { + "type": "string", + "description": "Bridging class", + "required": true + }, + "creator": { + "type": "string", + "description": "Entity that created the bridge", + "required": true + }, + "name": { + "type": "string", + "description": "Name the creator gave the bridge", + "required": true + }, + "channels": { + "type": "List[string]", + "description": "Ids of channels participating in this bridge", + "required": true + }, + "video_mode": { + "type": "string", + "description": "The video mode the bridge is using. One of 'none', 'talker', or 'single'.", + "required": false + }, + "video_source_id": { + "type": "string", + "description": "The ID of the channel that is the source of video in this bridge, if one exists.", + "required": false + }, + "creationtime": { + "required": true, + "type": "Date", + "description": "Timestamp when bridge was created" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_4_0_2/channels.json b/codegen/src/main/resources/codegen-data/ari_4_0_2/channels.json new file mode 100644 index 00000000..366fec8e --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_4_0_2/channels.json @@ -0,0 +1,2164 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/channels.{format}", + "requiresModules": [ + "res_stasis_answer", + "res_stasis_playback", + "res_stasis_recording", + "res_stasis_snoop" + ], + "apis": [ + { + "path": "/channels", + "description": "Active channels", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all active channels in Asterisk.", + "nickname": "list", + "responseClass": "List[Channel]" + }, + { + "httpMethod": "POST", + "summary": "Create a new channel (originate).", + "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.", + "nickname": "originate", + "responseClass": "Channel", + "parameters": [ + { + "name": "endpoint", + "description": "Endpoint to call.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to dial after the endpoint answers. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to dial after the endpoint answers. If omitted, uses 'default'. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to dial after the endpoint answers. If omitted, uses 1. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "long" + }, + { + "name": "label", + "description": "The label to dial after the endpoint answers. Will supersede 'priority' if provided. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The application that is subscribed to the originated channel. When the channel is answered, it will be passed to this Stasis application. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "callerId", + "description": "CallerID to use when dialing the endpoint or extension.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 30 + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "The unique id of the channel which is originating this one.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "formats", + "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for originating a channel." + }, + { + "code": 409, + "reason": "Channel with given unique ID already exists." + } + ] + } + ] + }, + { + "path": "/channels/create", + "description": "Create a channel and place it in a Stasis app, but do not dial the channel yet.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Create channel.", + "nickname": "create", + "responseClass": "Channel", + "parameters": [ + { + "name": "endpoint", + "description": "Endpoint for channel communication", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "Stasis Application to place channel into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "Unique ID of the calling channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "formats", + "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 409, + "reason": "Channel with given unique ID already exists." + } + ] + } + ] + }, + { + "path": "/channels/{channelId}", + "description": "Active channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "Channel details.", + "nickname": "get", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + } + ] + }, + { + "httpMethod": "POST", + "summary": "Create a new channel (originate with id).", + "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.", + "nickname": "originateWithId", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "endpoint", + "description": "Endpoint to call.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to dial after the endpoint answers. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to dial after the endpoint answers. If omitted, uses 'default'. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to dial after the endpoint answers. If omitted, uses 1. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "long" + }, + { + "name": "label", + "description": "The label to dial after the endpoint answers. Will supersede 'priority' if provided. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The application that is subscribed to the originated channel. When the channel is answered, it will be passed to this Stasis application. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "callerId", + "description": "CallerID to use when dialing the endpoint or extension.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 30 + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "The unique id of the channel which is originating this one.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "formats", + "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for originating a channel." + }, + { + "code": 409, + "reason": "Channel with given unique ID already exists." + } + ] + + }, + { + "httpMethod": "DELETE", + "summary": "Delete (i.e. hangup) a channel.", + "nickname": "hangup", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "reason", + "description": "Reason for hanging up the channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defalutValue": "normal", + "allowableValues": { + "valueType": "LIST", + "values": [ + "normal", + "busy", + "congestion", + "no_answer", + "timeout", + "rejected", + "unallocated", + "normal_unspecified", + "number_incomplete", + "codec_mismatch", + "interworking", + "failure", + "answered_elsewhere" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid reason for hangup provided" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/continue", + "description": "Exit application; continue execution in the dialplan", + "operations": [ + { + "httpMethod": "POST", + "summary": "Exit application; continue execution in the dialplan.", + "nickname": "continueInDialplan", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "label", + "description": "The label to continue to - will supersede 'priority' if both are provided.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/move", + "description": "Move the channel from one Stasis application to another.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Move the channel from one Stasis application to another.", + "nickname": "move", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The channel will be passed to this Stasis application.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": "404", + "reason": "Channel not found" + }, + { + "code": "409", + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/redirect", + "description": "Inform the channel that it should redirect itself to a different location. Note that this will almost certainly cause the channel to exit the application.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Redirect the channel to a different location.", + "nickname": "redirect", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "endpoint", + "description": "The endpoint to redirect the channel to", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Endpoint parameter not provided" + }, + { + "code": 404, + "reason": "Channel or endpoint not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 422, + "reason": "Endpoint is not the same type as the channel" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/answer", + "description": "Answer a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Answer a channel.", + "nickname": "answer", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/ring", + "description": "Send a ringing indication to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Indicate ringing to a channel.", + "nickname": "ring", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop ringing indication on a channel if locally generated.", + "nickname": "ringStop", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/dtmf", + "description": "Send DTMF to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Send provided DTMF to a given channel.", + "nickname": "sendDTMF", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "dtmf", + "description": "DTMF To send.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "before", + "description": "Amount of time to wait before DTMF digits (specified in milliseconds) start.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0 + }, + { + "name": "between", + "description": "Amount of time in between DTMF digits (specified in milliseconds).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 100 + }, + { + "name": "duration", + "description": "Length of each DTMF digit (specified in milliseconds).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 100 + }, + { + "name": "after", + "description": "Amount of time to wait after DTMF digits (specified in milliseconds) end.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0 + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "DTMF is required" + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/mute", + "description": "Mute a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Mute a channel.", + "nickname": "mute", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "Direction in which to mute audio", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both", + "in", + "out" + ] + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unmute a channel.", + "nickname": "unmute", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "Direction in which to unmute audio", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both", + "in", + "out" + ] + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/hold", + "description": "Put a channel on hold", + "operations": [ + { + "httpMethod": "POST", + "summary": "Hold a channel.", + "nickname": "hold", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Remove a channel from hold.", + "nickname": "unhold", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/moh", + "description": "Play music on hold to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play music on hold to a channel.", + "notes": "Using media operations such as /play on a channel playing MOH in this manner will suspend MOH without resuming automatically. If continuing music on hold is desired, the stasis application must reinitiate music on hold.", + "nickname": "startMoh", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "mohClass", + "description": "Music on hold class to use", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing music on hold to a channel.", + "nickname": "stopMoh", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/silence", + "description": "Play silence to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play silence to a channel.", + "notes": "Using media operations such as /play on a channel playing silence in this manner will suspend silence without resuming automatically.", + "nickname": "startSilence", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing silence to a channel.", + "nickname": "stopSilence", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/play", + "description": "Play media to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "play", + "responseClass": "Playback", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000 + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/play/{playbackId}", + "description": "Play media to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media and specify the playbackId.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "playWithId", + "responseClass": "Playback", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000 + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/record", + "description": "Record audio from a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start a recording.", + "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.", + "nickname": "record", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Recording's filename", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "maxDurationSeconds", + "description": "Maximum duration of the recording, in seconds. 0 for no limit", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "maxSilenceSeconds", + "description": "Maximum duration of silence, in seconds. 0 for no limit", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "ifExists", + "description": "Action to take if a recording with the same name already exists.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "fail", + "allowableValues": { + "valueType": "LIST", + "values": [ + "fail", + "overwrite", + "append" + ] + } + }, + { + "name": "beep", + "description": "Play beep when recording begins", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "terminateOn", + "description": "DTMF input to terminate recording", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "any", + "*", + "#" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "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" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/variable", + "description": "Variables on a channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the value of a channel variable or function.", + "nickname": "getChannelVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The channel variable or function to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Channel or variable not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "POST", + "summary": "Set the value of a channel variable or function.", + "nickname": "setChannelVar", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The channel variable or function to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/snoop", + "description": "Snoop (spy/whisper) on a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start snooping.", + "notes": "Snoop (spy/whisper) on a specific channel.", + "nickname": "snoopChannel", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "spy", + "description": "Direction of audio to spy on", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "whisper", + "description": "Direction of audio to whisper into", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "app", + "description": "Application the snooping channel is placed into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "snoopId", + "description": "Unique ID to assign to snooping channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/snoop/{snoopId}", + "description": "Snoop (spy/whisper) on a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start snooping.", + "notes": "Snoop (spy/whisper) on a specific channel.", + "nickname": "snoopChannelWithId", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "snoopId", + "description": "Unique ID to assign to snooping channel", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "spy", + "description": "Direction of audio to spy on", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "whisper", + "description": "Direction of audio to whisper into", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "app", + "description": "Application the snooping channel is placed into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/dial", + "description": "Dial a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Dial a created channel.", + "nickname": "dial", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "caller", + "description": "Channel ID of caller", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Dial timeout", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel cannot be found." + }, + { + "code": 409, + "reason": "Channel cannot be dialed." + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/rtp_statistics", + "description": "Get RTP statistics information for RTP on a channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "RTP stats on a channel.", + "nickname": "rtpstatistics", + "responseClass": "RTPstat", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel cannot be found." + } + ] + } + ] + }, + { + "path": "/channels/externalMedia", + "description": "Create a channel to an External Media source/sink.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start an External Media session.", + "notes": "Create a channel to an External Media source/sink.", + "nickname": "externalMedia", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "Stasis Application to place channel into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "external_host", + "description": "Hostname/ip:port of external host", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "encapsulation", + "description": "Payload encapsulation protocol", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "rtp", + "allowableValues": { + "valueType": "LIST", + "values": [ + "rtp" + ] + } + }, + { + "name": "transport", + "description": "Transport protocol", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "udp", + "allowableValues": { + "valueType": "LIST", + "values": [ + "udp" + ] + } + }, + { + "name": "connection_type", + "description": "Connection type (client/server)", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "client", + "allowableValues": { + "valueType": "LIST", + "values": [ + "client" + ] + } + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "External media direction", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 409, + "reason": "Channel is not in a Stasis application; Channel is already bridged" + } + ] + } + ] + } + ], + "models": { + "Dialed": { + "id": "Dialed", + "description": "Dialed channel information.", + "properties": {} + }, + "DialplanCEP": { + "id": "DialplanCEP", + "description": "Dialplan location (context/extension/priority)", + "properties": { + "context": { + "required": true, + "type": "string", + "description": "Context in the dialplan" + }, + "exten": { + "required": true, + "type": "string", + "description": "Extension in the dialplan" + }, + "priority": { + "required": true, + "type": "long", + "description": "Priority in the dialplan" + }, + "app_name": { + "required": true, + "type": "string", + "description": "Name of current dialplan application" + }, + "app_data": { + "required": true, + "type": "string", + "description": "Parameter of current dialplan application" + } + } + }, + "CallerID": { + "id": "CallerID", + "description": "Caller identification", + "properties": { + "name": { + "required": true, + "type": "string" + }, + "number": { + "required": true, + "type": "string" + } + } + }, + "RTPstat": { + "id": "RTPstat", + "description": "A statistics of a RTP.", + "properties": { + "txcount": { + "required": true, + "type": "int", + "description": "Number of packets transmitted." + }, + "rxcount": { + "required": true, + "type": "int", + "description": "Number of packets received." + }, + "txjitter": { + "required": false, + "type": "double", + "description": "Jitter on transmitted packets." + }, + "rxjitter": { + "required": false, + "type": "double", + "description": "Jitter on received packets." + }, + "remote_maxjitter": { + "required": false, + "type": "double", + "description": "Maximum jitter on remote side." + }, + "remote_minjitter": { + "required": false, + "type": "double", + "description": "Minimum jitter on remote side." + }, + "remote_normdevjitter": { + "required": false, + "type": "double", + "description": "Average jitter on remote side." + }, + "remote_stdevjitter": { + "required": false, + "type": "double", + "description": "Standard deviation jitter on remote side." + }, + "local_maxjitter": { + "required": false, + "type": "double", + "description": "Maximum jitter on local side." + }, + "local_minjitter": { + "required": false, + "type": "double", + "description": "Minimum jitter on local side." + }, + "local_normdevjitter": { + "required": false, + "type": "double", + "description": "Average jitter on local side." + }, + "local_stdevjitter": { + "required": false, + "type": "double", + "description": "Standard deviation jitter on local side." + }, + "txploss": { + "required": true, + "type": "int", + "description": "Number of transmitted packets lost." + }, + "rxploss": { + "required": true, + "type": "int", + "description": "Number of received packets lost." + }, + "remote_maxrxploss": { + "required": false, + "type": "double", + "description": "Maximum number of packets lost on remote side." + }, + "remote_minrxploss": { + "required": false, + "type": "double", + "description": "Minimum number of packets lost on remote side." + }, + "remote_normdevrxploss": { + "required": false, + "type": "double", + "description": "Average number of packets lost on remote side." + }, + "remote_stdevrxploss": { + "required": false, + "type": "double", + "description": "Standard deviation packets lost on remote side." + }, + "local_maxrxploss": { + "required": false, + "type": "double", + "description": "Maximum number of packets lost on local side." + }, + "local_minrxploss": { + "required": false, + "type": "double", + "description": "Minimum number of packets lost on local side." + }, + "local_normdevrxploss": { + "required": false, + "type": "double", + "description": "Average number of packets lost on local side." + }, + "local_stdevrxploss": { + "required": false, + "type": "double", + "description": "Standard deviation packets lost on local side." + }, + "rtt": { + "required": false, + "type": "double", + "description": "Total round trip time." + }, + "maxrtt": { + "required": false, + "type": "double", + "description": "Maximum round trip time." + }, + "minrtt": { + "required": false, + "type": "double", + "description": "Minimum round trip time." + }, + "normdevrtt": { + "required": false, + "type": "double", + "description": "Average round trip time." + }, + "stdevrtt": { + "required": false, + "type": "double", + "description": "Standard deviation round trip time." + }, + "local_ssrc": { + "required": true, + "type": "int", + "description": "Our SSRC." + }, + "remote_ssrc": { + "required": true, + "type": "int", + "description": "Their SSRC." + }, + "txoctetcount": { + "required": true, + "type": "int", + "description": "Number of octets transmitted." + }, + "rxoctetcount": { + "required": true, + "type": "int", + "description": "Number of octets received." + }, + "channel_uniqueid": { + "required": true, + "type": "string", + "description": "The Asterisk channel's unique ID that owns this instance." + } + } + }, + "Channel": { + "id": "Channel", + "description": "A specific communication connection between Asterisk and an Endpoint.", + "properties": { + "id": { + "required": true, + "type": "string", + "description": "Unique identifier of the channel.\n\nThis is the same as the Uniqueid field in AMI." + }, + "name": { + "required": true, + "type": "string", + "description": "Name of the channel (i.e. SIP/foo-0000a7e3)" + }, + "state": { + "required": true, + "type": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "Down", + "Rsrved", + "OffHook", + "Dialing", + "Ring", + "Ringing", + "Up", + "Busy", + "Dialing Offhook", + "Pre-ring", + "Unknown" + ] + } + }, + "caller": { + "required": true, + "type": "CallerID" + }, + "connected": { + "required": true, + "type": "CallerID" + }, + "accountcode": { + "required": true, + "type": "string" + }, + "dialplan": { + "required": true, + "type": "DialplanCEP", + "description": "Current location in the dialplan" + }, + "creationtime": { + "required": true, + "type": "Date", + "description": "Timestamp when channel was created" + }, + "language": { + "required": true, + "type": "string", + "description": "The default spoken language" + }, + "channelvars": { + "required": false, + "type": "object", + "description": "Channel variables" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_4_0_2/deviceStates.json b/codegen/src/main/resources/codegen-data/ari_4_0_2/deviceStates.json new file mode 100644 index 00000000..bd389355 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_4_0_2/deviceStates.json @@ -0,0 +1,154 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "Kevin Harwell ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/deviceStates.{format}", + "requiresModules": [ + "res_stasis_device_state" + ], + "apis": [ + { + "path": "/deviceStates", + "description": "Device states", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all ARI controlled device states.", + "nickname": "list", + "responseClass": "List[DeviceState]" + } + ] + }, + { + "path": "/deviceStates/{deviceName}", + "description": "Device state", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve the current state of a device.", + "nickname": "get", + "responseClass": "DeviceState", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Change the state of a device controlled by ARI. (Note - implicitly creates the device state).", + "nickname": "update", + "responseClass": "void", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "deviceState", + "description": "Device state value", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "NOT_INUSE", + "INUSE", + "BUSY", + "INVALID", + "UNAVAILABLE", + "RINGING", + "RINGINUSE", + "ONHOLD" + ] + } + + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Device name is missing" + }, + { + "code": 409, + "reason": "Uncontrolled device specified" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Destroy a device-state controlled by ARI.", + "nickname": "delete", + "responseClass": "void", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Device name is missing" + }, + { + "code": 409, + "reason": "Uncontrolled device specified" + } + ] + } + ] + } + ], + "models": { + "DeviceState": { + "id": "DeviceState", + "description": "Represents the state of a device.", + "properties": { + "name": { + "type": "string", + "description": "Name of the device.", + "required": true + }, + "state": { + "type": "string", + "description": "Device's state", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "UNKNOWN", + "NOT_INUSE", + "INUSE", + "BUSY", + "INVALID", + "UNAVAILABLE", + "RINGING", + "RINGINUSE", + "ONHOLD" + ] + } + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_4_0_2/endpoints.json b/codegen/src/main/resources/codegen-data/ari_4_0_2/endpoints.json new file mode 100644 index 00000000..264c0eb2 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_4_0_2/endpoints.json @@ -0,0 +1,279 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/endpoints.{format}", + "apis": [ + { + "path": "/endpoints", + "description": "Asterisk endpoints", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all endpoints.", + "nickname": "list", + "responseClass": "List[Endpoint]" + } + ] + }, + { + "path": "/endpoints/sendMessage", + "description": "Send a message to some technology URI or endpoint.", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Send a message to some technology URI or endpoint.", + "nickname": "sendMessage", + "responseClass": "void", + "parameters": [ + { + "name": "to", + "description": "The endpoint resource or technology specific URI to send the message to. Valid resources are sip, pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "from", + "description": "The endpoint resource or technology specific identity to send this message from. Valid resources are sip, pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "body", + "description": "The body of the message", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "descriptioni": "The \"variables\" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, pjsip and sip resource types will add the key/value pairs as SIP headers,", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoint not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}", + "description": "Asterisk endpoints", + "operations": [ + { + "httpMethod": "GET", + "summary": "List available endoints for a given endpoint technology.", + "nickname": "listByTech", + "responseClass": "List[Endpoint]", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoints (sip,iax2,...)", + "paramType": "path", + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Endpoints not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}/{resource}", + "description": "Single endpoint", + "operations": [ + { + "httpMethod": "GET", + "summary": "Details for an endpoint.", + "nickname": "get", + "responseClass": "Endpoint", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "resource", + "description": "ID of the endpoint", + "paramType": "path", + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoints not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}/{resource}/sendMessage", + "description": "Send a message to some endpoint in a technology.", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Send a message to some endpoint in a technology.", + "nickname": "sendMessageToEndpoint", + "responseClass": "void", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "resource", + "description": "ID of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "from", + "description": "The endpoint resource or technology specific identity to send this message from. Valid resources are sip, pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "body", + "description": "The body of the message", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "descriptioni": "The \"variables\" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, pjsip and sip resource types will add the key/value pairs as SIP headers,", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoint not found" + } + ] + } + ] + } + ], + "models": { + "Endpoint": { + "id": "Endpoint", + "description": "An external device that may offer/accept calls to/from Asterisk.\n\nUnlike most resources, which have a single unique identifier, an endpoint is uniquely identified by the technology/resource pair.", + "properties": { + "technology": { + "type": "string", + "description": "Technology of the endpoint", + "required": true + }, + "resource": { + "type": "string", + "description": "Identifier of the endpoint, specific to the given technology.", + "required": true + }, + "state": { + "type": "string", + "description": "Endpoint's state", + "required": false, + "allowableValues": { + "valueType": "LIST", + "values": [ + "unknown", + "offline", + "online" + ] + } + }, + "channel_ids": { + "type": "List[string]", + "description": "Id's of channels associated with this endpoint", + "required": true + } + } + }, + "TextMessageVariable": { + "id": "TextMessageVariable", + "description": "A key/value pair variable in a text message.", + "properties": { + "key": { + "type": "string", + "description": "A unique key identifying the variable.", + "required": true + }, + "value": { + "type": "string", + "description": "The value of the variable.", + "required": true + } + } + }, + "TextMessage": { + "id": "TextMessage", + "description": "A text message.", + "properties": { + "from": { + "type": "string", + "description": "A technology specific URI specifying the source of the message. For sip and pjsip technologies, any SIP URI can be specified. For xmpp, the URI must correspond to the client connection being used to send the message.", + "required": true + }, + "to": { + "type": "string", + "description": "A technology specific URI specifying the destination of the message. Valid technologies include sip, pjsip, and xmp. The destination of a message should be an endpoint.", + "required": true + }, + "body": { + "type": "string", + "description": "The text of the message.", + "required": true + }, + "variables": { + "type": "List[TextMessageVariable]", + "description": "Technology specific key/value pairs associated with the message.", + "required": false + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_4_0_2/events.json b/codegen/src/main/resources/codegen-data/ari_4_0_2/events.json new file mode 100644 index 00000000..c9822f6c --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_4_0_2/events.json @@ -0,0 +1,918 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.2", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/events.{format}", + "requiresModules": [ + "res_http_websocket" + ], + "apis": [ + { + "path": "/events", + "description": "Events from Asterisk to applications", + "operations": [ + { + "httpMethod": "GET", + "upgrade": "websocket", + "websocketProtocol": "ari", + "summary": "WebSocket connection for events.", + "nickname": "eventWebsocket", + "responseClass": "Message", + "parameters": [ + { + "name": "app", + "description": "Applications to subscribe to.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "subscribeAll", + "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'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean" + } + ] + } + ] + }, + { + "path": "/events/user/{eventName}", + "description": "Stasis application user events", + "operations": [ + { + "httpMethod": "POST", + "summary": "Generate a user event.", + "nickname": "userEvent", + "responseClass": "void", + "parameters": [ + { + "name": "eventName", + "description": "Event name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "application", + "description": "The name of the application that will receive this event", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "source", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}/{resource}, deviceState:{deviceName}", + "paramType": "query", + "required": false, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds custom key/value pairs to add to the user event. Ex. { \"variables\": { \"key\": \"value\" } }", + "paramType": "body", + "required": false, + "allowMultiple": false, + "dataType": "containers" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 422, + "reason": "Event source not found." + }, + { + "code": 400, + "reason": "Invalid even tsource URI or userevent data." + } + ] + } + ] + } + ], + "models": { + "Message": { + "id": "Message", + "description": "Base type for errors and events", + "discriminator": "type", + "properties": { + "type": { + "type": "string", + "required": true, + "description": "Indicates the type of this message." + }, + "asterisk_id": { + "type": "string", + "required": false, + "description": "The unique ID for the Asterisk instance that raised this event." + } + }, + "subTypes": [ + "MissingParams", + "Event" + ] + }, + "MissingParams": { + "id": "MissingParams", + "description": "Error event sent when required params are missing.", + "properties": { + "params": { + "required": true, + "type": "List[string]", + "description": "A list of the missing parameters" + } + } + }, + "Event": { + "id": "Event", + "description": "Base type for asynchronous events from Asterisk.", + "properties": { + "application": { + "type": "string", + "description": "Name of the application receiving the event.", + "required": true + }, + "timestamp": { + "type": "Date", + "description": "Time at which this event was created.", + "required": true + } + }, + "subTypes": [ + "DeviceStateChanged", + "PlaybackStarted", + "PlaybackContinuing", + "PlaybackFinished", + "RecordingStarted", + "RecordingFinished", + "RecordingFailed", + "ApplicationMoveFailed", + "ApplicationReplaced", + "BridgeCreated", + "BridgeDestroyed", + "BridgeMerged", + "BridgeBlindTransfer", + "BridgeAttendedTransfer", + "BridgeVideoSourceChanged", + "ChannelCreated", + "ChannelDestroyed", + "ChannelEnteredBridge", + "ChannelLeftBridge", + "ChannelStateChange", + "ChannelDtmfReceived", + "ChannelDialplan", + "ChannelCallerId", + "ChannelUserevent", + "ChannelHangupRequest", + "ChannelVarset", + "ChannelTalkingStarted", + "ChannelTalkingFinished", + "ChannelHold", + "ChannelUnhold", + "ContactStatusChange", + "EndpointStateChange", + "Dial", + "StasisEnd", + "StasisStart", + "TextMessageReceived", + "ChannelConnectedLine", + "PeerStatusChange" + ] + }, + "ContactInfo": { + "id": "ContactInfo", + "description": "Detailed information about a contact on an endpoint.", + "properties": { + "uri": { + "type": "string", + "description": "The location of the contact.", + "required": true + }, + "contact_status": { + "type": "string", + "description": "The current status of the contact.", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "Unreachable", + "Reachable", + "Unknown", + "NonQualified", + "Removed" + ] + } + }, + "aor": { + "type": "string", + "description": "The Address of Record this contact belongs to.", + "required": true + }, + "roundtrip_usec": { + "type": "string", + "description": "Current round trip time, in microseconds, for the contact.", + "required": false + } + } + }, + "Peer": { + "id": "Peer", + "description": "Detailed information about a remote peer that communicates with Asterisk.", + "properties": { + "peer_status": { + "type": "string", + "description": "The current state of the peer. Note that the values of the status are dependent on the underlying peer technology.", + "required": true + }, + "cause": { + "type": "string", + "description": "An optional reason associated with the change in peer_status.", + "required": false + }, + "address": { + "type": "string", + "description": "The IP address of the peer.", + "required": false + }, + "port": { + "type": "string", + "description": "The port of the peer.", + "required": false + }, + "time": { + "type": "string", + "description": "The last known time the peer was contacted.", + "required": false + } + } + }, + "DeviceStateChanged": { + "id": "DeviceStateChanged", + "description": "Notification that a device state has changed.", + "properties": { + "device_state": { + "type": "DeviceState", + "description": "Device state object", + "required": true + } + } + }, + "PlaybackStarted": { + "id": "PlaybackStarted", + "description": "Event showing the start of a media playback operation.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "PlaybackContinuing": { + "id": "PlaybackContinuing", + "description": "Event showing the continuation of a media playback operation from one media URI to the next in the list.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "PlaybackFinished": { + "id": "PlaybackFinished", + "description": "Event showing the completion of a media playback operation.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "RecordingStarted": { + "id": "RecordingStarted", + "description": "Event showing the start of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "RecordingFinished": { + "id": "RecordingFinished", + "description": "Event showing the completion of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "RecordingFailed": { + "id": "RecordingFailed", + "description": "Event showing failure of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "ApplicationMoveFailed": { + "id": "ApplicationMoveFailed", + "description": "Notification that trying to move a channel to another Stasis application failed.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + }, + "destination": { + "required": true, + "type": "string" + }, + "args": { + "required": true, + "type": "List[string]", + "description": "Arguments to the application" + } + } + }, + "ApplicationReplaced": { + "id": "ApplicationReplaced", + "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.", + "properties": {} + }, + "BridgeCreated": { + "id": "BridgeCreated", + "description": "Notification that a bridge has been created.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeDestroyed": { + "id": "BridgeDestroyed", + "description": "Notification that a bridge has been destroyed.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeMerged": { + "id": "BridgeMerged", + "description": "Notification that one bridge has merged into another.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "bridge_from": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeVideoSourceChanged": { + "id": "BridgeVideoSourceChanged", + "description": "Notification that the source of video in a bridge has changed.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "old_video_source_id": { + "required": false, + "type": "string" + } + } + }, + "BridgeBlindTransfer": { + "id": "BridgeBlindTransfer", + "description": "Notification that a blind transfer has occurred.", + "properties": { + "channel": { + "description": "The channel performing the blind transfer", + "required": true, + "type": "Channel" + }, + "replace_channel": { + "description": "The channel that is replacing transferer when the transferee(s) can not be transferred directly", + "required": false, + "type": "Channel" + }, + "transferee": { + "description": "The channel that is being transferred", + "required": false, + "type": "Channel" + }, + "exten": { + "description": "The extension transferred to", + "required": true, + "type": "string" + }, + "context": { + "description": "The context transferred to", + "required": true, + "type": "string" + }, + "result": { + "description": "The result of the transfer attempt", + "required": true, + "type": "string" + }, + "is_external": { + "description": "Whether the transfer was externally initiated or not", + "required": true, + "type": "boolean" + }, + "bridge": { + "description": "The bridge being transferred", + "type": "Bridge" + } + } + }, + "BridgeAttendedTransfer": { + "id": "BridgeAttendedTransfer", + "description": "Notification that an attended transfer has occurred.", + "properties": { + "transferer_first_leg": { + "description": "First leg of the transferer", + "required": true, + "type": "Channel" + }, + "transferer_second_leg": { + "description": "Second leg of the transferer", + "required": true, + "type": "Channel" + }, + "replace_channel": { + "description": "The channel that is replacing transferer_first_leg in the swap", + "required": false, + "type": "Channel" + }, + "transferee": { + "description": "The channel that is being transferred", + "required": false, + "type": "Channel" + }, + "transfer_target": { + "description": "The channel that is being transferred to", + "required": false, + "type": "Channel" + }, + "result": { + "description": "The result of the transfer attempt", + "required": true, + "type": "string" + }, + "is_external": { + "description": "Whether the transfer was externally initiated or not", + "required": true, + "type": "boolean" + }, + "transferer_first_leg_bridge": { + "description": "Bridge the transferer first leg is in", + "type": "Bridge" + }, + "transferer_second_leg_bridge": { + "description": "Bridge the transferer second leg is in", + "type": "Bridge" + }, + "destination_type": { + "description": "How the transfer was accomplished", + "required": true, + "type": "string" + }, + "destination_bridge": { + "description": "Bridge that survived the merge result", + "type": "string" + }, + "destination_application": { + "description": "Application that has been transferred into", + "type": "string" + }, + "destination_link_first_leg": { + "description": "First leg of a link transfer result", + "type": "Channel" + }, + "destination_link_second_leg": { + "description": "Second leg of a link transfer result", + "type": "Channel" + }, + "destination_threeway_channel": { + "description": "Transferer channel that survived the threeway result", + "type": "Channel" + }, + "destination_threeway_bridge": { + "description": "Bridge that survived the threeway result", + "type": "Bridge" + } + } + }, + "ChannelCreated": { + "id": "ChannelCreated", + "description": "Notification that a channel has been created.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelDestroyed": { + "id": "ChannelDestroyed", + "description": "Notification that a channel has been destroyed.", + "properties": { + "cause": { + "required": true, + "description": "Integer representation of the cause of the hangup", + "type": "int" + }, + "cause_txt": { + "required": true, + "description": "Text representation of the cause of the hangup", + "type": "string" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelEnteredBridge": { + "id": "ChannelEnteredBridge", + "description": "Notification that a channel has entered a bridge.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "channel": { + "type": "Channel" + } + } + }, + "ChannelLeftBridge": { + "id": "ChannelLeftBridge", + "description": "Notification that a channel has left a bridge.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelStateChange": { + "id": "ChannelStateChange", + "description": "Notification of a channel's state change.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelDtmfReceived": { + "id": "ChannelDtmfReceived", + "description": "DTMF received on a channel.\n\nThis event is sent when the DTMF ends. There is no notification about the start of DTMF", + "properties": { + "digit": { + "required": true, + "type": "string", + "description": "DTMF digit received (0-9, A-E, # or *)" + }, + "duration_ms": { + "required": true, + "type": "int", + "description": "Number of milliseconds DTMF was received" + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which DTMF was received" + } + } + }, + "ChannelDialplan": { + "id": "ChannelDialplan", + "description": "Channel changed location in the dialplan.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that changed dialplan location." + }, + "dialplan_app": { + "required": true, + "type": "string", + "description": "The application about to be executed." + }, + "dialplan_app_data": { + "required": true, + "type": "string", + "description": "The data to be passed to the application." + } + } + }, + "ChannelCallerId": { + "id": "ChannelCallerId", + "description": "Channel changed Caller ID.", + "properties": { + "caller_presentation": { + "required": true, + "type": "int", + "description": "The integer representation of the Caller Presentation value." + }, + "caller_presentation_txt": { + "required": true, + "type": "string", + "description": "The text representation of the Caller Presentation value." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that changed Caller ID." + } + } + }, + "ChannelUserevent": { + "id": "ChannelUserevent", + "description": "User-generated event with additional user-defined fields in the object.", + "properties": { + "eventname": { + "required": true, + "type": "string", + "description": "The name of the user event." + }, + "channel": { + "required": false, + "type": "Channel", + "description": "A channel that is signaled with the user event." + }, + "bridge": { + "required": false, + "type": "Bridge", + "description": "A bridge that is signaled with the user event." + }, + "endpoint": { + "required": false, + "type": "Endpoint", + "description": "A endpoint that is signaled with the user event." + }, + "userevent": { + "required": true, + "type": "object", + "description": "Custom Userevent data" + } + } + }, + "ChannelHangupRequest": { + "id": "ChannelHangupRequest", + "description": "A hangup was requested on the channel.", + "properties": { + "cause": { + "type": "int", + "description": "Integer representation of the cause of the hangup." + }, + "soft": { + "type": "boolean", + "description": "Whether the hangup request was a soft hangup request." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which the hangup was requested." + } + } + }, + "ChannelVarset": { + "id": "ChannelVarset", + "description": "Channel variable changed.", + "properties": { + "variable": { + "required": true, + "type": "string", + "description": "The variable that changed." + }, + "value": { + "required": true, + "type": "string", + "description": "The new value of the variable." + }, + "channel": { + "required": false, + "type": "Channel", + "description": "The channel on which the variable was set.\n\nIf missing, the variable is a global variable." + } + } + }, + "ChannelHold": { + "id": "ChannelHold", + "description": "A channel initiated a media hold.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that initiated the hold event." + }, + "musicclass": { + "required": false, + "type": "string", + "description": "The music on hold class that the initiator requested." + } + } + }, + "ChannelUnhold": { + "id": "ChannelUnhold", + "description": "A channel initiated a media unhold.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that initiated the unhold event." + } + } + }, + "ChannelTalkingStarted": { + "id": "ChannelTalkingStarted", + "description": "Talking was detected on the channel.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which talking started." + } + } + }, + "ChannelTalkingFinished": { + "id": "ChannelTalkingFinished", + "description": "Talking is no longer detected on the channel.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which talking completed." + }, + "duration": { + "required": true, + "type": "int", + "description": "The length of time, in milliseconds, that talking was detected on the channel" + } + } + }, + "ContactStatusChange": { + "id": "ContactStatusChange", + "description": "The state of a contact on an endpoint has changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + }, + "contact_info": { + "required": true, + "type": "ContactInfo" + } + } + }, + "PeerStatusChange": { + "id": "PeerStatusChange", + "description": "The state of a peer associated with an endpoint has changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + }, + "peer": { + "required": true, + "type": "Peer" + } + } + }, + "EndpointStateChange": { + "id": "EndpointStateChange", + "description": "Endpoint state changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + } + } + }, + "Dial": { + "id": "Dial", + "description": "Dialing state has changed.", + "properties": { + "caller": { + "required": false, + "type": "Channel", + "description": "The calling channel." + }, + "peer": { + "required": true, + "type": "Channel", + "description": "The dialed channel." + }, + "forward": { + "required": false, + "type": "string", + "description": "Forwarding target requested by the original dialed channel." + }, + "forwarded": { + "required": false, + "type": "Channel", + "description": "Channel that the caller has been forwarded to." + }, + "dialstring": { + "required": false, + "type": "string", + "description": "The dial string for calling the peer channel." + }, + "dialstatus": { + "required": true, + "type": "string", + "description": "Current status of the dialing attempt to the peer." + } + } + }, + "StasisEnd": { + "id": "StasisEnd", + "description": "Notification that a channel has left a Stasis application.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "StasisStart": { + "id": "StasisStart", + "description": "Notification that a channel has entered a Stasis application.", + "properties": { + "args": { + "required": true, + "type": "List[string]", + "description": "Arguments to the application" + }, + "channel": { + "required": true, + "type": "Channel" + }, + "replace_channel": { + "required": false, + "type": "Channel" + } + } + }, + "TextMessageReceived": { + "id": "TextMessageReceived", + "description": "A text message was received from an endpoint.", + "properties": { + "message": { + "required": true, + "type": "TextMessage" + }, + "endpoint": { + "required": false, + "type": "Endpoint" + } + } + }, + "ChannelConnectedLine": { + "id": "ChannelConnectedLine", + "description": "Channel changed Connected Line.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel whose connected line has changed." + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_4_0_2/mailboxes.json b/codegen/src/main/resources/codegen-data/ari_4_0_2/mailboxes.json new file mode 100644 index 00000000..8f5941b8 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_4_0_2/mailboxes.json @@ -0,0 +1,137 @@ +{ + "_copyright": "Copyright (C) 2013, Digium, Inc.", + "_author": "Jonathan Rose ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/mailboxes.{format}", + "requiresModules": [ + "res_stasis_mailbox" + ], + "apis": [ + { + "path": "/mailboxes", + "description": "Mailboxes", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all mailboxes.", + "nickname": "list", + "responseClass": "List[Mailbox]" + } + ] + }, + { + "path": "/mailboxes/{mailboxName}", + "description": "Mailbox state", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve the current state of a mailbox.", + "nickname": "get", + "responseClass": "Mailbox", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Change the state of a mailbox. (Note - implicitly creates the mailbox).", + "nickname": "update", + "responseClass": "void", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "oldMessages", + "description": "Count of old messages in the mailbox", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "newMessages", + "description": "Count of new messages in the mailbox", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "int" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Destroy a mailbox.", + "nickname": "delete", + "responseClass": "void", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + } + ] + } + ], + "models": { + "Mailbox": { + "id": "Mailbox", + "description": "Represents the state of a mailbox.", + "properties": { + "name": { + "type": "string", + "description": "Name of the mailbox.", + "required": true + }, + "old_messages": { + "type": "int", + "description": "Count of old messages in the mailbox.", + "required": true + }, + "new_messages": { + "type": "int", + "description": "Count of new messages in the mailbox.", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_4_0_2/playbacks.json b/codegen/src/main/resources/codegen-data/ari_4_0_2/playbacks.json new file mode 100644 index 00000000..a78dcae7 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_4_0_2/playbacks.json @@ -0,0 +1,164 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/playbacks.{format}", + "requiresModules": [ + "res_stasis_playback" + ], + "apis": [ + { + "path": "/playbacks/{playbackId}", + "description": "Control object for a playback operation.", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a playback's details.", + "nickname": "get", + "responseClass": "Playback", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "The playback cannot be found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop a playback.", + "nickname": "stop", + "responseClass": "void", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "The playback cannot be found" + } + ] + } + ] + }, + { + "path": "/playbacks/{playbackId}/control", + "description": "Control object for a playback operation.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Control a playback.", + "nickname": "control", + "responseClass": "void", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "operation", + "description": "Operation to perform on the playback.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "restart", + "pause", + "unpause", + "reverse", + "forward" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "The provided operation parameter was invalid" + }, + { + "code": 404, + "reason": "The playback cannot be found" + }, + { + "code": 409, + "reason": "The operation cannot be performed in the playback's current state" + } +] + } + ] + } + ], + "models": { + "Playback": { + "id": "Playback", + "description": "Object representing the playback of media to a channel", + "properties": { + "id": { + "type": "string", + "description": "ID for this playback operation", + "required": true + }, + "media_uri": { + "type": "string", + "description": "The URI for the media currently being played back.", + "required": true + }, + "next_media_uri": { + "type": "string", + "description": "If a list of URIs is being played, the next media URI to be played back.", + "required": false + }, + "target_uri": { + "type": "string", + "description": "URI for the channel or bridge to play the media on", + "required": true + }, + "language": { + "type": "string", + "description": "For media types that support multiple languages, the language requested for playback." + }, + "state": { + "type": "string", + "description": "Current state of the playback operation.", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "queued", + "playing", + "continuing", + "done" + ] + } + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_4_0_2/recordings.json b/codegen/src/main/resources/codegen-data/ari_4_0_2/recordings.json new file mode 100644 index 00000000..6ffd6d8e --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_4_0_2/recordings.json @@ -0,0 +1,413 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/recordings.{format}", + "requiresModules": [ + "res_stasis_recording" + ], + "apis": [ + { + "path": "/recordings/stored", + "description": "Recordings", + "operations": [ + { + "httpMethod": "GET", + "summary": "List recordings that are complete.", + "nickname": "listStored", + "responseClass": "List[StoredRecording]" + } + ] + }, + { + "path": "/recordings/stored/{recordingName}", + "description": "Individual recording", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a stored recording's details.", + "nickname": "getStored", + "responseClass": "StoredRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Delete a stored recording.", + "nickname": "deleteStored", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/stored/{recordingName}/file", + "description": "The actual file associated with the stored recording", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the file associated with the stored recording.", + "nickname": "getStoredFile", + "responseClass": "binary", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 403, + "reason": "The recording file could not be opened" + }, + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/stored/{recordingName}/copy", + "description": "Copy an individual recording", + "operations": [ + { + "httpMethod": "POST", + "summary": "Copy a stored recording.", + "nickname": "copyStored", + "responseClass": "StoredRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording to copy", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "destinationRecordingName", + "description": "The destination name of the recording", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "A recording with the same name already exists on the system" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}", + "description": "A recording that is in progress", + "operations": [ + { + "httpMethod": "GET", + "summary": "List live recordings.", + "nickname": "getLive", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop a live recording and discard it.", + "nickname": "cancel", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/stop", + "operations": [ + { + "httpMethod": "POST", + "summary": "Stop a live recording and store it.", + "nickname": "stop", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/pause", + "operations": [ + { + "httpMethod": "POST", + "summary": "Pause a live recording.", + "notes": "Pausing a recording suspends silence detection, which will be restarted when the recording is unpaused. Paused time is not included in the accounting for maxDurationSeconds.", + "nickname": "pause", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unpause a live recording.", + "nickname": "unpause", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/mute", + "operations": [ + { + "httpMethod": "POST", + "summary": "Mute a live recording.", + "notes": "Muting a recording suspends silence detection, which will be restarted when the recording is unmuted.", + "nickname": "mute", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unmute a live recording.", + "nickname": "unmute", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + } + ] + } + ], + "models": { + "StoredRecording": { + "id": "StoredRecording", + "description": "A past recording that may be played back.", + "properties": { + "name": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + }, + "LiveRecording": { + "id": "LiveRecording", + "description": "A recording that is in progress", + "properties": { + "name": { + "required": true, + "type": "string", + "description": "Base name for the recording" + }, + "format": { + "required": true, + "type": "string", + "description": "Recording format (wav, gsm, etc.)" + }, + "target_uri": { + "required": true, + "type": "string", + "description": "URI for the channel or bridge being recorded" + }, + "state": { + "required": true, + "type": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "queued", + "recording", + "paused", + "done", + "failed", + "canceled" + ] + } + }, + "duration": { + "required": false, + "type": "int", + "description": "Duration in seconds of the recording" + }, + "talking_duration": { + "required": false, + "type": "int", + "description": "Duration of talking, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds." + }, + "silence_duration": { + "required": false, + "type": "int", + "description": "Duration of silence, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds." + }, + "cause": { + "required": false, + "type": "string", + "description": "Cause for recording failure if failed" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_4_0_2/sounds.json b/codegen/src/main/resources/codegen-data/ari_4_0_2/sounds.json new file mode 100644 index 00000000..8fbe1c57 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_4_0_2/sounds.json @@ -0,0 +1,99 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/sounds.{format}", + "apis": [ + { + "path": "/sounds", + "description": "Sounds", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all sounds.", + "nickname": "list", + "responseClass": "List[Sound]", + "parameters": [ + { + "name": "lang", + "description": "Lookup sound for a specific language.", + "paramType": "query", + "dataType": "string", + "required": false + }, + { + "name": "format", + "description": "Lookup sound in a specific format.", + "paramType": "query", + "dataType": "string", + "required": false, + "__note": "core show translation can show translation paths between formats, along with relative costs. so this could be just installed format, or we could follow that for transcoded formats." + } + ] + } + ] + }, + { + "path": "/sounds/{soundId}", + "description": "Individual sound", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a sound's details.", + "nickname": "get", + "responseClass": "Sound", + "parameters": [ + { + "name": "soundId", + "description": "Sound's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ] + } + ] + } + ], + "models": { + "FormatLangPair": { + "id": "FormatLangPair", + "description": "Identifies the format and language of a sound file", + "properties": { + "language": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + }, + "Sound": { + "id": "Sound", + "description": "A media file that may be played back.", + "properties": { + "id": { + "required": true, + "description": "Sound's identifier.", + "type": "string" + }, + "text": { + "required": false, + "description": "Text description of the sound, usually the words spoken.", + "type": "string" + }, + "formats": { + "required": true, + "description": "The formats and languages in which this sound is available.", + "type": "List[FormatLangPair]" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_4_1_2/applications.json b/codegen/src/main/resources/codegen-data/ari_4_1_2/applications.json new file mode 100644 index 00000000..09c5cd5c --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_4_1_2/applications.json @@ -0,0 +1,223 @@ +{ + "_copyright": "Copyright (C) 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/applications.{format}", + "apis": [ + { + "path": "/applications", + "description": "Stasis applications", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all applications.", + "nickname": "list", + "responseClass": "List[Application]" + } + ] + }, + { + "path": "/applications/{applicationName}", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get details of an application.", + "nickname": "get", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Application does not exist." + } + ] + } + ] + }, + { + "path": "/applications/{applicationName}/subscription", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "POST", + "summary": "Subscribe an application to a event source.", + "notes": "Returns the state of the application after the subscriptions have changed", + "nickname": "subscribe", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "eventSource", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing parameter." + }, + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 422, + "reason": "Event source does not exist." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unsubscribe an application from an event source.", + "notes": "Returns the state of the application after the subscriptions have changed", + "nickname": "unsubscribe", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "eventSource", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing parameter; event source scheme not recognized." + }, + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 409, + "reason": "Application not subscribed to event source." + }, + { + "code": 422, + "reason": "Event source does not exist." + } + ] + } + ] + }, + { + "path": "/applications/{applicationName}/eventFilter", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Filter application events types.", + "notes": "Allowed and/or disallowed event type filtering can be done. The body (parameter) should specify a JSON key/value object that describes the type of event filtering needed. One, or both of the following keys can be designated:

\"allowed\" - Specifies an allowed list of event types
\"disallowed\" - Specifies a disallowed list of event types

Further, each of those key's value should be a JSON array that holds zero, or more JSON key/value objects. Each of these objects must contain the following key with an associated value:

\"type\" - The type name of the event to filter

The value must be the string name (case sensitive) of the event type that needs filtering. For example:

{ \"allowed\": [ { \"type\": \"StasisStart\" }, { \"type\": \"StasisEnd\" } ] }

As this specifies only an allowed list, then only those two event type messages are sent to the application. No other event messages are sent.

The following rules apply:

* If the body is empty, both the allowed and disallowed filters are set empty.
* If both list types are given then both are set to their respective values (note, specifying an empty array for a given type sets that type to empty).
* If only one list type is given then only that type is set. The other type is not updated.
* An empty \"allowed\" list means all events are allowed.
* An empty \"disallowed\" list means no events are disallowed.
* Disallowed events take precedence over allowed events if the event type is specified in both lists.", + "nickname": "filter", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "filter", + "description": "Specify which event types to allow/disallow", + "paramType": "body", + "required": false, + "dataType": "object", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Bad request." + }, + { + "code": 404, + "reason": "Application does not exist." + } + ] + } + ] + } + ], + "models": { + "Application": { + "id": "Application", + "description": "Details of a Stasis application", + "properties": { + "name": { + "type": "string", + "description": "Name of this application", + "required": true + }, + "channel_ids": { + "type": "List[string]", + "description": "Id's for channels subscribed to.", + "required": true + }, + "bridge_ids": { + "type": "List[string]", + "description": "Id's for bridges subscribed to.", + "required": true + }, + "endpoint_ids": { + "type": "List[string]", + "description": "{tech}/{resource} for endpoints subscribed to.", + "required": true + }, + "device_names": { + "type": "List[string]", + "description": "Names of the devices subscribed to.", + "required": true + }, + "events_allowed": { + "type": "List[object]", + "description": "Event types sent to the application.", + "required": true + }, + "events_disallowed": { + "type": "List[object]", + "description": "Event types not sent to the application.", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_4_1_2/asterisk.json b/codegen/src/main/resources/codegen-data/ari_4_1_2/asterisk.json new file mode 100644 index 00000000..841e6cd8 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_4_1_2/asterisk.json @@ -0,0 +1,725 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/asterisk.{format}", + "apis": [ + { + "path": "/asterisk/config/dynamic/{configClass}/{objectType}/{id}", + "description": "Asterisk dynamic configuration", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve a dynamic configuration object.", + "nickname": "getObject", + "responseClass": "List[ConfigTuple]", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to retrieve.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to retrieve.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "{configClass|objectType|id} not found" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Create or update a dynamic configuration object.", + "nickname": "updateObject", + "responseClass": "List[ConfigTuple]", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to create or update.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to create or update.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "fields", + "description": "The body object should have a value that is a list of ConfigTuples, which provide the fields to update. Ex. [ { \"attribute\": \"directmedia\", \"value\": \"false\" } ]", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Bad request body" + }, + { + "code": 403, + "reason": "Could not create or update object" + }, + { + "code": 404, + "reason": "{configClass|objectType} not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Delete a dynamic configuration object.", + "nickname": "deleteObject", + "responseClass": "void", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to delete.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to delete.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 403, + "reason": "Could not delete object" + }, + { + "code": 404, + "reason": "{configClass|objectType|id} not found" + } + ] + } + ] + }, + { + "path": "/asterisk/info", + "description": "Asterisk system information (similar to core show settings)", + "operations": [ + { + "httpMethod": "GET", + "summary": "Gets Asterisk system information.", + "nickname": "getInfo", + "responseClass": "AsteriskInfo", + "parameters": [ + { + "name": "only", + "description": "Filter information returned", + "paramType": "query", + "required": false, + "allowMultiple": true, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "build", + "system", + "config", + "status" + ] + } + } + ] + } + ] + }, + { + "path": "/asterisk/ping", + "description": "Asterisk ping", + "operations": [ + { + "httpMethod": "GET", + "summary": "Response pong message.", + "nickname": "ping", + "responseClass": "AsteriskPing" + } + ] + }, + { + "path": "/asterisk/modules", + "description": "Asterisk modules", + "operations": [ + { + "httpMethod": "GET", + "summary": "List Asterisk modules.", + "nickname": "listModules", + "responseClass": "List[Module]" + } + ] + }, + { + "path": "/asterisk/modules/{moduleName}", + "description": "Asterisk module", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get Asterisk module information.", + "nickname": "getModule", + "responseClass": "Module", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module could not be found in running modules." + }, + { + "code": 409, + "reason": "Module information could not be retrieved." + } + ] + }, + { + "httpMethod": "POST", + "summary": "Load an Asterisk module.", + "nickname": "loadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 409, + "reason": "Module could not be loaded." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unload an Asterisk module.", + "nickname": "unloadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module not found in running modules." + }, + { + "code": 409, + "reason": "Module could not be unloaded." + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Reload an Asterisk module.", + "nickname": "reloadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module not found in running modules." + }, + { + "code": 409, + "reason": "Module could not be reloaded." + } + ] + } + ] + }, + { + "path": "/asterisk/logging", + "description": "Asterisk log channels", + "operations": [ + { + "httpMethod": "GET", + "summary": "Gets Asterisk log channel information.", + "nickname": "listLogChannels", + "responseClass": "List[LogChannel]" + } + ] + }, + { + "path": "/asterisk/logging/{logChannelName}", + "description": "Asterisk log channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Adds a log channel.", + "nickname": "addLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "The log channel to add", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "configuration", + "description": "levels of the log channel", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Bad request body" + }, + { + "code": 409, + "reason": "Log channel could not be created." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Deletes a log channel.", + "nickname": "deleteLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "Log channels name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Log channel does not exist." + } + ] + } + ] + }, + { + "path": "/asterisk/logging/{logChannelName}/rotate", + "description": "Asterisk log channel", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Rotates a log channel.", + "nickname": "rotateLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "Log channel's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Log channel does not exist." + } + ] + } + ] + }, + { + "path": "/asterisk/variable", + "description": "Global variables", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the value of a global variable.", + "nickname": "getGlobalVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "variable", + "description": "The variable to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + } + ] + }, + { + "httpMethod": "POST", + "summary": "Set the value of a global variable.", + "nickname": "setGlobalVar", + "responseClass": "void", + "parameters": [ + { + "name": "variable", + "description": "The variable to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + } + ] + } + ] + } + ], + "models": { + "BuildInfo": { + "id": "BuildInfo", + "description": "Info about how Asterisk was built", + "properties": { + "os": { + "required": true, + "type": "string", + "description": "OS Asterisk was built on." + }, + "kernel": { + "required": true, + "type": "string", + "description": "Kernel version Asterisk was built on." + }, + "options": { + "required": true, + "type": "string", + "description": "Compile time options, or empty string if default." + }, + "machine": { + "required": true, + "type": "string", + "description": "Machine architecture (x86_64, i686, ppc, etc.)" + }, + "date": { + "required": true, + "type": "string", + "description": "Date and time when Asterisk was built." + }, + "user": { + "required": true, + "type": "string", + "description": "Username that build Asterisk" + } + } + }, + "SystemInfo": { + "id": "SystemInfo", + "description": "Info about Asterisk", + "properties": { + "version": { + "required": true, + "type": "string", + "description": "Asterisk version." + }, + "entity_id": { + "required": true, + "type": "string", + "description": "" + } + } + }, + "SetId": { + "id": "SetId", + "description": "Effective user/group id", + "properties": { + "user": { + "required": true, + "type": "string", + "description": "Effective user id." + }, + "group": { + "required": true, + "type": "string", + "description": "Effective group id." + } + } + }, + "ConfigInfo": { + "id": "ConfigInfo", + "description": "Info about Asterisk configuration", + "properties": { + "name": { + "required": true, + "type": "string", + "description": "Asterisk system name." + }, + "default_language": { + "required": true, + "type": "string", + "description": "Default language for media playback." + }, + "max_channels": { + "required": false, + "type": "int", + "description": "Maximum number of simultaneous channels." + }, + "max_open_files": { + "required": false, + "type": "int", + "description": "Maximum number of open file handles (files, sockets)." + }, + "max_load": { + "required": false, + "type": "double", + "description": "Maximum load avg on system." + }, + "setid": { + "required": true, + "type": "SetId", + "description": "Effective user/group id for running Asterisk." + } + } + }, + "StatusInfo": { + "id": "StatusInfo", + "description": "Info about Asterisk status", + "properties": { + "startup_time": { + "required": true, + "type": "Date", + "description": "Time when Asterisk was started." + }, + "last_reload_time": { + "required": true, + "type": "Date", + "description": "Time when Asterisk was last reloaded." + } + } + }, + "AsteriskInfo": { + "id": "AsteriskInfo", + "description": "Asterisk system information", + "properties": { + "build": { + "required": false, + "type": "BuildInfo", + "description": "Info about how Asterisk was built" + }, + "system": { + "required": false, + "type": "SystemInfo", + "description": "Info about the system running Asterisk" + }, + "config": { + "required": false, + "type": "ConfigInfo", + "description": "Info about Asterisk configuration" + }, + "status": { + "required": false, + "type": "StatusInfo", + "description": "Info about Asterisk status" + } + } + }, + "AsteriskPing": { + "id": "AsteriskPing", + "description": "Asterisk ping information", + "properties": { + "asterisk_id": { + "required": true, + "type": "string", + "description": "Asterisk id info" + }, + "ping": { + "required": true, + "type": "string", + "description": "Always string value is pong" + }, + "timestamp": { + "required": true, + "type": "string", + "description": "The timestamp string of request received time" + } + } + }, + "Module": { + "id": "Module", + "description": "Details of an Asterisk module", + "properties": { + "name": { + "type": "string", + "description": "The name of this module", + "required": true + }, + "description": { + "type": "string", + "description": "The description of this module", + "required": true + }, + "use_count": { + "type": "int", + "description": "The number of times this module is being used", + "required": true + }, + "status": { + "type": "string", + "description": "The running status of this module", + "required": true + }, + "support_level": { + "type": "string", + "description": "The support state of this module", + "required": true + } + } + }, + "LogChannel": { + "id": "LogChannel", + "description": "Details of an Asterisk log channel", + "properties": { + "channel": { + "type": "string", + "description": "The log channel path", + "required": true + }, + "type": { + "type": "string", + "description": "Types of logs for the log channel", + "required": true + }, + "status": { + "type": "string", + "description": "Whether or not a log type is enabled", + "required": true + }, + "configuration": { + "type": "string", + "description": "The various log levels", + "required": true + } + } + }, + "Variable": { + "id": "Variable", + "description": "The value of a channel variable", + "properties": { + "value": { + "required": true, + "type": "string", + "description": "The value of the variable requested" + } + } + }, + "ConfigTuple": { + "id": "ConfigTuple", + "description": "A key/value pair that makes up part of a configuration object.", + "properties": { + "attribute": { + "required": true, + "type": "string", + "description": "A configuration object attribute." + }, + "value": { + "required": true, + "type": "string", + "description": "The value for the attribute." + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_4_1_2/bridges.json b/codegen/src/main/resources/codegen-data/ari_4_1_2/bridges.json new file mode 100644 index 00000000..22743c3b --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_4_1_2/bridges.json @@ -0,0 +1,765 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/bridges.{format}", + "requiresModules": [ + "res_stasis_recording", + "res_stasis_playback" + ], + "apis": [ + { + "path": "/bridges", + "description": "Active bridges", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all active bridges in Asterisk.", + "nickname": "list", + "responseClass": "List[Bridge]" + }, + { + "httpMethod": "POST", + "summary": "Create a new bridge.", + "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", + "nickname": "create", + "responseClass": "Bridge", + "parameters": [ + { + "name": "type", + "description": "Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media, video_sfu).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "bridgeId", + "description": "Unique ID to give to the bridge being created.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Name to give to the bridge being created.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}", + "description": "Individual bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Create a new bridge or updates an existing one.", + "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", + "nickname": "createWithId", + "responseClass": "Bridge", + "parameters": [ + { + "name": "type", + "description": "Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media, video_sfu) to set.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "bridgeId", + "description": "Unique ID to give to the bridge being created.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Set the name of the bridge.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ] + }, + { + "httpMethod": "GET", + "summary": "Get bridge details.", + "nickname": "get", + "responseClass": "Bridge", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Shut down a bridge.", + "notes": "If any channels are in this bridge, they will be removed and resume whatever they were doing beforehand.", + "nickname": "destroy", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/addChannel", + "description": "Add a channel to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Add a channel to a bridge.", + "nickname": "addChannel", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channel", + "description": "Ids of channels to add to bridge", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "role", + "description": "Channel's role in the bridge", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "absorbDTMF", + "description": "Absorb DTMF coming from this channel, preventing it to pass through to the bridge", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "mute", + "description": "Mute audio from this channel, preventing it to pass through to the bridge", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Channel not found" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application; Channel currently recording" + }, + { + "code": 422, + "reason": "Channel not in Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/removeChannel", + "description": "Remove a channel from a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Remove a channel from a bridge.", + "nickname": "removeChannel", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channel", + "description": "Ids of channels to remove from bridge", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Channel not found" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + }, + { + "code": 422, + "reason": "Channel not in this bridge" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/videoSource/{channelId}", + "description": "Set a channel as the video source in a multi-party bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Set a channel as the video source in a multi-party mixing bridge. This operation has no effect on bridges with two or fewer participants.", + "nickname": "setVideoSource", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge or Channel not found" + }, + { + "code": 409, + "reason": "Channel not in Stasis application" + }, + { + "code": 422, + "reason": "Channel not in this Bridge" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/videoSource", + "description": "Removes any explicit video source", + "operations": [ + { + "httpMethod": "DELETE", + "summary": "Removes any explicit video source in a multi-party mixing bridge. This operation has no effect on bridges with two or fewer participants. When no explicit video source is set, talk detection will be used to determine the active video stream.", + "nickname": "clearVideoSource", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/moh", + "description": "Play music on hold to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play music on hold to a bridge or change the MOH class that is playing.", + "nickname": "startMoh", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "mohClass", + "description": "Channel's id", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing music on hold to a bridge.", + "notes": "This will only stop music on hold being played via POST bridges/{bridgeId}/moh.", + "nickname": "stopMoh", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/play", + "description": "Play media to the participants of a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media on a bridge.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "play", + "responseClass": "Playback", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "playbackId", + "description": "Playback Id.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/play/{playbackId}", + "description": "Play media to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media on a bridge.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "playWithId", + "responseClass": "Playback", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + + } + ] + }, + { + "path": "/bridges/{bridgeId}/record", + "description": "Record audio on a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start a recording.", + "notes": "This records the mixed audio from all channels participating in this bridge.", + "nickname": "record", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Recording's filename", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "maxDurationSeconds", + "description": "Maximum duration of the recording, in seconds. 0 for no limit.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "maxSilenceSeconds", + "description": "Maximum duration of silence, in seconds. 0 for no limit.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "ifExists", + "description": "Action to take if a recording with the same name already exists.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "fail", + "allowableValues": { + "valueType": "LIST", + "values": [ + "fail", + "overwrite", + "append" + ] + } + }, + { + "name": "beep", + "description": "Play beep when recording begins", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "terminateOn", + "description": "DTMF input to terminate recording.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "any", + "*", + "#" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge is not in a Stasis application; A recording with the same name already exists on the system and can not be overwritten because it is in progress or ifExists=fail" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + } + ], + "models": { + "Bridge": { + "id": "Bridge", + "description": "The merging of media from one or more channels.\n\nEveryone on the bridge receives the same audio.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for this bridge", + "required": true + }, + "technology": { + "type": "string", + "description": "Name of the current bridging technology", + "required": true + }, + "bridge_type": { + "type": "string", + "description": "Type of bridge technology", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "mixing", + "holding" + ] + } + }, + "bridge_class": { + "type": "string", + "description": "Bridging class", + "required": true + }, + "creator": { + "type": "string", + "description": "Entity that created the bridge", + "required": true + }, + "name": { + "type": "string", + "description": "Name the creator gave the bridge", + "required": true + }, + "channels": { + "type": "List[string]", + "description": "Ids of channels participating in this bridge", + "required": true + }, + "video_mode": { + "type": "string", + "description": "The video mode the bridge is using. One of 'none', 'talker', or 'single'.", + "required": false + }, + "video_source_id": { + "type": "string", + "description": "The ID of the channel that is the source of video in this bridge, if one exists.", + "required": false + }, + "creationtime": { + "required": true, + "type": "Date", + "description": "Timestamp when bridge was created" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_4_1_2/channels.json b/codegen/src/main/resources/codegen-data/ari_4_1_2/channels.json new file mode 100644 index 00000000..366fec8e --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_4_1_2/channels.json @@ -0,0 +1,2164 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/channels.{format}", + "requiresModules": [ + "res_stasis_answer", + "res_stasis_playback", + "res_stasis_recording", + "res_stasis_snoop" + ], + "apis": [ + { + "path": "/channels", + "description": "Active channels", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all active channels in Asterisk.", + "nickname": "list", + "responseClass": "List[Channel]" + }, + { + "httpMethod": "POST", + "summary": "Create a new channel (originate).", + "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.", + "nickname": "originate", + "responseClass": "Channel", + "parameters": [ + { + "name": "endpoint", + "description": "Endpoint to call.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to dial after the endpoint answers. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to dial after the endpoint answers. If omitted, uses 'default'. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to dial after the endpoint answers. If omitted, uses 1. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "long" + }, + { + "name": "label", + "description": "The label to dial after the endpoint answers. Will supersede 'priority' if provided. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The application that is subscribed to the originated channel. When the channel is answered, it will be passed to this Stasis application. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "callerId", + "description": "CallerID to use when dialing the endpoint or extension.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 30 + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "The unique id of the channel which is originating this one.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "formats", + "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for originating a channel." + }, + { + "code": 409, + "reason": "Channel with given unique ID already exists." + } + ] + } + ] + }, + { + "path": "/channels/create", + "description": "Create a channel and place it in a Stasis app, but do not dial the channel yet.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Create channel.", + "nickname": "create", + "responseClass": "Channel", + "parameters": [ + { + "name": "endpoint", + "description": "Endpoint for channel communication", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "Stasis Application to place channel into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "Unique ID of the calling channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "formats", + "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 409, + "reason": "Channel with given unique ID already exists." + } + ] + } + ] + }, + { + "path": "/channels/{channelId}", + "description": "Active channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "Channel details.", + "nickname": "get", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + } + ] + }, + { + "httpMethod": "POST", + "summary": "Create a new channel (originate with id).", + "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.", + "nickname": "originateWithId", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "endpoint", + "description": "Endpoint to call.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to dial after the endpoint answers. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to dial after the endpoint answers. If omitted, uses 'default'. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to dial after the endpoint answers. If omitted, uses 1. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "long" + }, + { + "name": "label", + "description": "The label to dial after the endpoint answers. Will supersede 'priority' if provided. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The application that is subscribed to the originated channel. When the channel is answered, it will be passed to this Stasis application. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "callerId", + "description": "CallerID to use when dialing the endpoint or extension.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 30 + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "The unique id of the channel which is originating this one.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "formats", + "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for originating a channel." + }, + { + "code": 409, + "reason": "Channel with given unique ID already exists." + } + ] + + }, + { + "httpMethod": "DELETE", + "summary": "Delete (i.e. hangup) a channel.", + "nickname": "hangup", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "reason", + "description": "Reason for hanging up the channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defalutValue": "normal", + "allowableValues": { + "valueType": "LIST", + "values": [ + "normal", + "busy", + "congestion", + "no_answer", + "timeout", + "rejected", + "unallocated", + "normal_unspecified", + "number_incomplete", + "codec_mismatch", + "interworking", + "failure", + "answered_elsewhere" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid reason for hangup provided" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/continue", + "description": "Exit application; continue execution in the dialplan", + "operations": [ + { + "httpMethod": "POST", + "summary": "Exit application; continue execution in the dialplan.", + "nickname": "continueInDialplan", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "label", + "description": "The label to continue to - will supersede 'priority' if both are provided.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/move", + "description": "Move the channel from one Stasis application to another.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Move the channel from one Stasis application to another.", + "nickname": "move", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The channel will be passed to this Stasis application.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": "404", + "reason": "Channel not found" + }, + { + "code": "409", + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/redirect", + "description": "Inform the channel that it should redirect itself to a different location. Note that this will almost certainly cause the channel to exit the application.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Redirect the channel to a different location.", + "nickname": "redirect", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "endpoint", + "description": "The endpoint to redirect the channel to", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Endpoint parameter not provided" + }, + { + "code": 404, + "reason": "Channel or endpoint not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 422, + "reason": "Endpoint is not the same type as the channel" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/answer", + "description": "Answer a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Answer a channel.", + "nickname": "answer", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/ring", + "description": "Send a ringing indication to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Indicate ringing to a channel.", + "nickname": "ring", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop ringing indication on a channel if locally generated.", + "nickname": "ringStop", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/dtmf", + "description": "Send DTMF to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Send provided DTMF to a given channel.", + "nickname": "sendDTMF", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "dtmf", + "description": "DTMF To send.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "before", + "description": "Amount of time to wait before DTMF digits (specified in milliseconds) start.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0 + }, + { + "name": "between", + "description": "Amount of time in between DTMF digits (specified in milliseconds).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 100 + }, + { + "name": "duration", + "description": "Length of each DTMF digit (specified in milliseconds).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 100 + }, + { + "name": "after", + "description": "Amount of time to wait after DTMF digits (specified in milliseconds) end.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0 + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "DTMF is required" + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/mute", + "description": "Mute a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Mute a channel.", + "nickname": "mute", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "Direction in which to mute audio", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both", + "in", + "out" + ] + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unmute a channel.", + "nickname": "unmute", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "Direction in which to unmute audio", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both", + "in", + "out" + ] + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/hold", + "description": "Put a channel on hold", + "operations": [ + { + "httpMethod": "POST", + "summary": "Hold a channel.", + "nickname": "hold", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Remove a channel from hold.", + "nickname": "unhold", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/moh", + "description": "Play music on hold to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play music on hold to a channel.", + "notes": "Using media operations such as /play on a channel playing MOH in this manner will suspend MOH without resuming automatically. If continuing music on hold is desired, the stasis application must reinitiate music on hold.", + "nickname": "startMoh", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "mohClass", + "description": "Music on hold class to use", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing music on hold to a channel.", + "nickname": "stopMoh", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/silence", + "description": "Play silence to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play silence to a channel.", + "notes": "Using media operations such as /play on a channel playing silence in this manner will suspend silence without resuming automatically.", + "nickname": "startSilence", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing silence to a channel.", + "nickname": "stopSilence", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/play", + "description": "Play media to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "play", + "responseClass": "Playback", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000 + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/play/{playbackId}", + "description": "Play media to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media and specify the playbackId.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "playWithId", + "responseClass": "Playback", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000 + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/record", + "description": "Record audio from a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start a recording.", + "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.", + "nickname": "record", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Recording's filename", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "maxDurationSeconds", + "description": "Maximum duration of the recording, in seconds. 0 for no limit", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "maxSilenceSeconds", + "description": "Maximum duration of silence, in seconds. 0 for no limit", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "ifExists", + "description": "Action to take if a recording with the same name already exists.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "fail", + "allowableValues": { + "valueType": "LIST", + "values": [ + "fail", + "overwrite", + "append" + ] + } + }, + { + "name": "beep", + "description": "Play beep when recording begins", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "terminateOn", + "description": "DTMF input to terminate recording", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "any", + "*", + "#" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "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" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/variable", + "description": "Variables on a channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the value of a channel variable or function.", + "nickname": "getChannelVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The channel variable or function to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Channel or variable not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "POST", + "summary": "Set the value of a channel variable or function.", + "nickname": "setChannelVar", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The channel variable or function to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/snoop", + "description": "Snoop (spy/whisper) on a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start snooping.", + "notes": "Snoop (spy/whisper) on a specific channel.", + "nickname": "snoopChannel", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "spy", + "description": "Direction of audio to spy on", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "whisper", + "description": "Direction of audio to whisper into", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "app", + "description": "Application the snooping channel is placed into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "snoopId", + "description": "Unique ID to assign to snooping channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/snoop/{snoopId}", + "description": "Snoop (spy/whisper) on a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start snooping.", + "notes": "Snoop (spy/whisper) on a specific channel.", + "nickname": "snoopChannelWithId", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "snoopId", + "description": "Unique ID to assign to snooping channel", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "spy", + "description": "Direction of audio to spy on", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "whisper", + "description": "Direction of audio to whisper into", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "app", + "description": "Application the snooping channel is placed into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/dial", + "description": "Dial a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Dial a created channel.", + "nickname": "dial", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "caller", + "description": "Channel ID of caller", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Dial timeout", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel cannot be found." + }, + { + "code": 409, + "reason": "Channel cannot be dialed." + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/rtp_statistics", + "description": "Get RTP statistics information for RTP on a channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "RTP stats on a channel.", + "nickname": "rtpstatistics", + "responseClass": "RTPstat", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel cannot be found." + } + ] + } + ] + }, + { + "path": "/channels/externalMedia", + "description": "Create a channel to an External Media source/sink.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start an External Media session.", + "notes": "Create a channel to an External Media source/sink.", + "nickname": "externalMedia", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "Stasis Application to place channel into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "external_host", + "description": "Hostname/ip:port of external host", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "encapsulation", + "description": "Payload encapsulation protocol", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "rtp", + "allowableValues": { + "valueType": "LIST", + "values": [ + "rtp" + ] + } + }, + { + "name": "transport", + "description": "Transport protocol", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "udp", + "allowableValues": { + "valueType": "LIST", + "values": [ + "udp" + ] + } + }, + { + "name": "connection_type", + "description": "Connection type (client/server)", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "client", + "allowableValues": { + "valueType": "LIST", + "values": [ + "client" + ] + } + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "External media direction", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 409, + "reason": "Channel is not in a Stasis application; Channel is already bridged" + } + ] + } + ] + } + ], + "models": { + "Dialed": { + "id": "Dialed", + "description": "Dialed channel information.", + "properties": {} + }, + "DialplanCEP": { + "id": "DialplanCEP", + "description": "Dialplan location (context/extension/priority)", + "properties": { + "context": { + "required": true, + "type": "string", + "description": "Context in the dialplan" + }, + "exten": { + "required": true, + "type": "string", + "description": "Extension in the dialplan" + }, + "priority": { + "required": true, + "type": "long", + "description": "Priority in the dialplan" + }, + "app_name": { + "required": true, + "type": "string", + "description": "Name of current dialplan application" + }, + "app_data": { + "required": true, + "type": "string", + "description": "Parameter of current dialplan application" + } + } + }, + "CallerID": { + "id": "CallerID", + "description": "Caller identification", + "properties": { + "name": { + "required": true, + "type": "string" + }, + "number": { + "required": true, + "type": "string" + } + } + }, + "RTPstat": { + "id": "RTPstat", + "description": "A statistics of a RTP.", + "properties": { + "txcount": { + "required": true, + "type": "int", + "description": "Number of packets transmitted." + }, + "rxcount": { + "required": true, + "type": "int", + "description": "Number of packets received." + }, + "txjitter": { + "required": false, + "type": "double", + "description": "Jitter on transmitted packets." + }, + "rxjitter": { + "required": false, + "type": "double", + "description": "Jitter on received packets." + }, + "remote_maxjitter": { + "required": false, + "type": "double", + "description": "Maximum jitter on remote side." + }, + "remote_minjitter": { + "required": false, + "type": "double", + "description": "Minimum jitter on remote side." + }, + "remote_normdevjitter": { + "required": false, + "type": "double", + "description": "Average jitter on remote side." + }, + "remote_stdevjitter": { + "required": false, + "type": "double", + "description": "Standard deviation jitter on remote side." + }, + "local_maxjitter": { + "required": false, + "type": "double", + "description": "Maximum jitter on local side." + }, + "local_minjitter": { + "required": false, + "type": "double", + "description": "Minimum jitter on local side." + }, + "local_normdevjitter": { + "required": false, + "type": "double", + "description": "Average jitter on local side." + }, + "local_stdevjitter": { + "required": false, + "type": "double", + "description": "Standard deviation jitter on local side." + }, + "txploss": { + "required": true, + "type": "int", + "description": "Number of transmitted packets lost." + }, + "rxploss": { + "required": true, + "type": "int", + "description": "Number of received packets lost." + }, + "remote_maxrxploss": { + "required": false, + "type": "double", + "description": "Maximum number of packets lost on remote side." + }, + "remote_minrxploss": { + "required": false, + "type": "double", + "description": "Minimum number of packets lost on remote side." + }, + "remote_normdevrxploss": { + "required": false, + "type": "double", + "description": "Average number of packets lost on remote side." + }, + "remote_stdevrxploss": { + "required": false, + "type": "double", + "description": "Standard deviation packets lost on remote side." + }, + "local_maxrxploss": { + "required": false, + "type": "double", + "description": "Maximum number of packets lost on local side." + }, + "local_minrxploss": { + "required": false, + "type": "double", + "description": "Minimum number of packets lost on local side." + }, + "local_normdevrxploss": { + "required": false, + "type": "double", + "description": "Average number of packets lost on local side." + }, + "local_stdevrxploss": { + "required": false, + "type": "double", + "description": "Standard deviation packets lost on local side." + }, + "rtt": { + "required": false, + "type": "double", + "description": "Total round trip time." + }, + "maxrtt": { + "required": false, + "type": "double", + "description": "Maximum round trip time." + }, + "minrtt": { + "required": false, + "type": "double", + "description": "Minimum round trip time." + }, + "normdevrtt": { + "required": false, + "type": "double", + "description": "Average round trip time." + }, + "stdevrtt": { + "required": false, + "type": "double", + "description": "Standard deviation round trip time." + }, + "local_ssrc": { + "required": true, + "type": "int", + "description": "Our SSRC." + }, + "remote_ssrc": { + "required": true, + "type": "int", + "description": "Their SSRC." + }, + "txoctetcount": { + "required": true, + "type": "int", + "description": "Number of octets transmitted." + }, + "rxoctetcount": { + "required": true, + "type": "int", + "description": "Number of octets received." + }, + "channel_uniqueid": { + "required": true, + "type": "string", + "description": "The Asterisk channel's unique ID that owns this instance." + } + } + }, + "Channel": { + "id": "Channel", + "description": "A specific communication connection between Asterisk and an Endpoint.", + "properties": { + "id": { + "required": true, + "type": "string", + "description": "Unique identifier of the channel.\n\nThis is the same as the Uniqueid field in AMI." + }, + "name": { + "required": true, + "type": "string", + "description": "Name of the channel (i.e. SIP/foo-0000a7e3)" + }, + "state": { + "required": true, + "type": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "Down", + "Rsrved", + "OffHook", + "Dialing", + "Ring", + "Ringing", + "Up", + "Busy", + "Dialing Offhook", + "Pre-ring", + "Unknown" + ] + } + }, + "caller": { + "required": true, + "type": "CallerID" + }, + "connected": { + "required": true, + "type": "CallerID" + }, + "accountcode": { + "required": true, + "type": "string" + }, + "dialplan": { + "required": true, + "type": "DialplanCEP", + "description": "Current location in the dialplan" + }, + "creationtime": { + "required": true, + "type": "Date", + "description": "Timestamp when channel was created" + }, + "language": { + "required": true, + "type": "string", + "description": "The default spoken language" + }, + "channelvars": { + "required": false, + "type": "object", + "description": "Channel variables" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_4_1_2/deviceStates.json b/codegen/src/main/resources/codegen-data/ari_4_1_2/deviceStates.json new file mode 100644 index 00000000..bd389355 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_4_1_2/deviceStates.json @@ -0,0 +1,154 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "Kevin Harwell ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/deviceStates.{format}", + "requiresModules": [ + "res_stasis_device_state" + ], + "apis": [ + { + "path": "/deviceStates", + "description": "Device states", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all ARI controlled device states.", + "nickname": "list", + "responseClass": "List[DeviceState]" + } + ] + }, + { + "path": "/deviceStates/{deviceName}", + "description": "Device state", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve the current state of a device.", + "nickname": "get", + "responseClass": "DeviceState", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Change the state of a device controlled by ARI. (Note - implicitly creates the device state).", + "nickname": "update", + "responseClass": "void", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "deviceState", + "description": "Device state value", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "NOT_INUSE", + "INUSE", + "BUSY", + "INVALID", + "UNAVAILABLE", + "RINGING", + "RINGINUSE", + "ONHOLD" + ] + } + + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Device name is missing" + }, + { + "code": 409, + "reason": "Uncontrolled device specified" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Destroy a device-state controlled by ARI.", + "nickname": "delete", + "responseClass": "void", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Device name is missing" + }, + { + "code": 409, + "reason": "Uncontrolled device specified" + } + ] + } + ] + } + ], + "models": { + "DeviceState": { + "id": "DeviceState", + "description": "Represents the state of a device.", + "properties": { + "name": { + "type": "string", + "description": "Name of the device.", + "required": true + }, + "state": { + "type": "string", + "description": "Device's state", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "UNKNOWN", + "NOT_INUSE", + "INUSE", + "BUSY", + "INVALID", + "UNAVAILABLE", + "RINGING", + "RINGINUSE", + "ONHOLD" + ] + } + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_4_1_2/endpoints.json b/codegen/src/main/resources/codegen-data/ari_4_1_2/endpoints.json new file mode 100644 index 00000000..1f77d370 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_4_1_2/endpoints.json @@ -0,0 +1,263 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/endpoints.{format}", + "apis": [ + { + "path": "/endpoints", + "description": "Asterisk endpoints", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all endpoints.", + "nickname": "list", + "responseClass": "List[Endpoint]" + } + ] + }, + { + "path": "/endpoints/sendMessage", + "description": "Send a message to some technology URI or endpoint.", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Send a message to some technology URI or endpoint.", + "nickname": "sendMessage", + "responseClass": "void", + "parameters": [ + { + "name": "to", + "description": "The endpoint resource or technology specific URI to send the message to. Valid resources are sip, pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "from", + "description": "The endpoint resource or technology specific identity to send this message from. Valid resources are sip, pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "body", + "description": "The body of the message", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "descriptioni": "The \"variables\" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, pjsip and sip resource types will add the key/value pairs as SIP headers,", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoint not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}", + "description": "Asterisk endpoints", + "operations": [ + { + "httpMethod": "GET", + "summary": "List available endoints for a given endpoint technology.", + "nickname": "listByTech", + "responseClass": "List[Endpoint]", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoints (sip,iax2,...)", + "paramType": "path", + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Endpoints not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}/{resource}", + "description": "Single endpoint", + "operations": [ + { + "httpMethod": "GET", + "summary": "Details for an endpoint.", + "nickname": "get", + "responseClass": "Endpoint", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "resource", + "description": "ID of the endpoint", + "paramType": "path", + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoints not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}/{resource}/sendMessage", + "description": "Send a message to some endpoint in a technology.", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Send a message to some endpoint in a technology.", + "nickname": "sendMessageToEndpoint", + "responseClass": "void", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "resource", + "description": "ID of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "from", + "description": "The endpoint resource or technology specific identity to send this message from. Valid resources are sip, pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "body", + "description": "The body of the message", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "descriptioni": "The \"variables\" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, pjsip and sip resource types will add the key/value pairs as SIP headers,", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoint not found" + } + ] + } + ] + } + ], + "models": { + "Endpoint": { + "id": "Endpoint", + "description": "An external device that may offer/accept calls to/from Asterisk.\n\nUnlike most resources, which have a single unique identifier, an endpoint is uniquely identified by the technology/resource pair.", + "properties": { + "technology": { + "type": "string", + "description": "Technology of the endpoint", + "required": true + }, + "resource": { + "type": "string", + "description": "Identifier of the endpoint, specific to the given technology.", + "required": true + }, + "state": { + "type": "string", + "description": "Endpoint's state", + "required": false, + "allowableValues": { + "valueType": "LIST", + "values": [ + "unknown", + "offline", + "online" + ] + } + }, + "channel_ids": { + "type": "List[string]", + "description": "Id's of channels associated with this endpoint", + "required": true + } + } + }, + "TextMessage": { + "id": "TextMessage", + "description": "A text message.", + "properties": { + "from": { + "type": "string", + "description": "A technology specific URI specifying the source of the message. For sip and pjsip technologies, any SIP URI can be specified. For xmpp, the URI must correspond to the client connection being used to send the message.", + "required": true + }, + "to": { + "type": "string", + "description": "A technology specific URI specifying the destination of the message. Valid technologies include sip, pjsip, and xmp. The destination of a message should be an endpoint.", + "required": true + }, + "body": { + "type": "string", + "description": "The text of the message.", + "required": true + }, + "variables": { + "type": "object", + "description": "Technology specific key/value pairs (JSON object) associated with the message.", + "required": false + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_4_1_2/events.json b/codegen/src/main/resources/codegen-data/ari_4_1_2/events.json new file mode 100644 index 00000000..c9822f6c --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_4_1_2/events.json @@ -0,0 +1,918 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.2", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/events.{format}", + "requiresModules": [ + "res_http_websocket" + ], + "apis": [ + { + "path": "/events", + "description": "Events from Asterisk to applications", + "operations": [ + { + "httpMethod": "GET", + "upgrade": "websocket", + "websocketProtocol": "ari", + "summary": "WebSocket connection for events.", + "nickname": "eventWebsocket", + "responseClass": "Message", + "parameters": [ + { + "name": "app", + "description": "Applications to subscribe to.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "subscribeAll", + "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'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean" + } + ] + } + ] + }, + { + "path": "/events/user/{eventName}", + "description": "Stasis application user events", + "operations": [ + { + "httpMethod": "POST", + "summary": "Generate a user event.", + "nickname": "userEvent", + "responseClass": "void", + "parameters": [ + { + "name": "eventName", + "description": "Event name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "application", + "description": "The name of the application that will receive this event", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "source", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}/{resource}, deviceState:{deviceName}", + "paramType": "query", + "required": false, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds custom key/value pairs to add to the user event. Ex. { \"variables\": { \"key\": \"value\" } }", + "paramType": "body", + "required": false, + "allowMultiple": false, + "dataType": "containers" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 422, + "reason": "Event source not found." + }, + { + "code": 400, + "reason": "Invalid even tsource URI or userevent data." + } + ] + } + ] + } + ], + "models": { + "Message": { + "id": "Message", + "description": "Base type for errors and events", + "discriminator": "type", + "properties": { + "type": { + "type": "string", + "required": true, + "description": "Indicates the type of this message." + }, + "asterisk_id": { + "type": "string", + "required": false, + "description": "The unique ID for the Asterisk instance that raised this event." + } + }, + "subTypes": [ + "MissingParams", + "Event" + ] + }, + "MissingParams": { + "id": "MissingParams", + "description": "Error event sent when required params are missing.", + "properties": { + "params": { + "required": true, + "type": "List[string]", + "description": "A list of the missing parameters" + } + } + }, + "Event": { + "id": "Event", + "description": "Base type for asynchronous events from Asterisk.", + "properties": { + "application": { + "type": "string", + "description": "Name of the application receiving the event.", + "required": true + }, + "timestamp": { + "type": "Date", + "description": "Time at which this event was created.", + "required": true + } + }, + "subTypes": [ + "DeviceStateChanged", + "PlaybackStarted", + "PlaybackContinuing", + "PlaybackFinished", + "RecordingStarted", + "RecordingFinished", + "RecordingFailed", + "ApplicationMoveFailed", + "ApplicationReplaced", + "BridgeCreated", + "BridgeDestroyed", + "BridgeMerged", + "BridgeBlindTransfer", + "BridgeAttendedTransfer", + "BridgeVideoSourceChanged", + "ChannelCreated", + "ChannelDestroyed", + "ChannelEnteredBridge", + "ChannelLeftBridge", + "ChannelStateChange", + "ChannelDtmfReceived", + "ChannelDialplan", + "ChannelCallerId", + "ChannelUserevent", + "ChannelHangupRequest", + "ChannelVarset", + "ChannelTalkingStarted", + "ChannelTalkingFinished", + "ChannelHold", + "ChannelUnhold", + "ContactStatusChange", + "EndpointStateChange", + "Dial", + "StasisEnd", + "StasisStart", + "TextMessageReceived", + "ChannelConnectedLine", + "PeerStatusChange" + ] + }, + "ContactInfo": { + "id": "ContactInfo", + "description": "Detailed information about a contact on an endpoint.", + "properties": { + "uri": { + "type": "string", + "description": "The location of the contact.", + "required": true + }, + "contact_status": { + "type": "string", + "description": "The current status of the contact.", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "Unreachable", + "Reachable", + "Unknown", + "NonQualified", + "Removed" + ] + } + }, + "aor": { + "type": "string", + "description": "The Address of Record this contact belongs to.", + "required": true + }, + "roundtrip_usec": { + "type": "string", + "description": "Current round trip time, in microseconds, for the contact.", + "required": false + } + } + }, + "Peer": { + "id": "Peer", + "description": "Detailed information about a remote peer that communicates with Asterisk.", + "properties": { + "peer_status": { + "type": "string", + "description": "The current state of the peer. Note that the values of the status are dependent on the underlying peer technology.", + "required": true + }, + "cause": { + "type": "string", + "description": "An optional reason associated with the change in peer_status.", + "required": false + }, + "address": { + "type": "string", + "description": "The IP address of the peer.", + "required": false + }, + "port": { + "type": "string", + "description": "The port of the peer.", + "required": false + }, + "time": { + "type": "string", + "description": "The last known time the peer was contacted.", + "required": false + } + } + }, + "DeviceStateChanged": { + "id": "DeviceStateChanged", + "description": "Notification that a device state has changed.", + "properties": { + "device_state": { + "type": "DeviceState", + "description": "Device state object", + "required": true + } + } + }, + "PlaybackStarted": { + "id": "PlaybackStarted", + "description": "Event showing the start of a media playback operation.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "PlaybackContinuing": { + "id": "PlaybackContinuing", + "description": "Event showing the continuation of a media playback operation from one media URI to the next in the list.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "PlaybackFinished": { + "id": "PlaybackFinished", + "description": "Event showing the completion of a media playback operation.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "RecordingStarted": { + "id": "RecordingStarted", + "description": "Event showing the start of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "RecordingFinished": { + "id": "RecordingFinished", + "description": "Event showing the completion of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "RecordingFailed": { + "id": "RecordingFailed", + "description": "Event showing failure of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "ApplicationMoveFailed": { + "id": "ApplicationMoveFailed", + "description": "Notification that trying to move a channel to another Stasis application failed.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + }, + "destination": { + "required": true, + "type": "string" + }, + "args": { + "required": true, + "type": "List[string]", + "description": "Arguments to the application" + } + } + }, + "ApplicationReplaced": { + "id": "ApplicationReplaced", + "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.", + "properties": {} + }, + "BridgeCreated": { + "id": "BridgeCreated", + "description": "Notification that a bridge has been created.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeDestroyed": { + "id": "BridgeDestroyed", + "description": "Notification that a bridge has been destroyed.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeMerged": { + "id": "BridgeMerged", + "description": "Notification that one bridge has merged into another.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "bridge_from": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeVideoSourceChanged": { + "id": "BridgeVideoSourceChanged", + "description": "Notification that the source of video in a bridge has changed.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "old_video_source_id": { + "required": false, + "type": "string" + } + } + }, + "BridgeBlindTransfer": { + "id": "BridgeBlindTransfer", + "description": "Notification that a blind transfer has occurred.", + "properties": { + "channel": { + "description": "The channel performing the blind transfer", + "required": true, + "type": "Channel" + }, + "replace_channel": { + "description": "The channel that is replacing transferer when the transferee(s) can not be transferred directly", + "required": false, + "type": "Channel" + }, + "transferee": { + "description": "The channel that is being transferred", + "required": false, + "type": "Channel" + }, + "exten": { + "description": "The extension transferred to", + "required": true, + "type": "string" + }, + "context": { + "description": "The context transferred to", + "required": true, + "type": "string" + }, + "result": { + "description": "The result of the transfer attempt", + "required": true, + "type": "string" + }, + "is_external": { + "description": "Whether the transfer was externally initiated or not", + "required": true, + "type": "boolean" + }, + "bridge": { + "description": "The bridge being transferred", + "type": "Bridge" + } + } + }, + "BridgeAttendedTransfer": { + "id": "BridgeAttendedTransfer", + "description": "Notification that an attended transfer has occurred.", + "properties": { + "transferer_first_leg": { + "description": "First leg of the transferer", + "required": true, + "type": "Channel" + }, + "transferer_second_leg": { + "description": "Second leg of the transferer", + "required": true, + "type": "Channel" + }, + "replace_channel": { + "description": "The channel that is replacing transferer_first_leg in the swap", + "required": false, + "type": "Channel" + }, + "transferee": { + "description": "The channel that is being transferred", + "required": false, + "type": "Channel" + }, + "transfer_target": { + "description": "The channel that is being transferred to", + "required": false, + "type": "Channel" + }, + "result": { + "description": "The result of the transfer attempt", + "required": true, + "type": "string" + }, + "is_external": { + "description": "Whether the transfer was externally initiated or not", + "required": true, + "type": "boolean" + }, + "transferer_first_leg_bridge": { + "description": "Bridge the transferer first leg is in", + "type": "Bridge" + }, + "transferer_second_leg_bridge": { + "description": "Bridge the transferer second leg is in", + "type": "Bridge" + }, + "destination_type": { + "description": "How the transfer was accomplished", + "required": true, + "type": "string" + }, + "destination_bridge": { + "description": "Bridge that survived the merge result", + "type": "string" + }, + "destination_application": { + "description": "Application that has been transferred into", + "type": "string" + }, + "destination_link_first_leg": { + "description": "First leg of a link transfer result", + "type": "Channel" + }, + "destination_link_second_leg": { + "description": "Second leg of a link transfer result", + "type": "Channel" + }, + "destination_threeway_channel": { + "description": "Transferer channel that survived the threeway result", + "type": "Channel" + }, + "destination_threeway_bridge": { + "description": "Bridge that survived the threeway result", + "type": "Bridge" + } + } + }, + "ChannelCreated": { + "id": "ChannelCreated", + "description": "Notification that a channel has been created.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelDestroyed": { + "id": "ChannelDestroyed", + "description": "Notification that a channel has been destroyed.", + "properties": { + "cause": { + "required": true, + "description": "Integer representation of the cause of the hangup", + "type": "int" + }, + "cause_txt": { + "required": true, + "description": "Text representation of the cause of the hangup", + "type": "string" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelEnteredBridge": { + "id": "ChannelEnteredBridge", + "description": "Notification that a channel has entered a bridge.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "channel": { + "type": "Channel" + } + } + }, + "ChannelLeftBridge": { + "id": "ChannelLeftBridge", + "description": "Notification that a channel has left a bridge.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelStateChange": { + "id": "ChannelStateChange", + "description": "Notification of a channel's state change.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelDtmfReceived": { + "id": "ChannelDtmfReceived", + "description": "DTMF received on a channel.\n\nThis event is sent when the DTMF ends. There is no notification about the start of DTMF", + "properties": { + "digit": { + "required": true, + "type": "string", + "description": "DTMF digit received (0-9, A-E, # or *)" + }, + "duration_ms": { + "required": true, + "type": "int", + "description": "Number of milliseconds DTMF was received" + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which DTMF was received" + } + } + }, + "ChannelDialplan": { + "id": "ChannelDialplan", + "description": "Channel changed location in the dialplan.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that changed dialplan location." + }, + "dialplan_app": { + "required": true, + "type": "string", + "description": "The application about to be executed." + }, + "dialplan_app_data": { + "required": true, + "type": "string", + "description": "The data to be passed to the application." + } + } + }, + "ChannelCallerId": { + "id": "ChannelCallerId", + "description": "Channel changed Caller ID.", + "properties": { + "caller_presentation": { + "required": true, + "type": "int", + "description": "The integer representation of the Caller Presentation value." + }, + "caller_presentation_txt": { + "required": true, + "type": "string", + "description": "The text representation of the Caller Presentation value." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that changed Caller ID." + } + } + }, + "ChannelUserevent": { + "id": "ChannelUserevent", + "description": "User-generated event with additional user-defined fields in the object.", + "properties": { + "eventname": { + "required": true, + "type": "string", + "description": "The name of the user event." + }, + "channel": { + "required": false, + "type": "Channel", + "description": "A channel that is signaled with the user event." + }, + "bridge": { + "required": false, + "type": "Bridge", + "description": "A bridge that is signaled with the user event." + }, + "endpoint": { + "required": false, + "type": "Endpoint", + "description": "A endpoint that is signaled with the user event." + }, + "userevent": { + "required": true, + "type": "object", + "description": "Custom Userevent data" + } + } + }, + "ChannelHangupRequest": { + "id": "ChannelHangupRequest", + "description": "A hangup was requested on the channel.", + "properties": { + "cause": { + "type": "int", + "description": "Integer representation of the cause of the hangup." + }, + "soft": { + "type": "boolean", + "description": "Whether the hangup request was a soft hangup request." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which the hangup was requested." + } + } + }, + "ChannelVarset": { + "id": "ChannelVarset", + "description": "Channel variable changed.", + "properties": { + "variable": { + "required": true, + "type": "string", + "description": "The variable that changed." + }, + "value": { + "required": true, + "type": "string", + "description": "The new value of the variable." + }, + "channel": { + "required": false, + "type": "Channel", + "description": "The channel on which the variable was set.\n\nIf missing, the variable is a global variable." + } + } + }, + "ChannelHold": { + "id": "ChannelHold", + "description": "A channel initiated a media hold.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that initiated the hold event." + }, + "musicclass": { + "required": false, + "type": "string", + "description": "The music on hold class that the initiator requested." + } + } + }, + "ChannelUnhold": { + "id": "ChannelUnhold", + "description": "A channel initiated a media unhold.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that initiated the unhold event." + } + } + }, + "ChannelTalkingStarted": { + "id": "ChannelTalkingStarted", + "description": "Talking was detected on the channel.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which talking started." + } + } + }, + "ChannelTalkingFinished": { + "id": "ChannelTalkingFinished", + "description": "Talking is no longer detected on the channel.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which talking completed." + }, + "duration": { + "required": true, + "type": "int", + "description": "The length of time, in milliseconds, that talking was detected on the channel" + } + } + }, + "ContactStatusChange": { + "id": "ContactStatusChange", + "description": "The state of a contact on an endpoint has changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + }, + "contact_info": { + "required": true, + "type": "ContactInfo" + } + } + }, + "PeerStatusChange": { + "id": "PeerStatusChange", + "description": "The state of a peer associated with an endpoint has changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + }, + "peer": { + "required": true, + "type": "Peer" + } + } + }, + "EndpointStateChange": { + "id": "EndpointStateChange", + "description": "Endpoint state changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + } + } + }, + "Dial": { + "id": "Dial", + "description": "Dialing state has changed.", + "properties": { + "caller": { + "required": false, + "type": "Channel", + "description": "The calling channel." + }, + "peer": { + "required": true, + "type": "Channel", + "description": "The dialed channel." + }, + "forward": { + "required": false, + "type": "string", + "description": "Forwarding target requested by the original dialed channel." + }, + "forwarded": { + "required": false, + "type": "Channel", + "description": "Channel that the caller has been forwarded to." + }, + "dialstring": { + "required": false, + "type": "string", + "description": "The dial string for calling the peer channel." + }, + "dialstatus": { + "required": true, + "type": "string", + "description": "Current status of the dialing attempt to the peer." + } + } + }, + "StasisEnd": { + "id": "StasisEnd", + "description": "Notification that a channel has left a Stasis application.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "StasisStart": { + "id": "StasisStart", + "description": "Notification that a channel has entered a Stasis application.", + "properties": { + "args": { + "required": true, + "type": "List[string]", + "description": "Arguments to the application" + }, + "channel": { + "required": true, + "type": "Channel" + }, + "replace_channel": { + "required": false, + "type": "Channel" + } + } + }, + "TextMessageReceived": { + "id": "TextMessageReceived", + "description": "A text message was received from an endpoint.", + "properties": { + "message": { + "required": true, + "type": "TextMessage" + }, + "endpoint": { + "required": false, + "type": "Endpoint" + } + } + }, + "ChannelConnectedLine": { + "id": "ChannelConnectedLine", + "description": "Channel changed Connected Line.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel whose connected line has changed." + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_4_1_2/mailboxes.json b/codegen/src/main/resources/codegen-data/ari_4_1_2/mailboxes.json new file mode 100644 index 00000000..8f5941b8 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_4_1_2/mailboxes.json @@ -0,0 +1,137 @@ +{ + "_copyright": "Copyright (C) 2013, Digium, Inc.", + "_author": "Jonathan Rose ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/mailboxes.{format}", + "requiresModules": [ + "res_stasis_mailbox" + ], + "apis": [ + { + "path": "/mailboxes", + "description": "Mailboxes", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all mailboxes.", + "nickname": "list", + "responseClass": "List[Mailbox]" + } + ] + }, + { + "path": "/mailboxes/{mailboxName}", + "description": "Mailbox state", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve the current state of a mailbox.", + "nickname": "get", + "responseClass": "Mailbox", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Change the state of a mailbox. (Note - implicitly creates the mailbox).", + "nickname": "update", + "responseClass": "void", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "oldMessages", + "description": "Count of old messages in the mailbox", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "newMessages", + "description": "Count of new messages in the mailbox", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "int" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Destroy a mailbox.", + "nickname": "delete", + "responseClass": "void", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + } + ] + } + ], + "models": { + "Mailbox": { + "id": "Mailbox", + "description": "Represents the state of a mailbox.", + "properties": { + "name": { + "type": "string", + "description": "Name of the mailbox.", + "required": true + }, + "old_messages": { + "type": "int", + "description": "Count of old messages in the mailbox.", + "required": true + }, + "new_messages": { + "type": "int", + "description": "Count of new messages in the mailbox.", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_4_1_2/playbacks.json b/codegen/src/main/resources/codegen-data/ari_4_1_2/playbacks.json new file mode 100644 index 00000000..a78dcae7 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_4_1_2/playbacks.json @@ -0,0 +1,164 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/playbacks.{format}", + "requiresModules": [ + "res_stasis_playback" + ], + "apis": [ + { + "path": "/playbacks/{playbackId}", + "description": "Control object for a playback operation.", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a playback's details.", + "nickname": "get", + "responseClass": "Playback", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "The playback cannot be found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop a playback.", + "nickname": "stop", + "responseClass": "void", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "The playback cannot be found" + } + ] + } + ] + }, + { + "path": "/playbacks/{playbackId}/control", + "description": "Control object for a playback operation.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Control a playback.", + "nickname": "control", + "responseClass": "void", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "operation", + "description": "Operation to perform on the playback.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "restart", + "pause", + "unpause", + "reverse", + "forward" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "The provided operation parameter was invalid" + }, + { + "code": 404, + "reason": "The playback cannot be found" + }, + { + "code": 409, + "reason": "The operation cannot be performed in the playback's current state" + } +] + } + ] + } + ], + "models": { + "Playback": { + "id": "Playback", + "description": "Object representing the playback of media to a channel", + "properties": { + "id": { + "type": "string", + "description": "ID for this playback operation", + "required": true + }, + "media_uri": { + "type": "string", + "description": "The URI for the media currently being played back.", + "required": true + }, + "next_media_uri": { + "type": "string", + "description": "If a list of URIs is being played, the next media URI to be played back.", + "required": false + }, + "target_uri": { + "type": "string", + "description": "URI for the channel or bridge to play the media on", + "required": true + }, + "language": { + "type": "string", + "description": "For media types that support multiple languages, the language requested for playback." + }, + "state": { + "type": "string", + "description": "Current state of the playback operation.", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "queued", + "playing", + "continuing", + "done" + ] + } + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_4_1_2/recordings.json b/codegen/src/main/resources/codegen-data/ari_4_1_2/recordings.json new file mode 100644 index 00000000..6ffd6d8e --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_4_1_2/recordings.json @@ -0,0 +1,413 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/recordings.{format}", + "requiresModules": [ + "res_stasis_recording" + ], + "apis": [ + { + "path": "/recordings/stored", + "description": "Recordings", + "operations": [ + { + "httpMethod": "GET", + "summary": "List recordings that are complete.", + "nickname": "listStored", + "responseClass": "List[StoredRecording]" + } + ] + }, + { + "path": "/recordings/stored/{recordingName}", + "description": "Individual recording", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a stored recording's details.", + "nickname": "getStored", + "responseClass": "StoredRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Delete a stored recording.", + "nickname": "deleteStored", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/stored/{recordingName}/file", + "description": "The actual file associated with the stored recording", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the file associated with the stored recording.", + "nickname": "getStoredFile", + "responseClass": "binary", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 403, + "reason": "The recording file could not be opened" + }, + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/stored/{recordingName}/copy", + "description": "Copy an individual recording", + "operations": [ + { + "httpMethod": "POST", + "summary": "Copy a stored recording.", + "nickname": "copyStored", + "responseClass": "StoredRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording to copy", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "destinationRecordingName", + "description": "The destination name of the recording", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "A recording with the same name already exists on the system" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}", + "description": "A recording that is in progress", + "operations": [ + { + "httpMethod": "GET", + "summary": "List live recordings.", + "nickname": "getLive", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop a live recording and discard it.", + "nickname": "cancel", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/stop", + "operations": [ + { + "httpMethod": "POST", + "summary": "Stop a live recording and store it.", + "nickname": "stop", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/pause", + "operations": [ + { + "httpMethod": "POST", + "summary": "Pause a live recording.", + "notes": "Pausing a recording suspends silence detection, which will be restarted when the recording is unpaused. Paused time is not included in the accounting for maxDurationSeconds.", + "nickname": "pause", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unpause a live recording.", + "nickname": "unpause", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/mute", + "operations": [ + { + "httpMethod": "POST", + "summary": "Mute a live recording.", + "notes": "Muting a recording suspends silence detection, which will be restarted when the recording is unmuted.", + "nickname": "mute", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unmute a live recording.", + "nickname": "unmute", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + } + ] + } + ], + "models": { + "StoredRecording": { + "id": "StoredRecording", + "description": "A past recording that may be played back.", + "properties": { + "name": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + }, + "LiveRecording": { + "id": "LiveRecording", + "description": "A recording that is in progress", + "properties": { + "name": { + "required": true, + "type": "string", + "description": "Base name for the recording" + }, + "format": { + "required": true, + "type": "string", + "description": "Recording format (wav, gsm, etc.)" + }, + "target_uri": { + "required": true, + "type": "string", + "description": "URI for the channel or bridge being recorded" + }, + "state": { + "required": true, + "type": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "queued", + "recording", + "paused", + "done", + "failed", + "canceled" + ] + } + }, + "duration": { + "required": false, + "type": "int", + "description": "Duration in seconds of the recording" + }, + "talking_duration": { + "required": false, + "type": "int", + "description": "Duration of talking, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds." + }, + "silence_duration": { + "required": false, + "type": "int", + "description": "Duration of silence, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds." + }, + "cause": { + "required": false, + "type": "string", + "description": "Cause for recording failure if failed" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_4_1_2/sounds.json b/codegen/src/main/resources/codegen-data/ari_4_1_2/sounds.json new file mode 100644 index 00000000..8fbe1c57 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_4_1_2/sounds.json @@ -0,0 +1,99 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/sounds.{format}", + "apis": [ + { + "path": "/sounds", + "description": "Sounds", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all sounds.", + "nickname": "list", + "responseClass": "List[Sound]", + "parameters": [ + { + "name": "lang", + "description": "Lookup sound for a specific language.", + "paramType": "query", + "dataType": "string", + "required": false + }, + { + "name": "format", + "description": "Lookup sound in a specific format.", + "paramType": "query", + "dataType": "string", + "required": false, + "__note": "core show translation can show translation paths between formats, along with relative costs. so this could be just installed format, or we could follow that for transcoded formats." + } + ] + } + ] + }, + { + "path": "/sounds/{soundId}", + "description": "Individual sound", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a sound's details.", + "nickname": "get", + "responseClass": "Sound", + "parameters": [ + { + "name": "soundId", + "description": "Sound's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ] + } + ] + } + ], + "models": { + "FormatLangPair": { + "id": "FormatLangPair", + "description": "Identifies the format and language of a sound file", + "properties": { + "language": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + }, + "Sound": { + "id": "Sound", + "description": "A media file that may be played back.", + "properties": { + "id": { + "required": true, + "description": "Sound's identifier.", + "type": "string" + }, + "text": { + "required": false, + "description": "Text description of the sound, usually the words spoken.", + "type": "string" + }, + "formats": { + "required": true, + "description": "The formats and languages in which this sound is available.", + "type": "List[FormatLangPair]" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_4_1_3/applications.json b/codegen/src/main/resources/codegen-data/ari_4_1_3/applications.json new file mode 100644 index 00000000..09c5cd5c --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_4_1_3/applications.json @@ -0,0 +1,223 @@ +{ + "_copyright": "Copyright (C) 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/applications.{format}", + "apis": [ + { + "path": "/applications", + "description": "Stasis applications", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all applications.", + "nickname": "list", + "responseClass": "List[Application]" + } + ] + }, + { + "path": "/applications/{applicationName}", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get details of an application.", + "nickname": "get", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Application does not exist." + } + ] + } + ] + }, + { + "path": "/applications/{applicationName}/subscription", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "POST", + "summary": "Subscribe an application to a event source.", + "notes": "Returns the state of the application after the subscriptions have changed", + "nickname": "subscribe", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "eventSource", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing parameter." + }, + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 422, + "reason": "Event source does not exist." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unsubscribe an application from an event source.", + "notes": "Returns the state of the application after the subscriptions have changed", + "nickname": "unsubscribe", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "eventSource", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing parameter; event source scheme not recognized." + }, + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 409, + "reason": "Application not subscribed to event source." + }, + { + "code": 422, + "reason": "Event source does not exist." + } + ] + } + ] + }, + { + "path": "/applications/{applicationName}/eventFilter", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Filter application events types.", + "notes": "Allowed and/or disallowed event type filtering can be done. The body (parameter) should specify a JSON key/value object that describes the type of event filtering needed. One, or both of the following keys can be designated:

\"allowed\" - Specifies an allowed list of event types
\"disallowed\" - Specifies a disallowed list of event types

Further, each of those key's value should be a JSON array that holds zero, or more JSON key/value objects. Each of these objects must contain the following key with an associated value:

\"type\" - The type name of the event to filter

The value must be the string name (case sensitive) of the event type that needs filtering. For example:

{ \"allowed\": [ { \"type\": \"StasisStart\" }, { \"type\": \"StasisEnd\" } ] }

As this specifies only an allowed list, then only those two event type messages are sent to the application. No other event messages are sent.

The following rules apply:

* If the body is empty, both the allowed and disallowed filters are set empty.
* If both list types are given then both are set to their respective values (note, specifying an empty array for a given type sets that type to empty).
* If only one list type is given then only that type is set. The other type is not updated.
* An empty \"allowed\" list means all events are allowed.
* An empty \"disallowed\" list means no events are disallowed.
* Disallowed events take precedence over allowed events if the event type is specified in both lists.", + "nickname": "filter", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "filter", + "description": "Specify which event types to allow/disallow", + "paramType": "body", + "required": false, + "dataType": "object", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Bad request." + }, + { + "code": 404, + "reason": "Application does not exist." + } + ] + } + ] + } + ], + "models": { + "Application": { + "id": "Application", + "description": "Details of a Stasis application", + "properties": { + "name": { + "type": "string", + "description": "Name of this application", + "required": true + }, + "channel_ids": { + "type": "List[string]", + "description": "Id's for channels subscribed to.", + "required": true + }, + "bridge_ids": { + "type": "List[string]", + "description": "Id's for bridges subscribed to.", + "required": true + }, + "endpoint_ids": { + "type": "List[string]", + "description": "{tech}/{resource} for endpoints subscribed to.", + "required": true + }, + "device_names": { + "type": "List[string]", + "description": "Names of the devices subscribed to.", + "required": true + }, + "events_allowed": { + "type": "List[object]", + "description": "Event types sent to the application.", + "required": true + }, + "events_disallowed": { + "type": "List[object]", + "description": "Event types not sent to the application.", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_4_1_3/asterisk.json b/codegen/src/main/resources/codegen-data/ari_4_1_3/asterisk.json new file mode 100644 index 00000000..841e6cd8 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_4_1_3/asterisk.json @@ -0,0 +1,725 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/asterisk.{format}", + "apis": [ + { + "path": "/asterisk/config/dynamic/{configClass}/{objectType}/{id}", + "description": "Asterisk dynamic configuration", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve a dynamic configuration object.", + "nickname": "getObject", + "responseClass": "List[ConfigTuple]", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to retrieve.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to retrieve.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "{configClass|objectType|id} not found" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Create or update a dynamic configuration object.", + "nickname": "updateObject", + "responseClass": "List[ConfigTuple]", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to create or update.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to create or update.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "fields", + "description": "The body object should have a value that is a list of ConfigTuples, which provide the fields to update. Ex. [ { \"attribute\": \"directmedia\", \"value\": \"false\" } ]", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Bad request body" + }, + { + "code": 403, + "reason": "Could not create or update object" + }, + { + "code": 404, + "reason": "{configClass|objectType} not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Delete a dynamic configuration object.", + "nickname": "deleteObject", + "responseClass": "void", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to delete.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to delete.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 403, + "reason": "Could not delete object" + }, + { + "code": 404, + "reason": "{configClass|objectType|id} not found" + } + ] + } + ] + }, + { + "path": "/asterisk/info", + "description": "Asterisk system information (similar to core show settings)", + "operations": [ + { + "httpMethod": "GET", + "summary": "Gets Asterisk system information.", + "nickname": "getInfo", + "responseClass": "AsteriskInfo", + "parameters": [ + { + "name": "only", + "description": "Filter information returned", + "paramType": "query", + "required": false, + "allowMultiple": true, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "build", + "system", + "config", + "status" + ] + } + } + ] + } + ] + }, + { + "path": "/asterisk/ping", + "description": "Asterisk ping", + "operations": [ + { + "httpMethod": "GET", + "summary": "Response pong message.", + "nickname": "ping", + "responseClass": "AsteriskPing" + } + ] + }, + { + "path": "/asterisk/modules", + "description": "Asterisk modules", + "operations": [ + { + "httpMethod": "GET", + "summary": "List Asterisk modules.", + "nickname": "listModules", + "responseClass": "List[Module]" + } + ] + }, + { + "path": "/asterisk/modules/{moduleName}", + "description": "Asterisk module", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get Asterisk module information.", + "nickname": "getModule", + "responseClass": "Module", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module could not be found in running modules." + }, + { + "code": 409, + "reason": "Module information could not be retrieved." + } + ] + }, + { + "httpMethod": "POST", + "summary": "Load an Asterisk module.", + "nickname": "loadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 409, + "reason": "Module could not be loaded." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unload an Asterisk module.", + "nickname": "unloadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module not found in running modules." + }, + { + "code": 409, + "reason": "Module could not be unloaded." + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Reload an Asterisk module.", + "nickname": "reloadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module not found in running modules." + }, + { + "code": 409, + "reason": "Module could not be reloaded." + } + ] + } + ] + }, + { + "path": "/asterisk/logging", + "description": "Asterisk log channels", + "operations": [ + { + "httpMethod": "GET", + "summary": "Gets Asterisk log channel information.", + "nickname": "listLogChannels", + "responseClass": "List[LogChannel]" + } + ] + }, + { + "path": "/asterisk/logging/{logChannelName}", + "description": "Asterisk log channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Adds a log channel.", + "nickname": "addLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "The log channel to add", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "configuration", + "description": "levels of the log channel", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Bad request body" + }, + { + "code": 409, + "reason": "Log channel could not be created." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Deletes a log channel.", + "nickname": "deleteLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "Log channels name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Log channel does not exist." + } + ] + } + ] + }, + { + "path": "/asterisk/logging/{logChannelName}/rotate", + "description": "Asterisk log channel", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Rotates a log channel.", + "nickname": "rotateLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "Log channel's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Log channel does not exist." + } + ] + } + ] + }, + { + "path": "/asterisk/variable", + "description": "Global variables", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the value of a global variable.", + "nickname": "getGlobalVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "variable", + "description": "The variable to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + } + ] + }, + { + "httpMethod": "POST", + "summary": "Set the value of a global variable.", + "nickname": "setGlobalVar", + "responseClass": "void", + "parameters": [ + { + "name": "variable", + "description": "The variable to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + } + ] + } + ] + } + ], + "models": { + "BuildInfo": { + "id": "BuildInfo", + "description": "Info about how Asterisk was built", + "properties": { + "os": { + "required": true, + "type": "string", + "description": "OS Asterisk was built on." + }, + "kernel": { + "required": true, + "type": "string", + "description": "Kernel version Asterisk was built on." + }, + "options": { + "required": true, + "type": "string", + "description": "Compile time options, or empty string if default." + }, + "machine": { + "required": true, + "type": "string", + "description": "Machine architecture (x86_64, i686, ppc, etc.)" + }, + "date": { + "required": true, + "type": "string", + "description": "Date and time when Asterisk was built." + }, + "user": { + "required": true, + "type": "string", + "description": "Username that build Asterisk" + } + } + }, + "SystemInfo": { + "id": "SystemInfo", + "description": "Info about Asterisk", + "properties": { + "version": { + "required": true, + "type": "string", + "description": "Asterisk version." + }, + "entity_id": { + "required": true, + "type": "string", + "description": "" + } + } + }, + "SetId": { + "id": "SetId", + "description": "Effective user/group id", + "properties": { + "user": { + "required": true, + "type": "string", + "description": "Effective user id." + }, + "group": { + "required": true, + "type": "string", + "description": "Effective group id." + } + } + }, + "ConfigInfo": { + "id": "ConfigInfo", + "description": "Info about Asterisk configuration", + "properties": { + "name": { + "required": true, + "type": "string", + "description": "Asterisk system name." + }, + "default_language": { + "required": true, + "type": "string", + "description": "Default language for media playback." + }, + "max_channels": { + "required": false, + "type": "int", + "description": "Maximum number of simultaneous channels." + }, + "max_open_files": { + "required": false, + "type": "int", + "description": "Maximum number of open file handles (files, sockets)." + }, + "max_load": { + "required": false, + "type": "double", + "description": "Maximum load avg on system." + }, + "setid": { + "required": true, + "type": "SetId", + "description": "Effective user/group id for running Asterisk." + } + } + }, + "StatusInfo": { + "id": "StatusInfo", + "description": "Info about Asterisk status", + "properties": { + "startup_time": { + "required": true, + "type": "Date", + "description": "Time when Asterisk was started." + }, + "last_reload_time": { + "required": true, + "type": "Date", + "description": "Time when Asterisk was last reloaded." + } + } + }, + "AsteriskInfo": { + "id": "AsteriskInfo", + "description": "Asterisk system information", + "properties": { + "build": { + "required": false, + "type": "BuildInfo", + "description": "Info about how Asterisk was built" + }, + "system": { + "required": false, + "type": "SystemInfo", + "description": "Info about the system running Asterisk" + }, + "config": { + "required": false, + "type": "ConfigInfo", + "description": "Info about Asterisk configuration" + }, + "status": { + "required": false, + "type": "StatusInfo", + "description": "Info about Asterisk status" + } + } + }, + "AsteriskPing": { + "id": "AsteriskPing", + "description": "Asterisk ping information", + "properties": { + "asterisk_id": { + "required": true, + "type": "string", + "description": "Asterisk id info" + }, + "ping": { + "required": true, + "type": "string", + "description": "Always string value is pong" + }, + "timestamp": { + "required": true, + "type": "string", + "description": "The timestamp string of request received time" + } + } + }, + "Module": { + "id": "Module", + "description": "Details of an Asterisk module", + "properties": { + "name": { + "type": "string", + "description": "The name of this module", + "required": true + }, + "description": { + "type": "string", + "description": "The description of this module", + "required": true + }, + "use_count": { + "type": "int", + "description": "The number of times this module is being used", + "required": true + }, + "status": { + "type": "string", + "description": "The running status of this module", + "required": true + }, + "support_level": { + "type": "string", + "description": "The support state of this module", + "required": true + } + } + }, + "LogChannel": { + "id": "LogChannel", + "description": "Details of an Asterisk log channel", + "properties": { + "channel": { + "type": "string", + "description": "The log channel path", + "required": true + }, + "type": { + "type": "string", + "description": "Types of logs for the log channel", + "required": true + }, + "status": { + "type": "string", + "description": "Whether or not a log type is enabled", + "required": true + }, + "configuration": { + "type": "string", + "description": "The various log levels", + "required": true + } + } + }, + "Variable": { + "id": "Variable", + "description": "The value of a channel variable", + "properties": { + "value": { + "required": true, + "type": "string", + "description": "The value of the variable requested" + } + } + }, + "ConfigTuple": { + "id": "ConfigTuple", + "description": "A key/value pair that makes up part of a configuration object.", + "properties": { + "attribute": { + "required": true, + "type": "string", + "description": "A configuration object attribute." + }, + "value": { + "required": true, + "type": "string", + "description": "The value for the attribute." + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_4_1_3/bridges.json b/codegen/src/main/resources/codegen-data/ari_4_1_3/bridges.json new file mode 100644 index 00000000..3e757e98 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_4_1_3/bridges.json @@ -0,0 +1,765 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/bridges.{format}", + "requiresModules": [ + "res_stasis_recording", + "res_stasis_playback" + ], + "apis": [ + { + "path": "/bridges", + "description": "Active bridges", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all active bridges in Asterisk.", + "nickname": "list", + "responseClass": "List[Bridge]" + }, + { + "httpMethod": "POST", + "summary": "Create a new bridge.", + "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", + "nickname": "create", + "responseClass": "Bridge", + "parameters": [ + { + "name": "type", + "description": "Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media, video_sfu, video_single).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "bridgeId", + "description": "Unique ID to give to the bridge being created.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Name to give to the bridge being created.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}", + "description": "Individual bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Create a new bridge or updates an existing one.", + "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", + "nickname": "createWithId", + "responseClass": "Bridge", + "parameters": [ + { + "name": "type", + "description": "Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media, video_sfu, video_single) to set.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "bridgeId", + "description": "Unique ID to give to the bridge being created.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Set the name of the bridge.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ] + }, + { + "httpMethod": "GET", + "summary": "Get bridge details.", + "nickname": "get", + "responseClass": "Bridge", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Shut down a bridge.", + "notes": "If any channels are in this bridge, they will be removed and resume whatever they were doing beforehand.", + "nickname": "destroy", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/addChannel", + "description": "Add a channel to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Add a channel to a bridge.", + "nickname": "addChannel", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channel", + "description": "Ids of channels to add to bridge", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "role", + "description": "Channel's role in the bridge", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "absorbDTMF", + "description": "Absorb DTMF coming from this channel, preventing it to pass through to the bridge", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "mute", + "description": "Mute audio from this channel, preventing it to pass through to the bridge", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Channel not found" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application; Channel currently recording" + }, + { + "code": 422, + "reason": "Channel not in Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/removeChannel", + "description": "Remove a channel from a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Remove a channel from a bridge.", + "nickname": "removeChannel", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channel", + "description": "Ids of channels to remove from bridge", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Channel not found" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + }, + { + "code": 422, + "reason": "Channel not in this bridge" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/videoSource/{channelId}", + "description": "Set a channel as the video source in a multi-party bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Set a channel as the video source in a multi-party mixing bridge. This operation has no effect on bridges with two or fewer participants.", + "nickname": "setVideoSource", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge or Channel not found" + }, + { + "code": 409, + "reason": "Channel not in Stasis application" + }, + { + "code": 422, + "reason": "Channel not in this Bridge" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/videoSource", + "description": "Removes any explicit video source", + "operations": [ + { + "httpMethod": "DELETE", + "summary": "Removes any explicit video source in a multi-party mixing bridge. This operation has no effect on bridges with two or fewer participants. When no explicit video source is set, talk detection will be used to determine the active video stream.", + "nickname": "clearVideoSource", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/moh", + "description": "Play music on hold to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play music on hold to a bridge or change the MOH class that is playing.", + "nickname": "startMoh", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "mohClass", + "description": "Channel's id", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing music on hold to a bridge.", + "notes": "This will only stop music on hold being played via POST bridges/{bridgeId}/moh.", + "nickname": "stopMoh", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/play", + "description": "Play media to the participants of a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media on a bridge.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "play", + "responseClass": "Playback", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "playbackId", + "description": "Playback Id.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/play/{playbackId}", + "description": "Play media to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media on a bridge.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "playWithId", + "responseClass": "Playback", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + + } + ] + }, + { + "path": "/bridges/{bridgeId}/record", + "description": "Record audio on a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start a recording.", + "notes": "This records the mixed audio from all channels participating in this bridge.", + "nickname": "record", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Recording's filename", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "maxDurationSeconds", + "description": "Maximum duration of the recording, in seconds. 0 for no limit.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "maxSilenceSeconds", + "description": "Maximum duration of silence, in seconds. 0 for no limit.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "ifExists", + "description": "Action to take if a recording with the same name already exists.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "fail", + "allowableValues": { + "valueType": "LIST", + "values": [ + "fail", + "overwrite", + "append" + ] + } + }, + { + "name": "beep", + "description": "Play beep when recording begins", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "terminateOn", + "description": "DTMF input to terminate recording.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "any", + "*", + "#" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge is not in a Stasis application; A recording with the same name already exists on the system and can not be overwritten because it is in progress or ifExists=fail" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + } + ], + "models": { + "Bridge": { + "id": "Bridge", + "description": "The merging of media from one or more channels.\n\nEveryone on the bridge receives the same audio.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for this bridge", + "required": true + }, + "technology": { + "type": "string", + "description": "Name of the current bridging technology", + "required": true + }, + "bridge_type": { + "type": "string", + "description": "Type of bridge technology", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "mixing", + "holding" + ] + } + }, + "bridge_class": { + "type": "string", + "description": "Bridging class", + "required": true + }, + "creator": { + "type": "string", + "description": "Entity that created the bridge", + "required": true + }, + "name": { + "type": "string", + "description": "Name the creator gave the bridge", + "required": true + }, + "channels": { + "type": "List[string]", + "description": "Ids of channels participating in this bridge", + "required": true + }, + "video_mode": { + "type": "string", + "description": "The video mode the bridge is using. One of 'none', 'talker', 'sfu', or 'single'.", + "required": false + }, + "video_source_id": { + "type": "string", + "description": "The ID of the channel that is the source of video in this bridge, if one exists.", + "required": false + }, + "creationtime": { + "required": true, + "type": "Date", + "description": "Timestamp when bridge was created" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_4_1_3/channels.json b/codegen/src/main/resources/codegen-data/ari_4_1_3/channels.json new file mode 100644 index 00000000..20dd4e9a --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_4_1_3/channels.json @@ -0,0 +1,2172 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/channels.{format}", + "requiresModules": [ + "res_stasis_answer", + "res_stasis_playback", + "res_stasis_recording", + "res_stasis_snoop" + ], + "apis": [ + { + "path": "/channels", + "description": "Active channels", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all active channels in Asterisk.", + "nickname": "list", + "responseClass": "List[Channel]" + }, + { + "httpMethod": "POST", + "summary": "Create a new channel (originate).", + "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.", + "nickname": "originate", + "responseClass": "Channel", + "parameters": [ + { + "name": "endpoint", + "description": "Endpoint to call.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to dial after the endpoint answers. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to dial after the endpoint answers. If omitted, uses 'default'. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to dial after the endpoint answers. If omitted, uses 1. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "long" + }, + { + "name": "label", + "description": "The label to dial after the endpoint answers. Will supersede 'priority' if provided. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The application that is subscribed to the originated channel. When the channel is answered, it will be passed to this Stasis application. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "callerId", + "description": "CallerID to use when dialing the endpoint or extension.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 30 + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "The unique id of the channel which is originating this one.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "formats", + "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for originating a channel." + }, + { + "code": 409, + "reason": "Channel with given unique ID already exists." + } + ] + } + ] + }, + { + "path": "/channels/create", + "description": "Create a channel and place it in a Stasis app, but do not dial the channel yet.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Create channel.", + "nickname": "create", + "responseClass": "Channel", + "parameters": [ + { + "name": "endpoint", + "description": "Endpoint for channel communication", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "Stasis Application to place channel into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "Unique ID of the calling channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "formats", + "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 409, + "reason": "Channel with given unique ID already exists." + } + ] + } + ] + }, + { + "path": "/channels/{channelId}", + "description": "Active channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "Channel details.", + "nickname": "get", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + } + ] + }, + { + "httpMethod": "POST", + "summary": "Create a new channel (originate with id).", + "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.", + "nickname": "originateWithId", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "endpoint", + "description": "Endpoint to call.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to dial after the endpoint answers. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to dial after the endpoint answers. If omitted, uses 'default'. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to dial after the endpoint answers. If omitted, uses 1. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "long" + }, + { + "name": "label", + "description": "The label to dial after the endpoint answers. Will supersede 'priority' if provided. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The application that is subscribed to the originated channel. When the channel is answered, it will be passed to this Stasis application. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "callerId", + "description": "CallerID to use when dialing the endpoint or extension.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 30 + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "The unique id of the channel which is originating this one.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "formats", + "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for originating a channel." + }, + { + "code": 409, + "reason": "Channel with given unique ID already exists." + } + ] + + }, + { + "httpMethod": "DELETE", + "summary": "Delete (i.e. hangup) a channel.", + "nickname": "hangup", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "reason", + "description": "Reason for hanging up the channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defalutValue": "normal", + "allowableValues": { + "valueType": "LIST", + "values": [ + "normal", + "busy", + "congestion", + "no_answer", + "timeout", + "rejected", + "unallocated", + "normal_unspecified", + "number_incomplete", + "codec_mismatch", + "interworking", + "failure", + "answered_elsewhere" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid reason for hangup provided" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/continue", + "description": "Exit application; continue execution in the dialplan", + "operations": [ + { + "httpMethod": "POST", + "summary": "Exit application; continue execution in the dialplan.", + "nickname": "continueInDialplan", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "label", + "description": "The label to continue to - will supersede 'priority' if both are provided.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/move", + "description": "Move the channel from one Stasis application to another.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Move the channel from one Stasis application to another.", + "nickname": "move", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The channel will be passed to this Stasis application.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": "404", + "reason": "Channel not found" + }, + { + "code": "409", + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/redirect", + "description": "Inform the channel that it should redirect itself to a different location. Note that this will almost certainly cause the channel to exit the application.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Redirect the channel to a different location.", + "nickname": "redirect", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "endpoint", + "description": "The endpoint to redirect the channel to", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Endpoint parameter not provided" + }, + { + "code": 404, + "reason": "Channel or endpoint not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 422, + "reason": "Endpoint is not the same type as the channel" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/answer", + "description": "Answer a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Answer a channel.", + "nickname": "answer", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/ring", + "description": "Send a ringing indication to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Indicate ringing to a channel.", + "nickname": "ring", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop ringing indication on a channel if locally generated.", + "nickname": "ringStop", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/dtmf", + "description": "Send DTMF to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Send provided DTMF to a given channel.", + "nickname": "sendDTMF", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "dtmf", + "description": "DTMF To send.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "before", + "description": "Amount of time to wait before DTMF digits (specified in milliseconds) start.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0 + }, + { + "name": "between", + "description": "Amount of time in between DTMF digits (specified in milliseconds).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 100 + }, + { + "name": "duration", + "description": "Length of each DTMF digit (specified in milliseconds).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 100 + }, + { + "name": "after", + "description": "Amount of time to wait after DTMF digits (specified in milliseconds) end.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0 + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "DTMF is required" + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/mute", + "description": "Mute a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Mute a channel.", + "nickname": "mute", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "Direction in which to mute audio", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both", + "in", + "out" + ] + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unmute a channel.", + "nickname": "unmute", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "Direction in which to unmute audio", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both", + "in", + "out" + ] + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/hold", + "description": "Put a channel on hold", + "operations": [ + { + "httpMethod": "POST", + "summary": "Hold a channel.", + "nickname": "hold", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Remove a channel from hold.", + "nickname": "unhold", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/moh", + "description": "Play music on hold to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play music on hold to a channel.", + "notes": "Using media operations such as /play on a channel playing MOH in this manner will suspend MOH without resuming automatically. If continuing music on hold is desired, the stasis application must reinitiate music on hold.", + "nickname": "startMoh", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "mohClass", + "description": "Music on hold class to use", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing music on hold to a channel.", + "nickname": "stopMoh", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/silence", + "description": "Play silence to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play silence to a channel.", + "notes": "Using media operations such as /play on a channel playing silence in this manner will suspend silence without resuming automatically.", + "nickname": "startSilence", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing silence to a channel.", + "nickname": "stopSilence", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/play", + "description": "Play media to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "play", + "responseClass": "Playback", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000 + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/play/{playbackId}", + "description": "Play media to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media and specify the playbackId.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "playWithId", + "responseClass": "Playback", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000 + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/record", + "description": "Record audio from a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start a recording.", + "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.", + "nickname": "record", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Recording's filename", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "maxDurationSeconds", + "description": "Maximum duration of the recording, in seconds. 0 for no limit", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "maxSilenceSeconds", + "description": "Maximum duration of silence, in seconds. 0 for no limit", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "ifExists", + "description": "Action to take if a recording with the same name already exists.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "fail", + "allowableValues": { + "valueType": "LIST", + "values": [ + "fail", + "overwrite", + "append" + ] + } + }, + { + "name": "beep", + "description": "Play beep when recording begins", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "terminateOn", + "description": "DTMF input to terminate recording", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "any", + "*", + "#" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "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" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/variable", + "description": "Variables on a channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the value of a channel variable or function.", + "nickname": "getChannelVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The channel variable or function to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Channel or variable not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "POST", + "summary": "Set the value of a channel variable or function.", + "nickname": "setChannelVar", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The channel variable or function to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/snoop", + "description": "Snoop (spy/whisper) on a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start snooping.", + "notes": "Snoop (spy/whisper) on a specific channel.", + "nickname": "snoopChannel", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "spy", + "description": "Direction of audio to spy on", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "whisper", + "description": "Direction of audio to whisper into", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "app", + "description": "Application the snooping channel is placed into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "snoopId", + "description": "Unique ID to assign to snooping channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/snoop/{snoopId}", + "description": "Snoop (spy/whisper) on a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start snooping.", + "notes": "Snoop (spy/whisper) on a specific channel.", + "nickname": "snoopChannelWithId", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "snoopId", + "description": "Unique ID to assign to snooping channel", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "spy", + "description": "Direction of audio to spy on", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "whisper", + "description": "Direction of audio to whisper into", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "app", + "description": "Application the snooping channel is placed into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/dial", + "description": "Dial a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Dial a created channel.", + "nickname": "dial", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "caller", + "description": "Channel ID of caller", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Dial timeout", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel cannot be found." + }, + { + "code": 409, + "reason": "Channel cannot be dialed." + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/rtp_statistics", + "description": "Get RTP statistics information for RTP on a channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "RTP stats on a channel.", + "nickname": "rtpstatistics", + "responseClass": "RTPstat", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel cannot be found." + } + ] + } + ] + }, + { + "path": "/channels/externalMedia", + "description": "Create a channel to an External Media source/sink.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start an External Media session.", + "notes": "Create a channel to an External Media source/sink.", + "nickname": "externalMedia", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "Stasis Application to place channel into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "external_host", + "description": "Hostname/ip:port of external host", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "encapsulation", + "description": "Payload encapsulation protocol", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "rtp", + "allowableValues": { + "valueType": "LIST", + "values": [ + "rtp" + ] + } + }, + { + "name": "transport", + "description": "Transport protocol", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "udp", + "allowableValues": { + "valueType": "LIST", + "values": [ + "udp" + ] + } + }, + { + "name": "connection_type", + "description": "Connection type (client/server)", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "client", + "allowableValues": { + "valueType": "LIST", + "values": [ + "client" + ] + } + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "External media direction", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 409, + "reason": "Channel is not in a Stasis application; Channel is already bridged" + } + ] + } + ] + } + ], + "models": { + "Dialed": { + "id": "Dialed", + "description": "Dialed channel information.", + "properties": {} + }, + "DialplanCEP": { + "id": "DialplanCEP", + "description": "Dialplan location (context/extension/priority)", + "properties": { + "context": { + "required": true, + "type": "string", + "description": "Context in the dialplan" + }, + "exten": { + "required": true, + "type": "string", + "description": "Extension in the dialplan" + }, + "priority": { + "required": true, + "type": "long", + "description": "Priority in the dialplan" + }, + "app_name": { + "required": true, + "type": "string", + "description": "Name of current dialplan application" + }, + "app_data": { + "required": true, + "type": "string", + "description": "Parameter of current dialplan application" + } + } + }, + "CallerID": { + "id": "CallerID", + "description": "Caller identification", + "properties": { + "name": { + "required": true, + "type": "string" + }, + "number": { + "required": true, + "type": "string" + } + } + }, + "RTPstat": { + "id": "RTPstat", + "description": "A statistics of a RTP.", + "properties": { + "txcount": { + "required": true, + "type": "int", + "description": "Number of packets transmitted." + }, + "rxcount": { + "required": true, + "type": "int", + "description": "Number of packets received." + }, + "txjitter": { + "required": false, + "type": "double", + "description": "Jitter on transmitted packets." + }, + "rxjitter": { + "required": false, + "type": "double", + "description": "Jitter on received packets." + }, + "remote_maxjitter": { + "required": false, + "type": "double", + "description": "Maximum jitter on remote side." + }, + "remote_minjitter": { + "required": false, + "type": "double", + "description": "Minimum jitter on remote side." + }, + "remote_normdevjitter": { + "required": false, + "type": "double", + "description": "Average jitter on remote side." + }, + "remote_stdevjitter": { + "required": false, + "type": "double", + "description": "Standard deviation jitter on remote side." + }, + "local_maxjitter": { + "required": false, + "type": "double", + "description": "Maximum jitter on local side." + }, + "local_minjitter": { + "required": false, + "type": "double", + "description": "Minimum jitter on local side." + }, + "local_normdevjitter": { + "required": false, + "type": "double", + "description": "Average jitter on local side." + }, + "local_stdevjitter": { + "required": false, + "type": "double", + "description": "Standard deviation jitter on local side." + }, + "txploss": { + "required": true, + "type": "int", + "description": "Number of transmitted packets lost." + }, + "rxploss": { + "required": true, + "type": "int", + "description": "Number of received packets lost." + }, + "remote_maxrxploss": { + "required": false, + "type": "double", + "description": "Maximum number of packets lost on remote side." + }, + "remote_minrxploss": { + "required": false, + "type": "double", + "description": "Minimum number of packets lost on remote side." + }, + "remote_normdevrxploss": { + "required": false, + "type": "double", + "description": "Average number of packets lost on remote side." + }, + "remote_stdevrxploss": { + "required": false, + "type": "double", + "description": "Standard deviation packets lost on remote side." + }, + "local_maxrxploss": { + "required": false, + "type": "double", + "description": "Maximum number of packets lost on local side." + }, + "local_minrxploss": { + "required": false, + "type": "double", + "description": "Minimum number of packets lost on local side." + }, + "local_normdevrxploss": { + "required": false, + "type": "double", + "description": "Average number of packets lost on local side." + }, + "local_stdevrxploss": { + "required": false, + "type": "double", + "description": "Standard deviation packets lost on local side." + }, + "rtt": { + "required": false, + "type": "double", + "description": "Total round trip time." + }, + "maxrtt": { + "required": false, + "type": "double", + "description": "Maximum round trip time." + }, + "minrtt": { + "required": false, + "type": "double", + "description": "Minimum round trip time." + }, + "normdevrtt": { + "required": false, + "type": "double", + "description": "Average round trip time." + }, + "stdevrtt": { + "required": false, + "type": "double", + "description": "Standard deviation round trip time." + }, + "local_ssrc": { + "required": true, + "type": "int", + "description": "Our SSRC." + }, + "remote_ssrc": { + "required": true, + "type": "int", + "description": "Their SSRC." + }, + "txoctetcount": { + "required": true, + "type": "int", + "description": "Number of octets transmitted." + }, + "rxoctetcount": { + "required": true, + "type": "int", + "description": "Number of octets received." + }, + "channel_uniqueid": { + "required": true, + "type": "string", + "description": "The Asterisk channel's unique ID that owns this instance." + } + } + }, + "Channel": { + "id": "Channel", + "description": "A specific communication connection between Asterisk and an Endpoint.", + "properties": { + "id": { + "required": true, + "type": "string", + "description": "Unique identifier of the channel.\n\nThis is the same as the Uniqueid field in AMI." + }, + "name": { + "required": true, + "type": "string", + "description": "Name of the channel (i.e. SIP/foo-0000a7e3)" + }, + "state": { + "required": true, + "type": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "Down", + "Rsrved", + "OffHook", + "Dialing", + "Ring", + "Ringing", + "Up", + "Busy", + "Dialing Offhook", + "Pre-ring", + "Unknown" + ] + } + }, + "caller": { + "required": true, + "type": "CallerID" + }, + "connected": { + "required": true, + "type": "CallerID" + }, + "accountcode": { + "required": true, + "type": "string" + }, + "dialplan": { + "required": true, + "type": "DialplanCEP", + "description": "Current location in the dialplan" + }, + "creationtime": { + "required": true, + "type": "Date", + "description": "Timestamp when channel was created" + }, + "language": { + "required": true, + "type": "string", + "description": "The default spoken language" + }, + "channelvars": { + "required": false, + "type": "object", + "description": "Channel variables" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_4_1_3/deviceStates.json b/codegen/src/main/resources/codegen-data/ari_4_1_3/deviceStates.json new file mode 100644 index 00000000..bd389355 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_4_1_3/deviceStates.json @@ -0,0 +1,154 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "Kevin Harwell ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/deviceStates.{format}", + "requiresModules": [ + "res_stasis_device_state" + ], + "apis": [ + { + "path": "/deviceStates", + "description": "Device states", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all ARI controlled device states.", + "nickname": "list", + "responseClass": "List[DeviceState]" + } + ] + }, + { + "path": "/deviceStates/{deviceName}", + "description": "Device state", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve the current state of a device.", + "nickname": "get", + "responseClass": "DeviceState", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Change the state of a device controlled by ARI. (Note - implicitly creates the device state).", + "nickname": "update", + "responseClass": "void", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "deviceState", + "description": "Device state value", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "NOT_INUSE", + "INUSE", + "BUSY", + "INVALID", + "UNAVAILABLE", + "RINGING", + "RINGINUSE", + "ONHOLD" + ] + } + + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Device name is missing" + }, + { + "code": 409, + "reason": "Uncontrolled device specified" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Destroy a device-state controlled by ARI.", + "nickname": "delete", + "responseClass": "void", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Device name is missing" + }, + { + "code": 409, + "reason": "Uncontrolled device specified" + } + ] + } + ] + } + ], + "models": { + "DeviceState": { + "id": "DeviceState", + "description": "Represents the state of a device.", + "properties": { + "name": { + "type": "string", + "description": "Name of the device.", + "required": true + }, + "state": { + "type": "string", + "description": "Device's state", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "UNKNOWN", + "NOT_INUSE", + "INUSE", + "BUSY", + "INVALID", + "UNAVAILABLE", + "RINGING", + "RINGINUSE", + "ONHOLD" + ] + } + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_4_1_3/endpoints.json b/codegen/src/main/resources/codegen-data/ari_4_1_3/endpoints.json new file mode 100644 index 00000000..1f77d370 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_4_1_3/endpoints.json @@ -0,0 +1,263 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/endpoints.{format}", + "apis": [ + { + "path": "/endpoints", + "description": "Asterisk endpoints", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all endpoints.", + "nickname": "list", + "responseClass": "List[Endpoint]" + } + ] + }, + { + "path": "/endpoints/sendMessage", + "description": "Send a message to some technology URI or endpoint.", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Send a message to some technology URI or endpoint.", + "nickname": "sendMessage", + "responseClass": "void", + "parameters": [ + { + "name": "to", + "description": "The endpoint resource or technology specific URI to send the message to. Valid resources are sip, pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "from", + "description": "The endpoint resource or technology specific identity to send this message from. Valid resources are sip, pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "body", + "description": "The body of the message", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "descriptioni": "The \"variables\" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, pjsip and sip resource types will add the key/value pairs as SIP headers,", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoint not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}", + "description": "Asterisk endpoints", + "operations": [ + { + "httpMethod": "GET", + "summary": "List available endoints for a given endpoint technology.", + "nickname": "listByTech", + "responseClass": "List[Endpoint]", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoints (sip,iax2,...)", + "paramType": "path", + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Endpoints not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}/{resource}", + "description": "Single endpoint", + "operations": [ + { + "httpMethod": "GET", + "summary": "Details for an endpoint.", + "nickname": "get", + "responseClass": "Endpoint", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "resource", + "description": "ID of the endpoint", + "paramType": "path", + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoints not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}/{resource}/sendMessage", + "description": "Send a message to some endpoint in a technology.", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Send a message to some endpoint in a technology.", + "nickname": "sendMessageToEndpoint", + "responseClass": "void", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "resource", + "description": "ID of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "from", + "description": "The endpoint resource or technology specific identity to send this message from. Valid resources are sip, pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "body", + "description": "The body of the message", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "descriptioni": "The \"variables\" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, pjsip and sip resource types will add the key/value pairs as SIP headers,", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoint not found" + } + ] + } + ] + } + ], + "models": { + "Endpoint": { + "id": "Endpoint", + "description": "An external device that may offer/accept calls to/from Asterisk.\n\nUnlike most resources, which have a single unique identifier, an endpoint is uniquely identified by the technology/resource pair.", + "properties": { + "technology": { + "type": "string", + "description": "Technology of the endpoint", + "required": true + }, + "resource": { + "type": "string", + "description": "Identifier of the endpoint, specific to the given technology.", + "required": true + }, + "state": { + "type": "string", + "description": "Endpoint's state", + "required": false, + "allowableValues": { + "valueType": "LIST", + "values": [ + "unknown", + "offline", + "online" + ] + } + }, + "channel_ids": { + "type": "List[string]", + "description": "Id's of channels associated with this endpoint", + "required": true + } + } + }, + "TextMessage": { + "id": "TextMessage", + "description": "A text message.", + "properties": { + "from": { + "type": "string", + "description": "A technology specific URI specifying the source of the message. For sip and pjsip technologies, any SIP URI can be specified. For xmpp, the URI must correspond to the client connection being used to send the message.", + "required": true + }, + "to": { + "type": "string", + "description": "A technology specific URI specifying the destination of the message. Valid technologies include sip, pjsip, and xmp. The destination of a message should be an endpoint.", + "required": true + }, + "body": { + "type": "string", + "description": "The text of the message.", + "required": true + }, + "variables": { + "type": "object", + "description": "Technology specific key/value pairs (JSON object) associated with the message.", + "required": false + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_4_1_3/events.json b/codegen/src/main/resources/codegen-data/ari_4_1_3/events.json new file mode 100644 index 00000000..c9822f6c --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_4_1_3/events.json @@ -0,0 +1,918 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.2", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/events.{format}", + "requiresModules": [ + "res_http_websocket" + ], + "apis": [ + { + "path": "/events", + "description": "Events from Asterisk to applications", + "operations": [ + { + "httpMethod": "GET", + "upgrade": "websocket", + "websocketProtocol": "ari", + "summary": "WebSocket connection for events.", + "nickname": "eventWebsocket", + "responseClass": "Message", + "parameters": [ + { + "name": "app", + "description": "Applications to subscribe to.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "subscribeAll", + "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'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean" + } + ] + } + ] + }, + { + "path": "/events/user/{eventName}", + "description": "Stasis application user events", + "operations": [ + { + "httpMethod": "POST", + "summary": "Generate a user event.", + "nickname": "userEvent", + "responseClass": "void", + "parameters": [ + { + "name": "eventName", + "description": "Event name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "application", + "description": "The name of the application that will receive this event", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "source", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}/{resource}, deviceState:{deviceName}", + "paramType": "query", + "required": false, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds custom key/value pairs to add to the user event. Ex. { \"variables\": { \"key\": \"value\" } }", + "paramType": "body", + "required": false, + "allowMultiple": false, + "dataType": "containers" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 422, + "reason": "Event source not found." + }, + { + "code": 400, + "reason": "Invalid even tsource URI or userevent data." + } + ] + } + ] + } + ], + "models": { + "Message": { + "id": "Message", + "description": "Base type for errors and events", + "discriminator": "type", + "properties": { + "type": { + "type": "string", + "required": true, + "description": "Indicates the type of this message." + }, + "asterisk_id": { + "type": "string", + "required": false, + "description": "The unique ID for the Asterisk instance that raised this event." + } + }, + "subTypes": [ + "MissingParams", + "Event" + ] + }, + "MissingParams": { + "id": "MissingParams", + "description": "Error event sent when required params are missing.", + "properties": { + "params": { + "required": true, + "type": "List[string]", + "description": "A list of the missing parameters" + } + } + }, + "Event": { + "id": "Event", + "description": "Base type for asynchronous events from Asterisk.", + "properties": { + "application": { + "type": "string", + "description": "Name of the application receiving the event.", + "required": true + }, + "timestamp": { + "type": "Date", + "description": "Time at which this event was created.", + "required": true + } + }, + "subTypes": [ + "DeviceStateChanged", + "PlaybackStarted", + "PlaybackContinuing", + "PlaybackFinished", + "RecordingStarted", + "RecordingFinished", + "RecordingFailed", + "ApplicationMoveFailed", + "ApplicationReplaced", + "BridgeCreated", + "BridgeDestroyed", + "BridgeMerged", + "BridgeBlindTransfer", + "BridgeAttendedTransfer", + "BridgeVideoSourceChanged", + "ChannelCreated", + "ChannelDestroyed", + "ChannelEnteredBridge", + "ChannelLeftBridge", + "ChannelStateChange", + "ChannelDtmfReceived", + "ChannelDialplan", + "ChannelCallerId", + "ChannelUserevent", + "ChannelHangupRequest", + "ChannelVarset", + "ChannelTalkingStarted", + "ChannelTalkingFinished", + "ChannelHold", + "ChannelUnhold", + "ContactStatusChange", + "EndpointStateChange", + "Dial", + "StasisEnd", + "StasisStart", + "TextMessageReceived", + "ChannelConnectedLine", + "PeerStatusChange" + ] + }, + "ContactInfo": { + "id": "ContactInfo", + "description": "Detailed information about a contact on an endpoint.", + "properties": { + "uri": { + "type": "string", + "description": "The location of the contact.", + "required": true + }, + "contact_status": { + "type": "string", + "description": "The current status of the contact.", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "Unreachable", + "Reachable", + "Unknown", + "NonQualified", + "Removed" + ] + } + }, + "aor": { + "type": "string", + "description": "The Address of Record this contact belongs to.", + "required": true + }, + "roundtrip_usec": { + "type": "string", + "description": "Current round trip time, in microseconds, for the contact.", + "required": false + } + } + }, + "Peer": { + "id": "Peer", + "description": "Detailed information about a remote peer that communicates with Asterisk.", + "properties": { + "peer_status": { + "type": "string", + "description": "The current state of the peer. Note that the values of the status are dependent on the underlying peer technology.", + "required": true + }, + "cause": { + "type": "string", + "description": "An optional reason associated with the change in peer_status.", + "required": false + }, + "address": { + "type": "string", + "description": "The IP address of the peer.", + "required": false + }, + "port": { + "type": "string", + "description": "The port of the peer.", + "required": false + }, + "time": { + "type": "string", + "description": "The last known time the peer was contacted.", + "required": false + } + } + }, + "DeviceStateChanged": { + "id": "DeviceStateChanged", + "description": "Notification that a device state has changed.", + "properties": { + "device_state": { + "type": "DeviceState", + "description": "Device state object", + "required": true + } + } + }, + "PlaybackStarted": { + "id": "PlaybackStarted", + "description": "Event showing the start of a media playback operation.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "PlaybackContinuing": { + "id": "PlaybackContinuing", + "description": "Event showing the continuation of a media playback operation from one media URI to the next in the list.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "PlaybackFinished": { + "id": "PlaybackFinished", + "description": "Event showing the completion of a media playback operation.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "RecordingStarted": { + "id": "RecordingStarted", + "description": "Event showing the start of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "RecordingFinished": { + "id": "RecordingFinished", + "description": "Event showing the completion of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "RecordingFailed": { + "id": "RecordingFailed", + "description": "Event showing failure of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "ApplicationMoveFailed": { + "id": "ApplicationMoveFailed", + "description": "Notification that trying to move a channel to another Stasis application failed.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + }, + "destination": { + "required": true, + "type": "string" + }, + "args": { + "required": true, + "type": "List[string]", + "description": "Arguments to the application" + } + } + }, + "ApplicationReplaced": { + "id": "ApplicationReplaced", + "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.", + "properties": {} + }, + "BridgeCreated": { + "id": "BridgeCreated", + "description": "Notification that a bridge has been created.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeDestroyed": { + "id": "BridgeDestroyed", + "description": "Notification that a bridge has been destroyed.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeMerged": { + "id": "BridgeMerged", + "description": "Notification that one bridge has merged into another.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "bridge_from": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeVideoSourceChanged": { + "id": "BridgeVideoSourceChanged", + "description": "Notification that the source of video in a bridge has changed.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "old_video_source_id": { + "required": false, + "type": "string" + } + } + }, + "BridgeBlindTransfer": { + "id": "BridgeBlindTransfer", + "description": "Notification that a blind transfer has occurred.", + "properties": { + "channel": { + "description": "The channel performing the blind transfer", + "required": true, + "type": "Channel" + }, + "replace_channel": { + "description": "The channel that is replacing transferer when the transferee(s) can not be transferred directly", + "required": false, + "type": "Channel" + }, + "transferee": { + "description": "The channel that is being transferred", + "required": false, + "type": "Channel" + }, + "exten": { + "description": "The extension transferred to", + "required": true, + "type": "string" + }, + "context": { + "description": "The context transferred to", + "required": true, + "type": "string" + }, + "result": { + "description": "The result of the transfer attempt", + "required": true, + "type": "string" + }, + "is_external": { + "description": "Whether the transfer was externally initiated or not", + "required": true, + "type": "boolean" + }, + "bridge": { + "description": "The bridge being transferred", + "type": "Bridge" + } + } + }, + "BridgeAttendedTransfer": { + "id": "BridgeAttendedTransfer", + "description": "Notification that an attended transfer has occurred.", + "properties": { + "transferer_first_leg": { + "description": "First leg of the transferer", + "required": true, + "type": "Channel" + }, + "transferer_second_leg": { + "description": "Second leg of the transferer", + "required": true, + "type": "Channel" + }, + "replace_channel": { + "description": "The channel that is replacing transferer_first_leg in the swap", + "required": false, + "type": "Channel" + }, + "transferee": { + "description": "The channel that is being transferred", + "required": false, + "type": "Channel" + }, + "transfer_target": { + "description": "The channel that is being transferred to", + "required": false, + "type": "Channel" + }, + "result": { + "description": "The result of the transfer attempt", + "required": true, + "type": "string" + }, + "is_external": { + "description": "Whether the transfer was externally initiated or not", + "required": true, + "type": "boolean" + }, + "transferer_first_leg_bridge": { + "description": "Bridge the transferer first leg is in", + "type": "Bridge" + }, + "transferer_second_leg_bridge": { + "description": "Bridge the transferer second leg is in", + "type": "Bridge" + }, + "destination_type": { + "description": "How the transfer was accomplished", + "required": true, + "type": "string" + }, + "destination_bridge": { + "description": "Bridge that survived the merge result", + "type": "string" + }, + "destination_application": { + "description": "Application that has been transferred into", + "type": "string" + }, + "destination_link_first_leg": { + "description": "First leg of a link transfer result", + "type": "Channel" + }, + "destination_link_second_leg": { + "description": "Second leg of a link transfer result", + "type": "Channel" + }, + "destination_threeway_channel": { + "description": "Transferer channel that survived the threeway result", + "type": "Channel" + }, + "destination_threeway_bridge": { + "description": "Bridge that survived the threeway result", + "type": "Bridge" + } + } + }, + "ChannelCreated": { + "id": "ChannelCreated", + "description": "Notification that a channel has been created.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelDestroyed": { + "id": "ChannelDestroyed", + "description": "Notification that a channel has been destroyed.", + "properties": { + "cause": { + "required": true, + "description": "Integer representation of the cause of the hangup", + "type": "int" + }, + "cause_txt": { + "required": true, + "description": "Text representation of the cause of the hangup", + "type": "string" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelEnteredBridge": { + "id": "ChannelEnteredBridge", + "description": "Notification that a channel has entered a bridge.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "channel": { + "type": "Channel" + } + } + }, + "ChannelLeftBridge": { + "id": "ChannelLeftBridge", + "description": "Notification that a channel has left a bridge.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelStateChange": { + "id": "ChannelStateChange", + "description": "Notification of a channel's state change.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelDtmfReceived": { + "id": "ChannelDtmfReceived", + "description": "DTMF received on a channel.\n\nThis event is sent when the DTMF ends. There is no notification about the start of DTMF", + "properties": { + "digit": { + "required": true, + "type": "string", + "description": "DTMF digit received (0-9, A-E, # or *)" + }, + "duration_ms": { + "required": true, + "type": "int", + "description": "Number of milliseconds DTMF was received" + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which DTMF was received" + } + } + }, + "ChannelDialplan": { + "id": "ChannelDialplan", + "description": "Channel changed location in the dialplan.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that changed dialplan location." + }, + "dialplan_app": { + "required": true, + "type": "string", + "description": "The application about to be executed." + }, + "dialplan_app_data": { + "required": true, + "type": "string", + "description": "The data to be passed to the application." + } + } + }, + "ChannelCallerId": { + "id": "ChannelCallerId", + "description": "Channel changed Caller ID.", + "properties": { + "caller_presentation": { + "required": true, + "type": "int", + "description": "The integer representation of the Caller Presentation value." + }, + "caller_presentation_txt": { + "required": true, + "type": "string", + "description": "The text representation of the Caller Presentation value." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that changed Caller ID." + } + } + }, + "ChannelUserevent": { + "id": "ChannelUserevent", + "description": "User-generated event with additional user-defined fields in the object.", + "properties": { + "eventname": { + "required": true, + "type": "string", + "description": "The name of the user event." + }, + "channel": { + "required": false, + "type": "Channel", + "description": "A channel that is signaled with the user event." + }, + "bridge": { + "required": false, + "type": "Bridge", + "description": "A bridge that is signaled with the user event." + }, + "endpoint": { + "required": false, + "type": "Endpoint", + "description": "A endpoint that is signaled with the user event." + }, + "userevent": { + "required": true, + "type": "object", + "description": "Custom Userevent data" + } + } + }, + "ChannelHangupRequest": { + "id": "ChannelHangupRequest", + "description": "A hangup was requested on the channel.", + "properties": { + "cause": { + "type": "int", + "description": "Integer representation of the cause of the hangup." + }, + "soft": { + "type": "boolean", + "description": "Whether the hangup request was a soft hangup request." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which the hangup was requested." + } + } + }, + "ChannelVarset": { + "id": "ChannelVarset", + "description": "Channel variable changed.", + "properties": { + "variable": { + "required": true, + "type": "string", + "description": "The variable that changed." + }, + "value": { + "required": true, + "type": "string", + "description": "The new value of the variable." + }, + "channel": { + "required": false, + "type": "Channel", + "description": "The channel on which the variable was set.\n\nIf missing, the variable is a global variable." + } + } + }, + "ChannelHold": { + "id": "ChannelHold", + "description": "A channel initiated a media hold.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that initiated the hold event." + }, + "musicclass": { + "required": false, + "type": "string", + "description": "The music on hold class that the initiator requested." + } + } + }, + "ChannelUnhold": { + "id": "ChannelUnhold", + "description": "A channel initiated a media unhold.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that initiated the unhold event." + } + } + }, + "ChannelTalkingStarted": { + "id": "ChannelTalkingStarted", + "description": "Talking was detected on the channel.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which talking started." + } + } + }, + "ChannelTalkingFinished": { + "id": "ChannelTalkingFinished", + "description": "Talking is no longer detected on the channel.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which talking completed." + }, + "duration": { + "required": true, + "type": "int", + "description": "The length of time, in milliseconds, that talking was detected on the channel" + } + } + }, + "ContactStatusChange": { + "id": "ContactStatusChange", + "description": "The state of a contact on an endpoint has changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + }, + "contact_info": { + "required": true, + "type": "ContactInfo" + } + } + }, + "PeerStatusChange": { + "id": "PeerStatusChange", + "description": "The state of a peer associated with an endpoint has changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + }, + "peer": { + "required": true, + "type": "Peer" + } + } + }, + "EndpointStateChange": { + "id": "EndpointStateChange", + "description": "Endpoint state changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + } + } + }, + "Dial": { + "id": "Dial", + "description": "Dialing state has changed.", + "properties": { + "caller": { + "required": false, + "type": "Channel", + "description": "The calling channel." + }, + "peer": { + "required": true, + "type": "Channel", + "description": "The dialed channel." + }, + "forward": { + "required": false, + "type": "string", + "description": "Forwarding target requested by the original dialed channel." + }, + "forwarded": { + "required": false, + "type": "Channel", + "description": "Channel that the caller has been forwarded to." + }, + "dialstring": { + "required": false, + "type": "string", + "description": "The dial string for calling the peer channel." + }, + "dialstatus": { + "required": true, + "type": "string", + "description": "Current status of the dialing attempt to the peer." + } + } + }, + "StasisEnd": { + "id": "StasisEnd", + "description": "Notification that a channel has left a Stasis application.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "StasisStart": { + "id": "StasisStart", + "description": "Notification that a channel has entered a Stasis application.", + "properties": { + "args": { + "required": true, + "type": "List[string]", + "description": "Arguments to the application" + }, + "channel": { + "required": true, + "type": "Channel" + }, + "replace_channel": { + "required": false, + "type": "Channel" + } + } + }, + "TextMessageReceived": { + "id": "TextMessageReceived", + "description": "A text message was received from an endpoint.", + "properties": { + "message": { + "required": true, + "type": "TextMessage" + }, + "endpoint": { + "required": false, + "type": "Endpoint" + } + } + }, + "ChannelConnectedLine": { + "id": "ChannelConnectedLine", + "description": "Channel changed Connected Line.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel whose connected line has changed." + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_4_1_3/mailboxes.json b/codegen/src/main/resources/codegen-data/ari_4_1_3/mailboxes.json new file mode 100644 index 00000000..8f5941b8 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_4_1_3/mailboxes.json @@ -0,0 +1,137 @@ +{ + "_copyright": "Copyright (C) 2013, Digium, Inc.", + "_author": "Jonathan Rose ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/mailboxes.{format}", + "requiresModules": [ + "res_stasis_mailbox" + ], + "apis": [ + { + "path": "/mailboxes", + "description": "Mailboxes", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all mailboxes.", + "nickname": "list", + "responseClass": "List[Mailbox]" + } + ] + }, + { + "path": "/mailboxes/{mailboxName}", + "description": "Mailbox state", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve the current state of a mailbox.", + "nickname": "get", + "responseClass": "Mailbox", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Change the state of a mailbox. (Note - implicitly creates the mailbox).", + "nickname": "update", + "responseClass": "void", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "oldMessages", + "description": "Count of old messages in the mailbox", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "newMessages", + "description": "Count of new messages in the mailbox", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "int" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Destroy a mailbox.", + "nickname": "delete", + "responseClass": "void", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + } + ] + } + ], + "models": { + "Mailbox": { + "id": "Mailbox", + "description": "Represents the state of a mailbox.", + "properties": { + "name": { + "type": "string", + "description": "Name of the mailbox.", + "required": true + }, + "old_messages": { + "type": "int", + "description": "Count of old messages in the mailbox.", + "required": true + }, + "new_messages": { + "type": "int", + "description": "Count of new messages in the mailbox.", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_4_1_3/playbacks.json b/codegen/src/main/resources/codegen-data/ari_4_1_3/playbacks.json new file mode 100644 index 00000000..793986fc --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_4_1_3/playbacks.json @@ -0,0 +1,165 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/playbacks.{format}", + "requiresModules": [ + "res_stasis_playback" + ], + "apis": [ + { + "path": "/playbacks/{playbackId}", + "description": "Control object for a playback operation.", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a playback's details.", + "nickname": "get", + "responseClass": "Playback", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "The playback cannot be found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop a playback.", + "nickname": "stop", + "responseClass": "void", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "The playback cannot be found" + } + ] + } + ] + }, + { + "path": "/playbacks/{playbackId}/control", + "description": "Control object for a playback operation.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Control a playback.", + "nickname": "control", + "responseClass": "void", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "operation", + "description": "Operation to perform on the playback.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "restart", + "pause", + "unpause", + "reverse", + "forward" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "The provided operation parameter was invalid" + }, + { + "code": 404, + "reason": "The playback cannot be found" + }, + { + "code": 409, + "reason": "The operation cannot be performed in the playback's current state" + } +] + } + ] + } + ], + "models": { + "Playback": { + "id": "Playback", + "description": "Object representing the playback of media to a channel", + "properties": { + "id": { + "type": "string", + "description": "ID for this playback operation", + "required": true + }, + "media_uri": { + "type": "string", + "description": "The URI for the media currently being played back.", + "required": true + }, + "next_media_uri": { + "type": "string", + "description": "If a list of URIs is being played, the next media URI to be played back.", + "required": false + }, + "target_uri": { + "type": "string", + "description": "URI for the channel or bridge to play the media on", + "required": true + }, + "language": { + "type": "string", + "description": "For media types that support multiple languages, the language requested for playback." + }, + "state": { + "type": "string", + "description": "Current state of the playback operation.", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "queued", + "playing", + "continuing", + "done", + "failed" + ] + } + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_4_1_3/recordings.json b/codegen/src/main/resources/codegen-data/ari_4_1_3/recordings.json new file mode 100644 index 00000000..6ffd6d8e --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_4_1_3/recordings.json @@ -0,0 +1,413 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/recordings.{format}", + "requiresModules": [ + "res_stasis_recording" + ], + "apis": [ + { + "path": "/recordings/stored", + "description": "Recordings", + "operations": [ + { + "httpMethod": "GET", + "summary": "List recordings that are complete.", + "nickname": "listStored", + "responseClass": "List[StoredRecording]" + } + ] + }, + { + "path": "/recordings/stored/{recordingName}", + "description": "Individual recording", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a stored recording's details.", + "nickname": "getStored", + "responseClass": "StoredRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Delete a stored recording.", + "nickname": "deleteStored", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/stored/{recordingName}/file", + "description": "The actual file associated with the stored recording", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the file associated with the stored recording.", + "nickname": "getStoredFile", + "responseClass": "binary", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 403, + "reason": "The recording file could not be opened" + }, + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/stored/{recordingName}/copy", + "description": "Copy an individual recording", + "operations": [ + { + "httpMethod": "POST", + "summary": "Copy a stored recording.", + "nickname": "copyStored", + "responseClass": "StoredRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording to copy", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "destinationRecordingName", + "description": "The destination name of the recording", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "A recording with the same name already exists on the system" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}", + "description": "A recording that is in progress", + "operations": [ + { + "httpMethod": "GET", + "summary": "List live recordings.", + "nickname": "getLive", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop a live recording and discard it.", + "nickname": "cancel", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/stop", + "operations": [ + { + "httpMethod": "POST", + "summary": "Stop a live recording and store it.", + "nickname": "stop", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/pause", + "operations": [ + { + "httpMethod": "POST", + "summary": "Pause a live recording.", + "notes": "Pausing a recording suspends silence detection, which will be restarted when the recording is unpaused. Paused time is not included in the accounting for maxDurationSeconds.", + "nickname": "pause", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unpause a live recording.", + "nickname": "unpause", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/mute", + "operations": [ + { + "httpMethod": "POST", + "summary": "Mute a live recording.", + "notes": "Muting a recording suspends silence detection, which will be restarted when the recording is unmuted.", + "nickname": "mute", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unmute a live recording.", + "nickname": "unmute", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + } + ] + } + ], + "models": { + "StoredRecording": { + "id": "StoredRecording", + "description": "A past recording that may be played back.", + "properties": { + "name": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + }, + "LiveRecording": { + "id": "LiveRecording", + "description": "A recording that is in progress", + "properties": { + "name": { + "required": true, + "type": "string", + "description": "Base name for the recording" + }, + "format": { + "required": true, + "type": "string", + "description": "Recording format (wav, gsm, etc.)" + }, + "target_uri": { + "required": true, + "type": "string", + "description": "URI for the channel or bridge being recorded" + }, + "state": { + "required": true, + "type": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "queued", + "recording", + "paused", + "done", + "failed", + "canceled" + ] + } + }, + "duration": { + "required": false, + "type": "int", + "description": "Duration in seconds of the recording" + }, + "talking_duration": { + "required": false, + "type": "int", + "description": "Duration of talking, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds." + }, + "silence_duration": { + "required": false, + "type": "int", + "description": "Duration of silence, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds." + }, + "cause": { + "required": false, + "type": "string", + "description": "Cause for recording failure if failed" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_4_1_3/sounds.json b/codegen/src/main/resources/codegen-data/ari_4_1_3/sounds.json new file mode 100644 index 00000000..8fbe1c57 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_4_1_3/sounds.json @@ -0,0 +1,99 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/sounds.{format}", + "apis": [ + { + "path": "/sounds", + "description": "Sounds", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all sounds.", + "nickname": "list", + "responseClass": "List[Sound]", + "parameters": [ + { + "name": "lang", + "description": "Lookup sound for a specific language.", + "paramType": "query", + "dataType": "string", + "required": false + }, + { + "name": "format", + "description": "Lookup sound in a specific format.", + "paramType": "query", + "dataType": "string", + "required": false, + "__note": "core show translation can show translation paths between formats, along with relative costs. so this could be just installed format, or we could follow that for transcoded formats." + } + ] + } + ] + }, + { + "path": "/sounds/{soundId}", + "description": "Individual sound", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a sound's details.", + "nickname": "get", + "responseClass": "Sound", + "parameters": [ + { + "name": "soundId", + "description": "Sound's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ] + } + ] + } + ], + "models": { + "FormatLangPair": { + "id": "FormatLangPair", + "description": "Identifies the format and language of a sound file", + "properties": { + "language": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + }, + "Sound": { + "id": "Sound", + "description": "A media file that may be played back.", + "properties": { + "id": { + "required": true, + "description": "Sound's identifier.", + "type": "string" + }, + "text": { + "required": false, + "description": "Text description of the sound, usually the words spoken.", + "type": "string" + }, + "formats": { + "required": true, + "description": "The formats and languages in which this sound is available.", + "type": "List[FormatLangPair]" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_4_1_4/applications.json b/codegen/src/main/resources/codegen-data/ari_4_1_4/applications.json new file mode 100644 index 00000000..09c5cd5c --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_4_1_4/applications.json @@ -0,0 +1,223 @@ +{ + "_copyright": "Copyright (C) 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/applications.{format}", + "apis": [ + { + "path": "/applications", + "description": "Stasis applications", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all applications.", + "nickname": "list", + "responseClass": "List[Application]" + } + ] + }, + { + "path": "/applications/{applicationName}", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get details of an application.", + "nickname": "get", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Application does not exist." + } + ] + } + ] + }, + { + "path": "/applications/{applicationName}/subscription", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "POST", + "summary": "Subscribe an application to a event source.", + "notes": "Returns the state of the application after the subscriptions have changed", + "nickname": "subscribe", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "eventSource", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing parameter." + }, + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 422, + "reason": "Event source does not exist." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unsubscribe an application from an event source.", + "notes": "Returns the state of the application after the subscriptions have changed", + "nickname": "unsubscribe", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "eventSource", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing parameter; event source scheme not recognized." + }, + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 409, + "reason": "Application not subscribed to event source." + }, + { + "code": 422, + "reason": "Event source does not exist." + } + ] + } + ] + }, + { + "path": "/applications/{applicationName}/eventFilter", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Filter application events types.", + "notes": "Allowed and/or disallowed event type filtering can be done. The body (parameter) should specify a JSON key/value object that describes the type of event filtering needed. One, or both of the following keys can be designated:

\"allowed\" - Specifies an allowed list of event types
\"disallowed\" - Specifies a disallowed list of event types

Further, each of those key's value should be a JSON array that holds zero, or more JSON key/value objects. Each of these objects must contain the following key with an associated value:

\"type\" - The type name of the event to filter

The value must be the string name (case sensitive) of the event type that needs filtering. For example:

{ \"allowed\": [ { \"type\": \"StasisStart\" }, { \"type\": \"StasisEnd\" } ] }

As this specifies only an allowed list, then only those two event type messages are sent to the application. No other event messages are sent.

The following rules apply:

* If the body is empty, both the allowed and disallowed filters are set empty.
* If both list types are given then both are set to their respective values (note, specifying an empty array for a given type sets that type to empty).
* If only one list type is given then only that type is set. The other type is not updated.
* An empty \"allowed\" list means all events are allowed.
* An empty \"disallowed\" list means no events are disallowed.
* Disallowed events take precedence over allowed events if the event type is specified in both lists.", + "nickname": "filter", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "filter", + "description": "Specify which event types to allow/disallow", + "paramType": "body", + "required": false, + "dataType": "object", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Bad request." + }, + { + "code": 404, + "reason": "Application does not exist." + } + ] + } + ] + } + ], + "models": { + "Application": { + "id": "Application", + "description": "Details of a Stasis application", + "properties": { + "name": { + "type": "string", + "description": "Name of this application", + "required": true + }, + "channel_ids": { + "type": "List[string]", + "description": "Id's for channels subscribed to.", + "required": true + }, + "bridge_ids": { + "type": "List[string]", + "description": "Id's for bridges subscribed to.", + "required": true + }, + "endpoint_ids": { + "type": "List[string]", + "description": "{tech}/{resource} for endpoints subscribed to.", + "required": true + }, + "device_names": { + "type": "List[string]", + "description": "Names of the devices subscribed to.", + "required": true + }, + "events_allowed": { + "type": "List[object]", + "description": "Event types sent to the application.", + "required": true + }, + "events_disallowed": { + "type": "List[object]", + "description": "Event types not sent to the application.", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_4_1_4/asterisk.json b/codegen/src/main/resources/codegen-data/ari_4_1_4/asterisk.json new file mode 100644 index 00000000..841e6cd8 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_4_1_4/asterisk.json @@ -0,0 +1,725 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/asterisk.{format}", + "apis": [ + { + "path": "/asterisk/config/dynamic/{configClass}/{objectType}/{id}", + "description": "Asterisk dynamic configuration", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve a dynamic configuration object.", + "nickname": "getObject", + "responseClass": "List[ConfigTuple]", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to retrieve.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to retrieve.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "{configClass|objectType|id} not found" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Create or update a dynamic configuration object.", + "nickname": "updateObject", + "responseClass": "List[ConfigTuple]", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to create or update.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to create or update.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "fields", + "description": "The body object should have a value that is a list of ConfigTuples, which provide the fields to update. Ex. [ { \"attribute\": \"directmedia\", \"value\": \"false\" } ]", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Bad request body" + }, + { + "code": 403, + "reason": "Could not create or update object" + }, + { + "code": 404, + "reason": "{configClass|objectType} not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Delete a dynamic configuration object.", + "nickname": "deleteObject", + "responseClass": "void", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to delete.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to delete.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 403, + "reason": "Could not delete object" + }, + { + "code": 404, + "reason": "{configClass|objectType|id} not found" + } + ] + } + ] + }, + { + "path": "/asterisk/info", + "description": "Asterisk system information (similar to core show settings)", + "operations": [ + { + "httpMethod": "GET", + "summary": "Gets Asterisk system information.", + "nickname": "getInfo", + "responseClass": "AsteriskInfo", + "parameters": [ + { + "name": "only", + "description": "Filter information returned", + "paramType": "query", + "required": false, + "allowMultiple": true, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "build", + "system", + "config", + "status" + ] + } + } + ] + } + ] + }, + { + "path": "/asterisk/ping", + "description": "Asterisk ping", + "operations": [ + { + "httpMethod": "GET", + "summary": "Response pong message.", + "nickname": "ping", + "responseClass": "AsteriskPing" + } + ] + }, + { + "path": "/asterisk/modules", + "description": "Asterisk modules", + "operations": [ + { + "httpMethod": "GET", + "summary": "List Asterisk modules.", + "nickname": "listModules", + "responseClass": "List[Module]" + } + ] + }, + { + "path": "/asterisk/modules/{moduleName}", + "description": "Asterisk module", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get Asterisk module information.", + "nickname": "getModule", + "responseClass": "Module", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module could not be found in running modules." + }, + { + "code": 409, + "reason": "Module information could not be retrieved." + } + ] + }, + { + "httpMethod": "POST", + "summary": "Load an Asterisk module.", + "nickname": "loadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 409, + "reason": "Module could not be loaded." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unload an Asterisk module.", + "nickname": "unloadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module not found in running modules." + }, + { + "code": 409, + "reason": "Module could not be unloaded." + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Reload an Asterisk module.", + "nickname": "reloadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module not found in running modules." + }, + { + "code": 409, + "reason": "Module could not be reloaded." + } + ] + } + ] + }, + { + "path": "/asterisk/logging", + "description": "Asterisk log channels", + "operations": [ + { + "httpMethod": "GET", + "summary": "Gets Asterisk log channel information.", + "nickname": "listLogChannels", + "responseClass": "List[LogChannel]" + } + ] + }, + { + "path": "/asterisk/logging/{logChannelName}", + "description": "Asterisk log channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Adds a log channel.", + "nickname": "addLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "The log channel to add", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "configuration", + "description": "levels of the log channel", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Bad request body" + }, + { + "code": 409, + "reason": "Log channel could not be created." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Deletes a log channel.", + "nickname": "deleteLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "Log channels name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Log channel does not exist." + } + ] + } + ] + }, + { + "path": "/asterisk/logging/{logChannelName}/rotate", + "description": "Asterisk log channel", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Rotates a log channel.", + "nickname": "rotateLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "Log channel's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Log channel does not exist." + } + ] + } + ] + }, + { + "path": "/asterisk/variable", + "description": "Global variables", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the value of a global variable.", + "nickname": "getGlobalVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "variable", + "description": "The variable to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + } + ] + }, + { + "httpMethod": "POST", + "summary": "Set the value of a global variable.", + "nickname": "setGlobalVar", + "responseClass": "void", + "parameters": [ + { + "name": "variable", + "description": "The variable to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + } + ] + } + ] + } + ], + "models": { + "BuildInfo": { + "id": "BuildInfo", + "description": "Info about how Asterisk was built", + "properties": { + "os": { + "required": true, + "type": "string", + "description": "OS Asterisk was built on." + }, + "kernel": { + "required": true, + "type": "string", + "description": "Kernel version Asterisk was built on." + }, + "options": { + "required": true, + "type": "string", + "description": "Compile time options, or empty string if default." + }, + "machine": { + "required": true, + "type": "string", + "description": "Machine architecture (x86_64, i686, ppc, etc.)" + }, + "date": { + "required": true, + "type": "string", + "description": "Date and time when Asterisk was built." + }, + "user": { + "required": true, + "type": "string", + "description": "Username that build Asterisk" + } + } + }, + "SystemInfo": { + "id": "SystemInfo", + "description": "Info about Asterisk", + "properties": { + "version": { + "required": true, + "type": "string", + "description": "Asterisk version." + }, + "entity_id": { + "required": true, + "type": "string", + "description": "" + } + } + }, + "SetId": { + "id": "SetId", + "description": "Effective user/group id", + "properties": { + "user": { + "required": true, + "type": "string", + "description": "Effective user id." + }, + "group": { + "required": true, + "type": "string", + "description": "Effective group id." + } + } + }, + "ConfigInfo": { + "id": "ConfigInfo", + "description": "Info about Asterisk configuration", + "properties": { + "name": { + "required": true, + "type": "string", + "description": "Asterisk system name." + }, + "default_language": { + "required": true, + "type": "string", + "description": "Default language for media playback." + }, + "max_channels": { + "required": false, + "type": "int", + "description": "Maximum number of simultaneous channels." + }, + "max_open_files": { + "required": false, + "type": "int", + "description": "Maximum number of open file handles (files, sockets)." + }, + "max_load": { + "required": false, + "type": "double", + "description": "Maximum load avg on system." + }, + "setid": { + "required": true, + "type": "SetId", + "description": "Effective user/group id for running Asterisk." + } + } + }, + "StatusInfo": { + "id": "StatusInfo", + "description": "Info about Asterisk status", + "properties": { + "startup_time": { + "required": true, + "type": "Date", + "description": "Time when Asterisk was started." + }, + "last_reload_time": { + "required": true, + "type": "Date", + "description": "Time when Asterisk was last reloaded." + } + } + }, + "AsteriskInfo": { + "id": "AsteriskInfo", + "description": "Asterisk system information", + "properties": { + "build": { + "required": false, + "type": "BuildInfo", + "description": "Info about how Asterisk was built" + }, + "system": { + "required": false, + "type": "SystemInfo", + "description": "Info about the system running Asterisk" + }, + "config": { + "required": false, + "type": "ConfigInfo", + "description": "Info about Asterisk configuration" + }, + "status": { + "required": false, + "type": "StatusInfo", + "description": "Info about Asterisk status" + } + } + }, + "AsteriskPing": { + "id": "AsteriskPing", + "description": "Asterisk ping information", + "properties": { + "asterisk_id": { + "required": true, + "type": "string", + "description": "Asterisk id info" + }, + "ping": { + "required": true, + "type": "string", + "description": "Always string value is pong" + }, + "timestamp": { + "required": true, + "type": "string", + "description": "The timestamp string of request received time" + } + } + }, + "Module": { + "id": "Module", + "description": "Details of an Asterisk module", + "properties": { + "name": { + "type": "string", + "description": "The name of this module", + "required": true + }, + "description": { + "type": "string", + "description": "The description of this module", + "required": true + }, + "use_count": { + "type": "int", + "description": "The number of times this module is being used", + "required": true + }, + "status": { + "type": "string", + "description": "The running status of this module", + "required": true + }, + "support_level": { + "type": "string", + "description": "The support state of this module", + "required": true + } + } + }, + "LogChannel": { + "id": "LogChannel", + "description": "Details of an Asterisk log channel", + "properties": { + "channel": { + "type": "string", + "description": "The log channel path", + "required": true + }, + "type": { + "type": "string", + "description": "Types of logs for the log channel", + "required": true + }, + "status": { + "type": "string", + "description": "Whether or not a log type is enabled", + "required": true + }, + "configuration": { + "type": "string", + "description": "The various log levels", + "required": true + } + } + }, + "Variable": { + "id": "Variable", + "description": "The value of a channel variable", + "properties": { + "value": { + "required": true, + "type": "string", + "description": "The value of the variable requested" + } + } + }, + "ConfigTuple": { + "id": "ConfigTuple", + "description": "A key/value pair that makes up part of a configuration object.", + "properties": { + "attribute": { + "required": true, + "type": "string", + "description": "A configuration object attribute." + }, + "value": { + "required": true, + "type": "string", + "description": "The value for the attribute." + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_4_1_4/bridges.json b/codegen/src/main/resources/codegen-data/ari_4_1_4/bridges.json new file mode 100644 index 00000000..3e757e98 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_4_1_4/bridges.json @@ -0,0 +1,765 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/bridges.{format}", + "requiresModules": [ + "res_stasis_recording", + "res_stasis_playback" + ], + "apis": [ + { + "path": "/bridges", + "description": "Active bridges", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all active bridges in Asterisk.", + "nickname": "list", + "responseClass": "List[Bridge]" + }, + { + "httpMethod": "POST", + "summary": "Create a new bridge.", + "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", + "nickname": "create", + "responseClass": "Bridge", + "parameters": [ + { + "name": "type", + "description": "Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media, video_sfu, video_single).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "bridgeId", + "description": "Unique ID to give to the bridge being created.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Name to give to the bridge being created.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}", + "description": "Individual bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Create a new bridge or updates an existing one.", + "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", + "nickname": "createWithId", + "responseClass": "Bridge", + "parameters": [ + { + "name": "type", + "description": "Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media, video_sfu, video_single) to set.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "bridgeId", + "description": "Unique ID to give to the bridge being created.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Set the name of the bridge.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ] + }, + { + "httpMethod": "GET", + "summary": "Get bridge details.", + "nickname": "get", + "responseClass": "Bridge", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Shut down a bridge.", + "notes": "If any channels are in this bridge, they will be removed and resume whatever they were doing beforehand.", + "nickname": "destroy", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/addChannel", + "description": "Add a channel to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Add a channel to a bridge.", + "nickname": "addChannel", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channel", + "description": "Ids of channels to add to bridge", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "role", + "description": "Channel's role in the bridge", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "absorbDTMF", + "description": "Absorb DTMF coming from this channel, preventing it to pass through to the bridge", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "mute", + "description": "Mute audio from this channel, preventing it to pass through to the bridge", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Channel not found" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application; Channel currently recording" + }, + { + "code": 422, + "reason": "Channel not in Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/removeChannel", + "description": "Remove a channel from a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Remove a channel from a bridge.", + "nickname": "removeChannel", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channel", + "description": "Ids of channels to remove from bridge", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Channel not found" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + }, + { + "code": 422, + "reason": "Channel not in this bridge" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/videoSource/{channelId}", + "description": "Set a channel as the video source in a multi-party bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Set a channel as the video source in a multi-party mixing bridge. This operation has no effect on bridges with two or fewer participants.", + "nickname": "setVideoSource", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge or Channel not found" + }, + { + "code": 409, + "reason": "Channel not in Stasis application" + }, + { + "code": 422, + "reason": "Channel not in this Bridge" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/videoSource", + "description": "Removes any explicit video source", + "operations": [ + { + "httpMethod": "DELETE", + "summary": "Removes any explicit video source in a multi-party mixing bridge. This operation has no effect on bridges with two or fewer participants. When no explicit video source is set, talk detection will be used to determine the active video stream.", + "nickname": "clearVideoSource", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/moh", + "description": "Play music on hold to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play music on hold to a bridge or change the MOH class that is playing.", + "nickname": "startMoh", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "mohClass", + "description": "Channel's id", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing music on hold to a bridge.", + "notes": "This will only stop music on hold being played via POST bridges/{bridgeId}/moh.", + "nickname": "stopMoh", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/play", + "description": "Play media to the participants of a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media on a bridge.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "play", + "responseClass": "Playback", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "playbackId", + "description": "Playback Id.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/play/{playbackId}", + "description": "Play media to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media on a bridge.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "playWithId", + "responseClass": "Playback", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + + } + ] + }, + { + "path": "/bridges/{bridgeId}/record", + "description": "Record audio on a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start a recording.", + "notes": "This records the mixed audio from all channels participating in this bridge.", + "nickname": "record", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Recording's filename", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "maxDurationSeconds", + "description": "Maximum duration of the recording, in seconds. 0 for no limit.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "maxSilenceSeconds", + "description": "Maximum duration of silence, in seconds. 0 for no limit.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "ifExists", + "description": "Action to take if a recording with the same name already exists.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "fail", + "allowableValues": { + "valueType": "LIST", + "values": [ + "fail", + "overwrite", + "append" + ] + } + }, + { + "name": "beep", + "description": "Play beep when recording begins", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "terminateOn", + "description": "DTMF input to terminate recording.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "any", + "*", + "#" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge is not in a Stasis application; A recording with the same name already exists on the system and can not be overwritten because it is in progress or ifExists=fail" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + } + ], + "models": { + "Bridge": { + "id": "Bridge", + "description": "The merging of media from one or more channels.\n\nEveryone on the bridge receives the same audio.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for this bridge", + "required": true + }, + "technology": { + "type": "string", + "description": "Name of the current bridging technology", + "required": true + }, + "bridge_type": { + "type": "string", + "description": "Type of bridge technology", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "mixing", + "holding" + ] + } + }, + "bridge_class": { + "type": "string", + "description": "Bridging class", + "required": true + }, + "creator": { + "type": "string", + "description": "Entity that created the bridge", + "required": true + }, + "name": { + "type": "string", + "description": "Name the creator gave the bridge", + "required": true + }, + "channels": { + "type": "List[string]", + "description": "Ids of channels participating in this bridge", + "required": true + }, + "video_mode": { + "type": "string", + "description": "The video mode the bridge is using. One of 'none', 'talker', 'sfu', or 'single'.", + "required": false + }, + "video_source_id": { + "type": "string", + "description": "The ID of the channel that is the source of video in this bridge, if one exists.", + "required": false + }, + "creationtime": { + "required": true, + "type": "Date", + "description": "Timestamp when bridge was created" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_4_1_4/channels.json b/codegen/src/main/resources/codegen-data/ari_4_1_4/channels.json new file mode 100644 index 00000000..fc8ba761 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_4_1_4/channels.json @@ -0,0 +1,2177 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/channels.{format}", + "requiresModules": [ + "res_stasis_answer", + "res_stasis_playback", + "res_stasis_recording", + "res_stasis_snoop" + ], + "apis": [ + { + "path": "/channels", + "description": "Active channels", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all active channels in Asterisk.", + "nickname": "list", + "responseClass": "List[Channel]" + }, + { + "httpMethod": "POST", + "summary": "Create a new channel (originate).", + "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.", + "nickname": "originate", + "responseClass": "Channel", + "parameters": [ + { + "name": "endpoint", + "description": "Endpoint to call.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to dial after the endpoint answers. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to dial after the endpoint answers. If omitted, uses 'default'. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to dial after the endpoint answers. If omitted, uses 1. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "long" + }, + { + "name": "label", + "description": "The label to dial after the endpoint answers. Will supersede 'priority' if provided. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The application that is subscribed to the originated channel. When the channel is answered, it will be passed to this Stasis application. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "callerId", + "description": "CallerID to use when dialing the endpoint or extension.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 30 + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "The unique id of the channel which is originating this one.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "formats", + "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for originating a channel." + }, + { + "code": 409, + "reason": "Channel with given unique ID already exists." + } + ] + } + ] + }, + { + "path": "/channels/create", + "description": "Create a channel and place it in a Stasis app, but do not dial the channel yet.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Create channel.", + "nickname": "create", + "responseClass": "Channel", + "parameters": [ + { + "name": "endpoint", + "description": "Endpoint for channel communication", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "Stasis Application to place channel into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "Unique ID of the calling channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "formats", + "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 409, + "reason": "Channel with given unique ID already exists." + } + ] + } + ] + }, + { + "path": "/channels/{channelId}", + "description": "Active channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "Channel details.", + "nickname": "get", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + } + ] + }, + { + "httpMethod": "POST", + "summary": "Create a new channel (originate with id).", + "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.", + "nickname": "originateWithId", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "endpoint", + "description": "Endpoint to call.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to dial after the endpoint answers. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to dial after the endpoint answers. If omitted, uses 'default'. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to dial after the endpoint answers. If omitted, uses 1. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "long" + }, + { + "name": "label", + "description": "The label to dial after the endpoint answers. Will supersede 'priority' if provided. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The application that is subscribed to the originated channel. When the channel is answered, it will be passed to this Stasis application. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "callerId", + "description": "CallerID to use when dialing the endpoint or extension.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 30 + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "The unique id of the channel which is originating this one.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "formats", + "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for originating a channel." + }, + { + "code": 409, + "reason": "Channel with given unique ID already exists." + } + ] + + }, + { + "httpMethod": "DELETE", + "summary": "Delete (i.e. hangup) a channel.", + "nickname": "hangup", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "reason", + "description": "Reason for hanging up the channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defalutValue": "normal", + "allowableValues": { + "valueType": "LIST", + "values": [ + "normal", + "busy", + "congestion", + "no_answer", + "timeout", + "rejected", + "unallocated", + "normal_unspecified", + "number_incomplete", + "codec_mismatch", + "interworking", + "failure", + "answered_elsewhere" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid reason for hangup provided" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/continue", + "description": "Exit application; continue execution in the dialplan", + "operations": [ + { + "httpMethod": "POST", + "summary": "Exit application; continue execution in the dialplan.", + "nickname": "continueInDialplan", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "label", + "description": "The label to continue to - will supersede 'priority' if both are provided.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/move", + "description": "Move the channel from one Stasis application to another.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Move the channel from one Stasis application to another.", + "nickname": "move", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The channel will be passed to this Stasis application.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": "404", + "reason": "Channel not found" + }, + { + "code": "409", + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/redirect", + "description": "Inform the channel that it should redirect itself to a different location. Note that this will almost certainly cause the channel to exit the application.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Redirect the channel to a different location.", + "nickname": "redirect", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "endpoint", + "description": "The endpoint to redirect the channel to", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Endpoint parameter not provided" + }, + { + "code": 404, + "reason": "Channel or endpoint not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 422, + "reason": "Endpoint is not the same type as the channel" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/answer", + "description": "Answer a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Answer a channel.", + "nickname": "answer", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/ring", + "description": "Send a ringing indication to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Indicate ringing to a channel.", + "nickname": "ring", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop ringing indication on a channel if locally generated.", + "nickname": "ringStop", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/dtmf", + "description": "Send DTMF to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Send provided DTMF to a given channel.", + "nickname": "sendDTMF", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "dtmf", + "description": "DTMF To send.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "before", + "description": "Amount of time to wait before DTMF digits (specified in milliseconds) start.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0 + }, + { + "name": "between", + "description": "Amount of time in between DTMF digits (specified in milliseconds).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 100 + }, + { + "name": "duration", + "description": "Length of each DTMF digit (specified in milliseconds).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 100 + }, + { + "name": "after", + "description": "Amount of time to wait after DTMF digits (specified in milliseconds) end.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0 + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "DTMF is required" + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/mute", + "description": "Mute a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Mute a channel.", + "nickname": "mute", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "Direction in which to mute audio", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both", + "in", + "out" + ] + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unmute a channel.", + "nickname": "unmute", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "Direction in which to unmute audio", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both", + "in", + "out" + ] + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/hold", + "description": "Put a channel on hold", + "operations": [ + { + "httpMethod": "POST", + "summary": "Hold a channel.", + "nickname": "hold", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Remove a channel from hold.", + "nickname": "unhold", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/moh", + "description": "Play music on hold to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play music on hold to a channel.", + "notes": "Using media operations such as /play on a channel playing MOH in this manner will suspend MOH without resuming automatically. If continuing music on hold is desired, the stasis application must reinitiate music on hold.", + "nickname": "startMoh", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "mohClass", + "description": "Music on hold class to use", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing music on hold to a channel.", + "nickname": "stopMoh", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/silence", + "description": "Play silence to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play silence to a channel.", + "notes": "Using media operations such as /play on a channel playing silence in this manner will suspend silence without resuming automatically.", + "nickname": "startSilence", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing silence to a channel.", + "nickname": "stopSilence", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/play", + "description": "Play media to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "play", + "responseClass": "Playback", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000 + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/play/{playbackId}", + "description": "Play media to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media and specify the playbackId.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "playWithId", + "responseClass": "Playback", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000 + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/record", + "description": "Record audio from a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start a recording.", + "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.", + "nickname": "record", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Recording's filename", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "maxDurationSeconds", + "description": "Maximum duration of the recording, in seconds. 0 for no limit", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "maxSilenceSeconds", + "description": "Maximum duration of silence, in seconds. 0 for no limit", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "ifExists", + "description": "Action to take if a recording with the same name already exists.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "fail", + "allowableValues": { + "valueType": "LIST", + "values": [ + "fail", + "overwrite", + "append" + ] + } + }, + { + "name": "beep", + "description": "Play beep when recording begins", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "terminateOn", + "description": "DTMF input to terminate recording", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "any", + "*", + "#" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "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" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/variable", + "description": "Variables on a channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the value of a channel variable or function.", + "nickname": "getChannelVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The channel variable or function to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Channel or variable not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "POST", + "summary": "Set the value of a channel variable or function.", + "nickname": "setChannelVar", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The channel variable or function to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/snoop", + "description": "Snoop (spy/whisper) on a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start snooping.", + "notes": "Snoop (spy/whisper) on a specific channel.", + "nickname": "snoopChannel", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "spy", + "description": "Direction of audio to spy on", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "whisper", + "description": "Direction of audio to whisper into", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "app", + "description": "Application the snooping channel is placed into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "snoopId", + "description": "Unique ID to assign to snooping channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/snoop/{snoopId}", + "description": "Snoop (spy/whisper) on a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start snooping.", + "notes": "Snoop (spy/whisper) on a specific channel.", + "nickname": "snoopChannelWithId", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "snoopId", + "description": "Unique ID to assign to snooping channel", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "spy", + "description": "Direction of audio to spy on", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "whisper", + "description": "Direction of audio to whisper into", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "app", + "description": "Application the snooping channel is placed into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/dial", + "description": "Dial a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Dial a created channel.", + "nickname": "dial", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "caller", + "description": "Channel ID of caller", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Dial timeout", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel cannot be found." + }, + { + "code": 409, + "reason": "Channel cannot be dialed." + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/rtp_statistics", + "description": "Get RTP statistics information for RTP on a channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "RTP stats on a channel.", + "nickname": "rtpstatistics", + "responseClass": "RTPstat", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel cannot be found." + } + ] + } + ] + }, + { + "path": "/channels/externalMedia", + "description": "Create a channel to an External Media source/sink.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start an External Media session.", + "notes": "Create a channel to an External Media source/sink.", + "nickname": "externalMedia", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "Stasis Application to place channel into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "external_host", + "description": "Hostname/ip:port of external host", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "encapsulation", + "description": "Payload encapsulation protocol", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "rtp", + "allowableValues": { + "valueType": "LIST", + "values": [ + "rtp" + ] + } + }, + { + "name": "transport", + "description": "Transport protocol", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "udp", + "allowableValues": { + "valueType": "LIST", + "values": [ + "udp" + ] + } + }, + { + "name": "connection_type", + "description": "Connection type (client/server)", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "client", + "allowableValues": { + "valueType": "LIST", + "values": [ + "client" + ] + } + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "External media direction", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 409, + "reason": "Channel is not in a Stasis application; Channel is already bridged" + } + ] + } + ] + } + ], + "models": { + "Dialed": { + "id": "Dialed", + "description": "Dialed channel information.", + "properties": {} + }, + "DialplanCEP": { + "id": "DialplanCEP", + "description": "Dialplan location (context/extension/priority)", + "properties": { + "context": { + "required": true, + "type": "string", + "description": "Context in the dialplan" + }, + "exten": { + "required": true, + "type": "string", + "description": "Extension in the dialplan" + }, + "priority": { + "required": true, + "type": "long", + "description": "Priority in the dialplan" + }, + "app_name": { + "required": true, + "type": "string", + "description": "Name of current dialplan application" + }, + "app_data": { + "required": true, + "type": "string", + "description": "Parameter of current dialplan application" + } + } + }, + "CallerID": { + "id": "CallerID", + "description": "Caller identification", + "properties": { + "name": { + "required": true, + "type": "string" + }, + "number": { + "required": true, + "type": "string" + } + } + }, + "RTPstat": { + "id": "RTPstat", + "description": "A statistics of a RTP.", + "properties": { + "txcount": { + "required": true, + "type": "int", + "description": "Number of packets transmitted." + }, + "rxcount": { + "required": true, + "type": "int", + "description": "Number of packets received." + }, + "txjitter": { + "required": false, + "type": "double", + "description": "Jitter on transmitted packets." + }, + "rxjitter": { + "required": false, + "type": "double", + "description": "Jitter on received packets." + }, + "remote_maxjitter": { + "required": false, + "type": "double", + "description": "Maximum jitter on remote side." + }, + "remote_minjitter": { + "required": false, + "type": "double", + "description": "Minimum jitter on remote side." + }, + "remote_normdevjitter": { + "required": false, + "type": "double", + "description": "Average jitter on remote side." + }, + "remote_stdevjitter": { + "required": false, + "type": "double", + "description": "Standard deviation jitter on remote side." + }, + "local_maxjitter": { + "required": false, + "type": "double", + "description": "Maximum jitter on local side." + }, + "local_minjitter": { + "required": false, + "type": "double", + "description": "Minimum jitter on local side." + }, + "local_normdevjitter": { + "required": false, + "type": "double", + "description": "Average jitter on local side." + }, + "local_stdevjitter": { + "required": false, + "type": "double", + "description": "Standard deviation jitter on local side." + }, + "txploss": { + "required": true, + "type": "int", + "description": "Number of transmitted packets lost." + }, + "rxploss": { + "required": true, + "type": "int", + "description": "Number of received packets lost." + }, + "remote_maxrxploss": { + "required": false, + "type": "double", + "description": "Maximum number of packets lost on remote side." + }, + "remote_minrxploss": { + "required": false, + "type": "double", + "description": "Minimum number of packets lost on remote side." + }, + "remote_normdevrxploss": { + "required": false, + "type": "double", + "description": "Average number of packets lost on remote side." + }, + "remote_stdevrxploss": { + "required": false, + "type": "double", + "description": "Standard deviation packets lost on remote side." + }, + "local_maxrxploss": { + "required": false, + "type": "double", + "description": "Maximum number of packets lost on local side." + }, + "local_minrxploss": { + "required": false, + "type": "double", + "description": "Minimum number of packets lost on local side." + }, + "local_normdevrxploss": { + "required": false, + "type": "double", + "description": "Average number of packets lost on local side." + }, + "local_stdevrxploss": { + "required": false, + "type": "double", + "description": "Standard deviation packets lost on local side." + }, + "rtt": { + "required": false, + "type": "double", + "description": "Total round trip time." + }, + "maxrtt": { + "required": false, + "type": "double", + "description": "Maximum round trip time." + }, + "minrtt": { + "required": false, + "type": "double", + "description": "Minimum round trip time." + }, + "normdevrtt": { + "required": false, + "type": "double", + "description": "Average round trip time." + }, + "stdevrtt": { + "required": false, + "type": "double", + "description": "Standard deviation round trip time." + }, + "local_ssrc": { + "required": true, + "type": "int", + "description": "Our SSRC." + }, + "remote_ssrc": { + "required": true, + "type": "int", + "description": "Their SSRC." + }, + "txoctetcount": { + "required": true, + "type": "int", + "description": "Number of octets transmitted." + }, + "rxoctetcount": { + "required": true, + "type": "int", + "description": "Number of octets received." + }, + "channel_uniqueid": { + "required": true, + "type": "string", + "description": "The Asterisk channel's unique ID that owns this instance." + } + } + }, + "Channel": { + "id": "Channel", + "description": "A specific communication connection between Asterisk and an Endpoint.", + "properties": { + "id": { + "required": true, + "type": "string", + "description": "Unique identifier of the channel.\n\nThis is the same as the Uniqueid field in AMI." + }, + "protocol_id": { + "required": true, + "type": "string", + "description": "Protocol id from underlying channel driver (i.e. Call-ID for chan_sip/chan_pjsip; will be empty if not applicable or not implemented by driver)." + }, + "name": { + "required": true, + "type": "string", + "description": "Name of the channel (i.e. SIP/foo-0000a7e3)" + }, + "state": { + "required": true, + "type": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "Down", + "Rsrved", + "OffHook", + "Dialing", + "Ring", + "Ringing", + "Up", + "Busy", + "Dialing Offhook", + "Pre-ring", + "Unknown" + ] + } + }, + "caller": { + "required": true, + "type": "CallerID" + }, + "connected": { + "required": true, + "type": "CallerID" + }, + "accountcode": { + "required": true, + "type": "string" + }, + "dialplan": { + "required": true, + "type": "DialplanCEP", + "description": "Current location in the dialplan" + }, + "creationtime": { + "required": true, + "type": "Date", + "description": "Timestamp when channel was created" + }, + "language": { + "required": true, + "type": "string", + "description": "The default spoken language" + }, + "channelvars": { + "required": false, + "type": "object", + "description": "Channel variables" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_4_1_4/deviceStates.json b/codegen/src/main/resources/codegen-data/ari_4_1_4/deviceStates.json new file mode 100644 index 00000000..bd389355 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_4_1_4/deviceStates.json @@ -0,0 +1,154 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "Kevin Harwell ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/deviceStates.{format}", + "requiresModules": [ + "res_stasis_device_state" + ], + "apis": [ + { + "path": "/deviceStates", + "description": "Device states", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all ARI controlled device states.", + "nickname": "list", + "responseClass": "List[DeviceState]" + } + ] + }, + { + "path": "/deviceStates/{deviceName}", + "description": "Device state", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve the current state of a device.", + "nickname": "get", + "responseClass": "DeviceState", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Change the state of a device controlled by ARI. (Note - implicitly creates the device state).", + "nickname": "update", + "responseClass": "void", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "deviceState", + "description": "Device state value", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "NOT_INUSE", + "INUSE", + "BUSY", + "INVALID", + "UNAVAILABLE", + "RINGING", + "RINGINUSE", + "ONHOLD" + ] + } + + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Device name is missing" + }, + { + "code": 409, + "reason": "Uncontrolled device specified" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Destroy a device-state controlled by ARI.", + "nickname": "delete", + "responseClass": "void", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Device name is missing" + }, + { + "code": 409, + "reason": "Uncontrolled device specified" + } + ] + } + ] + } + ], + "models": { + "DeviceState": { + "id": "DeviceState", + "description": "Represents the state of a device.", + "properties": { + "name": { + "type": "string", + "description": "Name of the device.", + "required": true + }, + "state": { + "type": "string", + "description": "Device's state", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "UNKNOWN", + "NOT_INUSE", + "INUSE", + "BUSY", + "INVALID", + "UNAVAILABLE", + "RINGING", + "RINGINUSE", + "ONHOLD" + ] + } + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_4_1_4/endpoints.json b/codegen/src/main/resources/codegen-data/ari_4_1_4/endpoints.json new file mode 100644 index 00000000..1f77d370 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_4_1_4/endpoints.json @@ -0,0 +1,263 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/endpoints.{format}", + "apis": [ + { + "path": "/endpoints", + "description": "Asterisk endpoints", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all endpoints.", + "nickname": "list", + "responseClass": "List[Endpoint]" + } + ] + }, + { + "path": "/endpoints/sendMessage", + "description": "Send a message to some technology URI or endpoint.", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Send a message to some technology URI or endpoint.", + "nickname": "sendMessage", + "responseClass": "void", + "parameters": [ + { + "name": "to", + "description": "The endpoint resource or technology specific URI to send the message to. Valid resources are sip, pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "from", + "description": "The endpoint resource or technology specific identity to send this message from. Valid resources are sip, pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "body", + "description": "The body of the message", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "descriptioni": "The \"variables\" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, pjsip and sip resource types will add the key/value pairs as SIP headers,", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoint not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}", + "description": "Asterisk endpoints", + "operations": [ + { + "httpMethod": "GET", + "summary": "List available endoints for a given endpoint technology.", + "nickname": "listByTech", + "responseClass": "List[Endpoint]", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoints (sip,iax2,...)", + "paramType": "path", + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Endpoints not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}/{resource}", + "description": "Single endpoint", + "operations": [ + { + "httpMethod": "GET", + "summary": "Details for an endpoint.", + "nickname": "get", + "responseClass": "Endpoint", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "resource", + "description": "ID of the endpoint", + "paramType": "path", + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoints not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}/{resource}/sendMessage", + "description": "Send a message to some endpoint in a technology.", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Send a message to some endpoint in a technology.", + "nickname": "sendMessageToEndpoint", + "responseClass": "void", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "resource", + "description": "ID of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "from", + "description": "The endpoint resource or technology specific identity to send this message from. Valid resources are sip, pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "body", + "description": "The body of the message", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "descriptioni": "The \"variables\" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, pjsip and sip resource types will add the key/value pairs as SIP headers,", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoint not found" + } + ] + } + ] + } + ], + "models": { + "Endpoint": { + "id": "Endpoint", + "description": "An external device that may offer/accept calls to/from Asterisk.\n\nUnlike most resources, which have a single unique identifier, an endpoint is uniquely identified by the technology/resource pair.", + "properties": { + "technology": { + "type": "string", + "description": "Technology of the endpoint", + "required": true + }, + "resource": { + "type": "string", + "description": "Identifier of the endpoint, specific to the given technology.", + "required": true + }, + "state": { + "type": "string", + "description": "Endpoint's state", + "required": false, + "allowableValues": { + "valueType": "LIST", + "values": [ + "unknown", + "offline", + "online" + ] + } + }, + "channel_ids": { + "type": "List[string]", + "description": "Id's of channels associated with this endpoint", + "required": true + } + } + }, + "TextMessage": { + "id": "TextMessage", + "description": "A text message.", + "properties": { + "from": { + "type": "string", + "description": "A technology specific URI specifying the source of the message. For sip and pjsip technologies, any SIP URI can be specified. For xmpp, the URI must correspond to the client connection being used to send the message.", + "required": true + }, + "to": { + "type": "string", + "description": "A technology specific URI specifying the destination of the message. Valid technologies include sip, pjsip, and xmp. The destination of a message should be an endpoint.", + "required": true + }, + "body": { + "type": "string", + "description": "The text of the message.", + "required": true + }, + "variables": { + "type": "object", + "description": "Technology specific key/value pairs (JSON object) associated with the message.", + "required": false + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_4_1_4/events.json b/codegen/src/main/resources/codegen-data/ari_4_1_4/events.json new file mode 100644 index 00000000..c9822f6c --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_4_1_4/events.json @@ -0,0 +1,918 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.2", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/events.{format}", + "requiresModules": [ + "res_http_websocket" + ], + "apis": [ + { + "path": "/events", + "description": "Events from Asterisk to applications", + "operations": [ + { + "httpMethod": "GET", + "upgrade": "websocket", + "websocketProtocol": "ari", + "summary": "WebSocket connection for events.", + "nickname": "eventWebsocket", + "responseClass": "Message", + "parameters": [ + { + "name": "app", + "description": "Applications to subscribe to.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "subscribeAll", + "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'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean" + } + ] + } + ] + }, + { + "path": "/events/user/{eventName}", + "description": "Stasis application user events", + "operations": [ + { + "httpMethod": "POST", + "summary": "Generate a user event.", + "nickname": "userEvent", + "responseClass": "void", + "parameters": [ + { + "name": "eventName", + "description": "Event name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "application", + "description": "The name of the application that will receive this event", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "source", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}/{resource}, deviceState:{deviceName}", + "paramType": "query", + "required": false, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds custom key/value pairs to add to the user event. Ex. { \"variables\": { \"key\": \"value\" } }", + "paramType": "body", + "required": false, + "allowMultiple": false, + "dataType": "containers" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 422, + "reason": "Event source not found." + }, + { + "code": 400, + "reason": "Invalid even tsource URI or userevent data." + } + ] + } + ] + } + ], + "models": { + "Message": { + "id": "Message", + "description": "Base type for errors and events", + "discriminator": "type", + "properties": { + "type": { + "type": "string", + "required": true, + "description": "Indicates the type of this message." + }, + "asterisk_id": { + "type": "string", + "required": false, + "description": "The unique ID for the Asterisk instance that raised this event." + } + }, + "subTypes": [ + "MissingParams", + "Event" + ] + }, + "MissingParams": { + "id": "MissingParams", + "description": "Error event sent when required params are missing.", + "properties": { + "params": { + "required": true, + "type": "List[string]", + "description": "A list of the missing parameters" + } + } + }, + "Event": { + "id": "Event", + "description": "Base type for asynchronous events from Asterisk.", + "properties": { + "application": { + "type": "string", + "description": "Name of the application receiving the event.", + "required": true + }, + "timestamp": { + "type": "Date", + "description": "Time at which this event was created.", + "required": true + } + }, + "subTypes": [ + "DeviceStateChanged", + "PlaybackStarted", + "PlaybackContinuing", + "PlaybackFinished", + "RecordingStarted", + "RecordingFinished", + "RecordingFailed", + "ApplicationMoveFailed", + "ApplicationReplaced", + "BridgeCreated", + "BridgeDestroyed", + "BridgeMerged", + "BridgeBlindTransfer", + "BridgeAttendedTransfer", + "BridgeVideoSourceChanged", + "ChannelCreated", + "ChannelDestroyed", + "ChannelEnteredBridge", + "ChannelLeftBridge", + "ChannelStateChange", + "ChannelDtmfReceived", + "ChannelDialplan", + "ChannelCallerId", + "ChannelUserevent", + "ChannelHangupRequest", + "ChannelVarset", + "ChannelTalkingStarted", + "ChannelTalkingFinished", + "ChannelHold", + "ChannelUnhold", + "ContactStatusChange", + "EndpointStateChange", + "Dial", + "StasisEnd", + "StasisStart", + "TextMessageReceived", + "ChannelConnectedLine", + "PeerStatusChange" + ] + }, + "ContactInfo": { + "id": "ContactInfo", + "description": "Detailed information about a contact on an endpoint.", + "properties": { + "uri": { + "type": "string", + "description": "The location of the contact.", + "required": true + }, + "contact_status": { + "type": "string", + "description": "The current status of the contact.", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "Unreachable", + "Reachable", + "Unknown", + "NonQualified", + "Removed" + ] + } + }, + "aor": { + "type": "string", + "description": "The Address of Record this contact belongs to.", + "required": true + }, + "roundtrip_usec": { + "type": "string", + "description": "Current round trip time, in microseconds, for the contact.", + "required": false + } + } + }, + "Peer": { + "id": "Peer", + "description": "Detailed information about a remote peer that communicates with Asterisk.", + "properties": { + "peer_status": { + "type": "string", + "description": "The current state of the peer. Note that the values of the status are dependent on the underlying peer technology.", + "required": true + }, + "cause": { + "type": "string", + "description": "An optional reason associated with the change in peer_status.", + "required": false + }, + "address": { + "type": "string", + "description": "The IP address of the peer.", + "required": false + }, + "port": { + "type": "string", + "description": "The port of the peer.", + "required": false + }, + "time": { + "type": "string", + "description": "The last known time the peer was contacted.", + "required": false + } + } + }, + "DeviceStateChanged": { + "id": "DeviceStateChanged", + "description": "Notification that a device state has changed.", + "properties": { + "device_state": { + "type": "DeviceState", + "description": "Device state object", + "required": true + } + } + }, + "PlaybackStarted": { + "id": "PlaybackStarted", + "description": "Event showing the start of a media playback operation.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "PlaybackContinuing": { + "id": "PlaybackContinuing", + "description": "Event showing the continuation of a media playback operation from one media URI to the next in the list.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "PlaybackFinished": { + "id": "PlaybackFinished", + "description": "Event showing the completion of a media playback operation.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "RecordingStarted": { + "id": "RecordingStarted", + "description": "Event showing the start of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "RecordingFinished": { + "id": "RecordingFinished", + "description": "Event showing the completion of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "RecordingFailed": { + "id": "RecordingFailed", + "description": "Event showing failure of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "ApplicationMoveFailed": { + "id": "ApplicationMoveFailed", + "description": "Notification that trying to move a channel to another Stasis application failed.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + }, + "destination": { + "required": true, + "type": "string" + }, + "args": { + "required": true, + "type": "List[string]", + "description": "Arguments to the application" + } + } + }, + "ApplicationReplaced": { + "id": "ApplicationReplaced", + "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.", + "properties": {} + }, + "BridgeCreated": { + "id": "BridgeCreated", + "description": "Notification that a bridge has been created.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeDestroyed": { + "id": "BridgeDestroyed", + "description": "Notification that a bridge has been destroyed.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeMerged": { + "id": "BridgeMerged", + "description": "Notification that one bridge has merged into another.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "bridge_from": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeVideoSourceChanged": { + "id": "BridgeVideoSourceChanged", + "description": "Notification that the source of video in a bridge has changed.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "old_video_source_id": { + "required": false, + "type": "string" + } + } + }, + "BridgeBlindTransfer": { + "id": "BridgeBlindTransfer", + "description": "Notification that a blind transfer has occurred.", + "properties": { + "channel": { + "description": "The channel performing the blind transfer", + "required": true, + "type": "Channel" + }, + "replace_channel": { + "description": "The channel that is replacing transferer when the transferee(s) can not be transferred directly", + "required": false, + "type": "Channel" + }, + "transferee": { + "description": "The channel that is being transferred", + "required": false, + "type": "Channel" + }, + "exten": { + "description": "The extension transferred to", + "required": true, + "type": "string" + }, + "context": { + "description": "The context transferred to", + "required": true, + "type": "string" + }, + "result": { + "description": "The result of the transfer attempt", + "required": true, + "type": "string" + }, + "is_external": { + "description": "Whether the transfer was externally initiated or not", + "required": true, + "type": "boolean" + }, + "bridge": { + "description": "The bridge being transferred", + "type": "Bridge" + } + } + }, + "BridgeAttendedTransfer": { + "id": "BridgeAttendedTransfer", + "description": "Notification that an attended transfer has occurred.", + "properties": { + "transferer_first_leg": { + "description": "First leg of the transferer", + "required": true, + "type": "Channel" + }, + "transferer_second_leg": { + "description": "Second leg of the transferer", + "required": true, + "type": "Channel" + }, + "replace_channel": { + "description": "The channel that is replacing transferer_first_leg in the swap", + "required": false, + "type": "Channel" + }, + "transferee": { + "description": "The channel that is being transferred", + "required": false, + "type": "Channel" + }, + "transfer_target": { + "description": "The channel that is being transferred to", + "required": false, + "type": "Channel" + }, + "result": { + "description": "The result of the transfer attempt", + "required": true, + "type": "string" + }, + "is_external": { + "description": "Whether the transfer was externally initiated or not", + "required": true, + "type": "boolean" + }, + "transferer_first_leg_bridge": { + "description": "Bridge the transferer first leg is in", + "type": "Bridge" + }, + "transferer_second_leg_bridge": { + "description": "Bridge the transferer second leg is in", + "type": "Bridge" + }, + "destination_type": { + "description": "How the transfer was accomplished", + "required": true, + "type": "string" + }, + "destination_bridge": { + "description": "Bridge that survived the merge result", + "type": "string" + }, + "destination_application": { + "description": "Application that has been transferred into", + "type": "string" + }, + "destination_link_first_leg": { + "description": "First leg of a link transfer result", + "type": "Channel" + }, + "destination_link_second_leg": { + "description": "Second leg of a link transfer result", + "type": "Channel" + }, + "destination_threeway_channel": { + "description": "Transferer channel that survived the threeway result", + "type": "Channel" + }, + "destination_threeway_bridge": { + "description": "Bridge that survived the threeway result", + "type": "Bridge" + } + } + }, + "ChannelCreated": { + "id": "ChannelCreated", + "description": "Notification that a channel has been created.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelDestroyed": { + "id": "ChannelDestroyed", + "description": "Notification that a channel has been destroyed.", + "properties": { + "cause": { + "required": true, + "description": "Integer representation of the cause of the hangup", + "type": "int" + }, + "cause_txt": { + "required": true, + "description": "Text representation of the cause of the hangup", + "type": "string" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelEnteredBridge": { + "id": "ChannelEnteredBridge", + "description": "Notification that a channel has entered a bridge.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "channel": { + "type": "Channel" + } + } + }, + "ChannelLeftBridge": { + "id": "ChannelLeftBridge", + "description": "Notification that a channel has left a bridge.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelStateChange": { + "id": "ChannelStateChange", + "description": "Notification of a channel's state change.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelDtmfReceived": { + "id": "ChannelDtmfReceived", + "description": "DTMF received on a channel.\n\nThis event is sent when the DTMF ends. There is no notification about the start of DTMF", + "properties": { + "digit": { + "required": true, + "type": "string", + "description": "DTMF digit received (0-9, A-E, # or *)" + }, + "duration_ms": { + "required": true, + "type": "int", + "description": "Number of milliseconds DTMF was received" + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which DTMF was received" + } + } + }, + "ChannelDialplan": { + "id": "ChannelDialplan", + "description": "Channel changed location in the dialplan.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that changed dialplan location." + }, + "dialplan_app": { + "required": true, + "type": "string", + "description": "The application about to be executed." + }, + "dialplan_app_data": { + "required": true, + "type": "string", + "description": "The data to be passed to the application." + } + } + }, + "ChannelCallerId": { + "id": "ChannelCallerId", + "description": "Channel changed Caller ID.", + "properties": { + "caller_presentation": { + "required": true, + "type": "int", + "description": "The integer representation of the Caller Presentation value." + }, + "caller_presentation_txt": { + "required": true, + "type": "string", + "description": "The text representation of the Caller Presentation value." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that changed Caller ID." + } + } + }, + "ChannelUserevent": { + "id": "ChannelUserevent", + "description": "User-generated event with additional user-defined fields in the object.", + "properties": { + "eventname": { + "required": true, + "type": "string", + "description": "The name of the user event." + }, + "channel": { + "required": false, + "type": "Channel", + "description": "A channel that is signaled with the user event." + }, + "bridge": { + "required": false, + "type": "Bridge", + "description": "A bridge that is signaled with the user event." + }, + "endpoint": { + "required": false, + "type": "Endpoint", + "description": "A endpoint that is signaled with the user event." + }, + "userevent": { + "required": true, + "type": "object", + "description": "Custom Userevent data" + } + } + }, + "ChannelHangupRequest": { + "id": "ChannelHangupRequest", + "description": "A hangup was requested on the channel.", + "properties": { + "cause": { + "type": "int", + "description": "Integer representation of the cause of the hangup." + }, + "soft": { + "type": "boolean", + "description": "Whether the hangup request was a soft hangup request." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which the hangup was requested." + } + } + }, + "ChannelVarset": { + "id": "ChannelVarset", + "description": "Channel variable changed.", + "properties": { + "variable": { + "required": true, + "type": "string", + "description": "The variable that changed." + }, + "value": { + "required": true, + "type": "string", + "description": "The new value of the variable." + }, + "channel": { + "required": false, + "type": "Channel", + "description": "The channel on which the variable was set.\n\nIf missing, the variable is a global variable." + } + } + }, + "ChannelHold": { + "id": "ChannelHold", + "description": "A channel initiated a media hold.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that initiated the hold event." + }, + "musicclass": { + "required": false, + "type": "string", + "description": "The music on hold class that the initiator requested." + } + } + }, + "ChannelUnhold": { + "id": "ChannelUnhold", + "description": "A channel initiated a media unhold.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that initiated the unhold event." + } + } + }, + "ChannelTalkingStarted": { + "id": "ChannelTalkingStarted", + "description": "Talking was detected on the channel.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which talking started." + } + } + }, + "ChannelTalkingFinished": { + "id": "ChannelTalkingFinished", + "description": "Talking is no longer detected on the channel.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which talking completed." + }, + "duration": { + "required": true, + "type": "int", + "description": "The length of time, in milliseconds, that talking was detected on the channel" + } + } + }, + "ContactStatusChange": { + "id": "ContactStatusChange", + "description": "The state of a contact on an endpoint has changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + }, + "contact_info": { + "required": true, + "type": "ContactInfo" + } + } + }, + "PeerStatusChange": { + "id": "PeerStatusChange", + "description": "The state of a peer associated with an endpoint has changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + }, + "peer": { + "required": true, + "type": "Peer" + } + } + }, + "EndpointStateChange": { + "id": "EndpointStateChange", + "description": "Endpoint state changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + } + } + }, + "Dial": { + "id": "Dial", + "description": "Dialing state has changed.", + "properties": { + "caller": { + "required": false, + "type": "Channel", + "description": "The calling channel." + }, + "peer": { + "required": true, + "type": "Channel", + "description": "The dialed channel." + }, + "forward": { + "required": false, + "type": "string", + "description": "Forwarding target requested by the original dialed channel." + }, + "forwarded": { + "required": false, + "type": "Channel", + "description": "Channel that the caller has been forwarded to." + }, + "dialstring": { + "required": false, + "type": "string", + "description": "The dial string for calling the peer channel." + }, + "dialstatus": { + "required": true, + "type": "string", + "description": "Current status of the dialing attempt to the peer." + } + } + }, + "StasisEnd": { + "id": "StasisEnd", + "description": "Notification that a channel has left a Stasis application.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "StasisStart": { + "id": "StasisStart", + "description": "Notification that a channel has entered a Stasis application.", + "properties": { + "args": { + "required": true, + "type": "List[string]", + "description": "Arguments to the application" + }, + "channel": { + "required": true, + "type": "Channel" + }, + "replace_channel": { + "required": false, + "type": "Channel" + } + } + }, + "TextMessageReceived": { + "id": "TextMessageReceived", + "description": "A text message was received from an endpoint.", + "properties": { + "message": { + "required": true, + "type": "TextMessage" + }, + "endpoint": { + "required": false, + "type": "Endpoint" + } + } + }, + "ChannelConnectedLine": { + "id": "ChannelConnectedLine", + "description": "Channel changed Connected Line.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel whose connected line has changed." + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_4_1_4/mailboxes.json b/codegen/src/main/resources/codegen-data/ari_4_1_4/mailboxes.json new file mode 100644 index 00000000..8f5941b8 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_4_1_4/mailboxes.json @@ -0,0 +1,137 @@ +{ + "_copyright": "Copyright (C) 2013, Digium, Inc.", + "_author": "Jonathan Rose ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/mailboxes.{format}", + "requiresModules": [ + "res_stasis_mailbox" + ], + "apis": [ + { + "path": "/mailboxes", + "description": "Mailboxes", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all mailboxes.", + "nickname": "list", + "responseClass": "List[Mailbox]" + } + ] + }, + { + "path": "/mailboxes/{mailboxName}", + "description": "Mailbox state", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve the current state of a mailbox.", + "nickname": "get", + "responseClass": "Mailbox", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Change the state of a mailbox. (Note - implicitly creates the mailbox).", + "nickname": "update", + "responseClass": "void", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "oldMessages", + "description": "Count of old messages in the mailbox", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "newMessages", + "description": "Count of new messages in the mailbox", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "int" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Destroy a mailbox.", + "nickname": "delete", + "responseClass": "void", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + } + ] + } + ], + "models": { + "Mailbox": { + "id": "Mailbox", + "description": "Represents the state of a mailbox.", + "properties": { + "name": { + "type": "string", + "description": "Name of the mailbox.", + "required": true + }, + "old_messages": { + "type": "int", + "description": "Count of old messages in the mailbox.", + "required": true + }, + "new_messages": { + "type": "int", + "description": "Count of new messages in the mailbox.", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_4_1_4/playbacks.json b/codegen/src/main/resources/codegen-data/ari_4_1_4/playbacks.json new file mode 100644 index 00000000..793986fc --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_4_1_4/playbacks.json @@ -0,0 +1,165 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/playbacks.{format}", + "requiresModules": [ + "res_stasis_playback" + ], + "apis": [ + { + "path": "/playbacks/{playbackId}", + "description": "Control object for a playback operation.", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a playback's details.", + "nickname": "get", + "responseClass": "Playback", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "The playback cannot be found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop a playback.", + "nickname": "stop", + "responseClass": "void", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "The playback cannot be found" + } + ] + } + ] + }, + { + "path": "/playbacks/{playbackId}/control", + "description": "Control object for a playback operation.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Control a playback.", + "nickname": "control", + "responseClass": "void", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "operation", + "description": "Operation to perform on the playback.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "restart", + "pause", + "unpause", + "reverse", + "forward" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "The provided operation parameter was invalid" + }, + { + "code": 404, + "reason": "The playback cannot be found" + }, + { + "code": 409, + "reason": "The operation cannot be performed in the playback's current state" + } +] + } + ] + } + ], + "models": { + "Playback": { + "id": "Playback", + "description": "Object representing the playback of media to a channel", + "properties": { + "id": { + "type": "string", + "description": "ID for this playback operation", + "required": true + }, + "media_uri": { + "type": "string", + "description": "The URI for the media currently being played back.", + "required": true + }, + "next_media_uri": { + "type": "string", + "description": "If a list of URIs is being played, the next media URI to be played back.", + "required": false + }, + "target_uri": { + "type": "string", + "description": "URI for the channel or bridge to play the media on", + "required": true + }, + "language": { + "type": "string", + "description": "For media types that support multiple languages, the language requested for playback." + }, + "state": { + "type": "string", + "description": "Current state of the playback operation.", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "queued", + "playing", + "continuing", + "done", + "failed" + ] + } + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_4_1_4/recordings.json b/codegen/src/main/resources/codegen-data/ari_4_1_4/recordings.json new file mode 100644 index 00000000..6ffd6d8e --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_4_1_4/recordings.json @@ -0,0 +1,413 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/recordings.{format}", + "requiresModules": [ + "res_stasis_recording" + ], + "apis": [ + { + "path": "/recordings/stored", + "description": "Recordings", + "operations": [ + { + "httpMethod": "GET", + "summary": "List recordings that are complete.", + "nickname": "listStored", + "responseClass": "List[StoredRecording]" + } + ] + }, + { + "path": "/recordings/stored/{recordingName}", + "description": "Individual recording", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a stored recording's details.", + "nickname": "getStored", + "responseClass": "StoredRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Delete a stored recording.", + "nickname": "deleteStored", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/stored/{recordingName}/file", + "description": "The actual file associated with the stored recording", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the file associated with the stored recording.", + "nickname": "getStoredFile", + "responseClass": "binary", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 403, + "reason": "The recording file could not be opened" + }, + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/stored/{recordingName}/copy", + "description": "Copy an individual recording", + "operations": [ + { + "httpMethod": "POST", + "summary": "Copy a stored recording.", + "nickname": "copyStored", + "responseClass": "StoredRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording to copy", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "destinationRecordingName", + "description": "The destination name of the recording", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "A recording with the same name already exists on the system" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}", + "description": "A recording that is in progress", + "operations": [ + { + "httpMethod": "GET", + "summary": "List live recordings.", + "nickname": "getLive", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop a live recording and discard it.", + "nickname": "cancel", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/stop", + "operations": [ + { + "httpMethod": "POST", + "summary": "Stop a live recording and store it.", + "nickname": "stop", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/pause", + "operations": [ + { + "httpMethod": "POST", + "summary": "Pause a live recording.", + "notes": "Pausing a recording suspends silence detection, which will be restarted when the recording is unpaused. Paused time is not included in the accounting for maxDurationSeconds.", + "nickname": "pause", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unpause a live recording.", + "nickname": "unpause", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/mute", + "operations": [ + { + "httpMethod": "POST", + "summary": "Mute a live recording.", + "notes": "Muting a recording suspends silence detection, which will be restarted when the recording is unmuted.", + "nickname": "mute", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unmute a live recording.", + "nickname": "unmute", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + } + ] + } + ], + "models": { + "StoredRecording": { + "id": "StoredRecording", + "description": "A past recording that may be played back.", + "properties": { + "name": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + }, + "LiveRecording": { + "id": "LiveRecording", + "description": "A recording that is in progress", + "properties": { + "name": { + "required": true, + "type": "string", + "description": "Base name for the recording" + }, + "format": { + "required": true, + "type": "string", + "description": "Recording format (wav, gsm, etc.)" + }, + "target_uri": { + "required": true, + "type": "string", + "description": "URI for the channel or bridge being recorded" + }, + "state": { + "required": true, + "type": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "queued", + "recording", + "paused", + "done", + "failed", + "canceled" + ] + } + }, + "duration": { + "required": false, + "type": "int", + "description": "Duration in seconds of the recording" + }, + "talking_duration": { + "required": false, + "type": "int", + "description": "Duration of talking, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds." + }, + "silence_duration": { + "required": false, + "type": "int", + "description": "Duration of silence, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds." + }, + "cause": { + "required": false, + "type": "string", + "description": "Cause for recording failure if failed" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_4_1_4/sounds.json b/codegen/src/main/resources/codegen-data/ari_4_1_4/sounds.json new file mode 100644 index 00000000..8fbe1c57 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_4_1_4/sounds.json @@ -0,0 +1,99 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/sounds.{format}", + "apis": [ + { + "path": "/sounds", + "description": "Sounds", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all sounds.", + "nickname": "list", + "responseClass": "List[Sound]", + "parameters": [ + { + "name": "lang", + "description": "Lookup sound for a specific language.", + "paramType": "query", + "dataType": "string", + "required": false + }, + { + "name": "format", + "description": "Lookup sound in a specific format.", + "paramType": "query", + "dataType": "string", + "required": false, + "__note": "core show translation can show translation paths between formats, along with relative costs. so this could be just installed format, or we could follow that for transcoded formats." + } + ] + } + ] + }, + { + "path": "/sounds/{soundId}", + "description": "Individual sound", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a sound's details.", + "nickname": "get", + "responseClass": "Sound", + "parameters": [ + { + "name": "soundId", + "description": "Sound's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ] + } + ] + } + ], + "models": { + "FormatLangPair": { + "id": "FormatLangPair", + "description": "Identifies the format and language of a sound file", + "properties": { + "language": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + }, + "Sound": { + "id": "Sound", + "description": "A media file that may be played back.", + "properties": { + "id": { + "required": true, + "description": "Sound's identifier.", + "type": "string" + }, + "text": { + "required": false, + "description": "Text description of the sound, usually the words spoken.", + "type": "string" + }, + "formats": { + "required": true, + "description": "The formats and languages in which this sound is available.", + "type": "List[FormatLangPair]" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_5_0_0/applications.json b/codegen/src/main/resources/codegen-data/ari_5_0_0/applications.json new file mode 100644 index 00000000..09c5cd5c --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_5_0_0/applications.json @@ -0,0 +1,223 @@ +{ + "_copyright": "Copyright (C) 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/applications.{format}", + "apis": [ + { + "path": "/applications", + "description": "Stasis applications", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all applications.", + "nickname": "list", + "responseClass": "List[Application]" + } + ] + }, + { + "path": "/applications/{applicationName}", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get details of an application.", + "nickname": "get", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Application does not exist." + } + ] + } + ] + }, + { + "path": "/applications/{applicationName}/subscription", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "POST", + "summary": "Subscribe an application to a event source.", + "notes": "Returns the state of the application after the subscriptions have changed", + "nickname": "subscribe", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "eventSource", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing parameter." + }, + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 422, + "reason": "Event source does not exist." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unsubscribe an application from an event source.", + "notes": "Returns the state of the application after the subscriptions have changed", + "nickname": "unsubscribe", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "eventSource", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing parameter; event source scheme not recognized." + }, + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 409, + "reason": "Application not subscribed to event source." + }, + { + "code": 422, + "reason": "Event source does not exist." + } + ] + } + ] + }, + { + "path": "/applications/{applicationName}/eventFilter", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Filter application events types.", + "notes": "Allowed and/or disallowed event type filtering can be done. The body (parameter) should specify a JSON key/value object that describes the type of event filtering needed. One, or both of the following keys can be designated:

\"allowed\" - Specifies an allowed list of event types
\"disallowed\" - Specifies a disallowed list of event types

Further, each of those key's value should be a JSON array that holds zero, or more JSON key/value objects. Each of these objects must contain the following key with an associated value:

\"type\" - The type name of the event to filter

The value must be the string name (case sensitive) of the event type that needs filtering. For example:

{ \"allowed\": [ { \"type\": \"StasisStart\" }, { \"type\": \"StasisEnd\" } ] }

As this specifies only an allowed list, then only those two event type messages are sent to the application. No other event messages are sent.

The following rules apply:

* If the body is empty, both the allowed and disallowed filters are set empty.
* If both list types are given then both are set to their respective values (note, specifying an empty array for a given type sets that type to empty).
* If only one list type is given then only that type is set. The other type is not updated.
* An empty \"allowed\" list means all events are allowed.
* An empty \"disallowed\" list means no events are disallowed.
* Disallowed events take precedence over allowed events if the event type is specified in both lists.", + "nickname": "filter", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "filter", + "description": "Specify which event types to allow/disallow", + "paramType": "body", + "required": false, + "dataType": "object", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Bad request." + }, + { + "code": 404, + "reason": "Application does not exist." + } + ] + } + ] + } + ], + "models": { + "Application": { + "id": "Application", + "description": "Details of a Stasis application", + "properties": { + "name": { + "type": "string", + "description": "Name of this application", + "required": true + }, + "channel_ids": { + "type": "List[string]", + "description": "Id's for channels subscribed to.", + "required": true + }, + "bridge_ids": { + "type": "List[string]", + "description": "Id's for bridges subscribed to.", + "required": true + }, + "endpoint_ids": { + "type": "List[string]", + "description": "{tech}/{resource} for endpoints subscribed to.", + "required": true + }, + "device_names": { + "type": "List[string]", + "description": "Names of the devices subscribed to.", + "required": true + }, + "events_allowed": { + "type": "List[object]", + "description": "Event types sent to the application.", + "required": true + }, + "events_disallowed": { + "type": "List[object]", + "description": "Event types not sent to the application.", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_5_0_0/asterisk.json b/codegen/src/main/resources/codegen-data/ari_5_0_0/asterisk.json new file mode 100644 index 00000000..841e6cd8 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_5_0_0/asterisk.json @@ -0,0 +1,725 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/asterisk.{format}", + "apis": [ + { + "path": "/asterisk/config/dynamic/{configClass}/{objectType}/{id}", + "description": "Asterisk dynamic configuration", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve a dynamic configuration object.", + "nickname": "getObject", + "responseClass": "List[ConfigTuple]", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to retrieve.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to retrieve.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "{configClass|objectType|id} not found" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Create or update a dynamic configuration object.", + "nickname": "updateObject", + "responseClass": "List[ConfigTuple]", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to create or update.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to create or update.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "fields", + "description": "The body object should have a value that is a list of ConfigTuples, which provide the fields to update. Ex. [ { \"attribute\": \"directmedia\", \"value\": \"false\" } ]", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Bad request body" + }, + { + "code": 403, + "reason": "Could not create or update object" + }, + { + "code": 404, + "reason": "{configClass|objectType} not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Delete a dynamic configuration object.", + "nickname": "deleteObject", + "responseClass": "void", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to delete.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to delete.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 403, + "reason": "Could not delete object" + }, + { + "code": 404, + "reason": "{configClass|objectType|id} not found" + } + ] + } + ] + }, + { + "path": "/asterisk/info", + "description": "Asterisk system information (similar to core show settings)", + "operations": [ + { + "httpMethod": "GET", + "summary": "Gets Asterisk system information.", + "nickname": "getInfo", + "responseClass": "AsteriskInfo", + "parameters": [ + { + "name": "only", + "description": "Filter information returned", + "paramType": "query", + "required": false, + "allowMultiple": true, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "build", + "system", + "config", + "status" + ] + } + } + ] + } + ] + }, + { + "path": "/asterisk/ping", + "description": "Asterisk ping", + "operations": [ + { + "httpMethod": "GET", + "summary": "Response pong message.", + "nickname": "ping", + "responseClass": "AsteriskPing" + } + ] + }, + { + "path": "/asterisk/modules", + "description": "Asterisk modules", + "operations": [ + { + "httpMethod": "GET", + "summary": "List Asterisk modules.", + "nickname": "listModules", + "responseClass": "List[Module]" + } + ] + }, + { + "path": "/asterisk/modules/{moduleName}", + "description": "Asterisk module", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get Asterisk module information.", + "nickname": "getModule", + "responseClass": "Module", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module could not be found in running modules." + }, + { + "code": 409, + "reason": "Module information could not be retrieved." + } + ] + }, + { + "httpMethod": "POST", + "summary": "Load an Asterisk module.", + "nickname": "loadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 409, + "reason": "Module could not be loaded." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unload an Asterisk module.", + "nickname": "unloadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module not found in running modules." + }, + { + "code": 409, + "reason": "Module could not be unloaded." + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Reload an Asterisk module.", + "nickname": "reloadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module not found in running modules." + }, + { + "code": 409, + "reason": "Module could not be reloaded." + } + ] + } + ] + }, + { + "path": "/asterisk/logging", + "description": "Asterisk log channels", + "operations": [ + { + "httpMethod": "GET", + "summary": "Gets Asterisk log channel information.", + "nickname": "listLogChannels", + "responseClass": "List[LogChannel]" + } + ] + }, + { + "path": "/asterisk/logging/{logChannelName}", + "description": "Asterisk log channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Adds a log channel.", + "nickname": "addLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "The log channel to add", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "configuration", + "description": "levels of the log channel", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Bad request body" + }, + { + "code": 409, + "reason": "Log channel could not be created." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Deletes a log channel.", + "nickname": "deleteLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "Log channels name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Log channel does not exist." + } + ] + } + ] + }, + { + "path": "/asterisk/logging/{logChannelName}/rotate", + "description": "Asterisk log channel", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Rotates a log channel.", + "nickname": "rotateLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "Log channel's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Log channel does not exist." + } + ] + } + ] + }, + { + "path": "/asterisk/variable", + "description": "Global variables", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the value of a global variable.", + "nickname": "getGlobalVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "variable", + "description": "The variable to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + } + ] + }, + { + "httpMethod": "POST", + "summary": "Set the value of a global variable.", + "nickname": "setGlobalVar", + "responseClass": "void", + "parameters": [ + { + "name": "variable", + "description": "The variable to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + } + ] + } + ] + } + ], + "models": { + "BuildInfo": { + "id": "BuildInfo", + "description": "Info about how Asterisk was built", + "properties": { + "os": { + "required": true, + "type": "string", + "description": "OS Asterisk was built on." + }, + "kernel": { + "required": true, + "type": "string", + "description": "Kernel version Asterisk was built on." + }, + "options": { + "required": true, + "type": "string", + "description": "Compile time options, or empty string if default." + }, + "machine": { + "required": true, + "type": "string", + "description": "Machine architecture (x86_64, i686, ppc, etc.)" + }, + "date": { + "required": true, + "type": "string", + "description": "Date and time when Asterisk was built." + }, + "user": { + "required": true, + "type": "string", + "description": "Username that build Asterisk" + } + } + }, + "SystemInfo": { + "id": "SystemInfo", + "description": "Info about Asterisk", + "properties": { + "version": { + "required": true, + "type": "string", + "description": "Asterisk version." + }, + "entity_id": { + "required": true, + "type": "string", + "description": "" + } + } + }, + "SetId": { + "id": "SetId", + "description": "Effective user/group id", + "properties": { + "user": { + "required": true, + "type": "string", + "description": "Effective user id." + }, + "group": { + "required": true, + "type": "string", + "description": "Effective group id." + } + } + }, + "ConfigInfo": { + "id": "ConfigInfo", + "description": "Info about Asterisk configuration", + "properties": { + "name": { + "required": true, + "type": "string", + "description": "Asterisk system name." + }, + "default_language": { + "required": true, + "type": "string", + "description": "Default language for media playback." + }, + "max_channels": { + "required": false, + "type": "int", + "description": "Maximum number of simultaneous channels." + }, + "max_open_files": { + "required": false, + "type": "int", + "description": "Maximum number of open file handles (files, sockets)." + }, + "max_load": { + "required": false, + "type": "double", + "description": "Maximum load avg on system." + }, + "setid": { + "required": true, + "type": "SetId", + "description": "Effective user/group id for running Asterisk." + } + } + }, + "StatusInfo": { + "id": "StatusInfo", + "description": "Info about Asterisk status", + "properties": { + "startup_time": { + "required": true, + "type": "Date", + "description": "Time when Asterisk was started." + }, + "last_reload_time": { + "required": true, + "type": "Date", + "description": "Time when Asterisk was last reloaded." + } + } + }, + "AsteriskInfo": { + "id": "AsteriskInfo", + "description": "Asterisk system information", + "properties": { + "build": { + "required": false, + "type": "BuildInfo", + "description": "Info about how Asterisk was built" + }, + "system": { + "required": false, + "type": "SystemInfo", + "description": "Info about the system running Asterisk" + }, + "config": { + "required": false, + "type": "ConfigInfo", + "description": "Info about Asterisk configuration" + }, + "status": { + "required": false, + "type": "StatusInfo", + "description": "Info about Asterisk status" + } + } + }, + "AsteriskPing": { + "id": "AsteriskPing", + "description": "Asterisk ping information", + "properties": { + "asterisk_id": { + "required": true, + "type": "string", + "description": "Asterisk id info" + }, + "ping": { + "required": true, + "type": "string", + "description": "Always string value is pong" + }, + "timestamp": { + "required": true, + "type": "string", + "description": "The timestamp string of request received time" + } + } + }, + "Module": { + "id": "Module", + "description": "Details of an Asterisk module", + "properties": { + "name": { + "type": "string", + "description": "The name of this module", + "required": true + }, + "description": { + "type": "string", + "description": "The description of this module", + "required": true + }, + "use_count": { + "type": "int", + "description": "The number of times this module is being used", + "required": true + }, + "status": { + "type": "string", + "description": "The running status of this module", + "required": true + }, + "support_level": { + "type": "string", + "description": "The support state of this module", + "required": true + } + } + }, + "LogChannel": { + "id": "LogChannel", + "description": "Details of an Asterisk log channel", + "properties": { + "channel": { + "type": "string", + "description": "The log channel path", + "required": true + }, + "type": { + "type": "string", + "description": "Types of logs for the log channel", + "required": true + }, + "status": { + "type": "string", + "description": "Whether or not a log type is enabled", + "required": true + }, + "configuration": { + "type": "string", + "description": "The various log levels", + "required": true + } + } + }, + "Variable": { + "id": "Variable", + "description": "The value of a channel variable", + "properties": { + "value": { + "required": true, + "type": "string", + "description": "The value of the variable requested" + } + } + }, + "ConfigTuple": { + "id": "ConfigTuple", + "description": "A key/value pair that makes up part of a configuration object.", + "properties": { + "attribute": { + "required": true, + "type": "string", + "description": "A configuration object attribute." + }, + "value": { + "required": true, + "type": "string", + "description": "The value for the attribute." + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_5_0_0/bridges.json b/codegen/src/main/resources/codegen-data/ari_5_0_0/bridges.json new file mode 100644 index 00000000..22743c3b --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_5_0_0/bridges.json @@ -0,0 +1,765 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/bridges.{format}", + "requiresModules": [ + "res_stasis_recording", + "res_stasis_playback" + ], + "apis": [ + { + "path": "/bridges", + "description": "Active bridges", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all active bridges in Asterisk.", + "nickname": "list", + "responseClass": "List[Bridge]" + }, + { + "httpMethod": "POST", + "summary": "Create a new bridge.", + "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", + "nickname": "create", + "responseClass": "Bridge", + "parameters": [ + { + "name": "type", + "description": "Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media, video_sfu).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "bridgeId", + "description": "Unique ID to give to the bridge being created.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Name to give to the bridge being created.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}", + "description": "Individual bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Create a new bridge or updates an existing one.", + "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", + "nickname": "createWithId", + "responseClass": "Bridge", + "parameters": [ + { + "name": "type", + "description": "Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media, video_sfu) to set.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "bridgeId", + "description": "Unique ID to give to the bridge being created.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Set the name of the bridge.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ] + }, + { + "httpMethod": "GET", + "summary": "Get bridge details.", + "nickname": "get", + "responseClass": "Bridge", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Shut down a bridge.", + "notes": "If any channels are in this bridge, they will be removed and resume whatever they were doing beforehand.", + "nickname": "destroy", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/addChannel", + "description": "Add a channel to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Add a channel to a bridge.", + "nickname": "addChannel", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channel", + "description": "Ids of channels to add to bridge", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "role", + "description": "Channel's role in the bridge", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "absorbDTMF", + "description": "Absorb DTMF coming from this channel, preventing it to pass through to the bridge", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "mute", + "description": "Mute audio from this channel, preventing it to pass through to the bridge", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Channel not found" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application; Channel currently recording" + }, + { + "code": 422, + "reason": "Channel not in Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/removeChannel", + "description": "Remove a channel from a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Remove a channel from a bridge.", + "nickname": "removeChannel", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channel", + "description": "Ids of channels to remove from bridge", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Channel not found" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + }, + { + "code": 422, + "reason": "Channel not in this bridge" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/videoSource/{channelId}", + "description": "Set a channel as the video source in a multi-party bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Set a channel as the video source in a multi-party mixing bridge. This operation has no effect on bridges with two or fewer participants.", + "nickname": "setVideoSource", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge or Channel not found" + }, + { + "code": 409, + "reason": "Channel not in Stasis application" + }, + { + "code": 422, + "reason": "Channel not in this Bridge" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/videoSource", + "description": "Removes any explicit video source", + "operations": [ + { + "httpMethod": "DELETE", + "summary": "Removes any explicit video source in a multi-party mixing bridge. This operation has no effect on bridges with two or fewer participants. When no explicit video source is set, talk detection will be used to determine the active video stream.", + "nickname": "clearVideoSource", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/moh", + "description": "Play music on hold to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play music on hold to a bridge or change the MOH class that is playing.", + "nickname": "startMoh", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "mohClass", + "description": "Channel's id", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing music on hold to a bridge.", + "notes": "This will only stop music on hold being played via POST bridges/{bridgeId}/moh.", + "nickname": "stopMoh", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/play", + "description": "Play media to the participants of a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media on a bridge.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "play", + "responseClass": "Playback", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "playbackId", + "description": "Playback Id.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/play/{playbackId}", + "description": "Play media to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media on a bridge.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "playWithId", + "responseClass": "Playback", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + + } + ] + }, + { + "path": "/bridges/{bridgeId}/record", + "description": "Record audio on a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start a recording.", + "notes": "This records the mixed audio from all channels participating in this bridge.", + "nickname": "record", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Recording's filename", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "maxDurationSeconds", + "description": "Maximum duration of the recording, in seconds. 0 for no limit.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "maxSilenceSeconds", + "description": "Maximum duration of silence, in seconds. 0 for no limit.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "ifExists", + "description": "Action to take if a recording with the same name already exists.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "fail", + "allowableValues": { + "valueType": "LIST", + "values": [ + "fail", + "overwrite", + "append" + ] + } + }, + { + "name": "beep", + "description": "Play beep when recording begins", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "terminateOn", + "description": "DTMF input to terminate recording.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "any", + "*", + "#" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge is not in a Stasis application; A recording with the same name already exists on the system and can not be overwritten because it is in progress or ifExists=fail" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + } + ], + "models": { + "Bridge": { + "id": "Bridge", + "description": "The merging of media from one or more channels.\n\nEveryone on the bridge receives the same audio.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for this bridge", + "required": true + }, + "technology": { + "type": "string", + "description": "Name of the current bridging technology", + "required": true + }, + "bridge_type": { + "type": "string", + "description": "Type of bridge technology", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "mixing", + "holding" + ] + } + }, + "bridge_class": { + "type": "string", + "description": "Bridging class", + "required": true + }, + "creator": { + "type": "string", + "description": "Entity that created the bridge", + "required": true + }, + "name": { + "type": "string", + "description": "Name the creator gave the bridge", + "required": true + }, + "channels": { + "type": "List[string]", + "description": "Ids of channels participating in this bridge", + "required": true + }, + "video_mode": { + "type": "string", + "description": "The video mode the bridge is using. One of 'none', 'talker', or 'single'.", + "required": false + }, + "video_source_id": { + "type": "string", + "description": "The ID of the channel that is the source of video in this bridge, if one exists.", + "required": false + }, + "creationtime": { + "required": true, + "type": "Date", + "description": "Timestamp when bridge was created" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_5_0_0/channels.json b/codegen/src/main/resources/codegen-data/ari_5_0_0/channels.json new file mode 100644 index 00000000..94afb277 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_5_0_0/channels.json @@ -0,0 +1,2171 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/channels.{format}", + "requiresModules": [ + "res_stasis_answer", + "res_stasis_playback", + "res_stasis_recording", + "res_stasis_snoop" + ], + "apis": [ + { + "path": "/channels", + "description": "Active channels", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all active channels in Asterisk.", + "nickname": "list", + "responseClass": "List[Channel]" + }, + { + "httpMethod": "POST", + "summary": "Create a new channel (originate).", + "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.", + "nickname": "originate", + "responseClass": "Channel", + "parameters": [ + { + "name": "endpoint", + "description": "Endpoint to call.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to dial after the endpoint answers. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to dial after the endpoint answers. If omitted, uses 'default'. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to dial after the endpoint answers. If omitted, uses 1. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "long" + }, + { + "name": "label", + "description": "The label to dial after the endpoint answers. Will supersede 'priority' if provided. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The application that is subscribed to the originated channel. When the channel is answered, it will be passed to this Stasis application. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "callerId", + "description": "CallerID to use when dialing the endpoint or extension.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 30 + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "The unique id of the channel which is originating this one.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "formats", + "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for originating a channel." + }, + { + "code": 409, + "reason": "Channel with given unique ID already exists." + } + ] + } + ] + }, + { + "path": "/channels/create", + "description": "Create a channel and place it in a Stasis app, but do not dial the channel yet.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Create channel.", + "nickname": "create", + "responseClass": "Channel", + "parameters": [ + { + "name": "endpoint", + "description": "Endpoint for channel communication", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "Stasis Application to place channel into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "Unique ID of the calling channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "formats", + "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 409, + "reason": "Channel with given unique ID already exists." + } + ] + } + ] + }, + { + "path": "/channels/{channelId}", + "description": "Active channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "Channel details.", + "nickname": "get", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + } + ] + }, + { + "httpMethod": "POST", + "summary": "Create a new channel (originate with id).", + "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.", + "nickname": "originateWithId", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "endpoint", + "description": "Endpoint to call.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to dial after the endpoint answers. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to dial after the endpoint answers. If omitted, uses 'default'. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to dial after the endpoint answers. If omitted, uses 1. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "long" + }, + { + "name": "label", + "description": "The label to dial after the endpoint answers. Will supersede 'priority' if provided. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The application that is subscribed to the originated channel. When the channel is answered, it will be passed to this Stasis application. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "callerId", + "description": "CallerID to use when dialing the endpoint or extension.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 30 + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "The unique id of the channel which is originating this one.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "formats", + "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for originating a channel." + }, + { + "code": 409, + "reason": "Channel with given unique ID already exists." + } + ] + + }, + { + "httpMethod": "DELETE", + "summary": "Delete (i.e. hangup) a channel.", + "nickname": "hangup", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "reason_code", + "description": "The reason code for hanging up the channel for detail use. Mutually exclusive with 'reason'. See detail hangup codes at here. https://wiki.asterisk.org/wiki/display/AST/Hangup+Cause+Mappings", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "reason", + "description": "Reason for hanging up the channel for simple use. Mutually exclusive with 'reason_code'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "normal", + "busy", + "congestion", + "no_answer", + "timeout", + "rejected", + "unallocated", + "normal_unspecified", + "number_incomplete", + "codec_mismatch", + "interworking", + "failure", + "answered_elsewhere" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid reason for hangup provided" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/continue", + "description": "Exit application; continue execution in the dialplan", + "operations": [ + { + "httpMethod": "POST", + "summary": "Exit application; continue execution in the dialplan.", + "nickname": "continueInDialplan", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "label", + "description": "The label to continue to - will supersede 'priority' if both are provided.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/move", + "description": "Move the channel from one Stasis application to another.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Move the channel from one Stasis application to another.", + "nickname": "move", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The channel will be passed to this Stasis application.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": "404", + "reason": "Channel not found" + }, + { + "code": "409", + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/redirect", + "description": "Inform the channel that it should redirect itself to a different location. Note that this will almost certainly cause the channel to exit the application.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Redirect the channel to a different location.", + "nickname": "redirect", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "endpoint", + "description": "The endpoint to redirect the channel to", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Endpoint parameter not provided" + }, + { + "code": 404, + "reason": "Channel or endpoint not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 422, + "reason": "Endpoint is not the same type as the channel" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/answer", + "description": "Answer a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Answer a channel.", + "nickname": "answer", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/ring", + "description": "Send a ringing indication to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Indicate ringing to a channel.", + "nickname": "ring", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop ringing indication on a channel if locally generated.", + "nickname": "ringStop", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/dtmf", + "description": "Send DTMF to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Send provided DTMF to a given channel.", + "nickname": "sendDTMF", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "dtmf", + "description": "DTMF To send.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "before", + "description": "Amount of time to wait before DTMF digits (specified in milliseconds) start.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0 + }, + { + "name": "between", + "description": "Amount of time in between DTMF digits (specified in milliseconds).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 100 + }, + { + "name": "duration", + "description": "Length of each DTMF digit (specified in milliseconds).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 100 + }, + { + "name": "after", + "description": "Amount of time to wait after DTMF digits (specified in milliseconds) end.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0 + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "DTMF is required" + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/mute", + "description": "Mute a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Mute a channel.", + "nickname": "mute", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "Direction in which to mute audio", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both", + "in", + "out" + ] + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unmute a channel.", + "nickname": "unmute", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "Direction in which to unmute audio", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both", + "in", + "out" + ] + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/hold", + "description": "Put a channel on hold", + "operations": [ + { + "httpMethod": "POST", + "summary": "Hold a channel.", + "nickname": "hold", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Remove a channel from hold.", + "nickname": "unhold", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/moh", + "description": "Play music on hold to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play music on hold to a channel.", + "notes": "Using media operations such as /play on a channel playing MOH in this manner will suspend MOH without resuming automatically. If continuing music on hold is desired, the stasis application must reinitiate music on hold.", + "nickname": "startMoh", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "mohClass", + "description": "Music on hold class to use", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing music on hold to a channel.", + "nickname": "stopMoh", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/silence", + "description": "Play silence to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play silence to a channel.", + "notes": "Using media operations such as /play on a channel playing silence in this manner will suspend silence without resuming automatically.", + "nickname": "startSilence", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing silence to a channel.", + "nickname": "stopSilence", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/play", + "description": "Play media to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "play", + "responseClass": "Playback", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000 + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/play/{playbackId}", + "description": "Play media to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media and specify the playbackId.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "playWithId", + "responseClass": "Playback", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000 + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/record", + "description": "Record audio from a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start a recording.", + "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.", + "nickname": "record", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Recording's filename", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "maxDurationSeconds", + "description": "Maximum duration of the recording, in seconds. 0 for no limit", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "maxSilenceSeconds", + "description": "Maximum duration of silence, in seconds. 0 for no limit", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "ifExists", + "description": "Action to take if a recording with the same name already exists.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "fail", + "allowableValues": { + "valueType": "LIST", + "values": [ + "fail", + "overwrite", + "append" + ] + } + }, + { + "name": "beep", + "description": "Play beep when recording begins", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "terminateOn", + "description": "DTMF input to terminate recording", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "any", + "*", + "#" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "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" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/variable", + "description": "Variables on a channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the value of a channel variable or function.", + "nickname": "getChannelVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The channel variable or function to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Channel or variable not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "POST", + "summary": "Set the value of a channel variable or function.", + "nickname": "setChannelVar", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The channel variable or function to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/snoop", + "description": "Snoop (spy/whisper) on a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start snooping.", + "notes": "Snoop (spy/whisper) on a specific channel.", + "nickname": "snoopChannel", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "spy", + "description": "Direction of audio to spy on", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "whisper", + "description": "Direction of audio to whisper into", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "app", + "description": "Application the snooping channel is placed into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "snoopId", + "description": "Unique ID to assign to snooping channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/snoop/{snoopId}", + "description": "Snoop (spy/whisper) on a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start snooping.", + "notes": "Snoop (spy/whisper) on a specific channel.", + "nickname": "snoopChannelWithId", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "snoopId", + "description": "Unique ID to assign to snooping channel", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "spy", + "description": "Direction of audio to spy on", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "whisper", + "description": "Direction of audio to whisper into", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "app", + "description": "Application the snooping channel is placed into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/dial", + "description": "Dial a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Dial a created channel.", + "nickname": "dial", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "caller", + "description": "Channel ID of caller", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Dial timeout", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel cannot be found." + }, + { + "code": 409, + "reason": "Channel cannot be dialed." + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/rtp_statistics", + "description": "Get RTP statistics information for RTP on a channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "RTP stats on a channel.", + "nickname": "rtpstatistics", + "responseClass": "RTPstat", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel cannot be found." + } + ] + } + ] + }, + { + "path": "/channels/externalMedia", + "description": "Create a channel to an External Media source/sink.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start an External Media session.", + "notes": "Create a channel to an External Media source/sink.", + "nickname": "externalMedia", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "Stasis Application to place channel into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "external_host", + "description": "Hostname/ip:port of external host", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "encapsulation", + "description": "Payload encapsulation protocol", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "rtp", + "allowableValues": { + "valueType": "LIST", + "values": [ + "rtp" + ] + } + }, + { + "name": "transport", + "description": "Transport protocol", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "udp", + "allowableValues": { + "valueType": "LIST", + "values": [ + "udp" + ] + } + }, + { + "name": "connection_type", + "description": "Connection type (client/server)", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "client", + "allowableValues": { + "valueType": "LIST", + "values": [ + "client" + ] + } + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "External media direction", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 409, + "reason": "Channel is not in a Stasis application; Channel is already bridged" + } + ] + } + ] + } + ], + "models": { + "Dialed": { + "id": "Dialed", + "description": "Dialed channel information.", + "properties": {} + }, + "DialplanCEP": { + "id": "DialplanCEP", + "description": "Dialplan location (context/extension/priority)", + "properties": { + "context": { + "required": true, + "type": "string", + "description": "Context in the dialplan" + }, + "exten": { + "required": true, + "type": "string", + "description": "Extension in the dialplan" + }, + "priority": { + "required": true, + "type": "long", + "description": "Priority in the dialplan" + }, + "app_name": { + "required": true, + "type": "string", + "description": "Name of current dialplan application" + }, + "app_data": { + "required": true, + "type": "string", + "description": "Parameter of current dialplan application" + } + } + }, + "CallerID": { + "id": "CallerID", + "description": "Caller identification", + "properties": { + "name": { + "required": true, + "type": "string" + }, + "number": { + "required": true, + "type": "string" + } + } + }, + "RTPstat": { + "id": "RTPstat", + "description": "A statistics of a RTP.", + "properties": { + "txcount": { + "required": true, + "type": "int", + "description": "Number of packets transmitted." + }, + "rxcount": { + "required": true, + "type": "int", + "description": "Number of packets received." + }, + "txjitter": { + "required": false, + "type": "double", + "description": "Jitter on transmitted packets." + }, + "rxjitter": { + "required": false, + "type": "double", + "description": "Jitter on received packets." + }, + "remote_maxjitter": { + "required": false, + "type": "double", + "description": "Maximum jitter on remote side." + }, + "remote_minjitter": { + "required": false, + "type": "double", + "description": "Minimum jitter on remote side." + }, + "remote_normdevjitter": { + "required": false, + "type": "double", + "description": "Average jitter on remote side." + }, + "remote_stdevjitter": { + "required": false, + "type": "double", + "description": "Standard deviation jitter on remote side." + }, + "local_maxjitter": { + "required": false, + "type": "double", + "description": "Maximum jitter on local side." + }, + "local_minjitter": { + "required": false, + "type": "double", + "description": "Minimum jitter on local side." + }, + "local_normdevjitter": { + "required": false, + "type": "double", + "description": "Average jitter on local side." + }, + "local_stdevjitter": { + "required": false, + "type": "double", + "description": "Standard deviation jitter on local side." + }, + "txploss": { + "required": true, + "type": "int", + "description": "Number of transmitted packets lost." + }, + "rxploss": { + "required": true, + "type": "int", + "description": "Number of received packets lost." + }, + "remote_maxrxploss": { + "required": false, + "type": "double", + "description": "Maximum number of packets lost on remote side." + }, + "remote_minrxploss": { + "required": false, + "type": "double", + "description": "Minimum number of packets lost on remote side." + }, + "remote_normdevrxploss": { + "required": false, + "type": "double", + "description": "Average number of packets lost on remote side." + }, + "remote_stdevrxploss": { + "required": false, + "type": "double", + "description": "Standard deviation packets lost on remote side." + }, + "local_maxrxploss": { + "required": false, + "type": "double", + "description": "Maximum number of packets lost on local side." + }, + "local_minrxploss": { + "required": false, + "type": "double", + "description": "Minimum number of packets lost on local side." + }, + "local_normdevrxploss": { + "required": false, + "type": "double", + "description": "Average number of packets lost on local side." + }, + "local_stdevrxploss": { + "required": false, + "type": "double", + "description": "Standard deviation packets lost on local side." + }, + "rtt": { + "required": false, + "type": "double", + "description": "Total round trip time." + }, + "maxrtt": { + "required": false, + "type": "double", + "description": "Maximum round trip time." + }, + "minrtt": { + "required": false, + "type": "double", + "description": "Minimum round trip time." + }, + "normdevrtt": { + "required": false, + "type": "double", + "description": "Average round trip time." + }, + "stdevrtt": { + "required": false, + "type": "double", + "description": "Standard deviation round trip time." + }, + "local_ssrc": { + "required": true, + "type": "int", + "description": "Our SSRC." + }, + "remote_ssrc": { + "required": true, + "type": "int", + "description": "Their SSRC." + }, + "txoctetcount": { + "required": true, + "type": "int", + "description": "Number of octets transmitted." + }, + "rxoctetcount": { + "required": true, + "type": "int", + "description": "Number of octets received." + }, + "channel_uniqueid": { + "required": true, + "type": "string", + "description": "The Asterisk channel's unique ID that owns this instance." + } + } + }, + "Channel": { + "id": "Channel", + "description": "A specific communication connection between Asterisk and an Endpoint.", + "properties": { + "id": { + "required": true, + "type": "string", + "description": "Unique identifier of the channel.\n\nThis is the same as the Uniqueid field in AMI." + }, + "name": { + "required": true, + "type": "string", + "description": "Name of the channel (i.e. SIP/foo-0000a7e3)" + }, + "state": { + "required": true, + "type": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "Down", + "Rsrved", + "OffHook", + "Dialing", + "Ring", + "Ringing", + "Up", + "Busy", + "Dialing Offhook", + "Pre-ring", + "Unknown" + ] + } + }, + "caller": { + "required": true, + "type": "CallerID" + }, + "connected": { + "required": true, + "type": "CallerID" + }, + "accountcode": { + "required": true, + "type": "string" + }, + "dialplan": { + "required": true, + "type": "DialplanCEP", + "description": "Current location in the dialplan" + }, + "creationtime": { + "required": true, + "type": "Date", + "description": "Timestamp when channel was created" + }, + "language": { + "required": true, + "type": "string", + "description": "The default spoken language" + }, + "channelvars": { + "required": false, + "type": "object", + "description": "Channel variables" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_5_0_0/deviceStates.json b/codegen/src/main/resources/codegen-data/ari_5_0_0/deviceStates.json new file mode 100644 index 00000000..bd389355 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_5_0_0/deviceStates.json @@ -0,0 +1,154 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "Kevin Harwell ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/deviceStates.{format}", + "requiresModules": [ + "res_stasis_device_state" + ], + "apis": [ + { + "path": "/deviceStates", + "description": "Device states", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all ARI controlled device states.", + "nickname": "list", + "responseClass": "List[DeviceState]" + } + ] + }, + { + "path": "/deviceStates/{deviceName}", + "description": "Device state", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve the current state of a device.", + "nickname": "get", + "responseClass": "DeviceState", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Change the state of a device controlled by ARI. (Note - implicitly creates the device state).", + "nickname": "update", + "responseClass": "void", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "deviceState", + "description": "Device state value", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "NOT_INUSE", + "INUSE", + "BUSY", + "INVALID", + "UNAVAILABLE", + "RINGING", + "RINGINUSE", + "ONHOLD" + ] + } + + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Device name is missing" + }, + { + "code": 409, + "reason": "Uncontrolled device specified" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Destroy a device-state controlled by ARI.", + "nickname": "delete", + "responseClass": "void", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Device name is missing" + }, + { + "code": 409, + "reason": "Uncontrolled device specified" + } + ] + } + ] + } + ], + "models": { + "DeviceState": { + "id": "DeviceState", + "description": "Represents the state of a device.", + "properties": { + "name": { + "type": "string", + "description": "Name of the device.", + "required": true + }, + "state": { + "type": "string", + "description": "Device's state", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "UNKNOWN", + "NOT_INUSE", + "INUSE", + "BUSY", + "INVALID", + "UNAVAILABLE", + "RINGING", + "RINGINUSE", + "ONHOLD" + ] + } + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_5_0_0/endpoints.json b/codegen/src/main/resources/codegen-data/ari_5_0_0/endpoints.json new file mode 100644 index 00000000..264c0eb2 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_5_0_0/endpoints.json @@ -0,0 +1,279 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/endpoints.{format}", + "apis": [ + { + "path": "/endpoints", + "description": "Asterisk endpoints", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all endpoints.", + "nickname": "list", + "responseClass": "List[Endpoint]" + } + ] + }, + { + "path": "/endpoints/sendMessage", + "description": "Send a message to some technology URI or endpoint.", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Send a message to some technology URI or endpoint.", + "nickname": "sendMessage", + "responseClass": "void", + "parameters": [ + { + "name": "to", + "description": "The endpoint resource or technology specific URI to send the message to. Valid resources are sip, pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "from", + "description": "The endpoint resource or technology specific identity to send this message from. Valid resources are sip, pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "body", + "description": "The body of the message", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "descriptioni": "The \"variables\" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, pjsip and sip resource types will add the key/value pairs as SIP headers,", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoint not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}", + "description": "Asterisk endpoints", + "operations": [ + { + "httpMethod": "GET", + "summary": "List available endoints for a given endpoint technology.", + "nickname": "listByTech", + "responseClass": "List[Endpoint]", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoints (sip,iax2,...)", + "paramType": "path", + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Endpoints not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}/{resource}", + "description": "Single endpoint", + "operations": [ + { + "httpMethod": "GET", + "summary": "Details for an endpoint.", + "nickname": "get", + "responseClass": "Endpoint", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "resource", + "description": "ID of the endpoint", + "paramType": "path", + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoints not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}/{resource}/sendMessage", + "description": "Send a message to some endpoint in a technology.", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Send a message to some endpoint in a technology.", + "nickname": "sendMessageToEndpoint", + "responseClass": "void", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "resource", + "description": "ID of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "from", + "description": "The endpoint resource or technology specific identity to send this message from. Valid resources are sip, pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "body", + "description": "The body of the message", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "descriptioni": "The \"variables\" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, pjsip and sip resource types will add the key/value pairs as SIP headers,", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoint not found" + } + ] + } + ] + } + ], + "models": { + "Endpoint": { + "id": "Endpoint", + "description": "An external device that may offer/accept calls to/from Asterisk.\n\nUnlike most resources, which have a single unique identifier, an endpoint is uniquely identified by the technology/resource pair.", + "properties": { + "technology": { + "type": "string", + "description": "Technology of the endpoint", + "required": true + }, + "resource": { + "type": "string", + "description": "Identifier of the endpoint, specific to the given technology.", + "required": true + }, + "state": { + "type": "string", + "description": "Endpoint's state", + "required": false, + "allowableValues": { + "valueType": "LIST", + "values": [ + "unknown", + "offline", + "online" + ] + } + }, + "channel_ids": { + "type": "List[string]", + "description": "Id's of channels associated with this endpoint", + "required": true + } + } + }, + "TextMessageVariable": { + "id": "TextMessageVariable", + "description": "A key/value pair variable in a text message.", + "properties": { + "key": { + "type": "string", + "description": "A unique key identifying the variable.", + "required": true + }, + "value": { + "type": "string", + "description": "The value of the variable.", + "required": true + } + } + }, + "TextMessage": { + "id": "TextMessage", + "description": "A text message.", + "properties": { + "from": { + "type": "string", + "description": "A technology specific URI specifying the source of the message. For sip and pjsip technologies, any SIP URI can be specified. For xmpp, the URI must correspond to the client connection being used to send the message.", + "required": true + }, + "to": { + "type": "string", + "description": "A technology specific URI specifying the destination of the message. Valid technologies include sip, pjsip, and xmp. The destination of a message should be an endpoint.", + "required": true + }, + "body": { + "type": "string", + "description": "The text of the message.", + "required": true + }, + "variables": { + "type": "List[TextMessageVariable]", + "description": "Technology specific key/value pairs associated with the message.", + "required": false + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_5_0_0/events.json b/codegen/src/main/resources/codegen-data/ari_5_0_0/events.json new file mode 100644 index 00000000..c9822f6c --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_5_0_0/events.json @@ -0,0 +1,918 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.2", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/events.{format}", + "requiresModules": [ + "res_http_websocket" + ], + "apis": [ + { + "path": "/events", + "description": "Events from Asterisk to applications", + "operations": [ + { + "httpMethod": "GET", + "upgrade": "websocket", + "websocketProtocol": "ari", + "summary": "WebSocket connection for events.", + "nickname": "eventWebsocket", + "responseClass": "Message", + "parameters": [ + { + "name": "app", + "description": "Applications to subscribe to.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "subscribeAll", + "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'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean" + } + ] + } + ] + }, + { + "path": "/events/user/{eventName}", + "description": "Stasis application user events", + "operations": [ + { + "httpMethod": "POST", + "summary": "Generate a user event.", + "nickname": "userEvent", + "responseClass": "void", + "parameters": [ + { + "name": "eventName", + "description": "Event name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "application", + "description": "The name of the application that will receive this event", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "source", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}/{resource}, deviceState:{deviceName}", + "paramType": "query", + "required": false, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds custom key/value pairs to add to the user event. Ex. { \"variables\": { \"key\": \"value\" } }", + "paramType": "body", + "required": false, + "allowMultiple": false, + "dataType": "containers" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 422, + "reason": "Event source not found." + }, + { + "code": 400, + "reason": "Invalid even tsource URI or userevent data." + } + ] + } + ] + } + ], + "models": { + "Message": { + "id": "Message", + "description": "Base type for errors and events", + "discriminator": "type", + "properties": { + "type": { + "type": "string", + "required": true, + "description": "Indicates the type of this message." + }, + "asterisk_id": { + "type": "string", + "required": false, + "description": "The unique ID for the Asterisk instance that raised this event." + } + }, + "subTypes": [ + "MissingParams", + "Event" + ] + }, + "MissingParams": { + "id": "MissingParams", + "description": "Error event sent when required params are missing.", + "properties": { + "params": { + "required": true, + "type": "List[string]", + "description": "A list of the missing parameters" + } + } + }, + "Event": { + "id": "Event", + "description": "Base type for asynchronous events from Asterisk.", + "properties": { + "application": { + "type": "string", + "description": "Name of the application receiving the event.", + "required": true + }, + "timestamp": { + "type": "Date", + "description": "Time at which this event was created.", + "required": true + } + }, + "subTypes": [ + "DeviceStateChanged", + "PlaybackStarted", + "PlaybackContinuing", + "PlaybackFinished", + "RecordingStarted", + "RecordingFinished", + "RecordingFailed", + "ApplicationMoveFailed", + "ApplicationReplaced", + "BridgeCreated", + "BridgeDestroyed", + "BridgeMerged", + "BridgeBlindTransfer", + "BridgeAttendedTransfer", + "BridgeVideoSourceChanged", + "ChannelCreated", + "ChannelDestroyed", + "ChannelEnteredBridge", + "ChannelLeftBridge", + "ChannelStateChange", + "ChannelDtmfReceived", + "ChannelDialplan", + "ChannelCallerId", + "ChannelUserevent", + "ChannelHangupRequest", + "ChannelVarset", + "ChannelTalkingStarted", + "ChannelTalkingFinished", + "ChannelHold", + "ChannelUnhold", + "ContactStatusChange", + "EndpointStateChange", + "Dial", + "StasisEnd", + "StasisStart", + "TextMessageReceived", + "ChannelConnectedLine", + "PeerStatusChange" + ] + }, + "ContactInfo": { + "id": "ContactInfo", + "description": "Detailed information about a contact on an endpoint.", + "properties": { + "uri": { + "type": "string", + "description": "The location of the contact.", + "required": true + }, + "contact_status": { + "type": "string", + "description": "The current status of the contact.", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "Unreachable", + "Reachable", + "Unknown", + "NonQualified", + "Removed" + ] + } + }, + "aor": { + "type": "string", + "description": "The Address of Record this contact belongs to.", + "required": true + }, + "roundtrip_usec": { + "type": "string", + "description": "Current round trip time, in microseconds, for the contact.", + "required": false + } + } + }, + "Peer": { + "id": "Peer", + "description": "Detailed information about a remote peer that communicates with Asterisk.", + "properties": { + "peer_status": { + "type": "string", + "description": "The current state of the peer. Note that the values of the status are dependent on the underlying peer technology.", + "required": true + }, + "cause": { + "type": "string", + "description": "An optional reason associated with the change in peer_status.", + "required": false + }, + "address": { + "type": "string", + "description": "The IP address of the peer.", + "required": false + }, + "port": { + "type": "string", + "description": "The port of the peer.", + "required": false + }, + "time": { + "type": "string", + "description": "The last known time the peer was contacted.", + "required": false + } + } + }, + "DeviceStateChanged": { + "id": "DeviceStateChanged", + "description": "Notification that a device state has changed.", + "properties": { + "device_state": { + "type": "DeviceState", + "description": "Device state object", + "required": true + } + } + }, + "PlaybackStarted": { + "id": "PlaybackStarted", + "description": "Event showing the start of a media playback operation.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "PlaybackContinuing": { + "id": "PlaybackContinuing", + "description": "Event showing the continuation of a media playback operation from one media URI to the next in the list.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "PlaybackFinished": { + "id": "PlaybackFinished", + "description": "Event showing the completion of a media playback operation.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "RecordingStarted": { + "id": "RecordingStarted", + "description": "Event showing the start of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "RecordingFinished": { + "id": "RecordingFinished", + "description": "Event showing the completion of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "RecordingFailed": { + "id": "RecordingFailed", + "description": "Event showing failure of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "ApplicationMoveFailed": { + "id": "ApplicationMoveFailed", + "description": "Notification that trying to move a channel to another Stasis application failed.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + }, + "destination": { + "required": true, + "type": "string" + }, + "args": { + "required": true, + "type": "List[string]", + "description": "Arguments to the application" + } + } + }, + "ApplicationReplaced": { + "id": "ApplicationReplaced", + "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.", + "properties": {} + }, + "BridgeCreated": { + "id": "BridgeCreated", + "description": "Notification that a bridge has been created.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeDestroyed": { + "id": "BridgeDestroyed", + "description": "Notification that a bridge has been destroyed.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeMerged": { + "id": "BridgeMerged", + "description": "Notification that one bridge has merged into another.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "bridge_from": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeVideoSourceChanged": { + "id": "BridgeVideoSourceChanged", + "description": "Notification that the source of video in a bridge has changed.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "old_video_source_id": { + "required": false, + "type": "string" + } + } + }, + "BridgeBlindTransfer": { + "id": "BridgeBlindTransfer", + "description": "Notification that a blind transfer has occurred.", + "properties": { + "channel": { + "description": "The channel performing the blind transfer", + "required": true, + "type": "Channel" + }, + "replace_channel": { + "description": "The channel that is replacing transferer when the transferee(s) can not be transferred directly", + "required": false, + "type": "Channel" + }, + "transferee": { + "description": "The channel that is being transferred", + "required": false, + "type": "Channel" + }, + "exten": { + "description": "The extension transferred to", + "required": true, + "type": "string" + }, + "context": { + "description": "The context transferred to", + "required": true, + "type": "string" + }, + "result": { + "description": "The result of the transfer attempt", + "required": true, + "type": "string" + }, + "is_external": { + "description": "Whether the transfer was externally initiated or not", + "required": true, + "type": "boolean" + }, + "bridge": { + "description": "The bridge being transferred", + "type": "Bridge" + } + } + }, + "BridgeAttendedTransfer": { + "id": "BridgeAttendedTransfer", + "description": "Notification that an attended transfer has occurred.", + "properties": { + "transferer_first_leg": { + "description": "First leg of the transferer", + "required": true, + "type": "Channel" + }, + "transferer_second_leg": { + "description": "Second leg of the transferer", + "required": true, + "type": "Channel" + }, + "replace_channel": { + "description": "The channel that is replacing transferer_first_leg in the swap", + "required": false, + "type": "Channel" + }, + "transferee": { + "description": "The channel that is being transferred", + "required": false, + "type": "Channel" + }, + "transfer_target": { + "description": "The channel that is being transferred to", + "required": false, + "type": "Channel" + }, + "result": { + "description": "The result of the transfer attempt", + "required": true, + "type": "string" + }, + "is_external": { + "description": "Whether the transfer was externally initiated or not", + "required": true, + "type": "boolean" + }, + "transferer_first_leg_bridge": { + "description": "Bridge the transferer first leg is in", + "type": "Bridge" + }, + "transferer_second_leg_bridge": { + "description": "Bridge the transferer second leg is in", + "type": "Bridge" + }, + "destination_type": { + "description": "How the transfer was accomplished", + "required": true, + "type": "string" + }, + "destination_bridge": { + "description": "Bridge that survived the merge result", + "type": "string" + }, + "destination_application": { + "description": "Application that has been transferred into", + "type": "string" + }, + "destination_link_first_leg": { + "description": "First leg of a link transfer result", + "type": "Channel" + }, + "destination_link_second_leg": { + "description": "Second leg of a link transfer result", + "type": "Channel" + }, + "destination_threeway_channel": { + "description": "Transferer channel that survived the threeway result", + "type": "Channel" + }, + "destination_threeway_bridge": { + "description": "Bridge that survived the threeway result", + "type": "Bridge" + } + } + }, + "ChannelCreated": { + "id": "ChannelCreated", + "description": "Notification that a channel has been created.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelDestroyed": { + "id": "ChannelDestroyed", + "description": "Notification that a channel has been destroyed.", + "properties": { + "cause": { + "required": true, + "description": "Integer representation of the cause of the hangup", + "type": "int" + }, + "cause_txt": { + "required": true, + "description": "Text representation of the cause of the hangup", + "type": "string" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelEnteredBridge": { + "id": "ChannelEnteredBridge", + "description": "Notification that a channel has entered a bridge.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "channel": { + "type": "Channel" + } + } + }, + "ChannelLeftBridge": { + "id": "ChannelLeftBridge", + "description": "Notification that a channel has left a bridge.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelStateChange": { + "id": "ChannelStateChange", + "description": "Notification of a channel's state change.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelDtmfReceived": { + "id": "ChannelDtmfReceived", + "description": "DTMF received on a channel.\n\nThis event is sent when the DTMF ends. There is no notification about the start of DTMF", + "properties": { + "digit": { + "required": true, + "type": "string", + "description": "DTMF digit received (0-9, A-E, # or *)" + }, + "duration_ms": { + "required": true, + "type": "int", + "description": "Number of milliseconds DTMF was received" + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which DTMF was received" + } + } + }, + "ChannelDialplan": { + "id": "ChannelDialplan", + "description": "Channel changed location in the dialplan.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that changed dialplan location." + }, + "dialplan_app": { + "required": true, + "type": "string", + "description": "The application about to be executed." + }, + "dialplan_app_data": { + "required": true, + "type": "string", + "description": "The data to be passed to the application." + } + } + }, + "ChannelCallerId": { + "id": "ChannelCallerId", + "description": "Channel changed Caller ID.", + "properties": { + "caller_presentation": { + "required": true, + "type": "int", + "description": "The integer representation of the Caller Presentation value." + }, + "caller_presentation_txt": { + "required": true, + "type": "string", + "description": "The text representation of the Caller Presentation value." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that changed Caller ID." + } + } + }, + "ChannelUserevent": { + "id": "ChannelUserevent", + "description": "User-generated event with additional user-defined fields in the object.", + "properties": { + "eventname": { + "required": true, + "type": "string", + "description": "The name of the user event." + }, + "channel": { + "required": false, + "type": "Channel", + "description": "A channel that is signaled with the user event." + }, + "bridge": { + "required": false, + "type": "Bridge", + "description": "A bridge that is signaled with the user event." + }, + "endpoint": { + "required": false, + "type": "Endpoint", + "description": "A endpoint that is signaled with the user event." + }, + "userevent": { + "required": true, + "type": "object", + "description": "Custom Userevent data" + } + } + }, + "ChannelHangupRequest": { + "id": "ChannelHangupRequest", + "description": "A hangup was requested on the channel.", + "properties": { + "cause": { + "type": "int", + "description": "Integer representation of the cause of the hangup." + }, + "soft": { + "type": "boolean", + "description": "Whether the hangup request was a soft hangup request." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which the hangup was requested." + } + } + }, + "ChannelVarset": { + "id": "ChannelVarset", + "description": "Channel variable changed.", + "properties": { + "variable": { + "required": true, + "type": "string", + "description": "The variable that changed." + }, + "value": { + "required": true, + "type": "string", + "description": "The new value of the variable." + }, + "channel": { + "required": false, + "type": "Channel", + "description": "The channel on which the variable was set.\n\nIf missing, the variable is a global variable." + } + } + }, + "ChannelHold": { + "id": "ChannelHold", + "description": "A channel initiated a media hold.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that initiated the hold event." + }, + "musicclass": { + "required": false, + "type": "string", + "description": "The music on hold class that the initiator requested." + } + } + }, + "ChannelUnhold": { + "id": "ChannelUnhold", + "description": "A channel initiated a media unhold.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that initiated the unhold event." + } + } + }, + "ChannelTalkingStarted": { + "id": "ChannelTalkingStarted", + "description": "Talking was detected on the channel.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which talking started." + } + } + }, + "ChannelTalkingFinished": { + "id": "ChannelTalkingFinished", + "description": "Talking is no longer detected on the channel.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which talking completed." + }, + "duration": { + "required": true, + "type": "int", + "description": "The length of time, in milliseconds, that talking was detected on the channel" + } + } + }, + "ContactStatusChange": { + "id": "ContactStatusChange", + "description": "The state of a contact on an endpoint has changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + }, + "contact_info": { + "required": true, + "type": "ContactInfo" + } + } + }, + "PeerStatusChange": { + "id": "PeerStatusChange", + "description": "The state of a peer associated with an endpoint has changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + }, + "peer": { + "required": true, + "type": "Peer" + } + } + }, + "EndpointStateChange": { + "id": "EndpointStateChange", + "description": "Endpoint state changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + } + } + }, + "Dial": { + "id": "Dial", + "description": "Dialing state has changed.", + "properties": { + "caller": { + "required": false, + "type": "Channel", + "description": "The calling channel." + }, + "peer": { + "required": true, + "type": "Channel", + "description": "The dialed channel." + }, + "forward": { + "required": false, + "type": "string", + "description": "Forwarding target requested by the original dialed channel." + }, + "forwarded": { + "required": false, + "type": "Channel", + "description": "Channel that the caller has been forwarded to." + }, + "dialstring": { + "required": false, + "type": "string", + "description": "The dial string for calling the peer channel." + }, + "dialstatus": { + "required": true, + "type": "string", + "description": "Current status of the dialing attempt to the peer." + } + } + }, + "StasisEnd": { + "id": "StasisEnd", + "description": "Notification that a channel has left a Stasis application.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "StasisStart": { + "id": "StasisStart", + "description": "Notification that a channel has entered a Stasis application.", + "properties": { + "args": { + "required": true, + "type": "List[string]", + "description": "Arguments to the application" + }, + "channel": { + "required": true, + "type": "Channel" + }, + "replace_channel": { + "required": false, + "type": "Channel" + } + } + }, + "TextMessageReceived": { + "id": "TextMessageReceived", + "description": "A text message was received from an endpoint.", + "properties": { + "message": { + "required": true, + "type": "TextMessage" + }, + "endpoint": { + "required": false, + "type": "Endpoint" + } + } + }, + "ChannelConnectedLine": { + "id": "ChannelConnectedLine", + "description": "Channel changed Connected Line.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel whose connected line has changed." + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_5_0_0/mailboxes.json b/codegen/src/main/resources/codegen-data/ari_5_0_0/mailboxes.json new file mode 100644 index 00000000..8f5941b8 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_5_0_0/mailboxes.json @@ -0,0 +1,137 @@ +{ + "_copyright": "Copyright (C) 2013, Digium, Inc.", + "_author": "Jonathan Rose ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/mailboxes.{format}", + "requiresModules": [ + "res_stasis_mailbox" + ], + "apis": [ + { + "path": "/mailboxes", + "description": "Mailboxes", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all mailboxes.", + "nickname": "list", + "responseClass": "List[Mailbox]" + } + ] + }, + { + "path": "/mailboxes/{mailboxName}", + "description": "Mailbox state", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve the current state of a mailbox.", + "nickname": "get", + "responseClass": "Mailbox", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Change the state of a mailbox. (Note - implicitly creates the mailbox).", + "nickname": "update", + "responseClass": "void", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "oldMessages", + "description": "Count of old messages in the mailbox", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "newMessages", + "description": "Count of new messages in the mailbox", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "int" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Destroy a mailbox.", + "nickname": "delete", + "responseClass": "void", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + } + ] + } + ], + "models": { + "Mailbox": { + "id": "Mailbox", + "description": "Represents the state of a mailbox.", + "properties": { + "name": { + "type": "string", + "description": "Name of the mailbox.", + "required": true + }, + "old_messages": { + "type": "int", + "description": "Count of old messages in the mailbox.", + "required": true + }, + "new_messages": { + "type": "int", + "description": "Count of new messages in the mailbox.", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_5_0_0/playbacks.json b/codegen/src/main/resources/codegen-data/ari_5_0_0/playbacks.json new file mode 100644 index 00000000..a78dcae7 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_5_0_0/playbacks.json @@ -0,0 +1,164 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/playbacks.{format}", + "requiresModules": [ + "res_stasis_playback" + ], + "apis": [ + { + "path": "/playbacks/{playbackId}", + "description": "Control object for a playback operation.", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a playback's details.", + "nickname": "get", + "responseClass": "Playback", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "The playback cannot be found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop a playback.", + "nickname": "stop", + "responseClass": "void", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "The playback cannot be found" + } + ] + } + ] + }, + { + "path": "/playbacks/{playbackId}/control", + "description": "Control object for a playback operation.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Control a playback.", + "nickname": "control", + "responseClass": "void", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "operation", + "description": "Operation to perform on the playback.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "restart", + "pause", + "unpause", + "reverse", + "forward" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "The provided operation parameter was invalid" + }, + { + "code": 404, + "reason": "The playback cannot be found" + }, + { + "code": 409, + "reason": "The operation cannot be performed in the playback's current state" + } +] + } + ] + } + ], + "models": { + "Playback": { + "id": "Playback", + "description": "Object representing the playback of media to a channel", + "properties": { + "id": { + "type": "string", + "description": "ID for this playback operation", + "required": true + }, + "media_uri": { + "type": "string", + "description": "The URI for the media currently being played back.", + "required": true + }, + "next_media_uri": { + "type": "string", + "description": "If a list of URIs is being played, the next media URI to be played back.", + "required": false + }, + "target_uri": { + "type": "string", + "description": "URI for the channel or bridge to play the media on", + "required": true + }, + "language": { + "type": "string", + "description": "For media types that support multiple languages, the language requested for playback." + }, + "state": { + "type": "string", + "description": "Current state of the playback operation.", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "queued", + "playing", + "continuing", + "done" + ] + } + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_5_0_0/recordings.json b/codegen/src/main/resources/codegen-data/ari_5_0_0/recordings.json new file mode 100644 index 00000000..6ffd6d8e --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_5_0_0/recordings.json @@ -0,0 +1,413 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/recordings.{format}", + "requiresModules": [ + "res_stasis_recording" + ], + "apis": [ + { + "path": "/recordings/stored", + "description": "Recordings", + "operations": [ + { + "httpMethod": "GET", + "summary": "List recordings that are complete.", + "nickname": "listStored", + "responseClass": "List[StoredRecording]" + } + ] + }, + { + "path": "/recordings/stored/{recordingName}", + "description": "Individual recording", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a stored recording's details.", + "nickname": "getStored", + "responseClass": "StoredRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Delete a stored recording.", + "nickname": "deleteStored", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/stored/{recordingName}/file", + "description": "The actual file associated with the stored recording", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the file associated with the stored recording.", + "nickname": "getStoredFile", + "responseClass": "binary", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 403, + "reason": "The recording file could not be opened" + }, + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/stored/{recordingName}/copy", + "description": "Copy an individual recording", + "operations": [ + { + "httpMethod": "POST", + "summary": "Copy a stored recording.", + "nickname": "copyStored", + "responseClass": "StoredRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording to copy", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "destinationRecordingName", + "description": "The destination name of the recording", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "A recording with the same name already exists on the system" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}", + "description": "A recording that is in progress", + "operations": [ + { + "httpMethod": "GET", + "summary": "List live recordings.", + "nickname": "getLive", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop a live recording and discard it.", + "nickname": "cancel", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/stop", + "operations": [ + { + "httpMethod": "POST", + "summary": "Stop a live recording and store it.", + "nickname": "stop", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/pause", + "operations": [ + { + "httpMethod": "POST", + "summary": "Pause a live recording.", + "notes": "Pausing a recording suspends silence detection, which will be restarted when the recording is unpaused. Paused time is not included in the accounting for maxDurationSeconds.", + "nickname": "pause", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unpause a live recording.", + "nickname": "unpause", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/mute", + "operations": [ + { + "httpMethod": "POST", + "summary": "Mute a live recording.", + "notes": "Muting a recording suspends silence detection, which will be restarted when the recording is unmuted.", + "nickname": "mute", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unmute a live recording.", + "nickname": "unmute", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + } + ] + } + ], + "models": { + "StoredRecording": { + "id": "StoredRecording", + "description": "A past recording that may be played back.", + "properties": { + "name": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + }, + "LiveRecording": { + "id": "LiveRecording", + "description": "A recording that is in progress", + "properties": { + "name": { + "required": true, + "type": "string", + "description": "Base name for the recording" + }, + "format": { + "required": true, + "type": "string", + "description": "Recording format (wav, gsm, etc.)" + }, + "target_uri": { + "required": true, + "type": "string", + "description": "URI for the channel or bridge being recorded" + }, + "state": { + "required": true, + "type": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "queued", + "recording", + "paused", + "done", + "failed", + "canceled" + ] + } + }, + "duration": { + "required": false, + "type": "int", + "description": "Duration in seconds of the recording" + }, + "talking_duration": { + "required": false, + "type": "int", + "description": "Duration of talking, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds." + }, + "silence_duration": { + "required": false, + "type": "int", + "description": "Duration of silence, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds." + }, + "cause": { + "required": false, + "type": "string", + "description": "Cause for recording failure if failed" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_5_0_0/sounds.json b/codegen/src/main/resources/codegen-data/ari_5_0_0/sounds.json new file mode 100644 index 00000000..8fbe1c57 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_5_0_0/sounds.json @@ -0,0 +1,99 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/sounds.{format}", + "apis": [ + { + "path": "/sounds", + "description": "Sounds", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all sounds.", + "nickname": "list", + "responseClass": "List[Sound]", + "parameters": [ + { + "name": "lang", + "description": "Lookup sound for a specific language.", + "paramType": "query", + "dataType": "string", + "required": false + }, + { + "name": "format", + "description": "Lookup sound in a specific format.", + "paramType": "query", + "dataType": "string", + "required": false, + "__note": "core show translation can show translation paths between formats, along with relative costs. so this could be just installed format, or we could follow that for transcoded formats." + } + ] + } + ] + }, + { + "path": "/sounds/{soundId}", + "description": "Individual sound", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a sound's details.", + "nickname": "get", + "responseClass": "Sound", + "parameters": [ + { + "name": "soundId", + "description": "Sound's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ] + } + ] + } + ], + "models": { + "FormatLangPair": { + "id": "FormatLangPair", + "description": "Identifies the format and language of a sound file", + "properties": { + "language": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + }, + "Sound": { + "id": "Sound", + "description": "A media file that may be played back.", + "properties": { + "id": { + "required": true, + "description": "Sound's identifier.", + "type": "string" + }, + "text": { + "required": false, + "description": "Text description of the sound, usually the words spoken.", + "type": "string" + }, + "formats": { + "required": true, + "description": "The formats and languages in which this sound is available.", + "type": "List[FormatLangPair]" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_5_1_0/applications.json b/codegen/src/main/resources/codegen-data/ari_5_1_0/applications.json new file mode 100644 index 00000000..09c5cd5c --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_5_1_0/applications.json @@ -0,0 +1,223 @@ +{ + "_copyright": "Copyright (C) 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/applications.{format}", + "apis": [ + { + "path": "/applications", + "description": "Stasis applications", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all applications.", + "nickname": "list", + "responseClass": "List[Application]" + } + ] + }, + { + "path": "/applications/{applicationName}", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get details of an application.", + "nickname": "get", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Application does not exist." + } + ] + } + ] + }, + { + "path": "/applications/{applicationName}/subscription", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "POST", + "summary": "Subscribe an application to a event source.", + "notes": "Returns the state of the application after the subscriptions have changed", + "nickname": "subscribe", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "eventSource", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing parameter." + }, + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 422, + "reason": "Event source does not exist." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unsubscribe an application from an event source.", + "notes": "Returns the state of the application after the subscriptions have changed", + "nickname": "unsubscribe", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "eventSource", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing parameter; event source scheme not recognized." + }, + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 409, + "reason": "Application not subscribed to event source." + }, + { + "code": 422, + "reason": "Event source does not exist." + } + ] + } + ] + }, + { + "path": "/applications/{applicationName}/eventFilter", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Filter application events types.", + "notes": "Allowed and/or disallowed event type filtering can be done. The body (parameter) should specify a JSON key/value object that describes the type of event filtering needed. One, or both of the following keys can be designated:

\"allowed\" - Specifies an allowed list of event types
\"disallowed\" - Specifies a disallowed list of event types

Further, each of those key's value should be a JSON array that holds zero, or more JSON key/value objects. Each of these objects must contain the following key with an associated value:

\"type\" - The type name of the event to filter

The value must be the string name (case sensitive) of the event type that needs filtering. For example:

{ \"allowed\": [ { \"type\": \"StasisStart\" }, { \"type\": \"StasisEnd\" } ] }

As this specifies only an allowed list, then only those two event type messages are sent to the application. No other event messages are sent.

The following rules apply:

* If the body is empty, both the allowed and disallowed filters are set empty.
* If both list types are given then both are set to their respective values (note, specifying an empty array for a given type sets that type to empty).
* If only one list type is given then only that type is set. The other type is not updated.
* An empty \"allowed\" list means all events are allowed.
* An empty \"disallowed\" list means no events are disallowed.
* Disallowed events take precedence over allowed events if the event type is specified in both lists.", + "nickname": "filter", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "filter", + "description": "Specify which event types to allow/disallow", + "paramType": "body", + "required": false, + "dataType": "object", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Bad request." + }, + { + "code": 404, + "reason": "Application does not exist." + } + ] + } + ] + } + ], + "models": { + "Application": { + "id": "Application", + "description": "Details of a Stasis application", + "properties": { + "name": { + "type": "string", + "description": "Name of this application", + "required": true + }, + "channel_ids": { + "type": "List[string]", + "description": "Id's for channels subscribed to.", + "required": true + }, + "bridge_ids": { + "type": "List[string]", + "description": "Id's for bridges subscribed to.", + "required": true + }, + "endpoint_ids": { + "type": "List[string]", + "description": "{tech}/{resource} for endpoints subscribed to.", + "required": true + }, + "device_names": { + "type": "List[string]", + "description": "Names of the devices subscribed to.", + "required": true + }, + "events_allowed": { + "type": "List[object]", + "description": "Event types sent to the application.", + "required": true + }, + "events_disallowed": { + "type": "List[object]", + "description": "Event types not sent to the application.", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_5_1_0/asterisk.json b/codegen/src/main/resources/codegen-data/ari_5_1_0/asterisk.json new file mode 100644 index 00000000..841e6cd8 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_5_1_0/asterisk.json @@ -0,0 +1,725 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/asterisk.{format}", + "apis": [ + { + "path": "/asterisk/config/dynamic/{configClass}/{objectType}/{id}", + "description": "Asterisk dynamic configuration", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve a dynamic configuration object.", + "nickname": "getObject", + "responseClass": "List[ConfigTuple]", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to retrieve.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to retrieve.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "{configClass|objectType|id} not found" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Create or update a dynamic configuration object.", + "nickname": "updateObject", + "responseClass": "List[ConfigTuple]", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to create or update.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to create or update.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "fields", + "description": "The body object should have a value that is a list of ConfigTuples, which provide the fields to update. Ex. [ { \"attribute\": \"directmedia\", \"value\": \"false\" } ]", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Bad request body" + }, + { + "code": 403, + "reason": "Could not create or update object" + }, + { + "code": 404, + "reason": "{configClass|objectType} not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Delete a dynamic configuration object.", + "nickname": "deleteObject", + "responseClass": "void", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to delete.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to delete.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 403, + "reason": "Could not delete object" + }, + { + "code": 404, + "reason": "{configClass|objectType|id} not found" + } + ] + } + ] + }, + { + "path": "/asterisk/info", + "description": "Asterisk system information (similar to core show settings)", + "operations": [ + { + "httpMethod": "GET", + "summary": "Gets Asterisk system information.", + "nickname": "getInfo", + "responseClass": "AsteriskInfo", + "parameters": [ + { + "name": "only", + "description": "Filter information returned", + "paramType": "query", + "required": false, + "allowMultiple": true, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "build", + "system", + "config", + "status" + ] + } + } + ] + } + ] + }, + { + "path": "/asterisk/ping", + "description": "Asterisk ping", + "operations": [ + { + "httpMethod": "GET", + "summary": "Response pong message.", + "nickname": "ping", + "responseClass": "AsteriskPing" + } + ] + }, + { + "path": "/asterisk/modules", + "description": "Asterisk modules", + "operations": [ + { + "httpMethod": "GET", + "summary": "List Asterisk modules.", + "nickname": "listModules", + "responseClass": "List[Module]" + } + ] + }, + { + "path": "/asterisk/modules/{moduleName}", + "description": "Asterisk module", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get Asterisk module information.", + "nickname": "getModule", + "responseClass": "Module", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module could not be found in running modules." + }, + { + "code": 409, + "reason": "Module information could not be retrieved." + } + ] + }, + { + "httpMethod": "POST", + "summary": "Load an Asterisk module.", + "nickname": "loadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 409, + "reason": "Module could not be loaded." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unload an Asterisk module.", + "nickname": "unloadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module not found in running modules." + }, + { + "code": 409, + "reason": "Module could not be unloaded." + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Reload an Asterisk module.", + "nickname": "reloadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module not found in running modules." + }, + { + "code": 409, + "reason": "Module could not be reloaded." + } + ] + } + ] + }, + { + "path": "/asterisk/logging", + "description": "Asterisk log channels", + "operations": [ + { + "httpMethod": "GET", + "summary": "Gets Asterisk log channel information.", + "nickname": "listLogChannels", + "responseClass": "List[LogChannel]" + } + ] + }, + { + "path": "/asterisk/logging/{logChannelName}", + "description": "Asterisk log channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Adds a log channel.", + "nickname": "addLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "The log channel to add", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "configuration", + "description": "levels of the log channel", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Bad request body" + }, + { + "code": 409, + "reason": "Log channel could not be created." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Deletes a log channel.", + "nickname": "deleteLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "Log channels name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Log channel does not exist." + } + ] + } + ] + }, + { + "path": "/asterisk/logging/{logChannelName}/rotate", + "description": "Asterisk log channel", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Rotates a log channel.", + "nickname": "rotateLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "Log channel's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Log channel does not exist." + } + ] + } + ] + }, + { + "path": "/asterisk/variable", + "description": "Global variables", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the value of a global variable.", + "nickname": "getGlobalVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "variable", + "description": "The variable to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + } + ] + }, + { + "httpMethod": "POST", + "summary": "Set the value of a global variable.", + "nickname": "setGlobalVar", + "responseClass": "void", + "parameters": [ + { + "name": "variable", + "description": "The variable to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + } + ] + } + ] + } + ], + "models": { + "BuildInfo": { + "id": "BuildInfo", + "description": "Info about how Asterisk was built", + "properties": { + "os": { + "required": true, + "type": "string", + "description": "OS Asterisk was built on." + }, + "kernel": { + "required": true, + "type": "string", + "description": "Kernel version Asterisk was built on." + }, + "options": { + "required": true, + "type": "string", + "description": "Compile time options, or empty string if default." + }, + "machine": { + "required": true, + "type": "string", + "description": "Machine architecture (x86_64, i686, ppc, etc.)" + }, + "date": { + "required": true, + "type": "string", + "description": "Date and time when Asterisk was built." + }, + "user": { + "required": true, + "type": "string", + "description": "Username that build Asterisk" + } + } + }, + "SystemInfo": { + "id": "SystemInfo", + "description": "Info about Asterisk", + "properties": { + "version": { + "required": true, + "type": "string", + "description": "Asterisk version." + }, + "entity_id": { + "required": true, + "type": "string", + "description": "" + } + } + }, + "SetId": { + "id": "SetId", + "description": "Effective user/group id", + "properties": { + "user": { + "required": true, + "type": "string", + "description": "Effective user id." + }, + "group": { + "required": true, + "type": "string", + "description": "Effective group id." + } + } + }, + "ConfigInfo": { + "id": "ConfigInfo", + "description": "Info about Asterisk configuration", + "properties": { + "name": { + "required": true, + "type": "string", + "description": "Asterisk system name." + }, + "default_language": { + "required": true, + "type": "string", + "description": "Default language for media playback." + }, + "max_channels": { + "required": false, + "type": "int", + "description": "Maximum number of simultaneous channels." + }, + "max_open_files": { + "required": false, + "type": "int", + "description": "Maximum number of open file handles (files, sockets)." + }, + "max_load": { + "required": false, + "type": "double", + "description": "Maximum load avg on system." + }, + "setid": { + "required": true, + "type": "SetId", + "description": "Effective user/group id for running Asterisk." + } + } + }, + "StatusInfo": { + "id": "StatusInfo", + "description": "Info about Asterisk status", + "properties": { + "startup_time": { + "required": true, + "type": "Date", + "description": "Time when Asterisk was started." + }, + "last_reload_time": { + "required": true, + "type": "Date", + "description": "Time when Asterisk was last reloaded." + } + } + }, + "AsteriskInfo": { + "id": "AsteriskInfo", + "description": "Asterisk system information", + "properties": { + "build": { + "required": false, + "type": "BuildInfo", + "description": "Info about how Asterisk was built" + }, + "system": { + "required": false, + "type": "SystemInfo", + "description": "Info about the system running Asterisk" + }, + "config": { + "required": false, + "type": "ConfigInfo", + "description": "Info about Asterisk configuration" + }, + "status": { + "required": false, + "type": "StatusInfo", + "description": "Info about Asterisk status" + } + } + }, + "AsteriskPing": { + "id": "AsteriskPing", + "description": "Asterisk ping information", + "properties": { + "asterisk_id": { + "required": true, + "type": "string", + "description": "Asterisk id info" + }, + "ping": { + "required": true, + "type": "string", + "description": "Always string value is pong" + }, + "timestamp": { + "required": true, + "type": "string", + "description": "The timestamp string of request received time" + } + } + }, + "Module": { + "id": "Module", + "description": "Details of an Asterisk module", + "properties": { + "name": { + "type": "string", + "description": "The name of this module", + "required": true + }, + "description": { + "type": "string", + "description": "The description of this module", + "required": true + }, + "use_count": { + "type": "int", + "description": "The number of times this module is being used", + "required": true + }, + "status": { + "type": "string", + "description": "The running status of this module", + "required": true + }, + "support_level": { + "type": "string", + "description": "The support state of this module", + "required": true + } + } + }, + "LogChannel": { + "id": "LogChannel", + "description": "Details of an Asterisk log channel", + "properties": { + "channel": { + "type": "string", + "description": "The log channel path", + "required": true + }, + "type": { + "type": "string", + "description": "Types of logs for the log channel", + "required": true + }, + "status": { + "type": "string", + "description": "Whether or not a log type is enabled", + "required": true + }, + "configuration": { + "type": "string", + "description": "The various log levels", + "required": true + } + } + }, + "Variable": { + "id": "Variable", + "description": "The value of a channel variable", + "properties": { + "value": { + "required": true, + "type": "string", + "description": "The value of the variable requested" + } + } + }, + "ConfigTuple": { + "id": "ConfigTuple", + "description": "A key/value pair that makes up part of a configuration object.", + "properties": { + "attribute": { + "required": true, + "type": "string", + "description": "A configuration object attribute." + }, + "value": { + "required": true, + "type": "string", + "description": "The value for the attribute." + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_5_1_0/bridges.json b/codegen/src/main/resources/codegen-data/ari_5_1_0/bridges.json new file mode 100644 index 00000000..22743c3b --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_5_1_0/bridges.json @@ -0,0 +1,765 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/bridges.{format}", + "requiresModules": [ + "res_stasis_recording", + "res_stasis_playback" + ], + "apis": [ + { + "path": "/bridges", + "description": "Active bridges", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all active bridges in Asterisk.", + "nickname": "list", + "responseClass": "List[Bridge]" + }, + { + "httpMethod": "POST", + "summary": "Create a new bridge.", + "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", + "nickname": "create", + "responseClass": "Bridge", + "parameters": [ + { + "name": "type", + "description": "Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media, video_sfu).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "bridgeId", + "description": "Unique ID to give to the bridge being created.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Name to give to the bridge being created.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}", + "description": "Individual bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Create a new bridge or updates an existing one.", + "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", + "nickname": "createWithId", + "responseClass": "Bridge", + "parameters": [ + { + "name": "type", + "description": "Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media, video_sfu) to set.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "bridgeId", + "description": "Unique ID to give to the bridge being created.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Set the name of the bridge.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ] + }, + { + "httpMethod": "GET", + "summary": "Get bridge details.", + "nickname": "get", + "responseClass": "Bridge", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Shut down a bridge.", + "notes": "If any channels are in this bridge, they will be removed and resume whatever they were doing beforehand.", + "nickname": "destroy", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/addChannel", + "description": "Add a channel to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Add a channel to a bridge.", + "nickname": "addChannel", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channel", + "description": "Ids of channels to add to bridge", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "role", + "description": "Channel's role in the bridge", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "absorbDTMF", + "description": "Absorb DTMF coming from this channel, preventing it to pass through to the bridge", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "mute", + "description": "Mute audio from this channel, preventing it to pass through to the bridge", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Channel not found" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application; Channel currently recording" + }, + { + "code": 422, + "reason": "Channel not in Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/removeChannel", + "description": "Remove a channel from a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Remove a channel from a bridge.", + "nickname": "removeChannel", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channel", + "description": "Ids of channels to remove from bridge", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Channel not found" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + }, + { + "code": 422, + "reason": "Channel not in this bridge" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/videoSource/{channelId}", + "description": "Set a channel as the video source in a multi-party bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Set a channel as the video source in a multi-party mixing bridge. This operation has no effect on bridges with two or fewer participants.", + "nickname": "setVideoSource", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge or Channel not found" + }, + { + "code": 409, + "reason": "Channel not in Stasis application" + }, + { + "code": 422, + "reason": "Channel not in this Bridge" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/videoSource", + "description": "Removes any explicit video source", + "operations": [ + { + "httpMethod": "DELETE", + "summary": "Removes any explicit video source in a multi-party mixing bridge. This operation has no effect on bridges with two or fewer participants. When no explicit video source is set, talk detection will be used to determine the active video stream.", + "nickname": "clearVideoSource", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/moh", + "description": "Play music on hold to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play music on hold to a bridge or change the MOH class that is playing.", + "nickname": "startMoh", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "mohClass", + "description": "Channel's id", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing music on hold to a bridge.", + "notes": "This will only stop music on hold being played via POST bridges/{bridgeId}/moh.", + "nickname": "stopMoh", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/play", + "description": "Play media to the participants of a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media on a bridge.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "play", + "responseClass": "Playback", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "playbackId", + "description": "Playback Id.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/play/{playbackId}", + "description": "Play media to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media on a bridge.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "playWithId", + "responseClass": "Playback", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + + } + ] + }, + { + "path": "/bridges/{bridgeId}/record", + "description": "Record audio on a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start a recording.", + "notes": "This records the mixed audio from all channels participating in this bridge.", + "nickname": "record", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Recording's filename", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "maxDurationSeconds", + "description": "Maximum duration of the recording, in seconds. 0 for no limit.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "maxSilenceSeconds", + "description": "Maximum duration of silence, in seconds. 0 for no limit.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "ifExists", + "description": "Action to take if a recording with the same name already exists.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "fail", + "allowableValues": { + "valueType": "LIST", + "values": [ + "fail", + "overwrite", + "append" + ] + } + }, + { + "name": "beep", + "description": "Play beep when recording begins", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "terminateOn", + "description": "DTMF input to terminate recording.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "any", + "*", + "#" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge is not in a Stasis application; A recording with the same name already exists on the system and can not be overwritten because it is in progress or ifExists=fail" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + } + ], + "models": { + "Bridge": { + "id": "Bridge", + "description": "The merging of media from one or more channels.\n\nEveryone on the bridge receives the same audio.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for this bridge", + "required": true + }, + "technology": { + "type": "string", + "description": "Name of the current bridging technology", + "required": true + }, + "bridge_type": { + "type": "string", + "description": "Type of bridge technology", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "mixing", + "holding" + ] + } + }, + "bridge_class": { + "type": "string", + "description": "Bridging class", + "required": true + }, + "creator": { + "type": "string", + "description": "Entity that created the bridge", + "required": true + }, + "name": { + "type": "string", + "description": "Name the creator gave the bridge", + "required": true + }, + "channels": { + "type": "List[string]", + "description": "Ids of channels participating in this bridge", + "required": true + }, + "video_mode": { + "type": "string", + "description": "The video mode the bridge is using. One of 'none', 'talker', or 'single'.", + "required": false + }, + "video_source_id": { + "type": "string", + "description": "The ID of the channel that is the source of video in this bridge, if one exists.", + "required": false + }, + "creationtime": { + "required": true, + "type": "Date", + "description": "Timestamp when bridge was created" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_5_1_0/channels.json b/codegen/src/main/resources/codegen-data/ari_5_1_0/channels.json new file mode 100644 index 00000000..94afb277 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_5_1_0/channels.json @@ -0,0 +1,2171 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/channels.{format}", + "requiresModules": [ + "res_stasis_answer", + "res_stasis_playback", + "res_stasis_recording", + "res_stasis_snoop" + ], + "apis": [ + { + "path": "/channels", + "description": "Active channels", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all active channels in Asterisk.", + "nickname": "list", + "responseClass": "List[Channel]" + }, + { + "httpMethod": "POST", + "summary": "Create a new channel (originate).", + "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.", + "nickname": "originate", + "responseClass": "Channel", + "parameters": [ + { + "name": "endpoint", + "description": "Endpoint to call.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to dial after the endpoint answers. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to dial after the endpoint answers. If omitted, uses 'default'. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to dial after the endpoint answers. If omitted, uses 1. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "long" + }, + { + "name": "label", + "description": "The label to dial after the endpoint answers. Will supersede 'priority' if provided. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The application that is subscribed to the originated channel. When the channel is answered, it will be passed to this Stasis application. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "callerId", + "description": "CallerID to use when dialing the endpoint or extension.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 30 + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "The unique id of the channel which is originating this one.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "formats", + "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for originating a channel." + }, + { + "code": 409, + "reason": "Channel with given unique ID already exists." + } + ] + } + ] + }, + { + "path": "/channels/create", + "description": "Create a channel and place it in a Stasis app, but do not dial the channel yet.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Create channel.", + "nickname": "create", + "responseClass": "Channel", + "parameters": [ + { + "name": "endpoint", + "description": "Endpoint for channel communication", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "Stasis Application to place channel into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "Unique ID of the calling channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "formats", + "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 409, + "reason": "Channel with given unique ID already exists." + } + ] + } + ] + }, + { + "path": "/channels/{channelId}", + "description": "Active channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "Channel details.", + "nickname": "get", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + } + ] + }, + { + "httpMethod": "POST", + "summary": "Create a new channel (originate with id).", + "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.", + "nickname": "originateWithId", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "endpoint", + "description": "Endpoint to call.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to dial after the endpoint answers. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to dial after the endpoint answers. If omitted, uses 'default'. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to dial after the endpoint answers. If omitted, uses 1. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "long" + }, + { + "name": "label", + "description": "The label to dial after the endpoint answers. Will supersede 'priority' if provided. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The application that is subscribed to the originated channel. When the channel is answered, it will be passed to this Stasis application. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "callerId", + "description": "CallerID to use when dialing the endpoint or extension.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 30 + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "The unique id of the channel which is originating this one.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "formats", + "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for originating a channel." + }, + { + "code": 409, + "reason": "Channel with given unique ID already exists." + } + ] + + }, + { + "httpMethod": "DELETE", + "summary": "Delete (i.e. hangup) a channel.", + "nickname": "hangup", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "reason_code", + "description": "The reason code for hanging up the channel for detail use. Mutually exclusive with 'reason'. See detail hangup codes at here. https://wiki.asterisk.org/wiki/display/AST/Hangup+Cause+Mappings", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "reason", + "description": "Reason for hanging up the channel for simple use. Mutually exclusive with 'reason_code'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "normal", + "busy", + "congestion", + "no_answer", + "timeout", + "rejected", + "unallocated", + "normal_unspecified", + "number_incomplete", + "codec_mismatch", + "interworking", + "failure", + "answered_elsewhere" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid reason for hangup provided" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/continue", + "description": "Exit application; continue execution in the dialplan", + "operations": [ + { + "httpMethod": "POST", + "summary": "Exit application; continue execution in the dialplan.", + "nickname": "continueInDialplan", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "label", + "description": "The label to continue to - will supersede 'priority' if both are provided.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/move", + "description": "Move the channel from one Stasis application to another.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Move the channel from one Stasis application to another.", + "nickname": "move", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The channel will be passed to this Stasis application.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": "404", + "reason": "Channel not found" + }, + { + "code": "409", + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/redirect", + "description": "Inform the channel that it should redirect itself to a different location. Note that this will almost certainly cause the channel to exit the application.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Redirect the channel to a different location.", + "nickname": "redirect", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "endpoint", + "description": "The endpoint to redirect the channel to", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Endpoint parameter not provided" + }, + { + "code": 404, + "reason": "Channel or endpoint not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 422, + "reason": "Endpoint is not the same type as the channel" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/answer", + "description": "Answer a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Answer a channel.", + "nickname": "answer", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/ring", + "description": "Send a ringing indication to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Indicate ringing to a channel.", + "nickname": "ring", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop ringing indication on a channel if locally generated.", + "nickname": "ringStop", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/dtmf", + "description": "Send DTMF to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Send provided DTMF to a given channel.", + "nickname": "sendDTMF", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "dtmf", + "description": "DTMF To send.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "before", + "description": "Amount of time to wait before DTMF digits (specified in milliseconds) start.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0 + }, + { + "name": "between", + "description": "Amount of time in between DTMF digits (specified in milliseconds).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 100 + }, + { + "name": "duration", + "description": "Length of each DTMF digit (specified in milliseconds).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 100 + }, + { + "name": "after", + "description": "Amount of time to wait after DTMF digits (specified in milliseconds) end.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0 + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "DTMF is required" + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/mute", + "description": "Mute a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Mute a channel.", + "nickname": "mute", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "Direction in which to mute audio", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both", + "in", + "out" + ] + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unmute a channel.", + "nickname": "unmute", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "Direction in which to unmute audio", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both", + "in", + "out" + ] + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/hold", + "description": "Put a channel on hold", + "operations": [ + { + "httpMethod": "POST", + "summary": "Hold a channel.", + "nickname": "hold", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Remove a channel from hold.", + "nickname": "unhold", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/moh", + "description": "Play music on hold to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play music on hold to a channel.", + "notes": "Using media operations such as /play on a channel playing MOH in this manner will suspend MOH without resuming automatically. If continuing music on hold is desired, the stasis application must reinitiate music on hold.", + "nickname": "startMoh", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "mohClass", + "description": "Music on hold class to use", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing music on hold to a channel.", + "nickname": "stopMoh", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/silence", + "description": "Play silence to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play silence to a channel.", + "notes": "Using media operations such as /play on a channel playing silence in this manner will suspend silence without resuming automatically.", + "nickname": "startSilence", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing silence to a channel.", + "nickname": "stopSilence", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/play", + "description": "Play media to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "play", + "responseClass": "Playback", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000 + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/play/{playbackId}", + "description": "Play media to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media and specify the playbackId.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "playWithId", + "responseClass": "Playback", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000 + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/record", + "description": "Record audio from a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start a recording.", + "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.", + "nickname": "record", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Recording's filename", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "maxDurationSeconds", + "description": "Maximum duration of the recording, in seconds. 0 for no limit", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "maxSilenceSeconds", + "description": "Maximum duration of silence, in seconds. 0 for no limit", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "ifExists", + "description": "Action to take if a recording with the same name already exists.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "fail", + "allowableValues": { + "valueType": "LIST", + "values": [ + "fail", + "overwrite", + "append" + ] + } + }, + { + "name": "beep", + "description": "Play beep when recording begins", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "terminateOn", + "description": "DTMF input to terminate recording", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "any", + "*", + "#" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "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" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/variable", + "description": "Variables on a channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the value of a channel variable or function.", + "nickname": "getChannelVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The channel variable or function to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Channel or variable not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "POST", + "summary": "Set the value of a channel variable or function.", + "nickname": "setChannelVar", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The channel variable or function to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/snoop", + "description": "Snoop (spy/whisper) on a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start snooping.", + "notes": "Snoop (spy/whisper) on a specific channel.", + "nickname": "snoopChannel", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "spy", + "description": "Direction of audio to spy on", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "whisper", + "description": "Direction of audio to whisper into", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "app", + "description": "Application the snooping channel is placed into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "snoopId", + "description": "Unique ID to assign to snooping channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/snoop/{snoopId}", + "description": "Snoop (spy/whisper) on a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start snooping.", + "notes": "Snoop (spy/whisper) on a specific channel.", + "nickname": "snoopChannelWithId", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "snoopId", + "description": "Unique ID to assign to snooping channel", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "spy", + "description": "Direction of audio to spy on", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "whisper", + "description": "Direction of audio to whisper into", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "app", + "description": "Application the snooping channel is placed into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/dial", + "description": "Dial a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Dial a created channel.", + "nickname": "dial", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "caller", + "description": "Channel ID of caller", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Dial timeout", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel cannot be found." + }, + { + "code": 409, + "reason": "Channel cannot be dialed." + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/rtp_statistics", + "description": "Get RTP statistics information for RTP on a channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "RTP stats on a channel.", + "nickname": "rtpstatistics", + "responseClass": "RTPstat", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel cannot be found." + } + ] + } + ] + }, + { + "path": "/channels/externalMedia", + "description": "Create a channel to an External Media source/sink.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start an External Media session.", + "notes": "Create a channel to an External Media source/sink.", + "nickname": "externalMedia", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "Stasis Application to place channel into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "external_host", + "description": "Hostname/ip:port of external host", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "encapsulation", + "description": "Payload encapsulation protocol", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "rtp", + "allowableValues": { + "valueType": "LIST", + "values": [ + "rtp" + ] + } + }, + { + "name": "transport", + "description": "Transport protocol", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "udp", + "allowableValues": { + "valueType": "LIST", + "values": [ + "udp" + ] + } + }, + { + "name": "connection_type", + "description": "Connection type (client/server)", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "client", + "allowableValues": { + "valueType": "LIST", + "values": [ + "client" + ] + } + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "External media direction", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 409, + "reason": "Channel is not in a Stasis application; Channel is already bridged" + } + ] + } + ] + } + ], + "models": { + "Dialed": { + "id": "Dialed", + "description": "Dialed channel information.", + "properties": {} + }, + "DialplanCEP": { + "id": "DialplanCEP", + "description": "Dialplan location (context/extension/priority)", + "properties": { + "context": { + "required": true, + "type": "string", + "description": "Context in the dialplan" + }, + "exten": { + "required": true, + "type": "string", + "description": "Extension in the dialplan" + }, + "priority": { + "required": true, + "type": "long", + "description": "Priority in the dialplan" + }, + "app_name": { + "required": true, + "type": "string", + "description": "Name of current dialplan application" + }, + "app_data": { + "required": true, + "type": "string", + "description": "Parameter of current dialplan application" + } + } + }, + "CallerID": { + "id": "CallerID", + "description": "Caller identification", + "properties": { + "name": { + "required": true, + "type": "string" + }, + "number": { + "required": true, + "type": "string" + } + } + }, + "RTPstat": { + "id": "RTPstat", + "description": "A statistics of a RTP.", + "properties": { + "txcount": { + "required": true, + "type": "int", + "description": "Number of packets transmitted." + }, + "rxcount": { + "required": true, + "type": "int", + "description": "Number of packets received." + }, + "txjitter": { + "required": false, + "type": "double", + "description": "Jitter on transmitted packets." + }, + "rxjitter": { + "required": false, + "type": "double", + "description": "Jitter on received packets." + }, + "remote_maxjitter": { + "required": false, + "type": "double", + "description": "Maximum jitter on remote side." + }, + "remote_minjitter": { + "required": false, + "type": "double", + "description": "Minimum jitter on remote side." + }, + "remote_normdevjitter": { + "required": false, + "type": "double", + "description": "Average jitter on remote side." + }, + "remote_stdevjitter": { + "required": false, + "type": "double", + "description": "Standard deviation jitter on remote side." + }, + "local_maxjitter": { + "required": false, + "type": "double", + "description": "Maximum jitter on local side." + }, + "local_minjitter": { + "required": false, + "type": "double", + "description": "Minimum jitter on local side." + }, + "local_normdevjitter": { + "required": false, + "type": "double", + "description": "Average jitter on local side." + }, + "local_stdevjitter": { + "required": false, + "type": "double", + "description": "Standard deviation jitter on local side." + }, + "txploss": { + "required": true, + "type": "int", + "description": "Number of transmitted packets lost." + }, + "rxploss": { + "required": true, + "type": "int", + "description": "Number of received packets lost." + }, + "remote_maxrxploss": { + "required": false, + "type": "double", + "description": "Maximum number of packets lost on remote side." + }, + "remote_minrxploss": { + "required": false, + "type": "double", + "description": "Minimum number of packets lost on remote side." + }, + "remote_normdevrxploss": { + "required": false, + "type": "double", + "description": "Average number of packets lost on remote side." + }, + "remote_stdevrxploss": { + "required": false, + "type": "double", + "description": "Standard deviation packets lost on remote side." + }, + "local_maxrxploss": { + "required": false, + "type": "double", + "description": "Maximum number of packets lost on local side." + }, + "local_minrxploss": { + "required": false, + "type": "double", + "description": "Minimum number of packets lost on local side." + }, + "local_normdevrxploss": { + "required": false, + "type": "double", + "description": "Average number of packets lost on local side." + }, + "local_stdevrxploss": { + "required": false, + "type": "double", + "description": "Standard deviation packets lost on local side." + }, + "rtt": { + "required": false, + "type": "double", + "description": "Total round trip time." + }, + "maxrtt": { + "required": false, + "type": "double", + "description": "Maximum round trip time." + }, + "minrtt": { + "required": false, + "type": "double", + "description": "Minimum round trip time." + }, + "normdevrtt": { + "required": false, + "type": "double", + "description": "Average round trip time." + }, + "stdevrtt": { + "required": false, + "type": "double", + "description": "Standard deviation round trip time." + }, + "local_ssrc": { + "required": true, + "type": "int", + "description": "Our SSRC." + }, + "remote_ssrc": { + "required": true, + "type": "int", + "description": "Their SSRC." + }, + "txoctetcount": { + "required": true, + "type": "int", + "description": "Number of octets transmitted." + }, + "rxoctetcount": { + "required": true, + "type": "int", + "description": "Number of octets received." + }, + "channel_uniqueid": { + "required": true, + "type": "string", + "description": "The Asterisk channel's unique ID that owns this instance." + } + } + }, + "Channel": { + "id": "Channel", + "description": "A specific communication connection between Asterisk and an Endpoint.", + "properties": { + "id": { + "required": true, + "type": "string", + "description": "Unique identifier of the channel.\n\nThis is the same as the Uniqueid field in AMI." + }, + "name": { + "required": true, + "type": "string", + "description": "Name of the channel (i.e. SIP/foo-0000a7e3)" + }, + "state": { + "required": true, + "type": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "Down", + "Rsrved", + "OffHook", + "Dialing", + "Ring", + "Ringing", + "Up", + "Busy", + "Dialing Offhook", + "Pre-ring", + "Unknown" + ] + } + }, + "caller": { + "required": true, + "type": "CallerID" + }, + "connected": { + "required": true, + "type": "CallerID" + }, + "accountcode": { + "required": true, + "type": "string" + }, + "dialplan": { + "required": true, + "type": "DialplanCEP", + "description": "Current location in the dialplan" + }, + "creationtime": { + "required": true, + "type": "Date", + "description": "Timestamp when channel was created" + }, + "language": { + "required": true, + "type": "string", + "description": "The default spoken language" + }, + "channelvars": { + "required": false, + "type": "object", + "description": "Channel variables" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_5_1_0/deviceStates.json b/codegen/src/main/resources/codegen-data/ari_5_1_0/deviceStates.json new file mode 100644 index 00000000..bd389355 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_5_1_0/deviceStates.json @@ -0,0 +1,154 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "Kevin Harwell ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/deviceStates.{format}", + "requiresModules": [ + "res_stasis_device_state" + ], + "apis": [ + { + "path": "/deviceStates", + "description": "Device states", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all ARI controlled device states.", + "nickname": "list", + "responseClass": "List[DeviceState]" + } + ] + }, + { + "path": "/deviceStates/{deviceName}", + "description": "Device state", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve the current state of a device.", + "nickname": "get", + "responseClass": "DeviceState", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Change the state of a device controlled by ARI. (Note - implicitly creates the device state).", + "nickname": "update", + "responseClass": "void", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "deviceState", + "description": "Device state value", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "NOT_INUSE", + "INUSE", + "BUSY", + "INVALID", + "UNAVAILABLE", + "RINGING", + "RINGINUSE", + "ONHOLD" + ] + } + + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Device name is missing" + }, + { + "code": 409, + "reason": "Uncontrolled device specified" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Destroy a device-state controlled by ARI.", + "nickname": "delete", + "responseClass": "void", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Device name is missing" + }, + { + "code": 409, + "reason": "Uncontrolled device specified" + } + ] + } + ] + } + ], + "models": { + "DeviceState": { + "id": "DeviceState", + "description": "Represents the state of a device.", + "properties": { + "name": { + "type": "string", + "description": "Name of the device.", + "required": true + }, + "state": { + "type": "string", + "description": "Device's state", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "UNKNOWN", + "NOT_INUSE", + "INUSE", + "BUSY", + "INVALID", + "UNAVAILABLE", + "RINGING", + "RINGINUSE", + "ONHOLD" + ] + } + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_5_1_0/endpoints.json b/codegen/src/main/resources/codegen-data/ari_5_1_0/endpoints.json new file mode 100644 index 00000000..1f77d370 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_5_1_0/endpoints.json @@ -0,0 +1,263 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/endpoints.{format}", + "apis": [ + { + "path": "/endpoints", + "description": "Asterisk endpoints", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all endpoints.", + "nickname": "list", + "responseClass": "List[Endpoint]" + } + ] + }, + { + "path": "/endpoints/sendMessage", + "description": "Send a message to some technology URI or endpoint.", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Send a message to some technology URI or endpoint.", + "nickname": "sendMessage", + "responseClass": "void", + "parameters": [ + { + "name": "to", + "description": "The endpoint resource or technology specific URI to send the message to. Valid resources are sip, pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "from", + "description": "The endpoint resource or technology specific identity to send this message from. Valid resources are sip, pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "body", + "description": "The body of the message", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "descriptioni": "The \"variables\" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, pjsip and sip resource types will add the key/value pairs as SIP headers,", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoint not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}", + "description": "Asterisk endpoints", + "operations": [ + { + "httpMethod": "GET", + "summary": "List available endoints for a given endpoint technology.", + "nickname": "listByTech", + "responseClass": "List[Endpoint]", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoints (sip,iax2,...)", + "paramType": "path", + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Endpoints not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}/{resource}", + "description": "Single endpoint", + "operations": [ + { + "httpMethod": "GET", + "summary": "Details for an endpoint.", + "nickname": "get", + "responseClass": "Endpoint", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "resource", + "description": "ID of the endpoint", + "paramType": "path", + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoints not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}/{resource}/sendMessage", + "description": "Send a message to some endpoint in a technology.", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Send a message to some endpoint in a technology.", + "nickname": "sendMessageToEndpoint", + "responseClass": "void", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "resource", + "description": "ID of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "from", + "description": "The endpoint resource or technology specific identity to send this message from. Valid resources are sip, pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "body", + "description": "The body of the message", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "descriptioni": "The \"variables\" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, pjsip and sip resource types will add the key/value pairs as SIP headers,", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoint not found" + } + ] + } + ] + } + ], + "models": { + "Endpoint": { + "id": "Endpoint", + "description": "An external device that may offer/accept calls to/from Asterisk.\n\nUnlike most resources, which have a single unique identifier, an endpoint is uniquely identified by the technology/resource pair.", + "properties": { + "technology": { + "type": "string", + "description": "Technology of the endpoint", + "required": true + }, + "resource": { + "type": "string", + "description": "Identifier of the endpoint, specific to the given technology.", + "required": true + }, + "state": { + "type": "string", + "description": "Endpoint's state", + "required": false, + "allowableValues": { + "valueType": "LIST", + "values": [ + "unknown", + "offline", + "online" + ] + } + }, + "channel_ids": { + "type": "List[string]", + "description": "Id's of channels associated with this endpoint", + "required": true + } + } + }, + "TextMessage": { + "id": "TextMessage", + "description": "A text message.", + "properties": { + "from": { + "type": "string", + "description": "A technology specific URI specifying the source of the message. For sip and pjsip technologies, any SIP URI can be specified. For xmpp, the URI must correspond to the client connection being used to send the message.", + "required": true + }, + "to": { + "type": "string", + "description": "A technology specific URI specifying the destination of the message. Valid technologies include sip, pjsip, and xmp. The destination of a message should be an endpoint.", + "required": true + }, + "body": { + "type": "string", + "description": "The text of the message.", + "required": true + }, + "variables": { + "type": "object", + "description": "Technology specific key/value pairs (JSON object) associated with the message.", + "required": false + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_5_1_0/events.json b/codegen/src/main/resources/codegen-data/ari_5_1_0/events.json new file mode 100644 index 00000000..c9822f6c --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_5_1_0/events.json @@ -0,0 +1,918 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.2", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/events.{format}", + "requiresModules": [ + "res_http_websocket" + ], + "apis": [ + { + "path": "/events", + "description": "Events from Asterisk to applications", + "operations": [ + { + "httpMethod": "GET", + "upgrade": "websocket", + "websocketProtocol": "ari", + "summary": "WebSocket connection for events.", + "nickname": "eventWebsocket", + "responseClass": "Message", + "parameters": [ + { + "name": "app", + "description": "Applications to subscribe to.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "subscribeAll", + "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'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean" + } + ] + } + ] + }, + { + "path": "/events/user/{eventName}", + "description": "Stasis application user events", + "operations": [ + { + "httpMethod": "POST", + "summary": "Generate a user event.", + "nickname": "userEvent", + "responseClass": "void", + "parameters": [ + { + "name": "eventName", + "description": "Event name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "application", + "description": "The name of the application that will receive this event", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "source", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}/{resource}, deviceState:{deviceName}", + "paramType": "query", + "required": false, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds custom key/value pairs to add to the user event. Ex. { \"variables\": { \"key\": \"value\" } }", + "paramType": "body", + "required": false, + "allowMultiple": false, + "dataType": "containers" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 422, + "reason": "Event source not found." + }, + { + "code": 400, + "reason": "Invalid even tsource URI or userevent data." + } + ] + } + ] + } + ], + "models": { + "Message": { + "id": "Message", + "description": "Base type for errors and events", + "discriminator": "type", + "properties": { + "type": { + "type": "string", + "required": true, + "description": "Indicates the type of this message." + }, + "asterisk_id": { + "type": "string", + "required": false, + "description": "The unique ID for the Asterisk instance that raised this event." + } + }, + "subTypes": [ + "MissingParams", + "Event" + ] + }, + "MissingParams": { + "id": "MissingParams", + "description": "Error event sent when required params are missing.", + "properties": { + "params": { + "required": true, + "type": "List[string]", + "description": "A list of the missing parameters" + } + } + }, + "Event": { + "id": "Event", + "description": "Base type for asynchronous events from Asterisk.", + "properties": { + "application": { + "type": "string", + "description": "Name of the application receiving the event.", + "required": true + }, + "timestamp": { + "type": "Date", + "description": "Time at which this event was created.", + "required": true + } + }, + "subTypes": [ + "DeviceStateChanged", + "PlaybackStarted", + "PlaybackContinuing", + "PlaybackFinished", + "RecordingStarted", + "RecordingFinished", + "RecordingFailed", + "ApplicationMoveFailed", + "ApplicationReplaced", + "BridgeCreated", + "BridgeDestroyed", + "BridgeMerged", + "BridgeBlindTransfer", + "BridgeAttendedTransfer", + "BridgeVideoSourceChanged", + "ChannelCreated", + "ChannelDestroyed", + "ChannelEnteredBridge", + "ChannelLeftBridge", + "ChannelStateChange", + "ChannelDtmfReceived", + "ChannelDialplan", + "ChannelCallerId", + "ChannelUserevent", + "ChannelHangupRequest", + "ChannelVarset", + "ChannelTalkingStarted", + "ChannelTalkingFinished", + "ChannelHold", + "ChannelUnhold", + "ContactStatusChange", + "EndpointStateChange", + "Dial", + "StasisEnd", + "StasisStart", + "TextMessageReceived", + "ChannelConnectedLine", + "PeerStatusChange" + ] + }, + "ContactInfo": { + "id": "ContactInfo", + "description": "Detailed information about a contact on an endpoint.", + "properties": { + "uri": { + "type": "string", + "description": "The location of the contact.", + "required": true + }, + "contact_status": { + "type": "string", + "description": "The current status of the contact.", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "Unreachable", + "Reachable", + "Unknown", + "NonQualified", + "Removed" + ] + } + }, + "aor": { + "type": "string", + "description": "The Address of Record this contact belongs to.", + "required": true + }, + "roundtrip_usec": { + "type": "string", + "description": "Current round trip time, in microseconds, for the contact.", + "required": false + } + } + }, + "Peer": { + "id": "Peer", + "description": "Detailed information about a remote peer that communicates with Asterisk.", + "properties": { + "peer_status": { + "type": "string", + "description": "The current state of the peer. Note that the values of the status are dependent on the underlying peer technology.", + "required": true + }, + "cause": { + "type": "string", + "description": "An optional reason associated with the change in peer_status.", + "required": false + }, + "address": { + "type": "string", + "description": "The IP address of the peer.", + "required": false + }, + "port": { + "type": "string", + "description": "The port of the peer.", + "required": false + }, + "time": { + "type": "string", + "description": "The last known time the peer was contacted.", + "required": false + } + } + }, + "DeviceStateChanged": { + "id": "DeviceStateChanged", + "description": "Notification that a device state has changed.", + "properties": { + "device_state": { + "type": "DeviceState", + "description": "Device state object", + "required": true + } + } + }, + "PlaybackStarted": { + "id": "PlaybackStarted", + "description": "Event showing the start of a media playback operation.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "PlaybackContinuing": { + "id": "PlaybackContinuing", + "description": "Event showing the continuation of a media playback operation from one media URI to the next in the list.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "PlaybackFinished": { + "id": "PlaybackFinished", + "description": "Event showing the completion of a media playback operation.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "RecordingStarted": { + "id": "RecordingStarted", + "description": "Event showing the start of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "RecordingFinished": { + "id": "RecordingFinished", + "description": "Event showing the completion of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "RecordingFailed": { + "id": "RecordingFailed", + "description": "Event showing failure of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "ApplicationMoveFailed": { + "id": "ApplicationMoveFailed", + "description": "Notification that trying to move a channel to another Stasis application failed.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + }, + "destination": { + "required": true, + "type": "string" + }, + "args": { + "required": true, + "type": "List[string]", + "description": "Arguments to the application" + } + } + }, + "ApplicationReplaced": { + "id": "ApplicationReplaced", + "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.", + "properties": {} + }, + "BridgeCreated": { + "id": "BridgeCreated", + "description": "Notification that a bridge has been created.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeDestroyed": { + "id": "BridgeDestroyed", + "description": "Notification that a bridge has been destroyed.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeMerged": { + "id": "BridgeMerged", + "description": "Notification that one bridge has merged into another.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "bridge_from": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeVideoSourceChanged": { + "id": "BridgeVideoSourceChanged", + "description": "Notification that the source of video in a bridge has changed.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "old_video_source_id": { + "required": false, + "type": "string" + } + } + }, + "BridgeBlindTransfer": { + "id": "BridgeBlindTransfer", + "description": "Notification that a blind transfer has occurred.", + "properties": { + "channel": { + "description": "The channel performing the blind transfer", + "required": true, + "type": "Channel" + }, + "replace_channel": { + "description": "The channel that is replacing transferer when the transferee(s) can not be transferred directly", + "required": false, + "type": "Channel" + }, + "transferee": { + "description": "The channel that is being transferred", + "required": false, + "type": "Channel" + }, + "exten": { + "description": "The extension transferred to", + "required": true, + "type": "string" + }, + "context": { + "description": "The context transferred to", + "required": true, + "type": "string" + }, + "result": { + "description": "The result of the transfer attempt", + "required": true, + "type": "string" + }, + "is_external": { + "description": "Whether the transfer was externally initiated or not", + "required": true, + "type": "boolean" + }, + "bridge": { + "description": "The bridge being transferred", + "type": "Bridge" + } + } + }, + "BridgeAttendedTransfer": { + "id": "BridgeAttendedTransfer", + "description": "Notification that an attended transfer has occurred.", + "properties": { + "transferer_first_leg": { + "description": "First leg of the transferer", + "required": true, + "type": "Channel" + }, + "transferer_second_leg": { + "description": "Second leg of the transferer", + "required": true, + "type": "Channel" + }, + "replace_channel": { + "description": "The channel that is replacing transferer_first_leg in the swap", + "required": false, + "type": "Channel" + }, + "transferee": { + "description": "The channel that is being transferred", + "required": false, + "type": "Channel" + }, + "transfer_target": { + "description": "The channel that is being transferred to", + "required": false, + "type": "Channel" + }, + "result": { + "description": "The result of the transfer attempt", + "required": true, + "type": "string" + }, + "is_external": { + "description": "Whether the transfer was externally initiated or not", + "required": true, + "type": "boolean" + }, + "transferer_first_leg_bridge": { + "description": "Bridge the transferer first leg is in", + "type": "Bridge" + }, + "transferer_second_leg_bridge": { + "description": "Bridge the transferer second leg is in", + "type": "Bridge" + }, + "destination_type": { + "description": "How the transfer was accomplished", + "required": true, + "type": "string" + }, + "destination_bridge": { + "description": "Bridge that survived the merge result", + "type": "string" + }, + "destination_application": { + "description": "Application that has been transferred into", + "type": "string" + }, + "destination_link_first_leg": { + "description": "First leg of a link transfer result", + "type": "Channel" + }, + "destination_link_second_leg": { + "description": "Second leg of a link transfer result", + "type": "Channel" + }, + "destination_threeway_channel": { + "description": "Transferer channel that survived the threeway result", + "type": "Channel" + }, + "destination_threeway_bridge": { + "description": "Bridge that survived the threeway result", + "type": "Bridge" + } + } + }, + "ChannelCreated": { + "id": "ChannelCreated", + "description": "Notification that a channel has been created.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelDestroyed": { + "id": "ChannelDestroyed", + "description": "Notification that a channel has been destroyed.", + "properties": { + "cause": { + "required": true, + "description": "Integer representation of the cause of the hangup", + "type": "int" + }, + "cause_txt": { + "required": true, + "description": "Text representation of the cause of the hangup", + "type": "string" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelEnteredBridge": { + "id": "ChannelEnteredBridge", + "description": "Notification that a channel has entered a bridge.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "channel": { + "type": "Channel" + } + } + }, + "ChannelLeftBridge": { + "id": "ChannelLeftBridge", + "description": "Notification that a channel has left a bridge.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelStateChange": { + "id": "ChannelStateChange", + "description": "Notification of a channel's state change.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelDtmfReceived": { + "id": "ChannelDtmfReceived", + "description": "DTMF received on a channel.\n\nThis event is sent when the DTMF ends. There is no notification about the start of DTMF", + "properties": { + "digit": { + "required": true, + "type": "string", + "description": "DTMF digit received (0-9, A-E, # or *)" + }, + "duration_ms": { + "required": true, + "type": "int", + "description": "Number of milliseconds DTMF was received" + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which DTMF was received" + } + } + }, + "ChannelDialplan": { + "id": "ChannelDialplan", + "description": "Channel changed location in the dialplan.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that changed dialplan location." + }, + "dialplan_app": { + "required": true, + "type": "string", + "description": "The application about to be executed." + }, + "dialplan_app_data": { + "required": true, + "type": "string", + "description": "The data to be passed to the application." + } + } + }, + "ChannelCallerId": { + "id": "ChannelCallerId", + "description": "Channel changed Caller ID.", + "properties": { + "caller_presentation": { + "required": true, + "type": "int", + "description": "The integer representation of the Caller Presentation value." + }, + "caller_presentation_txt": { + "required": true, + "type": "string", + "description": "The text representation of the Caller Presentation value." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that changed Caller ID." + } + } + }, + "ChannelUserevent": { + "id": "ChannelUserevent", + "description": "User-generated event with additional user-defined fields in the object.", + "properties": { + "eventname": { + "required": true, + "type": "string", + "description": "The name of the user event." + }, + "channel": { + "required": false, + "type": "Channel", + "description": "A channel that is signaled with the user event." + }, + "bridge": { + "required": false, + "type": "Bridge", + "description": "A bridge that is signaled with the user event." + }, + "endpoint": { + "required": false, + "type": "Endpoint", + "description": "A endpoint that is signaled with the user event." + }, + "userevent": { + "required": true, + "type": "object", + "description": "Custom Userevent data" + } + } + }, + "ChannelHangupRequest": { + "id": "ChannelHangupRequest", + "description": "A hangup was requested on the channel.", + "properties": { + "cause": { + "type": "int", + "description": "Integer representation of the cause of the hangup." + }, + "soft": { + "type": "boolean", + "description": "Whether the hangup request was a soft hangup request." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which the hangup was requested." + } + } + }, + "ChannelVarset": { + "id": "ChannelVarset", + "description": "Channel variable changed.", + "properties": { + "variable": { + "required": true, + "type": "string", + "description": "The variable that changed." + }, + "value": { + "required": true, + "type": "string", + "description": "The new value of the variable." + }, + "channel": { + "required": false, + "type": "Channel", + "description": "The channel on which the variable was set.\n\nIf missing, the variable is a global variable." + } + } + }, + "ChannelHold": { + "id": "ChannelHold", + "description": "A channel initiated a media hold.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that initiated the hold event." + }, + "musicclass": { + "required": false, + "type": "string", + "description": "The music on hold class that the initiator requested." + } + } + }, + "ChannelUnhold": { + "id": "ChannelUnhold", + "description": "A channel initiated a media unhold.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that initiated the unhold event." + } + } + }, + "ChannelTalkingStarted": { + "id": "ChannelTalkingStarted", + "description": "Talking was detected on the channel.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which talking started." + } + } + }, + "ChannelTalkingFinished": { + "id": "ChannelTalkingFinished", + "description": "Talking is no longer detected on the channel.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which talking completed." + }, + "duration": { + "required": true, + "type": "int", + "description": "The length of time, in milliseconds, that talking was detected on the channel" + } + } + }, + "ContactStatusChange": { + "id": "ContactStatusChange", + "description": "The state of a contact on an endpoint has changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + }, + "contact_info": { + "required": true, + "type": "ContactInfo" + } + } + }, + "PeerStatusChange": { + "id": "PeerStatusChange", + "description": "The state of a peer associated with an endpoint has changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + }, + "peer": { + "required": true, + "type": "Peer" + } + } + }, + "EndpointStateChange": { + "id": "EndpointStateChange", + "description": "Endpoint state changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + } + } + }, + "Dial": { + "id": "Dial", + "description": "Dialing state has changed.", + "properties": { + "caller": { + "required": false, + "type": "Channel", + "description": "The calling channel." + }, + "peer": { + "required": true, + "type": "Channel", + "description": "The dialed channel." + }, + "forward": { + "required": false, + "type": "string", + "description": "Forwarding target requested by the original dialed channel." + }, + "forwarded": { + "required": false, + "type": "Channel", + "description": "Channel that the caller has been forwarded to." + }, + "dialstring": { + "required": false, + "type": "string", + "description": "The dial string for calling the peer channel." + }, + "dialstatus": { + "required": true, + "type": "string", + "description": "Current status of the dialing attempt to the peer." + } + } + }, + "StasisEnd": { + "id": "StasisEnd", + "description": "Notification that a channel has left a Stasis application.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "StasisStart": { + "id": "StasisStart", + "description": "Notification that a channel has entered a Stasis application.", + "properties": { + "args": { + "required": true, + "type": "List[string]", + "description": "Arguments to the application" + }, + "channel": { + "required": true, + "type": "Channel" + }, + "replace_channel": { + "required": false, + "type": "Channel" + } + } + }, + "TextMessageReceived": { + "id": "TextMessageReceived", + "description": "A text message was received from an endpoint.", + "properties": { + "message": { + "required": true, + "type": "TextMessage" + }, + "endpoint": { + "required": false, + "type": "Endpoint" + } + } + }, + "ChannelConnectedLine": { + "id": "ChannelConnectedLine", + "description": "Channel changed Connected Line.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel whose connected line has changed." + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_5_1_0/mailboxes.json b/codegen/src/main/resources/codegen-data/ari_5_1_0/mailboxes.json new file mode 100644 index 00000000..8f5941b8 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_5_1_0/mailboxes.json @@ -0,0 +1,137 @@ +{ + "_copyright": "Copyright (C) 2013, Digium, Inc.", + "_author": "Jonathan Rose ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/mailboxes.{format}", + "requiresModules": [ + "res_stasis_mailbox" + ], + "apis": [ + { + "path": "/mailboxes", + "description": "Mailboxes", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all mailboxes.", + "nickname": "list", + "responseClass": "List[Mailbox]" + } + ] + }, + { + "path": "/mailboxes/{mailboxName}", + "description": "Mailbox state", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve the current state of a mailbox.", + "nickname": "get", + "responseClass": "Mailbox", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Change the state of a mailbox. (Note - implicitly creates the mailbox).", + "nickname": "update", + "responseClass": "void", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "oldMessages", + "description": "Count of old messages in the mailbox", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "newMessages", + "description": "Count of new messages in the mailbox", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "int" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Destroy a mailbox.", + "nickname": "delete", + "responseClass": "void", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + } + ] + } + ], + "models": { + "Mailbox": { + "id": "Mailbox", + "description": "Represents the state of a mailbox.", + "properties": { + "name": { + "type": "string", + "description": "Name of the mailbox.", + "required": true + }, + "old_messages": { + "type": "int", + "description": "Count of old messages in the mailbox.", + "required": true + }, + "new_messages": { + "type": "int", + "description": "Count of new messages in the mailbox.", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_5_1_0/playbacks.json b/codegen/src/main/resources/codegen-data/ari_5_1_0/playbacks.json new file mode 100644 index 00000000..a78dcae7 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_5_1_0/playbacks.json @@ -0,0 +1,164 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/playbacks.{format}", + "requiresModules": [ + "res_stasis_playback" + ], + "apis": [ + { + "path": "/playbacks/{playbackId}", + "description": "Control object for a playback operation.", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a playback's details.", + "nickname": "get", + "responseClass": "Playback", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "The playback cannot be found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop a playback.", + "nickname": "stop", + "responseClass": "void", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "The playback cannot be found" + } + ] + } + ] + }, + { + "path": "/playbacks/{playbackId}/control", + "description": "Control object for a playback operation.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Control a playback.", + "nickname": "control", + "responseClass": "void", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "operation", + "description": "Operation to perform on the playback.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "restart", + "pause", + "unpause", + "reverse", + "forward" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "The provided operation parameter was invalid" + }, + { + "code": 404, + "reason": "The playback cannot be found" + }, + { + "code": 409, + "reason": "The operation cannot be performed in the playback's current state" + } +] + } + ] + } + ], + "models": { + "Playback": { + "id": "Playback", + "description": "Object representing the playback of media to a channel", + "properties": { + "id": { + "type": "string", + "description": "ID for this playback operation", + "required": true + }, + "media_uri": { + "type": "string", + "description": "The URI for the media currently being played back.", + "required": true + }, + "next_media_uri": { + "type": "string", + "description": "If a list of URIs is being played, the next media URI to be played back.", + "required": false + }, + "target_uri": { + "type": "string", + "description": "URI for the channel or bridge to play the media on", + "required": true + }, + "language": { + "type": "string", + "description": "For media types that support multiple languages, the language requested for playback." + }, + "state": { + "type": "string", + "description": "Current state of the playback operation.", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "queued", + "playing", + "continuing", + "done" + ] + } + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_5_1_0/recordings.json b/codegen/src/main/resources/codegen-data/ari_5_1_0/recordings.json new file mode 100644 index 00000000..6ffd6d8e --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_5_1_0/recordings.json @@ -0,0 +1,413 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/recordings.{format}", + "requiresModules": [ + "res_stasis_recording" + ], + "apis": [ + { + "path": "/recordings/stored", + "description": "Recordings", + "operations": [ + { + "httpMethod": "GET", + "summary": "List recordings that are complete.", + "nickname": "listStored", + "responseClass": "List[StoredRecording]" + } + ] + }, + { + "path": "/recordings/stored/{recordingName}", + "description": "Individual recording", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a stored recording's details.", + "nickname": "getStored", + "responseClass": "StoredRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Delete a stored recording.", + "nickname": "deleteStored", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/stored/{recordingName}/file", + "description": "The actual file associated with the stored recording", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the file associated with the stored recording.", + "nickname": "getStoredFile", + "responseClass": "binary", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 403, + "reason": "The recording file could not be opened" + }, + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/stored/{recordingName}/copy", + "description": "Copy an individual recording", + "operations": [ + { + "httpMethod": "POST", + "summary": "Copy a stored recording.", + "nickname": "copyStored", + "responseClass": "StoredRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording to copy", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "destinationRecordingName", + "description": "The destination name of the recording", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "A recording with the same name already exists on the system" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}", + "description": "A recording that is in progress", + "operations": [ + { + "httpMethod": "GET", + "summary": "List live recordings.", + "nickname": "getLive", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop a live recording and discard it.", + "nickname": "cancel", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/stop", + "operations": [ + { + "httpMethod": "POST", + "summary": "Stop a live recording and store it.", + "nickname": "stop", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/pause", + "operations": [ + { + "httpMethod": "POST", + "summary": "Pause a live recording.", + "notes": "Pausing a recording suspends silence detection, which will be restarted when the recording is unpaused. Paused time is not included in the accounting for maxDurationSeconds.", + "nickname": "pause", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unpause a live recording.", + "nickname": "unpause", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/mute", + "operations": [ + { + "httpMethod": "POST", + "summary": "Mute a live recording.", + "notes": "Muting a recording suspends silence detection, which will be restarted when the recording is unmuted.", + "nickname": "mute", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unmute a live recording.", + "nickname": "unmute", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + } + ] + } + ], + "models": { + "StoredRecording": { + "id": "StoredRecording", + "description": "A past recording that may be played back.", + "properties": { + "name": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + }, + "LiveRecording": { + "id": "LiveRecording", + "description": "A recording that is in progress", + "properties": { + "name": { + "required": true, + "type": "string", + "description": "Base name for the recording" + }, + "format": { + "required": true, + "type": "string", + "description": "Recording format (wav, gsm, etc.)" + }, + "target_uri": { + "required": true, + "type": "string", + "description": "URI for the channel or bridge being recorded" + }, + "state": { + "required": true, + "type": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "queued", + "recording", + "paused", + "done", + "failed", + "canceled" + ] + } + }, + "duration": { + "required": false, + "type": "int", + "description": "Duration in seconds of the recording" + }, + "talking_duration": { + "required": false, + "type": "int", + "description": "Duration of talking, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds." + }, + "silence_duration": { + "required": false, + "type": "int", + "description": "Duration of silence, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds." + }, + "cause": { + "required": false, + "type": "string", + "description": "Cause for recording failure if failed" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_5_1_0/sounds.json b/codegen/src/main/resources/codegen-data/ari_5_1_0/sounds.json new file mode 100644 index 00000000..8fbe1c57 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_5_1_0/sounds.json @@ -0,0 +1,99 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/sounds.{format}", + "apis": [ + { + "path": "/sounds", + "description": "Sounds", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all sounds.", + "nickname": "list", + "responseClass": "List[Sound]", + "parameters": [ + { + "name": "lang", + "description": "Lookup sound for a specific language.", + "paramType": "query", + "dataType": "string", + "required": false + }, + { + "name": "format", + "description": "Lookup sound in a specific format.", + "paramType": "query", + "dataType": "string", + "required": false, + "__note": "core show translation can show translation paths between formats, along with relative costs. so this could be just installed format, or we could follow that for transcoded formats." + } + ] + } + ] + }, + { + "path": "/sounds/{soundId}", + "description": "Individual sound", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a sound's details.", + "nickname": "get", + "responseClass": "Sound", + "parameters": [ + { + "name": "soundId", + "description": "Sound's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ] + } + ] + } + ], + "models": { + "FormatLangPair": { + "id": "FormatLangPair", + "description": "Identifies the format and language of a sound file", + "properties": { + "language": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + }, + "Sound": { + "id": "Sound", + "description": "A media file that may be played back.", + "properties": { + "id": { + "required": true, + "description": "Sound's identifier.", + "type": "string" + }, + "text": { + "required": false, + "description": "Text description of the sound, usually the words spoken.", + "type": "string" + }, + "formats": { + "required": true, + "description": "The formats and languages in which this sound is available.", + "type": "List[FormatLangPair]" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_5_1_1/applications.json b/codegen/src/main/resources/codegen-data/ari_5_1_1/applications.json new file mode 100644 index 00000000..09c5cd5c --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_5_1_1/applications.json @@ -0,0 +1,223 @@ +{ + "_copyright": "Copyright (C) 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/applications.{format}", + "apis": [ + { + "path": "/applications", + "description": "Stasis applications", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all applications.", + "nickname": "list", + "responseClass": "List[Application]" + } + ] + }, + { + "path": "/applications/{applicationName}", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get details of an application.", + "nickname": "get", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Application does not exist." + } + ] + } + ] + }, + { + "path": "/applications/{applicationName}/subscription", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "POST", + "summary": "Subscribe an application to a event source.", + "notes": "Returns the state of the application after the subscriptions have changed", + "nickname": "subscribe", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "eventSource", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing parameter." + }, + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 422, + "reason": "Event source does not exist." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unsubscribe an application from an event source.", + "notes": "Returns the state of the application after the subscriptions have changed", + "nickname": "unsubscribe", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "eventSource", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing parameter; event source scheme not recognized." + }, + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 409, + "reason": "Application not subscribed to event source." + }, + { + "code": 422, + "reason": "Event source does not exist." + } + ] + } + ] + }, + { + "path": "/applications/{applicationName}/eventFilter", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Filter application events types.", + "notes": "Allowed and/or disallowed event type filtering can be done. The body (parameter) should specify a JSON key/value object that describes the type of event filtering needed. One, or both of the following keys can be designated:

\"allowed\" - Specifies an allowed list of event types
\"disallowed\" - Specifies a disallowed list of event types

Further, each of those key's value should be a JSON array that holds zero, or more JSON key/value objects. Each of these objects must contain the following key with an associated value:

\"type\" - The type name of the event to filter

The value must be the string name (case sensitive) of the event type that needs filtering. For example:

{ \"allowed\": [ { \"type\": \"StasisStart\" }, { \"type\": \"StasisEnd\" } ] }

As this specifies only an allowed list, then only those two event type messages are sent to the application. No other event messages are sent.

The following rules apply:

* If the body is empty, both the allowed and disallowed filters are set empty.
* If both list types are given then both are set to their respective values (note, specifying an empty array for a given type sets that type to empty).
* If only one list type is given then only that type is set. The other type is not updated.
* An empty \"allowed\" list means all events are allowed.
* An empty \"disallowed\" list means no events are disallowed.
* Disallowed events take precedence over allowed events if the event type is specified in both lists.", + "nickname": "filter", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "filter", + "description": "Specify which event types to allow/disallow", + "paramType": "body", + "required": false, + "dataType": "object", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Bad request." + }, + { + "code": 404, + "reason": "Application does not exist." + } + ] + } + ] + } + ], + "models": { + "Application": { + "id": "Application", + "description": "Details of a Stasis application", + "properties": { + "name": { + "type": "string", + "description": "Name of this application", + "required": true + }, + "channel_ids": { + "type": "List[string]", + "description": "Id's for channels subscribed to.", + "required": true + }, + "bridge_ids": { + "type": "List[string]", + "description": "Id's for bridges subscribed to.", + "required": true + }, + "endpoint_ids": { + "type": "List[string]", + "description": "{tech}/{resource} for endpoints subscribed to.", + "required": true + }, + "device_names": { + "type": "List[string]", + "description": "Names of the devices subscribed to.", + "required": true + }, + "events_allowed": { + "type": "List[object]", + "description": "Event types sent to the application.", + "required": true + }, + "events_disallowed": { + "type": "List[object]", + "description": "Event types not sent to the application.", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_5_1_1/asterisk.json b/codegen/src/main/resources/codegen-data/ari_5_1_1/asterisk.json new file mode 100644 index 00000000..841e6cd8 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_5_1_1/asterisk.json @@ -0,0 +1,725 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/asterisk.{format}", + "apis": [ + { + "path": "/asterisk/config/dynamic/{configClass}/{objectType}/{id}", + "description": "Asterisk dynamic configuration", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve a dynamic configuration object.", + "nickname": "getObject", + "responseClass": "List[ConfigTuple]", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to retrieve.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to retrieve.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "{configClass|objectType|id} not found" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Create or update a dynamic configuration object.", + "nickname": "updateObject", + "responseClass": "List[ConfigTuple]", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to create or update.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to create or update.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "fields", + "description": "The body object should have a value that is a list of ConfigTuples, which provide the fields to update. Ex. [ { \"attribute\": \"directmedia\", \"value\": \"false\" } ]", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Bad request body" + }, + { + "code": 403, + "reason": "Could not create or update object" + }, + { + "code": 404, + "reason": "{configClass|objectType} not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Delete a dynamic configuration object.", + "nickname": "deleteObject", + "responseClass": "void", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to delete.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to delete.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 403, + "reason": "Could not delete object" + }, + { + "code": 404, + "reason": "{configClass|objectType|id} not found" + } + ] + } + ] + }, + { + "path": "/asterisk/info", + "description": "Asterisk system information (similar to core show settings)", + "operations": [ + { + "httpMethod": "GET", + "summary": "Gets Asterisk system information.", + "nickname": "getInfo", + "responseClass": "AsteriskInfo", + "parameters": [ + { + "name": "only", + "description": "Filter information returned", + "paramType": "query", + "required": false, + "allowMultiple": true, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "build", + "system", + "config", + "status" + ] + } + } + ] + } + ] + }, + { + "path": "/asterisk/ping", + "description": "Asterisk ping", + "operations": [ + { + "httpMethod": "GET", + "summary": "Response pong message.", + "nickname": "ping", + "responseClass": "AsteriskPing" + } + ] + }, + { + "path": "/asterisk/modules", + "description": "Asterisk modules", + "operations": [ + { + "httpMethod": "GET", + "summary": "List Asterisk modules.", + "nickname": "listModules", + "responseClass": "List[Module]" + } + ] + }, + { + "path": "/asterisk/modules/{moduleName}", + "description": "Asterisk module", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get Asterisk module information.", + "nickname": "getModule", + "responseClass": "Module", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module could not be found in running modules." + }, + { + "code": 409, + "reason": "Module information could not be retrieved." + } + ] + }, + { + "httpMethod": "POST", + "summary": "Load an Asterisk module.", + "nickname": "loadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 409, + "reason": "Module could not be loaded." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unload an Asterisk module.", + "nickname": "unloadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module not found in running modules." + }, + { + "code": 409, + "reason": "Module could not be unloaded." + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Reload an Asterisk module.", + "nickname": "reloadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module not found in running modules." + }, + { + "code": 409, + "reason": "Module could not be reloaded." + } + ] + } + ] + }, + { + "path": "/asterisk/logging", + "description": "Asterisk log channels", + "operations": [ + { + "httpMethod": "GET", + "summary": "Gets Asterisk log channel information.", + "nickname": "listLogChannels", + "responseClass": "List[LogChannel]" + } + ] + }, + { + "path": "/asterisk/logging/{logChannelName}", + "description": "Asterisk log channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Adds a log channel.", + "nickname": "addLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "The log channel to add", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "configuration", + "description": "levels of the log channel", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Bad request body" + }, + { + "code": 409, + "reason": "Log channel could not be created." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Deletes a log channel.", + "nickname": "deleteLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "Log channels name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Log channel does not exist." + } + ] + } + ] + }, + { + "path": "/asterisk/logging/{logChannelName}/rotate", + "description": "Asterisk log channel", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Rotates a log channel.", + "nickname": "rotateLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "Log channel's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Log channel does not exist." + } + ] + } + ] + }, + { + "path": "/asterisk/variable", + "description": "Global variables", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the value of a global variable.", + "nickname": "getGlobalVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "variable", + "description": "The variable to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + } + ] + }, + { + "httpMethod": "POST", + "summary": "Set the value of a global variable.", + "nickname": "setGlobalVar", + "responseClass": "void", + "parameters": [ + { + "name": "variable", + "description": "The variable to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + } + ] + } + ] + } + ], + "models": { + "BuildInfo": { + "id": "BuildInfo", + "description": "Info about how Asterisk was built", + "properties": { + "os": { + "required": true, + "type": "string", + "description": "OS Asterisk was built on." + }, + "kernel": { + "required": true, + "type": "string", + "description": "Kernel version Asterisk was built on." + }, + "options": { + "required": true, + "type": "string", + "description": "Compile time options, or empty string if default." + }, + "machine": { + "required": true, + "type": "string", + "description": "Machine architecture (x86_64, i686, ppc, etc.)" + }, + "date": { + "required": true, + "type": "string", + "description": "Date and time when Asterisk was built." + }, + "user": { + "required": true, + "type": "string", + "description": "Username that build Asterisk" + } + } + }, + "SystemInfo": { + "id": "SystemInfo", + "description": "Info about Asterisk", + "properties": { + "version": { + "required": true, + "type": "string", + "description": "Asterisk version." + }, + "entity_id": { + "required": true, + "type": "string", + "description": "" + } + } + }, + "SetId": { + "id": "SetId", + "description": "Effective user/group id", + "properties": { + "user": { + "required": true, + "type": "string", + "description": "Effective user id." + }, + "group": { + "required": true, + "type": "string", + "description": "Effective group id." + } + } + }, + "ConfigInfo": { + "id": "ConfigInfo", + "description": "Info about Asterisk configuration", + "properties": { + "name": { + "required": true, + "type": "string", + "description": "Asterisk system name." + }, + "default_language": { + "required": true, + "type": "string", + "description": "Default language for media playback." + }, + "max_channels": { + "required": false, + "type": "int", + "description": "Maximum number of simultaneous channels." + }, + "max_open_files": { + "required": false, + "type": "int", + "description": "Maximum number of open file handles (files, sockets)." + }, + "max_load": { + "required": false, + "type": "double", + "description": "Maximum load avg on system." + }, + "setid": { + "required": true, + "type": "SetId", + "description": "Effective user/group id for running Asterisk." + } + } + }, + "StatusInfo": { + "id": "StatusInfo", + "description": "Info about Asterisk status", + "properties": { + "startup_time": { + "required": true, + "type": "Date", + "description": "Time when Asterisk was started." + }, + "last_reload_time": { + "required": true, + "type": "Date", + "description": "Time when Asterisk was last reloaded." + } + } + }, + "AsteriskInfo": { + "id": "AsteriskInfo", + "description": "Asterisk system information", + "properties": { + "build": { + "required": false, + "type": "BuildInfo", + "description": "Info about how Asterisk was built" + }, + "system": { + "required": false, + "type": "SystemInfo", + "description": "Info about the system running Asterisk" + }, + "config": { + "required": false, + "type": "ConfigInfo", + "description": "Info about Asterisk configuration" + }, + "status": { + "required": false, + "type": "StatusInfo", + "description": "Info about Asterisk status" + } + } + }, + "AsteriskPing": { + "id": "AsteriskPing", + "description": "Asterisk ping information", + "properties": { + "asterisk_id": { + "required": true, + "type": "string", + "description": "Asterisk id info" + }, + "ping": { + "required": true, + "type": "string", + "description": "Always string value is pong" + }, + "timestamp": { + "required": true, + "type": "string", + "description": "The timestamp string of request received time" + } + } + }, + "Module": { + "id": "Module", + "description": "Details of an Asterisk module", + "properties": { + "name": { + "type": "string", + "description": "The name of this module", + "required": true + }, + "description": { + "type": "string", + "description": "The description of this module", + "required": true + }, + "use_count": { + "type": "int", + "description": "The number of times this module is being used", + "required": true + }, + "status": { + "type": "string", + "description": "The running status of this module", + "required": true + }, + "support_level": { + "type": "string", + "description": "The support state of this module", + "required": true + } + } + }, + "LogChannel": { + "id": "LogChannel", + "description": "Details of an Asterisk log channel", + "properties": { + "channel": { + "type": "string", + "description": "The log channel path", + "required": true + }, + "type": { + "type": "string", + "description": "Types of logs for the log channel", + "required": true + }, + "status": { + "type": "string", + "description": "Whether or not a log type is enabled", + "required": true + }, + "configuration": { + "type": "string", + "description": "The various log levels", + "required": true + } + } + }, + "Variable": { + "id": "Variable", + "description": "The value of a channel variable", + "properties": { + "value": { + "required": true, + "type": "string", + "description": "The value of the variable requested" + } + } + }, + "ConfigTuple": { + "id": "ConfigTuple", + "description": "A key/value pair that makes up part of a configuration object.", + "properties": { + "attribute": { + "required": true, + "type": "string", + "description": "A configuration object attribute." + }, + "value": { + "required": true, + "type": "string", + "description": "The value for the attribute." + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_5_1_1/bridges.json b/codegen/src/main/resources/codegen-data/ari_5_1_1/bridges.json new file mode 100644 index 00000000..3e757e98 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_5_1_1/bridges.json @@ -0,0 +1,765 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/bridges.{format}", + "requiresModules": [ + "res_stasis_recording", + "res_stasis_playback" + ], + "apis": [ + { + "path": "/bridges", + "description": "Active bridges", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all active bridges in Asterisk.", + "nickname": "list", + "responseClass": "List[Bridge]" + }, + { + "httpMethod": "POST", + "summary": "Create a new bridge.", + "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", + "nickname": "create", + "responseClass": "Bridge", + "parameters": [ + { + "name": "type", + "description": "Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media, video_sfu, video_single).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "bridgeId", + "description": "Unique ID to give to the bridge being created.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Name to give to the bridge being created.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}", + "description": "Individual bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Create a new bridge or updates an existing one.", + "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", + "nickname": "createWithId", + "responseClass": "Bridge", + "parameters": [ + { + "name": "type", + "description": "Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media, video_sfu, video_single) to set.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "bridgeId", + "description": "Unique ID to give to the bridge being created.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Set the name of the bridge.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ] + }, + { + "httpMethod": "GET", + "summary": "Get bridge details.", + "nickname": "get", + "responseClass": "Bridge", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Shut down a bridge.", + "notes": "If any channels are in this bridge, they will be removed and resume whatever they were doing beforehand.", + "nickname": "destroy", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/addChannel", + "description": "Add a channel to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Add a channel to a bridge.", + "nickname": "addChannel", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channel", + "description": "Ids of channels to add to bridge", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "role", + "description": "Channel's role in the bridge", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "absorbDTMF", + "description": "Absorb DTMF coming from this channel, preventing it to pass through to the bridge", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "mute", + "description": "Mute audio from this channel, preventing it to pass through to the bridge", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Channel not found" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application; Channel currently recording" + }, + { + "code": 422, + "reason": "Channel not in Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/removeChannel", + "description": "Remove a channel from a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Remove a channel from a bridge.", + "nickname": "removeChannel", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channel", + "description": "Ids of channels to remove from bridge", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Channel not found" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + }, + { + "code": 422, + "reason": "Channel not in this bridge" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/videoSource/{channelId}", + "description": "Set a channel as the video source in a multi-party bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Set a channel as the video source in a multi-party mixing bridge. This operation has no effect on bridges with two or fewer participants.", + "nickname": "setVideoSource", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge or Channel not found" + }, + { + "code": 409, + "reason": "Channel not in Stasis application" + }, + { + "code": 422, + "reason": "Channel not in this Bridge" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/videoSource", + "description": "Removes any explicit video source", + "operations": [ + { + "httpMethod": "DELETE", + "summary": "Removes any explicit video source in a multi-party mixing bridge. This operation has no effect on bridges with two or fewer participants. When no explicit video source is set, talk detection will be used to determine the active video stream.", + "nickname": "clearVideoSource", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/moh", + "description": "Play music on hold to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play music on hold to a bridge or change the MOH class that is playing.", + "nickname": "startMoh", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "mohClass", + "description": "Channel's id", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing music on hold to a bridge.", + "notes": "This will only stop music on hold being played via POST bridges/{bridgeId}/moh.", + "nickname": "stopMoh", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/play", + "description": "Play media to the participants of a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media on a bridge.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "play", + "responseClass": "Playback", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "playbackId", + "description": "Playback Id.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/play/{playbackId}", + "description": "Play media to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media on a bridge.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "playWithId", + "responseClass": "Playback", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + + } + ] + }, + { + "path": "/bridges/{bridgeId}/record", + "description": "Record audio on a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start a recording.", + "notes": "This records the mixed audio from all channels participating in this bridge.", + "nickname": "record", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Recording's filename", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "maxDurationSeconds", + "description": "Maximum duration of the recording, in seconds. 0 for no limit.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "maxSilenceSeconds", + "description": "Maximum duration of silence, in seconds. 0 for no limit.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "ifExists", + "description": "Action to take if a recording with the same name already exists.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "fail", + "allowableValues": { + "valueType": "LIST", + "values": [ + "fail", + "overwrite", + "append" + ] + } + }, + { + "name": "beep", + "description": "Play beep when recording begins", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "terminateOn", + "description": "DTMF input to terminate recording.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "any", + "*", + "#" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge is not in a Stasis application; A recording with the same name already exists on the system and can not be overwritten because it is in progress or ifExists=fail" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + } + ], + "models": { + "Bridge": { + "id": "Bridge", + "description": "The merging of media from one or more channels.\n\nEveryone on the bridge receives the same audio.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for this bridge", + "required": true + }, + "technology": { + "type": "string", + "description": "Name of the current bridging technology", + "required": true + }, + "bridge_type": { + "type": "string", + "description": "Type of bridge technology", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "mixing", + "holding" + ] + } + }, + "bridge_class": { + "type": "string", + "description": "Bridging class", + "required": true + }, + "creator": { + "type": "string", + "description": "Entity that created the bridge", + "required": true + }, + "name": { + "type": "string", + "description": "Name the creator gave the bridge", + "required": true + }, + "channels": { + "type": "List[string]", + "description": "Ids of channels participating in this bridge", + "required": true + }, + "video_mode": { + "type": "string", + "description": "The video mode the bridge is using. One of 'none', 'talker', 'sfu', or 'single'.", + "required": false + }, + "video_source_id": { + "type": "string", + "description": "The ID of the channel that is the source of video in this bridge, if one exists.", + "required": false + }, + "creationtime": { + "required": true, + "type": "Date", + "description": "Timestamp when bridge was created" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_5_1_1/channels.json b/codegen/src/main/resources/codegen-data/ari_5_1_1/channels.json new file mode 100644 index 00000000..2e015232 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_5_1_1/channels.json @@ -0,0 +1,2179 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/channels.{format}", + "requiresModules": [ + "res_stasis_answer", + "res_stasis_playback", + "res_stasis_recording", + "res_stasis_snoop" + ], + "apis": [ + { + "path": "/channels", + "description": "Active channels", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all active channels in Asterisk.", + "nickname": "list", + "responseClass": "List[Channel]" + }, + { + "httpMethod": "POST", + "summary": "Create a new channel (originate).", + "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.", + "nickname": "originate", + "responseClass": "Channel", + "parameters": [ + { + "name": "endpoint", + "description": "Endpoint to call.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to dial after the endpoint answers. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to dial after the endpoint answers. If omitted, uses 'default'. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to dial after the endpoint answers. If omitted, uses 1. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "long" + }, + { + "name": "label", + "description": "The label to dial after the endpoint answers. Will supersede 'priority' if provided. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The application that is subscribed to the originated channel. When the channel is answered, it will be passed to this Stasis application. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "callerId", + "description": "CallerID to use when dialing the endpoint or extension.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 30 + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "The unique id of the channel which is originating this one.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "formats", + "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for originating a channel." + }, + { + "code": 409, + "reason": "Channel with given unique ID already exists." + } + ] + } + ] + }, + { + "path": "/channels/create", + "description": "Create a channel and place it in a Stasis app, but do not dial the channel yet.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Create channel.", + "nickname": "create", + "responseClass": "Channel", + "parameters": [ + { + "name": "endpoint", + "description": "Endpoint for channel communication", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "Stasis Application to place channel into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "Unique ID of the calling channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "formats", + "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 409, + "reason": "Channel with given unique ID already exists." + } + ] + } + ] + }, + { + "path": "/channels/{channelId}", + "description": "Active channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "Channel details.", + "nickname": "get", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + } + ] + }, + { + "httpMethod": "POST", + "summary": "Create a new channel (originate with id).", + "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.", + "nickname": "originateWithId", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "endpoint", + "description": "Endpoint to call.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to dial after the endpoint answers. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to dial after the endpoint answers. If omitted, uses 'default'. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to dial after the endpoint answers. If omitted, uses 1. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "long" + }, + { + "name": "label", + "description": "The label to dial after the endpoint answers. Will supersede 'priority' if provided. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The application that is subscribed to the originated channel. When the channel is answered, it will be passed to this Stasis application. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "callerId", + "description": "CallerID to use when dialing the endpoint or extension.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 30 + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "The unique id of the channel which is originating this one.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "formats", + "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for originating a channel." + }, + { + "code": 409, + "reason": "Channel with given unique ID already exists." + } + ] + + }, + { + "httpMethod": "DELETE", + "summary": "Delete (i.e. hangup) a channel.", + "nickname": "hangup", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "reason_code", + "description": "The reason code for hanging up the channel for detail use. Mutually exclusive with 'reason'. See detail hangup codes at here. https://wiki.asterisk.org/wiki/display/AST/Hangup+Cause+Mappings", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "reason", + "description": "Reason for hanging up the channel for simple use. Mutually exclusive with 'reason_code'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "normal", + "busy", + "congestion", + "no_answer", + "timeout", + "rejected", + "unallocated", + "normal_unspecified", + "number_incomplete", + "codec_mismatch", + "interworking", + "failure", + "answered_elsewhere" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid reason for hangup provided" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/continue", + "description": "Exit application; continue execution in the dialplan", + "operations": [ + { + "httpMethod": "POST", + "summary": "Exit application; continue execution in the dialplan.", + "nickname": "continueInDialplan", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "label", + "description": "The label to continue to - will supersede 'priority' if both are provided.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/move", + "description": "Move the channel from one Stasis application to another.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Move the channel from one Stasis application to another.", + "nickname": "move", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The channel will be passed to this Stasis application.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": "404", + "reason": "Channel not found" + }, + { + "code": "409", + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/redirect", + "description": "Inform the channel that it should redirect itself to a different location. Note that this will almost certainly cause the channel to exit the application.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Redirect the channel to a different location.", + "nickname": "redirect", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "endpoint", + "description": "The endpoint to redirect the channel to", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Endpoint parameter not provided" + }, + { + "code": 404, + "reason": "Channel or endpoint not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 422, + "reason": "Endpoint is not the same type as the channel" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/answer", + "description": "Answer a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Answer a channel.", + "nickname": "answer", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/ring", + "description": "Send a ringing indication to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Indicate ringing to a channel.", + "nickname": "ring", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop ringing indication on a channel if locally generated.", + "nickname": "ringStop", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/dtmf", + "description": "Send DTMF to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Send provided DTMF to a given channel.", + "nickname": "sendDTMF", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "dtmf", + "description": "DTMF To send.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "before", + "description": "Amount of time to wait before DTMF digits (specified in milliseconds) start.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0 + }, + { + "name": "between", + "description": "Amount of time in between DTMF digits (specified in milliseconds).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 100 + }, + { + "name": "duration", + "description": "Length of each DTMF digit (specified in milliseconds).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 100 + }, + { + "name": "after", + "description": "Amount of time to wait after DTMF digits (specified in milliseconds) end.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0 + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "DTMF is required" + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/mute", + "description": "Mute a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Mute a channel.", + "nickname": "mute", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "Direction in which to mute audio", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both", + "in", + "out" + ] + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unmute a channel.", + "nickname": "unmute", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "Direction in which to unmute audio", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both", + "in", + "out" + ] + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/hold", + "description": "Put a channel on hold", + "operations": [ + { + "httpMethod": "POST", + "summary": "Hold a channel.", + "nickname": "hold", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Remove a channel from hold.", + "nickname": "unhold", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/moh", + "description": "Play music on hold to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play music on hold to a channel.", + "notes": "Using media operations such as /play on a channel playing MOH in this manner will suspend MOH without resuming automatically. If continuing music on hold is desired, the stasis application must reinitiate music on hold.", + "nickname": "startMoh", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "mohClass", + "description": "Music on hold class to use", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing music on hold to a channel.", + "nickname": "stopMoh", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/silence", + "description": "Play silence to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play silence to a channel.", + "notes": "Using media operations such as /play on a channel playing silence in this manner will suspend silence without resuming automatically.", + "nickname": "startSilence", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing silence to a channel.", + "nickname": "stopSilence", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/play", + "description": "Play media to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "play", + "responseClass": "Playback", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000 + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/play/{playbackId}", + "description": "Play media to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media and specify the playbackId.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "playWithId", + "responseClass": "Playback", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000 + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/record", + "description": "Record audio from a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start a recording.", + "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.", + "nickname": "record", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Recording's filename", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "maxDurationSeconds", + "description": "Maximum duration of the recording, in seconds. 0 for no limit", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "maxSilenceSeconds", + "description": "Maximum duration of silence, in seconds. 0 for no limit", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "ifExists", + "description": "Action to take if a recording with the same name already exists.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "fail", + "allowableValues": { + "valueType": "LIST", + "values": [ + "fail", + "overwrite", + "append" + ] + } + }, + { + "name": "beep", + "description": "Play beep when recording begins", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "terminateOn", + "description": "DTMF input to terminate recording", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "any", + "*", + "#" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "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" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/variable", + "description": "Variables on a channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the value of a channel variable or function.", + "nickname": "getChannelVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The channel variable or function to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Channel or variable not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "POST", + "summary": "Set the value of a channel variable or function.", + "nickname": "setChannelVar", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The channel variable or function to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/snoop", + "description": "Snoop (spy/whisper) on a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start snooping.", + "notes": "Snoop (spy/whisper) on a specific channel.", + "nickname": "snoopChannel", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "spy", + "description": "Direction of audio to spy on", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "whisper", + "description": "Direction of audio to whisper into", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "app", + "description": "Application the snooping channel is placed into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "snoopId", + "description": "Unique ID to assign to snooping channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/snoop/{snoopId}", + "description": "Snoop (spy/whisper) on a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start snooping.", + "notes": "Snoop (spy/whisper) on a specific channel.", + "nickname": "snoopChannelWithId", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "snoopId", + "description": "Unique ID to assign to snooping channel", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "spy", + "description": "Direction of audio to spy on", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "whisper", + "description": "Direction of audio to whisper into", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "app", + "description": "Application the snooping channel is placed into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/dial", + "description": "Dial a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Dial a created channel.", + "nickname": "dial", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "caller", + "description": "Channel ID of caller", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Dial timeout", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel cannot be found." + }, + { + "code": 409, + "reason": "Channel cannot be dialed." + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/rtp_statistics", + "description": "Get RTP statistics information for RTP on a channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "RTP stats on a channel.", + "nickname": "rtpstatistics", + "responseClass": "RTPstat", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel cannot be found." + } + ] + } + ] + }, + { + "path": "/channels/externalMedia", + "description": "Create a channel to an External Media source/sink.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start an External Media session.", + "notes": "Create a channel to an External Media source/sink.", + "nickname": "externalMedia", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "Stasis Application to place channel into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "external_host", + "description": "Hostname/ip:port of external host", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "encapsulation", + "description": "Payload encapsulation protocol", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "rtp", + "allowableValues": { + "valueType": "LIST", + "values": [ + "rtp" + ] + } + }, + { + "name": "transport", + "description": "Transport protocol", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "udp", + "allowableValues": { + "valueType": "LIST", + "values": [ + "udp" + ] + } + }, + { + "name": "connection_type", + "description": "Connection type (client/server)", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "client", + "allowableValues": { + "valueType": "LIST", + "values": [ + "client" + ] + } + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "External media direction", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 409, + "reason": "Channel is not in a Stasis application; Channel is already bridged" + } + ] + } + ] + } + ], + "models": { + "Dialed": { + "id": "Dialed", + "description": "Dialed channel information.", + "properties": {} + }, + "DialplanCEP": { + "id": "DialplanCEP", + "description": "Dialplan location (context/extension/priority)", + "properties": { + "context": { + "required": true, + "type": "string", + "description": "Context in the dialplan" + }, + "exten": { + "required": true, + "type": "string", + "description": "Extension in the dialplan" + }, + "priority": { + "required": true, + "type": "long", + "description": "Priority in the dialplan" + }, + "app_name": { + "required": true, + "type": "string", + "description": "Name of current dialplan application" + }, + "app_data": { + "required": true, + "type": "string", + "description": "Parameter of current dialplan application" + } + } + }, + "CallerID": { + "id": "CallerID", + "description": "Caller identification", + "properties": { + "name": { + "required": true, + "type": "string" + }, + "number": { + "required": true, + "type": "string" + } + } + }, + "RTPstat": { + "id": "RTPstat", + "description": "A statistics of a RTP.", + "properties": { + "txcount": { + "required": true, + "type": "int", + "description": "Number of packets transmitted." + }, + "rxcount": { + "required": true, + "type": "int", + "description": "Number of packets received." + }, + "txjitter": { + "required": false, + "type": "double", + "description": "Jitter on transmitted packets." + }, + "rxjitter": { + "required": false, + "type": "double", + "description": "Jitter on received packets." + }, + "remote_maxjitter": { + "required": false, + "type": "double", + "description": "Maximum jitter on remote side." + }, + "remote_minjitter": { + "required": false, + "type": "double", + "description": "Minimum jitter on remote side." + }, + "remote_normdevjitter": { + "required": false, + "type": "double", + "description": "Average jitter on remote side." + }, + "remote_stdevjitter": { + "required": false, + "type": "double", + "description": "Standard deviation jitter on remote side." + }, + "local_maxjitter": { + "required": false, + "type": "double", + "description": "Maximum jitter on local side." + }, + "local_minjitter": { + "required": false, + "type": "double", + "description": "Minimum jitter on local side." + }, + "local_normdevjitter": { + "required": false, + "type": "double", + "description": "Average jitter on local side." + }, + "local_stdevjitter": { + "required": false, + "type": "double", + "description": "Standard deviation jitter on local side." + }, + "txploss": { + "required": true, + "type": "int", + "description": "Number of transmitted packets lost." + }, + "rxploss": { + "required": true, + "type": "int", + "description": "Number of received packets lost." + }, + "remote_maxrxploss": { + "required": false, + "type": "double", + "description": "Maximum number of packets lost on remote side." + }, + "remote_minrxploss": { + "required": false, + "type": "double", + "description": "Minimum number of packets lost on remote side." + }, + "remote_normdevrxploss": { + "required": false, + "type": "double", + "description": "Average number of packets lost on remote side." + }, + "remote_stdevrxploss": { + "required": false, + "type": "double", + "description": "Standard deviation packets lost on remote side." + }, + "local_maxrxploss": { + "required": false, + "type": "double", + "description": "Maximum number of packets lost on local side." + }, + "local_minrxploss": { + "required": false, + "type": "double", + "description": "Minimum number of packets lost on local side." + }, + "local_normdevrxploss": { + "required": false, + "type": "double", + "description": "Average number of packets lost on local side." + }, + "local_stdevrxploss": { + "required": false, + "type": "double", + "description": "Standard deviation packets lost on local side." + }, + "rtt": { + "required": false, + "type": "double", + "description": "Total round trip time." + }, + "maxrtt": { + "required": false, + "type": "double", + "description": "Maximum round trip time." + }, + "minrtt": { + "required": false, + "type": "double", + "description": "Minimum round trip time." + }, + "normdevrtt": { + "required": false, + "type": "double", + "description": "Average round trip time." + }, + "stdevrtt": { + "required": false, + "type": "double", + "description": "Standard deviation round trip time." + }, + "local_ssrc": { + "required": true, + "type": "int", + "description": "Our SSRC." + }, + "remote_ssrc": { + "required": true, + "type": "int", + "description": "Their SSRC." + }, + "txoctetcount": { + "required": true, + "type": "int", + "description": "Number of octets transmitted." + }, + "rxoctetcount": { + "required": true, + "type": "int", + "description": "Number of octets received." + }, + "channel_uniqueid": { + "required": true, + "type": "string", + "description": "The Asterisk channel's unique ID that owns this instance." + } + } + }, + "Channel": { + "id": "Channel", + "description": "A specific communication connection between Asterisk and an Endpoint.", + "properties": { + "id": { + "required": true, + "type": "string", + "description": "Unique identifier of the channel.\n\nThis is the same as the Uniqueid field in AMI." + }, + "name": { + "required": true, + "type": "string", + "description": "Name of the channel (i.e. SIP/foo-0000a7e3)" + }, + "state": { + "required": true, + "type": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "Down", + "Rsrved", + "OffHook", + "Dialing", + "Ring", + "Ringing", + "Up", + "Busy", + "Dialing Offhook", + "Pre-ring", + "Unknown" + ] + } + }, + "caller": { + "required": true, + "type": "CallerID" + }, + "connected": { + "required": true, + "type": "CallerID" + }, + "accountcode": { + "required": true, + "type": "string" + }, + "dialplan": { + "required": true, + "type": "DialplanCEP", + "description": "Current location in the dialplan" + }, + "creationtime": { + "required": true, + "type": "Date", + "description": "Timestamp when channel was created" + }, + "language": { + "required": true, + "type": "string", + "description": "The default spoken language" + }, + "channelvars": { + "required": false, + "type": "object", + "description": "Channel variables" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_5_1_1/deviceStates.json b/codegen/src/main/resources/codegen-data/ari_5_1_1/deviceStates.json new file mode 100644 index 00000000..bd389355 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_5_1_1/deviceStates.json @@ -0,0 +1,154 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "Kevin Harwell ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/deviceStates.{format}", + "requiresModules": [ + "res_stasis_device_state" + ], + "apis": [ + { + "path": "/deviceStates", + "description": "Device states", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all ARI controlled device states.", + "nickname": "list", + "responseClass": "List[DeviceState]" + } + ] + }, + { + "path": "/deviceStates/{deviceName}", + "description": "Device state", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve the current state of a device.", + "nickname": "get", + "responseClass": "DeviceState", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Change the state of a device controlled by ARI. (Note - implicitly creates the device state).", + "nickname": "update", + "responseClass": "void", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "deviceState", + "description": "Device state value", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "NOT_INUSE", + "INUSE", + "BUSY", + "INVALID", + "UNAVAILABLE", + "RINGING", + "RINGINUSE", + "ONHOLD" + ] + } + + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Device name is missing" + }, + { + "code": 409, + "reason": "Uncontrolled device specified" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Destroy a device-state controlled by ARI.", + "nickname": "delete", + "responseClass": "void", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Device name is missing" + }, + { + "code": 409, + "reason": "Uncontrolled device specified" + } + ] + } + ] + } + ], + "models": { + "DeviceState": { + "id": "DeviceState", + "description": "Represents the state of a device.", + "properties": { + "name": { + "type": "string", + "description": "Name of the device.", + "required": true + }, + "state": { + "type": "string", + "description": "Device's state", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "UNKNOWN", + "NOT_INUSE", + "INUSE", + "BUSY", + "INVALID", + "UNAVAILABLE", + "RINGING", + "RINGINUSE", + "ONHOLD" + ] + } + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_5_1_1/endpoints.json b/codegen/src/main/resources/codegen-data/ari_5_1_1/endpoints.json new file mode 100644 index 00000000..1f77d370 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_5_1_1/endpoints.json @@ -0,0 +1,263 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/endpoints.{format}", + "apis": [ + { + "path": "/endpoints", + "description": "Asterisk endpoints", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all endpoints.", + "nickname": "list", + "responseClass": "List[Endpoint]" + } + ] + }, + { + "path": "/endpoints/sendMessage", + "description": "Send a message to some technology URI or endpoint.", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Send a message to some technology URI or endpoint.", + "nickname": "sendMessage", + "responseClass": "void", + "parameters": [ + { + "name": "to", + "description": "The endpoint resource or technology specific URI to send the message to. Valid resources are sip, pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "from", + "description": "The endpoint resource or technology specific identity to send this message from. Valid resources are sip, pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "body", + "description": "The body of the message", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "descriptioni": "The \"variables\" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, pjsip and sip resource types will add the key/value pairs as SIP headers,", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoint not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}", + "description": "Asterisk endpoints", + "operations": [ + { + "httpMethod": "GET", + "summary": "List available endoints for a given endpoint technology.", + "nickname": "listByTech", + "responseClass": "List[Endpoint]", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoints (sip,iax2,...)", + "paramType": "path", + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Endpoints not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}/{resource}", + "description": "Single endpoint", + "operations": [ + { + "httpMethod": "GET", + "summary": "Details for an endpoint.", + "nickname": "get", + "responseClass": "Endpoint", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "resource", + "description": "ID of the endpoint", + "paramType": "path", + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoints not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}/{resource}/sendMessage", + "description": "Send a message to some endpoint in a technology.", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Send a message to some endpoint in a technology.", + "nickname": "sendMessageToEndpoint", + "responseClass": "void", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "resource", + "description": "ID of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "from", + "description": "The endpoint resource or technology specific identity to send this message from. Valid resources are sip, pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "body", + "description": "The body of the message", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "descriptioni": "The \"variables\" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, pjsip and sip resource types will add the key/value pairs as SIP headers,", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoint not found" + } + ] + } + ] + } + ], + "models": { + "Endpoint": { + "id": "Endpoint", + "description": "An external device that may offer/accept calls to/from Asterisk.\n\nUnlike most resources, which have a single unique identifier, an endpoint is uniquely identified by the technology/resource pair.", + "properties": { + "technology": { + "type": "string", + "description": "Technology of the endpoint", + "required": true + }, + "resource": { + "type": "string", + "description": "Identifier of the endpoint, specific to the given technology.", + "required": true + }, + "state": { + "type": "string", + "description": "Endpoint's state", + "required": false, + "allowableValues": { + "valueType": "LIST", + "values": [ + "unknown", + "offline", + "online" + ] + } + }, + "channel_ids": { + "type": "List[string]", + "description": "Id's of channels associated with this endpoint", + "required": true + } + } + }, + "TextMessage": { + "id": "TextMessage", + "description": "A text message.", + "properties": { + "from": { + "type": "string", + "description": "A technology specific URI specifying the source of the message. For sip and pjsip technologies, any SIP URI can be specified. For xmpp, the URI must correspond to the client connection being used to send the message.", + "required": true + }, + "to": { + "type": "string", + "description": "A technology specific URI specifying the destination of the message. Valid technologies include sip, pjsip, and xmp. The destination of a message should be an endpoint.", + "required": true + }, + "body": { + "type": "string", + "description": "The text of the message.", + "required": true + }, + "variables": { + "type": "object", + "description": "Technology specific key/value pairs (JSON object) associated with the message.", + "required": false + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_5_1_1/events.json b/codegen/src/main/resources/codegen-data/ari_5_1_1/events.json new file mode 100644 index 00000000..c9822f6c --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_5_1_1/events.json @@ -0,0 +1,918 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.2", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/events.{format}", + "requiresModules": [ + "res_http_websocket" + ], + "apis": [ + { + "path": "/events", + "description": "Events from Asterisk to applications", + "operations": [ + { + "httpMethod": "GET", + "upgrade": "websocket", + "websocketProtocol": "ari", + "summary": "WebSocket connection for events.", + "nickname": "eventWebsocket", + "responseClass": "Message", + "parameters": [ + { + "name": "app", + "description": "Applications to subscribe to.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "subscribeAll", + "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'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean" + } + ] + } + ] + }, + { + "path": "/events/user/{eventName}", + "description": "Stasis application user events", + "operations": [ + { + "httpMethod": "POST", + "summary": "Generate a user event.", + "nickname": "userEvent", + "responseClass": "void", + "parameters": [ + { + "name": "eventName", + "description": "Event name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "application", + "description": "The name of the application that will receive this event", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "source", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}/{resource}, deviceState:{deviceName}", + "paramType": "query", + "required": false, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds custom key/value pairs to add to the user event. Ex. { \"variables\": { \"key\": \"value\" } }", + "paramType": "body", + "required": false, + "allowMultiple": false, + "dataType": "containers" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 422, + "reason": "Event source not found." + }, + { + "code": 400, + "reason": "Invalid even tsource URI or userevent data." + } + ] + } + ] + } + ], + "models": { + "Message": { + "id": "Message", + "description": "Base type for errors and events", + "discriminator": "type", + "properties": { + "type": { + "type": "string", + "required": true, + "description": "Indicates the type of this message." + }, + "asterisk_id": { + "type": "string", + "required": false, + "description": "The unique ID for the Asterisk instance that raised this event." + } + }, + "subTypes": [ + "MissingParams", + "Event" + ] + }, + "MissingParams": { + "id": "MissingParams", + "description": "Error event sent when required params are missing.", + "properties": { + "params": { + "required": true, + "type": "List[string]", + "description": "A list of the missing parameters" + } + } + }, + "Event": { + "id": "Event", + "description": "Base type for asynchronous events from Asterisk.", + "properties": { + "application": { + "type": "string", + "description": "Name of the application receiving the event.", + "required": true + }, + "timestamp": { + "type": "Date", + "description": "Time at which this event was created.", + "required": true + } + }, + "subTypes": [ + "DeviceStateChanged", + "PlaybackStarted", + "PlaybackContinuing", + "PlaybackFinished", + "RecordingStarted", + "RecordingFinished", + "RecordingFailed", + "ApplicationMoveFailed", + "ApplicationReplaced", + "BridgeCreated", + "BridgeDestroyed", + "BridgeMerged", + "BridgeBlindTransfer", + "BridgeAttendedTransfer", + "BridgeVideoSourceChanged", + "ChannelCreated", + "ChannelDestroyed", + "ChannelEnteredBridge", + "ChannelLeftBridge", + "ChannelStateChange", + "ChannelDtmfReceived", + "ChannelDialplan", + "ChannelCallerId", + "ChannelUserevent", + "ChannelHangupRequest", + "ChannelVarset", + "ChannelTalkingStarted", + "ChannelTalkingFinished", + "ChannelHold", + "ChannelUnhold", + "ContactStatusChange", + "EndpointStateChange", + "Dial", + "StasisEnd", + "StasisStart", + "TextMessageReceived", + "ChannelConnectedLine", + "PeerStatusChange" + ] + }, + "ContactInfo": { + "id": "ContactInfo", + "description": "Detailed information about a contact on an endpoint.", + "properties": { + "uri": { + "type": "string", + "description": "The location of the contact.", + "required": true + }, + "contact_status": { + "type": "string", + "description": "The current status of the contact.", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "Unreachable", + "Reachable", + "Unknown", + "NonQualified", + "Removed" + ] + } + }, + "aor": { + "type": "string", + "description": "The Address of Record this contact belongs to.", + "required": true + }, + "roundtrip_usec": { + "type": "string", + "description": "Current round trip time, in microseconds, for the contact.", + "required": false + } + } + }, + "Peer": { + "id": "Peer", + "description": "Detailed information about a remote peer that communicates with Asterisk.", + "properties": { + "peer_status": { + "type": "string", + "description": "The current state of the peer. Note that the values of the status are dependent on the underlying peer technology.", + "required": true + }, + "cause": { + "type": "string", + "description": "An optional reason associated with the change in peer_status.", + "required": false + }, + "address": { + "type": "string", + "description": "The IP address of the peer.", + "required": false + }, + "port": { + "type": "string", + "description": "The port of the peer.", + "required": false + }, + "time": { + "type": "string", + "description": "The last known time the peer was contacted.", + "required": false + } + } + }, + "DeviceStateChanged": { + "id": "DeviceStateChanged", + "description": "Notification that a device state has changed.", + "properties": { + "device_state": { + "type": "DeviceState", + "description": "Device state object", + "required": true + } + } + }, + "PlaybackStarted": { + "id": "PlaybackStarted", + "description": "Event showing the start of a media playback operation.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "PlaybackContinuing": { + "id": "PlaybackContinuing", + "description": "Event showing the continuation of a media playback operation from one media URI to the next in the list.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "PlaybackFinished": { + "id": "PlaybackFinished", + "description": "Event showing the completion of a media playback operation.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "RecordingStarted": { + "id": "RecordingStarted", + "description": "Event showing the start of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "RecordingFinished": { + "id": "RecordingFinished", + "description": "Event showing the completion of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "RecordingFailed": { + "id": "RecordingFailed", + "description": "Event showing failure of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "ApplicationMoveFailed": { + "id": "ApplicationMoveFailed", + "description": "Notification that trying to move a channel to another Stasis application failed.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + }, + "destination": { + "required": true, + "type": "string" + }, + "args": { + "required": true, + "type": "List[string]", + "description": "Arguments to the application" + } + } + }, + "ApplicationReplaced": { + "id": "ApplicationReplaced", + "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.", + "properties": {} + }, + "BridgeCreated": { + "id": "BridgeCreated", + "description": "Notification that a bridge has been created.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeDestroyed": { + "id": "BridgeDestroyed", + "description": "Notification that a bridge has been destroyed.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeMerged": { + "id": "BridgeMerged", + "description": "Notification that one bridge has merged into another.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "bridge_from": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeVideoSourceChanged": { + "id": "BridgeVideoSourceChanged", + "description": "Notification that the source of video in a bridge has changed.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "old_video_source_id": { + "required": false, + "type": "string" + } + } + }, + "BridgeBlindTransfer": { + "id": "BridgeBlindTransfer", + "description": "Notification that a blind transfer has occurred.", + "properties": { + "channel": { + "description": "The channel performing the blind transfer", + "required": true, + "type": "Channel" + }, + "replace_channel": { + "description": "The channel that is replacing transferer when the transferee(s) can not be transferred directly", + "required": false, + "type": "Channel" + }, + "transferee": { + "description": "The channel that is being transferred", + "required": false, + "type": "Channel" + }, + "exten": { + "description": "The extension transferred to", + "required": true, + "type": "string" + }, + "context": { + "description": "The context transferred to", + "required": true, + "type": "string" + }, + "result": { + "description": "The result of the transfer attempt", + "required": true, + "type": "string" + }, + "is_external": { + "description": "Whether the transfer was externally initiated or not", + "required": true, + "type": "boolean" + }, + "bridge": { + "description": "The bridge being transferred", + "type": "Bridge" + } + } + }, + "BridgeAttendedTransfer": { + "id": "BridgeAttendedTransfer", + "description": "Notification that an attended transfer has occurred.", + "properties": { + "transferer_first_leg": { + "description": "First leg of the transferer", + "required": true, + "type": "Channel" + }, + "transferer_second_leg": { + "description": "Second leg of the transferer", + "required": true, + "type": "Channel" + }, + "replace_channel": { + "description": "The channel that is replacing transferer_first_leg in the swap", + "required": false, + "type": "Channel" + }, + "transferee": { + "description": "The channel that is being transferred", + "required": false, + "type": "Channel" + }, + "transfer_target": { + "description": "The channel that is being transferred to", + "required": false, + "type": "Channel" + }, + "result": { + "description": "The result of the transfer attempt", + "required": true, + "type": "string" + }, + "is_external": { + "description": "Whether the transfer was externally initiated or not", + "required": true, + "type": "boolean" + }, + "transferer_first_leg_bridge": { + "description": "Bridge the transferer first leg is in", + "type": "Bridge" + }, + "transferer_second_leg_bridge": { + "description": "Bridge the transferer second leg is in", + "type": "Bridge" + }, + "destination_type": { + "description": "How the transfer was accomplished", + "required": true, + "type": "string" + }, + "destination_bridge": { + "description": "Bridge that survived the merge result", + "type": "string" + }, + "destination_application": { + "description": "Application that has been transferred into", + "type": "string" + }, + "destination_link_first_leg": { + "description": "First leg of a link transfer result", + "type": "Channel" + }, + "destination_link_second_leg": { + "description": "Second leg of a link transfer result", + "type": "Channel" + }, + "destination_threeway_channel": { + "description": "Transferer channel that survived the threeway result", + "type": "Channel" + }, + "destination_threeway_bridge": { + "description": "Bridge that survived the threeway result", + "type": "Bridge" + } + } + }, + "ChannelCreated": { + "id": "ChannelCreated", + "description": "Notification that a channel has been created.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelDestroyed": { + "id": "ChannelDestroyed", + "description": "Notification that a channel has been destroyed.", + "properties": { + "cause": { + "required": true, + "description": "Integer representation of the cause of the hangup", + "type": "int" + }, + "cause_txt": { + "required": true, + "description": "Text representation of the cause of the hangup", + "type": "string" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelEnteredBridge": { + "id": "ChannelEnteredBridge", + "description": "Notification that a channel has entered a bridge.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "channel": { + "type": "Channel" + } + } + }, + "ChannelLeftBridge": { + "id": "ChannelLeftBridge", + "description": "Notification that a channel has left a bridge.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelStateChange": { + "id": "ChannelStateChange", + "description": "Notification of a channel's state change.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelDtmfReceived": { + "id": "ChannelDtmfReceived", + "description": "DTMF received on a channel.\n\nThis event is sent when the DTMF ends. There is no notification about the start of DTMF", + "properties": { + "digit": { + "required": true, + "type": "string", + "description": "DTMF digit received (0-9, A-E, # or *)" + }, + "duration_ms": { + "required": true, + "type": "int", + "description": "Number of milliseconds DTMF was received" + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which DTMF was received" + } + } + }, + "ChannelDialplan": { + "id": "ChannelDialplan", + "description": "Channel changed location in the dialplan.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that changed dialplan location." + }, + "dialplan_app": { + "required": true, + "type": "string", + "description": "The application about to be executed." + }, + "dialplan_app_data": { + "required": true, + "type": "string", + "description": "The data to be passed to the application." + } + } + }, + "ChannelCallerId": { + "id": "ChannelCallerId", + "description": "Channel changed Caller ID.", + "properties": { + "caller_presentation": { + "required": true, + "type": "int", + "description": "The integer representation of the Caller Presentation value." + }, + "caller_presentation_txt": { + "required": true, + "type": "string", + "description": "The text representation of the Caller Presentation value." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that changed Caller ID." + } + } + }, + "ChannelUserevent": { + "id": "ChannelUserevent", + "description": "User-generated event with additional user-defined fields in the object.", + "properties": { + "eventname": { + "required": true, + "type": "string", + "description": "The name of the user event." + }, + "channel": { + "required": false, + "type": "Channel", + "description": "A channel that is signaled with the user event." + }, + "bridge": { + "required": false, + "type": "Bridge", + "description": "A bridge that is signaled with the user event." + }, + "endpoint": { + "required": false, + "type": "Endpoint", + "description": "A endpoint that is signaled with the user event." + }, + "userevent": { + "required": true, + "type": "object", + "description": "Custom Userevent data" + } + } + }, + "ChannelHangupRequest": { + "id": "ChannelHangupRequest", + "description": "A hangup was requested on the channel.", + "properties": { + "cause": { + "type": "int", + "description": "Integer representation of the cause of the hangup." + }, + "soft": { + "type": "boolean", + "description": "Whether the hangup request was a soft hangup request." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which the hangup was requested." + } + } + }, + "ChannelVarset": { + "id": "ChannelVarset", + "description": "Channel variable changed.", + "properties": { + "variable": { + "required": true, + "type": "string", + "description": "The variable that changed." + }, + "value": { + "required": true, + "type": "string", + "description": "The new value of the variable." + }, + "channel": { + "required": false, + "type": "Channel", + "description": "The channel on which the variable was set.\n\nIf missing, the variable is a global variable." + } + } + }, + "ChannelHold": { + "id": "ChannelHold", + "description": "A channel initiated a media hold.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that initiated the hold event." + }, + "musicclass": { + "required": false, + "type": "string", + "description": "The music on hold class that the initiator requested." + } + } + }, + "ChannelUnhold": { + "id": "ChannelUnhold", + "description": "A channel initiated a media unhold.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that initiated the unhold event." + } + } + }, + "ChannelTalkingStarted": { + "id": "ChannelTalkingStarted", + "description": "Talking was detected on the channel.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which talking started." + } + } + }, + "ChannelTalkingFinished": { + "id": "ChannelTalkingFinished", + "description": "Talking is no longer detected on the channel.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which talking completed." + }, + "duration": { + "required": true, + "type": "int", + "description": "The length of time, in milliseconds, that talking was detected on the channel" + } + } + }, + "ContactStatusChange": { + "id": "ContactStatusChange", + "description": "The state of a contact on an endpoint has changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + }, + "contact_info": { + "required": true, + "type": "ContactInfo" + } + } + }, + "PeerStatusChange": { + "id": "PeerStatusChange", + "description": "The state of a peer associated with an endpoint has changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + }, + "peer": { + "required": true, + "type": "Peer" + } + } + }, + "EndpointStateChange": { + "id": "EndpointStateChange", + "description": "Endpoint state changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + } + } + }, + "Dial": { + "id": "Dial", + "description": "Dialing state has changed.", + "properties": { + "caller": { + "required": false, + "type": "Channel", + "description": "The calling channel." + }, + "peer": { + "required": true, + "type": "Channel", + "description": "The dialed channel." + }, + "forward": { + "required": false, + "type": "string", + "description": "Forwarding target requested by the original dialed channel." + }, + "forwarded": { + "required": false, + "type": "Channel", + "description": "Channel that the caller has been forwarded to." + }, + "dialstring": { + "required": false, + "type": "string", + "description": "The dial string for calling the peer channel." + }, + "dialstatus": { + "required": true, + "type": "string", + "description": "Current status of the dialing attempt to the peer." + } + } + }, + "StasisEnd": { + "id": "StasisEnd", + "description": "Notification that a channel has left a Stasis application.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "StasisStart": { + "id": "StasisStart", + "description": "Notification that a channel has entered a Stasis application.", + "properties": { + "args": { + "required": true, + "type": "List[string]", + "description": "Arguments to the application" + }, + "channel": { + "required": true, + "type": "Channel" + }, + "replace_channel": { + "required": false, + "type": "Channel" + } + } + }, + "TextMessageReceived": { + "id": "TextMessageReceived", + "description": "A text message was received from an endpoint.", + "properties": { + "message": { + "required": true, + "type": "TextMessage" + }, + "endpoint": { + "required": false, + "type": "Endpoint" + } + } + }, + "ChannelConnectedLine": { + "id": "ChannelConnectedLine", + "description": "Channel changed Connected Line.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel whose connected line has changed." + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_5_1_1/mailboxes.json b/codegen/src/main/resources/codegen-data/ari_5_1_1/mailboxes.json new file mode 100644 index 00000000..8f5941b8 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_5_1_1/mailboxes.json @@ -0,0 +1,137 @@ +{ + "_copyright": "Copyright (C) 2013, Digium, Inc.", + "_author": "Jonathan Rose ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/mailboxes.{format}", + "requiresModules": [ + "res_stasis_mailbox" + ], + "apis": [ + { + "path": "/mailboxes", + "description": "Mailboxes", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all mailboxes.", + "nickname": "list", + "responseClass": "List[Mailbox]" + } + ] + }, + { + "path": "/mailboxes/{mailboxName}", + "description": "Mailbox state", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve the current state of a mailbox.", + "nickname": "get", + "responseClass": "Mailbox", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Change the state of a mailbox. (Note - implicitly creates the mailbox).", + "nickname": "update", + "responseClass": "void", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "oldMessages", + "description": "Count of old messages in the mailbox", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "newMessages", + "description": "Count of new messages in the mailbox", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "int" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Destroy a mailbox.", + "nickname": "delete", + "responseClass": "void", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + } + ] + } + ], + "models": { + "Mailbox": { + "id": "Mailbox", + "description": "Represents the state of a mailbox.", + "properties": { + "name": { + "type": "string", + "description": "Name of the mailbox.", + "required": true + }, + "old_messages": { + "type": "int", + "description": "Count of old messages in the mailbox.", + "required": true + }, + "new_messages": { + "type": "int", + "description": "Count of new messages in the mailbox.", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_5_1_1/playbacks.json b/codegen/src/main/resources/codegen-data/ari_5_1_1/playbacks.json new file mode 100644 index 00000000..a78dcae7 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_5_1_1/playbacks.json @@ -0,0 +1,164 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/playbacks.{format}", + "requiresModules": [ + "res_stasis_playback" + ], + "apis": [ + { + "path": "/playbacks/{playbackId}", + "description": "Control object for a playback operation.", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a playback's details.", + "nickname": "get", + "responseClass": "Playback", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "The playback cannot be found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop a playback.", + "nickname": "stop", + "responseClass": "void", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "The playback cannot be found" + } + ] + } + ] + }, + { + "path": "/playbacks/{playbackId}/control", + "description": "Control object for a playback operation.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Control a playback.", + "nickname": "control", + "responseClass": "void", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "operation", + "description": "Operation to perform on the playback.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "restart", + "pause", + "unpause", + "reverse", + "forward" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "The provided operation parameter was invalid" + }, + { + "code": 404, + "reason": "The playback cannot be found" + }, + { + "code": 409, + "reason": "The operation cannot be performed in the playback's current state" + } +] + } + ] + } + ], + "models": { + "Playback": { + "id": "Playback", + "description": "Object representing the playback of media to a channel", + "properties": { + "id": { + "type": "string", + "description": "ID for this playback operation", + "required": true + }, + "media_uri": { + "type": "string", + "description": "The URI for the media currently being played back.", + "required": true + }, + "next_media_uri": { + "type": "string", + "description": "If a list of URIs is being played, the next media URI to be played back.", + "required": false + }, + "target_uri": { + "type": "string", + "description": "URI for the channel or bridge to play the media on", + "required": true + }, + "language": { + "type": "string", + "description": "For media types that support multiple languages, the language requested for playback." + }, + "state": { + "type": "string", + "description": "Current state of the playback operation.", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "queued", + "playing", + "continuing", + "done" + ] + } + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_5_1_1/recordings.json b/codegen/src/main/resources/codegen-data/ari_5_1_1/recordings.json new file mode 100644 index 00000000..6ffd6d8e --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_5_1_1/recordings.json @@ -0,0 +1,413 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/recordings.{format}", + "requiresModules": [ + "res_stasis_recording" + ], + "apis": [ + { + "path": "/recordings/stored", + "description": "Recordings", + "operations": [ + { + "httpMethod": "GET", + "summary": "List recordings that are complete.", + "nickname": "listStored", + "responseClass": "List[StoredRecording]" + } + ] + }, + { + "path": "/recordings/stored/{recordingName}", + "description": "Individual recording", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a stored recording's details.", + "nickname": "getStored", + "responseClass": "StoredRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Delete a stored recording.", + "nickname": "deleteStored", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/stored/{recordingName}/file", + "description": "The actual file associated with the stored recording", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the file associated with the stored recording.", + "nickname": "getStoredFile", + "responseClass": "binary", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 403, + "reason": "The recording file could not be opened" + }, + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/stored/{recordingName}/copy", + "description": "Copy an individual recording", + "operations": [ + { + "httpMethod": "POST", + "summary": "Copy a stored recording.", + "nickname": "copyStored", + "responseClass": "StoredRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording to copy", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "destinationRecordingName", + "description": "The destination name of the recording", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "A recording with the same name already exists on the system" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}", + "description": "A recording that is in progress", + "operations": [ + { + "httpMethod": "GET", + "summary": "List live recordings.", + "nickname": "getLive", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop a live recording and discard it.", + "nickname": "cancel", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/stop", + "operations": [ + { + "httpMethod": "POST", + "summary": "Stop a live recording and store it.", + "nickname": "stop", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/pause", + "operations": [ + { + "httpMethod": "POST", + "summary": "Pause a live recording.", + "notes": "Pausing a recording suspends silence detection, which will be restarted when the recording is unpaused. Paused time is not included in the accounting for maxDurationSeconds.", + "nickname": "pause", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unpause a live recording.", + "nickname": "unpause", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/mute", + "operations": [ + { + "httpMethod": "POST", + "summary": "Mute a live recording.", + "notes": "Muting a recording suspends silence detection, which will be restarted when the recording is unmuted.", + "nickname": "mute", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unmute a live recording.", + "nickname": "unmute", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + } + ] + } + ], + "models": { + "StoredRecording": { + "id": "StoredRecording", + "description": "A past recording that may be played back.", + "properties": { + "name": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + }, + "LiveRecording": { + "id": "LiveRecording", + "description": "A recording that is in progress", + "properties": { + "name": { + "required": true, + "type": "string", + "description": "Base name for the recording" + }, + "format": { + "required": true, + "type": "string", + "description": "Recording format (wav, gsm, etc.)" + }, + "target_uri": { + "required": true, + "type": "string", + "description": "URI for the channel or bridge being recorded" + }, + "state": { + "required": true, + "type": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "queued", + "recording", + "paused", + "done", + "failed", + "canceled" + ] + } + }, + "duration": { + "required": false, + "type": "int", + "description": "Duration in seconds of the recording" + }, + "talking_duration": { + "required": false, + "type": "int", + "description": "Duration of talking, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds." + }, + "silence_duration": { + "required": false, + "type": "int", + "description": "Duration of silence, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds." + }, + "cause": { + "required": false, + "type": "string", + "description": "Cause for recording failure if failed" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_5_1_1/sounds.json b/codegen/src/main/resources/codegen-data/ari_5_1_1/sounds.json new file mode 100644 index 00000000..8fbe1c57 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_5_1_1/sounds.json @@ -0,0 +1,99 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/sounds.{format}", + "apis": [ + { + "path": "/sounds", + "description": "Sounds", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all sounds.", + "nickname": "list", + "responseClass": "List[Sound]", + "parameters": [ + { + "name": "lang", + "description": "Lookup sound for a specific language.", + "paramType": "query", + "dataType": "string", + "required": false + }, + { + "name": "format", + "description": "Lookup sound in a specific format.", + "paramType": "query", + "dataType": "string", + "required": false, + "__note": "core show translation can show translation paths between formats, along with relative costs. so this could be just installed format, or we could follow that for transcoded formats." + } + ] + } + ] + }, + { + "path": "/sounds/{soundId}", + "description": "Individual sound", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a sound's details.", + "nickname": "get", + "responseClass": "Sound", + "parameters": [ + { + "name": "soundId", + "description": "Sound's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ] + } + ] + } + ], + "models": { + "FormatLangPair": { + "id": "FormatLangPair", + "description": "Identifies the format and language of a sound file", + "properties": { + "language": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + }, + "Sound": { + "id": "Sound", + "description": "A media file that may be played back.", + "properties": { + "id": { + "required": true, + "description": "Sound's identifier.", + "type": "string" + }, + "text": { + "required": false, + "description": "Text description of the sound, usually the words spoken.", + "type": "string" + }, + "formats": { + "required": true, + "description": "The formats and languages in which this sound is available.", + "type": "List[FormatLangPair]" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_6_0_0/applications.json b/codegen/src/main/resources/codegen-data/ari_6_0_0/applications.json new file mode 100644 index 00000000..09c5cd5c --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_6_0_0/applications.json @@ -0,0 +1,223 @@ +{ + "_copyright": "Copyright (C) 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/applications.{format}", + "apis": [ + { + "path": "/applications", + "description": "Stasis applications", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all applications.", + "nickname": "list", + "responseClass": "List[Application]" + } + ] + }, + { + "path": "/applications/{applicationName}", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get details of an application.", + "nickname": "get", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Application does not exist." + } + ] + } + ] + }, + { + "path": "/applications/{applicationName}/subscription", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "POST", + "summary": "Subscribe an application to a event source.", + "notes": "Returns the state of the application after the subscriptions have changed", + "nickname": "subscribe", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "eventSource", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing parameter." + }, + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 422, + "reason": "Event source does not exist." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unsubscribe an application from an event source.", + "notes": "Returns the state of the application after the subscriptions have changed", + "nickname": "unsubscribe", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "eventSource", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing parameter; event source scheme not recognized." + }, + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 409, + "reason": "Application not subscribed to event source." + }, + { + "code": 422, + "reason": "Event source does not exist." + } + ] + } + ] + }, + { + "path": "/applications/{applicationName}/eventFilter", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Filter application events types.", + "notes": "Allowed and/or disallowed event type filtering can be done. The body (parameter) should specify a JSON key/value object that describes the type of event filtering needed. One, or both of the following keys can be designated:

\"allowed\" - Specifies an allowed list of event types
\"disallowed\" - Specifies a disallowed list of event types

Further, each of those key's value should be a JSON array that holds zero, or more JSON key/value objects. Each of these objects must contain the following key with an associated value:

\"type\" - The type name of the event to filter

The value must be the string name (case sensitive) of the event type that needs filtering. For example:

{ \"allowed\": [ { \"type\": \"StasisStart\" }, { \"type\": \"StasisEnd\" } ] }

As this specifies only an allowed list, then only those two event type messages are sent to the application. No other event messages are sent.

The following rules apply:

* If the body is empty, both the allowed and disallowed filters are set empty.
* If both list types are given then both are set to their respective values (note, specifying an empty array for a given type sets that type to empty).
* If only one list type is given then only that type is set. The other type is not updated.
* An empty \"allowed\" list means all events are allowed.
* An empty \"disallowed\" list means no events are disallowed.
* Disallowed events take precedence over allowed events if the event type is specified in both lists.", + "nickname": "filter", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "filter", + "description": "Specify which event types to allow/disallow", + "paramType": "body", + "required": false, + "dataType": "object", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Bad request." + }, + { + "code": 404, + "reason": "Application does not exist." + } + ] + } + ] + } + ], + "models": { + "Application": { + "id": "Application", + "description": "Details of a Stasis application", + "properties": { + "name": { + "type": "string", + "description": "Name of this application", + "required": true + }, + "channel_ids": { + "type": "List[string]", + "description": "Id's for channels subscribed to.", + "required": true + }, + "bridge_ids": { + "type": "List[string]", + "description": "Id's for bridges subscribed to.", + "required": true + }, + "endpoint_ids": { + "type": "List[string]", + "description": "{tech}/{resource} for endpoints subscribed to.", + "required": true + }, + "device_names": { + "type": "List[string]", + "description": "Names of the devices subscribed to.", + "required": true + }, + "events_allowed": { + "type": "List[object]", + "description": "Event types sent to the application.", + "required": true + }, + "events_disallowed": { + "type": "List[object]", + "description": "Event types not sent to the application.", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_6_0_0/asterisk.json b/codegen/src/main/resources/codegen-data/ari_6_0_0/asterisk.json new file mode 100644 index 00000000..841e6cd8 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_6_0_0/asterisk.json @@ -0,0 +1,725 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/asterisk.{format}", + "apis": [ + { + "path": "/asterisk/config/dynamic/{configClass}/{objectType}/{id}", + "description": "Asterisk dynamic configuration", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve a dynamic configuration object.", + "nickname": "getObject", + "responseClass": "List[ConfigTuple]", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to retrieve.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to retrieve.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "{configClass|objectType|id} not found" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Create or update a dynamic configuration object.", + "nickname": "updateObject", + "responseClass": "List[ConfigTuple]", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to create or update.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to create or update.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "fields", + "description": "The body object should have a value that is a list of ConfigTuples, which provide the fields to update. Ex. [ { \"attribute\": \"directmedia\", \"value\": \"false\" } ]", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Bad request body" + }, + { + "code": 403, + "reason": "Could not create or update object" + }, + { + "code": 404, + "reason": "{configClass|objectType} not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Delete a dynamic configuration object.", + "nickname": "deleteObject", + "responseClass": "void", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to delete.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to delete.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 403, + "reason": "Could not delete object" + }, + { + "code": 404, + "reason": "{configClass|objectType|id} not found" + } + ] + } + ] + }, + { + "path": "/asterisk/info", + "description": "Asterisk system information (similar to core show settings)", + "operations": [ + { + "httpMethod": "GET", + "summary": "Gets Asterisk system information.", + "nickname": "getInfo", + "responseClass": "AsteriskInfo", + "parameters": [ + { + "name": "only", + "description": "Filter information returned", + "paramType": "query", + "required": false, + "allowMultiple": true, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "build", + "system", + "config", + "status" + ] + } + } + ] + } + ] + }, + { + "path": "/asterisk/ping", + "description": "Asterisk ping", + "operations": [ + { + "httpMethod": "GET", + "summary": "Response pong message.", + "nickname": "ping", + "responseClass": "AsteriskPing" + } + ] + }, + { + "path": "/asterisk/modules", + "description": "Asterisk modules", + "operations": [ + { + "httpMethod": "GET", + "summary": "List Asterisk modules.", + "nickname": "listModules", + "responseClass": "List[Module]" + } + ] + }, + { + "path": "/asterisk/modules/{moduleName}", + "description": "Asterisk module", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get Asterisk module information.", + "nickname": "getModule", + "responseClass": "Module", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module could not be found in running modules." + }, + { + "code": 409, + "reason": "Module information could not be retrieved." + } + ] + }, + { + "httpMethod": "POST", + "summary": "Load an Asterisk module.", + "nickname": "loadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 409, + "reason": "Module could not be loaded." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unload an Asterisk module.", + "nickname": "unloadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module not found in running modules." + }, + { + "code": 409, + "reason": "Module could not be unloaded." + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Reload an Asterisk module.", + "nickname": "reloadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module not found in running modules." + }, + { + "code": 409, + "reason": "Module could not be reloaded." + } + ] + } + ] + }, + { + "path": "/asterisk/logging", + "description": "Asterisk log channels", + "operations": [ + { + "httpMethod": "GET", + "summary": "Gets Asterisk log channel information.", + "nickname": "listLogChannels", + "responseClass": "List[LogChannel]" + } + ] + }, + { + "path": "/asterisk/logging/{logChannelName}", + "description": "Asterisk log channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Adds a log channel.", + "nickname": "addLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "The log channel to add", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "configuration", + "description": "levels of the log channel", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Bad request body" + }, + { + "code": 409, + "reason": "Log channel could not be created." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Deletes a log channel.", + "nickname": "deleteLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "Log channels name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Log channel does not exist." + } + ] + } + ] + }, + { + "path": "/asterisk/logging/{logChannelName}/rotate", + "description": "Asterisk log channel", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Rotates a log channel.", + "nickname": "rotateLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "Log channel's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Log channel does not exist." + } + ] + } + ] + }, + { + "path": "/asterisk/variable", + "description": "Global variables", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the value of a global variable.", + "nickname": "getGlobalVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "variable", + "description": "The variable to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + } + ] + }, + { + "httpMethod": "POST", + "summary": "Set the value of a global variable.", + "nickname": "setGlobalVar", + "responseClass": "void", + "parameters": [ + { + "name": "variable", + "description": "The variable to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + } + ] + } + ] + } + ], + "models": { + "BuildInfo": { + "id": "BuildInfo", + "description": "Info about how Asterisk was built", + "properties": { + "os": { + "required": true, + "type": "string", + "description": "OS Asterisk was built on." + }, + "kernel": { + "required": true, + "type": "string", + "description": "Kernel version Asterisk was built on." + }, + "options": { + "required": true, + "type": "string", + "description": "Compile time options, or empty string if default." + }, + "machine": { + "required": true, + "type": "string", + "description": "Machine architecture (x86_64, i686, ppc, etc.)" + }, + "date": { + "required": true, + "type": "string", + "description": "Date and time when Asterisk was built." + }, + "user": { + "required": true, + "type": "string", + "description": "Username that build Asterisk" + } + } + }, + "SystemInfo": { + "id": "SystemInfo", + "description": "Info about Asterisk", + "properties": { + "version": { + "required": true, + "type": "string", + "description": "Asterisk version." + }, + "entity_id": { + "required": true, + "type": "string", + "description": "" + } + } + }, + "SetId": { + "id": "SetId", + "description": "Effective user/group id", + "properties": { + "user": { + "required": true, + "type": "string", + "description": "Effective user id." + }, + "group": { + "required": true, + "type": "string", + "description": "Effective group id." + } + } + }, + "ConfigInfo": { + "id": "ConfigInfo", + "description": "Info about Asterisk configuration", + "properties": { + "name": { + "required": true, + "type": "string", + "description": "Asterisk system name." + }, + "default_language": { + "required": true, + "type": "string", + "description": "Default language for media playback." + }, + "max_channels": { + "required": false, + "type": "int", + "description": "Maximum number of simultaneous channels." + }, + "max_open_files": { + "required": false, + "type": "int", + "description": "Maximum number of open file handles (files, sockets)." + }, + "max_load": { + "required": false, + "type": "double", + "description": "Maximum load avg on system." + }, + "setid": { + "required": true, + "type": "SetId", + "description": "Effective user/group id for running Asterisk." + } + } + }, + "StatusInfo": { + "id": "StatusInfo", + "description": "Info about Asterisk status", + "properties": { + "startup_time": { + "required": true, + "type": "Date", + "description": "Time when Asterisk was started." + }, + "last_reload_time": { + "required": true, + "type": "Date", + "description": "Time when Asterisk was last reloaded." + } + } + }, + "AsteriskInfo": { + "id": "AsteriskInfo", + "description": "Asterisk system information", + "properties": { + "build": { + "required": false, + "type": "BuildInfo", + "description": "Info about how Asterisk was built" + }, + "system": { + "required": false, + "type": "SystemInfo", + "description": "Info about the system running Asterisk" + }, + "config": { + "required": false, + "type": "ConfigInfo", + "description": "Info about Asterisk configuration" + }, + "status": { + "required": false, + "type": "StatusInfo", + "description": "Info about Asterisk status" + } + } + }, + "AsteriskPing": { + "id": "AsteriskPing", + "description": "Asterisk ping information", + "properties": { + "asterisk_id": { + "required": true, + "type": "string", + "description": "Asterisk id info" + }, + "ping": { + "required": true, + "type": "string", + "description": "Always string value is pong" + }, + "timestamp": { + "required": true, + "type": "string", + "description": "The timestamp string of request received time" + } + } + }, + "Module": { + "id": "Module", + "description": "Details of an Asterisk module", + "properties": { + "name": { + "type": "string", + "description": "The name of this module", + "required": true + }, + "description": { + "type": "string", + "description": "The description of this module", + "required": true + }, + "use_count": { + "type": "int", + "description": "The number of times this module is being used", + "required": true + }, + "status": { + "type": "string", + "description": "The running status of this module", + "required": true + }, + "support_level": { + "type": "string", + "description": "The support state of this module", + "required": true + } + } + }, + "LogChannel": { + "id": "LogChannel", + "description": "Details of an Asterisk log channel", + "properties": { + "channel": { + "type": "string", + "description": "The log channel path", + "required": true + }, + "type": { + "type": "string", + "description": "Types of logs for the log channel", + "required": true + }, + "status": { + "type": "string", + "description": "Whether or not a log type is enabled", + "required": true + }, + "configuration": { + "type": "string", + "description": "The various log levels", + "required": true + } + } + }, + "Variable": { + "id": "Variable", + "description": "The value of a channel variable", + "properties": { + "value": { + "required": true, + "type": "string", + "description": "The value of the variable requested" + } + } + }, + "ConfigTuple": { + "id": "ConfigTuple", + "description": "A key/value pair that makes up part of a configuration object.", + "properties": { + "attribute": { + "required": true, + "type": "string", + "description": "A configuration object attribute." + }, + "value": { + "required": true, + "type": "string", + "description": "The value for the attribute." + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_6_0_0/bridges.json b/codegen/src/main/resources/codegen-data/ari_6_0_0/bridges.json new file mode 100644 index 00000000..bf0a0016 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_6_0_0/bridges.json @@ -0,0 +1,774 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/bridges.{format}", + "requiresModules": [ + "res_stasis_recording", + "res_stasis_playback" + ], + "apis": [ + { + "path": "/bridges", + "description": "Active bridges", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all active bridges in Asterisk.", + "nickname": "list", + "responseClass": "List[Bridge]" + }, + { + "httpMethod": "POST", + "summary": "Create a new bridge.", + "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", + "nickname": "create", + "responseClass": "Bridge", + "parameters": [ + { + "name": "type", + "description": "Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media, video_sfu, video_single).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "bridgeId", + "description": "Unique ID to give to the bridge being created.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Name to give to the bridge being created.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}", + "description": "Individual bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Create a new bridge or updates an existing one.", + "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", + "nickname": "createWithId", + "responseClass": "Bridge", + "parameters": [ + { + "name": "type", + "description": "Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media, video_sfu, video_single) to set.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "bridgeId", + "description": "Unique ID to give to the bridge being created.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Set the name of the bridge.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ] + }, + { + "httpMethod": "GET", + "summary": "Get bridge details.", + "nickname": "get", + "responseClass": "Bridge", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Shut down a bridge.", + "notes": "If any channels are in this bridge, they will be removed and resume whatever they were doing beforehand.", + "nickname": "destroy", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/addChannel", + "description": "Add a channel to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Add a channel to a bridge.", + "nickname": "addChannel", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channel", + "description": "Ids of channels to add to bridge", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "role", + "description": "Channel's role in the bridge", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "absorbDTMF", + "description": "Absorb DTMF coming from this channel, preventing it to pass through to the bridge", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "mute", + "description": "Mute audio from this channel, preventing it to pass through to the bridge", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "inhibitConnectedLineUpdates", + "description": "Do not present the identity of the newly connected channel to other bridge members", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Channel not found" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application; Channel currently recording" + }, + { + "code": 422, + "reason": "Channel not in Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/removeChannel", + "description": "Remove a channel from a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Remove a channel from a bridge.", + "nickname": "removeChannel", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channel", + "description": "Ids of channels to remove from bridge", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Channel not found" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + }, + { + "code": 422, + "reason": "Channel not in this bridge" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/videoSource/{channelId}", + "description": "Set a channel as the video source in a multi-party bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Set a channel as the video source in a multi-party mixing bridge. This operation has no effect on bridges with two or fewer participants.", + "nickname": "setVideoSource", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge or Channel not found" + }, + { + "code": 409, + "reason": "Channel not in Stasis application" + }, + { + "code": 422, + "reason": "Channel not in this Bridge" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/videoSource", + "description": "Removes any explicit video source", + "operations": [ + { + "httpMethod": "DELETE", + "summary": "Removes any explicit video source in a multi-party mixing bridge. This operation has no effect on bridges with two or fewer participants. When no explicit video source is set, talk detection will be used to determine the active video stream.", + "nickname": "clearVideoSource", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/moh", + "description": "Play music on hold to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play music on hold to a bridge or change the MOH class that is playing.", + "nickname": "startMoh", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "mohClass", + "description": "Channel's id", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing music on hold to a bridge.", + "notes": "This will only stop music on hold being played via POST bridges/{bridgeId}/moh.", + "nickname": "stopMoh", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/play", + "description": "Play media to the participants of a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media on a bridge.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "play", + "responseClass": "Playback", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "playbackId", + "description": "Playback Id.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/play/{playbackId}", + "description": "Play media to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media on a bridge.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "playWithId", + "responseClass": "Playback", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + + } + ] + }, + { + "path": "/bridges/{bridgeId}/record", + "description": "Record audio on a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start a recording.", + "notes": "This records the mixed audio from all channels participating in this bridge.", + "nickname": "record", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Recording's filename", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "maxDurationSeconds", + "description": "Maximum duration of the recording, in seconds. 0 for no limit.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "maxSilenceSeconds", + "description": "Maximum duration of silence, in seconds. 0 for no limit.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "ifExists", + "description": "Action to take if a recording with the same name already exists.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "fail", + "allowableValues": { + "valueType": "LIST", + "values": [ + "fail", + "overwrite", + "append" + ] + } + }, + { + "name": "beep", + "description": "Play beep when recording begins", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "terminateOn", + "description": "DTMF input to terminate recording.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "any", + "*", + "#" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge is not in a Stasis application; A recording with the same name already exists on the system and can not be overwritten because it is in progress or ifExists=fail" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + } + ], + "models": { + "Bridge": { + "id": "Bridge", + "description": "The merging of media from one or more channels.\n\nEveryone on the bridge receives the same audio.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for this bridge", + "required": true + }, + "technology": { + "type": "string", + "description": "Name of the current bridging technology", + "required": true + }, + "bridge_type": { + "type": "string", + "description": "Type of bridge technology", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "mixing", + "holding" + ] + } + }, + "bridge_class": { + "type": "string", + "description": "Bridging class", + "required": true + }, + "creator": { + "type": "string", + "description": "Entity that created the bridge", + "required": true + }, + "name": { + "type": "string", + "description": "Name the creator gave the bridge", + "required": true + }, + "channels": { + "type": "List[string]", + "description": "Ids of channels participating in this bridge", + "required": true + }, + "video_mode": { + "type": "string", + "description": "The video mode the bridge is using. One of 'none', 'talker', 'sfu', or 'single'.", + "required": false + }, + "video_source_id": { + "type": "string", + "description": "The ID of the channel that is the source of video in this bridge, if one exists.", + "required": false + }, + "creationtime": { + "required": true, + "type": "Date", + "description": "Timestamp when bridge was created" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_6_0_0/channels.json b/codegen/src/main/resources/codegen-data/ari_6_0_0/channels.json new file mode 100644 index 00000000..db4b3a8a --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_6_0_0/channels.json @@ -0,0 +1,2194 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/channels.{format}", + "requiresModules": [ + "res_stasis_answer", + "res_stasis_playback", + "res_stasis_recording", + "res_stasis_snoop" + ], + "apis": [ + { + "path": "/channels", + "description": "Active channels", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all active channels in Asterisk.", + "nickname": "list", + "responseClass": "List[Channel]" + }, + { + "httpMethod": "POST", + "summary": "Create a new channel (originate).", + "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.", + "nickname": "originate", + "responseClass": "Channel", + "parameters": [ + { + "name": "endpoint", + "description": "Endpoint to call.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to dial after the endpoint answers. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to dial after the endpoint answers. If omitted, uses 'default'. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to dial after the endpoint answers. If omitted, uses 1. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "long" + }, + { + "name": "label", + "description": "The label to dial after the endpoint answers. Will supersede 'priority' if provided. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The application that is subscribed to the originated channel. When the channel is answered, it will be passed to this Stasis application. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "callerId", + "description": "CallerID to use when dialing the endpoint or extension.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 30 + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "The unique id of the channel which is originating this one.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "formats", + "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for originating a channel." + }, + { + "code": 409, + "reason": "Channel with given unique ID already exists." + } + ] + } + ] + }, + { + "path": "/channels/create", + "description": "Create a channel and place it in a Stasis app, but do not dial the channel yet.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Create channel.", + "nickname": "create", + "responseClass": "Channel", + "parameters": [ + { + "name": "endpoint", + "description": "Endpoint for channel communication", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "Stasis Application to place channel into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "Unique ID of the calling channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "formats", + "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 409, + "reason": "Channel with given unique ID already exists." + } + ] + } + ] + }, + { + "path": "/channels/{channelId}", + "description": "Active channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "Channel details.", + "nickname": "get", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + } + ] + }, + { + "httpMethod": "POST", + "summary": "Create a new channel (originate with id).", + "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.", + "nickname": "originateWithId", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "endpoint", + "description": "Endpoint to call.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to dial after the endpoint answers. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to dial after the endpoint answers. If omitted, uses 'default'. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to dial after the endpoint answers. If omitted, uses 1. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "long" + }, + { + "name": "label", + "description": "The label to dial after the endpoint answers. Will supersede 'priority' if provided. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The application that is subscribed to the originated channel. When the channel is answered, it will be passed to this Stasis application. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "callerId", + "description": "CallerID to use when dialing the endpoint or extension.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 30 + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "The unique id of the channel which is originating this one.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "formats", + "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for originating a channel." + }, + { + "code": 409, + "reason": "Channel with given unique ID already exists." + } + ] + + }, + { + "httpMethod": "DELETE", + "summary": "Delete (i.e. hangup) a channel.", + "nickname": "hangup", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "reason_code", + "description": "The reason code for hanging up the channel for detail use. Mutually exclusive with 'reason'. See detail hangup codes at here. https://docs.asterisk.org/Configuration/Miscellaneous/Hangup-Cause-Mappings/", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "reason", + "description": "Reason for hanging up the channel for simple use. Mutually exclusive with 'reason_code'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "normal", + "busy", + "congestion", + "no_answer", + "timeout", + "rejected", + "unallocated", + "normal_unspecified", + "number_incomplete", + "codec_mismatch", + "interworking", + "failure", + "answered_elsewhere" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid reason for hangup provided" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/continue", + "description": "Exit application; continue execution in the dialplan", + "operations": [ + { + "httpMethod": "POST", + "summary": "Exit application; continue execution in the dialplan.", + "nickname": "continueInDialplan", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "label", + "description": "The label to continue to - will supersede 'priority' if both are provided.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/move", + "description": "Move the channel from one Stasis application to another.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Move the channel from one Stasis application to another.", + "nickname": "move", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The channel will be passed to this Stasis application.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": "404", + "reason": "Channel not found" + }, + { + "code": "409", + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/redirect", + "description": "Inform the channel that it should redirect itself to a different location. Note that this will almost certainly cause the channel to exit the application.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Redirect the channel to a different location.", + "nickname": "redirect", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "endpoint", + "description": "The endpoint to redirect the channel to", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Endpoint parameter not provided" + }, + { + "code": 404, + "reason": "Channel or endpoint not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 422, + "reason": "Endpoint is not the same type as the channel" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/answer", + "description": "Answer a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Answer a channel.", + "nickname": "answer", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/ring", + "description": "Send a ringing indication to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Indicate ringing to a channel.", + "nickname": "ring", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop ringing indication on a channel if locally generated.", + "nickname": "ringStop", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/dtmf", + "description": "Send DTMF to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Send provided DTMF to a given channel.", + "nickname": "sendDTMF", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "dtmf", + "description": "DTMF To send.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "before", + "description": "Amount of time to wait before DTMF digits (specified in milliseconds) start.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0 + }, + { + "name": "between", + "description": "Amount of time in between DTMF digits (specified in milliseconds).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 100 + }, + { + "name": "duration", + "description": "Length of each DTMF digit (specified in milliseconds).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 100 + }, + { + "name": "after", + "description": "Amount of time to wait after DTMF digits (specified in milliseconds) end.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0 + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "DTMF is required" + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/mute", + "description": "Mute a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Mute a channel.", + "nickname": "mute", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "Direction in which to mute audio", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both", + "in", + "out" + ] + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unmute a channel.", + "nickname": "unmute", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "Direction in which to unmute audio", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both", + "in", + "out" + ] + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/hold", + "description": "Put a channel on hold", + "operations": [ + { + "httpMethod": "POST", + "summary": "Hold a channel.", + "nickname": "hold", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Remove a channel from hold.", + "nickname": "unhold", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/moh", + "description": "Play music on hold to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play music on hold to a channel.", + "notes": "Using media operations such as /play on a channel playing MOH in this manner will suspend MOH without resuming automatically. If continuing music on hold is desired, the stasis application must reinitiate music on hold.", + "nickname": "startMoh", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "mohClass", + "description": "Music on hold class to use", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing music on hold to a channel.", + "nickname": "stopMoh", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/silence", + "description": "Play silence to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play silence to a channel.", + "notes": "Using media operations such as /play on a channel playing silence in this manner will suspend silence without resuming automatically.", + "nickname": "startSilence", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing silence to a channel.", + "nickname": "stopSilence", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/play", + "description": "Play media to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "play", + "responseClass": "Playback", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000 + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/play/{playbackId}", + "description": "Play media to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media and specify the playbackId.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "playWithId", + "responseClass": "Playback", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000 + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/record", + "description": "Record audio from a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start a recording.", + "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.", + "nickname": "record", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Recording's filename", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "maxDurationSeconds", + "description": "Maximum duration of the recording, in seconds. 0 for no limit", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "maxSilenceSeconds", + "description": "Maximum duration of silence, in seconds. 0 for no limit", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "ifExists", + "description": "Action to take if a recording with the same name already exists.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "fail", + "allowableValues": { + "valueType": "LIST", + "values": [ + "fail", + "overwrite", + "append" + ] + } + }, + { + "name": "beep", + "description": "Play beep when recording begins", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "terminateOn", + "description": "DTMF input to terminate recording", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "any", + "*", + "#" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "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" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/variable", + "description": "Variables on a channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the value of a channel variable or function.", + "nickname": "getChannelVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The channel variable or function to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Channel or variable not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "POST", + "summary": "Set the value of a channel variable or function.", + "nickname": "setChannelVar", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The channel variable or function to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/snoop", + "description": "Snoop (spy/whisper) on a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start snooping.", + "notes": "Snoop (spy/whisper) on a specific channel.", + "nickname": "snoopChannel", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "spy", + "description": "Direction of audio to spy on", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "whisper", + "description": "Direction of audio to whisper into", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "app", + "description": "Application the snooping channel is placed into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "snoopId", + "description": "Unique ID to assign to snooping channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/snoop/{snoopId}", + "description": "Snoop (spy/whisper) on a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start snooping.", + "notes": "Snoop (spy/whisper) on a specific channel.", + "nickname": "snoopChannelWithId", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "snoopId", + "description": "Unique ID to assign to snooping channel", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "spy", + "description": "Direction of audio to spy on", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "whisper", + "description": "Direction of audio to whisper into", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "app", + "description": "Application the snooping channel is placed into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/dial", + "description": "Dial a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Dial a created channel.", + "nickname": "dial", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "caller", + "description": "Channel ID of caller", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Dial timeout", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel cannot be found." + }, + { + "code": 409, + "reason": "Channel cannot be dialed." + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/rtp_statistics", + "description": "Get RTP statistics information for RTP on a channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "RTP stats on a channel.", + "nickname": "rtpstatistics", + "responseClass": "RTPstat", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel cannot be found." + } + ] + } + ] + }, + { + "path": "/channels/externalMedia", + "description": "Create a channel to an External Media source/sink.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start an External Media session.", + "notes": "Create a channel to an External Media source/sink.", + "nickname": "externalMedia", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "Stasis Application to place channel into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "external_host", + "description": "Hostname/ip:port of external host", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "encapsulation", + "description": "Payload encapsulation protocol", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "rtp", + "allowableValues": { + "valueType": "LIST", + "values": [ + "rtp", + "audiosocket" + ] + } + }, + { + "name": "transport", + "description": "Transport protocol", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "udp", + "allowableValues": { + "valueType": "LIST", + "values": [ + "udp", + "tcp" + ] + } + }, + { + "name": "connection_type", + "description": "Connection type (client/server)", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "client", + "allowableValues": { + "valueType": "LIST", + "values": [ + "client" + ] + } + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "External media direction", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both" + ] + } + }, + { + "name": "data", + "description": "An arbitrary data field", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 409, + "reason": "Channel is not in a Stasis application; Channel is already bridged" + } + ] + } + ] + } + ], + "models": { + "Dialed": { + "id": "Dialed", + "description": "Dialed channel information.", + "properties": {} + }, + "DialplanCEP": { + "id": "DialplanCEP", + "description": "Dialplan location (context/extension/priority)", + "properties": { + "context": { + "required": true, + "type": "string", + "description": "Context in the dialplan" + }, + "exten": { + "required": true, + "type": "string", + "description": "Extension in the dialplan" + }, + "priority": { + "required": true, + "type": "long", + "description": "Priority in the dialplan" + }, + "app_name": { + "required": true, + "type": "string", + "description": "Name of current dialplan application" + }, + "app_data": { + "required": true, + "type": "string", + "description": "Parameter of current dialplan application" + } + } + }, + "CallerID": { + "id": "CallerID", + "description": "Caller identification", + "properties": { + "name": { + "required": true, + "type": "string" + }, + "number": { + "required": true, + "type": "string" + } + } + }, + "RTPstat": { + "id": "RTPstat", + "description": "A statistics of a RTP.", + "properties": { + "txcount": { + "required": true, + "type": "int", + "description": "Number of packets transmitted." + }, + "rxcount": { + "required": true, + "type": "int", + "description": "Number of packets received." + }, + "txjitter": { + "required": false, + "type": "double", + "description": "Jitter on transmitted packets." + }, + "rxjitter": { + "required": false, + "type": "double", + "description": "Jitter on received packets." + }, + "remote_maxjitter": { + "required": false, + "type": "double", + "description": "Maximum jitter on remote side." + }, + "remote_minjitter": { + "required": false, + "type": "double", + "description": "Minimum jitter on remote side." + }, + "remote_normdevjitter": { + "required": false, + "type": "double", + "description": "Average jitter on remote side." + }, + "remote_stdevjitter": { + "required": false, + "type": "double", + "description": "Standard deviation jitter on remote side." + }, + "local_maxjitter": { + "required": false, + "type": "double", + "description": "Maximum jitter on local side." + }, + "local_minjitter": { + "required": false, + "type": "double", + "description": "Minimum jitter on local side." + }, + "local_normdevjitter": { + "required": false, + "type": "double", + "description": "Average jitter on local side." + }, + "local_stdevjitter": { + "required": false, + "type": "double", + "description": "Standard deviation jitter on local side." + }, + "txploss": { + "required": true, + "type": "int", + "description": "Number of transmitted packets lost." + }, + "rxploss": { + "required": true, + "type": "int", + "description": "Number of received packets lost." + }, + "remote_maxrxploss": { + "required": false, + "type": "double", + "description": "Maximum number of packets lost on remote side." + }, + "remote_minrxploss": { + "required": false, + "type": "double", + "description": "Minimum number of packets lost on remote side." + }, + "remote_normdevrxploss": { + "required": false, + "type": "double", + "description": "Average number of packets lost on remote side." + }, + "remote_stdevrxploss": { + "required": false, + "type": "double", + "description": "Standard deviation packets lost on remote side." + }, + "local_maxrxploss": { + "required": false, + "type": "double", + "description": "Maximum number of packets lost on local side." + }, + "local_minrxploss": { + "required": false, + "type": "double", + "description": "Minimum number of packets lost on local side." + }, + "local_normdevrxploss": { + "required": false, + "type": "double", + "description": "Average number of packets lost on local side." + }, + "local_stdevrxploss": { + "required": false, + "type": "double", + "description": "Standard deviation packets lost on local side." + }, + "rtt": { + "required": false, + "type": "double", + "description": "Total round trip time." + }, + "maxrtt": { + "required": false, + "type": "double", + "description": "Maximum round trip time." + }, + "minrtt": { + "required": false, + "type": "double", + "description": "Minimum round trip time." + }, + "normdevrtt": { + "required": false, + "type": "double", + "description": "Average round trip time." + }, + "stdevrtt": { + "required": false, + "type": "double", + "description": "Standard deviation round trip time." + }, + "local_ssrc": { + "required": true, + "type": "int", + "description": "Our SSRC." + }, + "remote_ssrc": { + "required": true, + "type": "int", + "description": "Their SSRC." + }, + "txoctetcount": { + "required": true, + "type": "int", + "description": "Number of octets transmitted." + }, + "rxoctetcount": { + "required": true, + "type": "int", + "description": "Number of octets received." + }, + "channel_uniqueid": { + "required": true, + "type": "string", + "description": "The Asterisk channel's unique ID that owns this instance." + } + } + }, + "Channel": { + "id": "Channel", + "description": "A specific communication connection between Asterisk and an Endpoint.", + "properties": { + "id": { + "required": true, + "type": "string", + "description": "Unique identifier of the channel.\n\nThis is the same as the Uniqueid field in AMI." + }, + "name": { + "required": true, + "type": "string", + "description": "Name of the channel (i.e. SIP/foo-0000a7e3)" + }, + "state": { + "required": true, + "type": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "Down", + "Rsrved", + "OffHook", + "Dialing", + "Ring", + "Ringing", + "Up", + "Busy", + "Dialing Offhook", + "Pre-ring", + "Unknown" + ] + } + }, + "caller": { + "required": true, + "type": "CallerID" + }, + "connected": { + "required": true, + "type": "CallerID" + }, + "accountcode": { + "required": true, + "type": "string" + }, + "dialplan": { + "required": true, + "type": "DialplanCEP", + "description": "Current location in the dialplan" + }, + "creationtime": { + "required": true, + "type": "Date", + "description": "Timestamp when channel was created" + }, + "language": { + "required": true, + "type": "string", + "description": "The default spoken language" + }, + "channelvars": { + "required": false, + "type": "object", + "description": "Channel variables" + }, + "tenantid": { + "required": false, + "type": "string", + "description": "The Tenant ID for the channel" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_6_0_0/deviceStates.json b/codegen/src/main/resources/codegen-data/ari_6_0_0/deviceStates.json new file mode 100644 index 00000000..bd389355 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_6_0_0/deviceStates.json @@ -0,0 +1,154 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "Kevin Harwell ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/deviceStates.{format}", + "requiresModules": [ + "res_stasis_device_state" + ], + "apis": [ + { + "path": "/deviceStates", + "description": "Device states", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all ARI controlled device states.", + "nickname": "list", + "responseClass": "List[DeviceState]" + } + ] + }, + { + "path": "/deviceStates/{deviceName}", + "description": "Device state", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve the current state of a device.", + "nickname": "get", + "responseClass": "DeviceState", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Change the state of a device controlled by ARI. (Note - implicitly creates the device state).", + "nickname": "update", + "responseClass": "void", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "deviceState", + "description": "Device state value", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "NOT_INUSE", + "INUSE", + "BUSY", + "INVALID", + "UNAVAILABLE", + "RINGING", + "RINGINUSE", + "ONHOLD" + ] + } + + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Device name is missing" + }, + { + "code": 409, + "reason": "Uncontrolled device specified" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Destroy a device-state controlled by ARI.", + "nickname": "delete", + "responseClass": "void", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Device name is missing" + }, + { + "code": 409, + "reason": "Uncontrolled device specified" + } + ] + } + ] + } + ], + "models": { + "DeviceState": { + "id": "DeviceState", + "description": "Represents the state of a device.", + "properties": { + "name": { + "type": "string", + "description": "Name of the device.", + "required": true + }, + "state": { + "type": "string", + "description": "Device's state", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "UNKNOWN", + "NOT_INUSE", + "INUSE", + "BUSY", + "INVALID", + "UNAVAILABLE", + "RINGING", + "RINGINUSE", + "ONHOLD" + ] + } + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_6_0_0/endpoints.json b/codegen/src/main/resources/codegen-data/ari_6_0_0/endpoints.json new file mode 100644 index 00000000..1f77d370 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_6_0_0/endpoints.json @@ -0,0 +1,263 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/endpoints.{format}", + "apis": [ + { + "path": "/endpoints", + "description": "Asterisk endpoints", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all endpoints.", + "nickname": "list", + "responseClass": "List[Endpoint]" + } + ] + }, + { + "path": "/endpoints/sendMessage", + "description": "Send a message to some technology URI or endpoint.", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Send a message to some technology URI or endpoint.", + "nickname": "sendMessage", + "responseClass": "void", + "parameters": [ + { + "name": "to", + "description": "The endpoint resource or technology specific URI to send the message to. Valid resources are sip, pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "from", + "description": "The endpoint resource or technology specific identity to send this message from. Valid resources are sip, pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "body", + "description": "The body of the message", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "descriptioni": "The \"variables\" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, pjsip and sip resource types will add the key/value pairs as SIP headers,", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoint not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}", + "description": "Asterisk endpoints", + "operations": [ + { + "httpMethod": "GET", + "summary": "List available endoints for a given endpoint technology.", + "nickname": "listByTech", + "responseClass": "List[Endpoint]", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoints (sip,iax2,...)", + "paramType": "path", + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Endpoints not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}/{resource}", + "description": "Single endpoint", + "operations": [ + { + "httpMethod": "GET", + "summary": "Details for an endpoint.", + "nickname": "get", + "responseClass": "Endpoint", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "resource", + "description": "ID of the endpoint", + "paramType": "path", + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoints not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}/{resource}/sendMessage", + "description": "Send a message to some endpoint in a technology.", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Send a message to some endpoint in a technology.", + "nickname": "sendMessageToEndpoint", + "responseClass": "void", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "resource", + "description": "ID of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "from", + "description": "The endpoint resource or technology specific identity to send this message from. Valid resources are sip, pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "body", + "description": "The body of the message", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "descriptioni": "The \"variables\" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, pjsip and sip resource types will add the key/value pairs as SIP headers,", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoint not found" + } + ] + } + ] + } + ], + "models": { + "Endpoint": { + "id": "Endpoint", + "description": "An external device that may offer/accept calls to/from Asterisk.\n\nUnlike most resources, which have a single unique identifier, an endpoint is uniquely identified by the technology/resource pair.", + "properties": { + "technology": { + "type": "string", + "description": "Technology of the endpoint", + "required": true + }, + "resource": { + "type": "string", + "description": "Identifier of the endpoint, specific to the given technology.", + "required": true + }, + "state": { + "type": "string", + "description": "Endpoint's state", + "required": false, + "allowableValues": { + "valueType": "LIST", + "values": [ + "unknown", + "offline", + "online" + ] + } + }, + "channel_ids": { + "type": "List[string]", + "description": "Id's of channels associated with this endpoint", + "required": true + } + } + }, + "TextMessage": { + "id": "TextMessage", + "description": "A text message.", + "properties": { + "from": { + "type": "string", + "description": "A technology specific URI specifying the source of the message. For sip and pjsip technologies, any SIP URI can be specified. For xmpp, the URI must correspond to the client connection being used to send the message.", + "required": true + }, + "to": { + "type": "string", + "description": "A technology specific URI specifying the destination of the message. Valid technologies include sip, pjsip, and xmp. The destination of a message should be an endpoint.", + "required": true + }, + "body": { + "type": "string", + "description": "The text of the message.", + "required": true + }, + "variables": { + "type": "object", + "description": "Technology specific key/value pairs (JSON object) associated with the message.", + "required": false + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_6_0_0/events.json b/codegen/src/main/resources/codegen-data/ari_6_0_0/events.json new file mode 100644 index 00000000..c9822f6c --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_6_0_0/events.json @@ -0,0 +1,918 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.2", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/events.{format}", + "requiresModules": [ + "res_http_websocket" + ], + "apis": [ + { + "path": "/events", + "description": "Events from Asterisk to applications", + "operations": [ + { + "httpMethod": "GET", + "upgrade": "websocket", + "websocketProtocol": "ari", + "summary": "WebSocket connection for events.", + "nickname": "eventWebsocket", + "responseClass": "Message", + "parameters": [ + { + "name": "app", + "description": "Applications to subscribe to.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "subscribeAll", + "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'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean" + } + ] + } + ] + }, + { + "path": "/events/user/{eventName}", + "description": "Stasis application user events", + "operations": [ + { + "httpMethod": "POST", + "summary": "Generate a user event.", + "nickname": "userEvent", + "responseClass": "void", + "parameters": [ + { + "name": "eventName", + "description": "Event name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "application", + "description": "The name of the application that will receive this event", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "source", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}/{resource}, deviceState:{deviceName}", + "paramType": "query", + "required": false, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds custom key/value pairs to add to the user event. Ex. { \"variables\": { \"key\": \"value\" } }", + "paramType": "body", + "required": false, + "allowMultiple": false, + "dataType": "containers" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 422, + "reason": "Event source not found." + }, + { + "code": 400, + "reason": "Invalid even tsource URI or userevent data." + } + ] + } + ] + } + ], + "models": { + "Message": { + "id": "Message", + "description": "Base type for errors and events", + "discriminator": "type", + "properties": { + "type": { + "type": "string", + "required": true, + "description": "Indicates the type of this message." + }, + "asterisk_id": { + "type": "string", + "required": false, + "description": "The unique ID for the Asterisk instance that raised this event." + } + }, + "subTypes": [ + "MissingParams", + "Event" + ] + }, + "MissingParams": { + "id": "MissingParams", + "description": "Error event sent when required params are missing.", + "properties": { + "params": { + "required": true, + "type": "List[string]", + "description": "A list of the missing parameters" + } + } + }, + "Event": { + "id": "Event", + "description": "Base type for asynchronous events from Asterisk.", + "properties": { + "application": { + "type": "string", + "description": "Name of the application receiving the event.", + "required": true + }, + "timestamp": { + "type": "Date", + "description": "Time at which this event was created.", + "required": true + } + }, + "subTypes": [ + "DeviceStateChanged", + "PlaybackStarted", + "PlaybackContinuing", + "PlaybackFinished", + "RecordingStarted", + "RecordingFinished", + "RecordingFailed", + "ApplicationMoveFailed", + "ApplicationReplaced", + "BridgeCreated", + "BridgeDestroyed", + "BridgeMerged", + "BridgeBlindTransfer", + "BridgeAttendedTransfer", + "BridgeVideoSourceChanged", + "ChannelCreated", + "ChannelDestroyed", + "ChannelEnteredBridge", + "ChannelLeftBridge", + "ChannelStateChange", + "ChannelDtmfReceived", + "ChannelDialplan", + "ChannelCallerId", + "ChannelUserevent", + "ChannelHangupRequest", + "ChannelVarset", + "ChannelTalkingStarted", + "ChannelTalkingFinished", + "ChannelHold", + "ChannelUnhold", + "ContactStatusChange", + "EndpointStateChange", + "Dial", + "StasisEnd", + "StasisStart", + "TextMessageReceived", + "ChannelConnectedLine", + "PeerStatusChange" + ] + }, + "ContactInfo": { + "id": "ContactInfo", + "description": "Detailed information about a contact on an endpoint.", + "properties": { + "uri": { + "type": "string", + "description": "The location of the contact.", + "required": true + }, + "contact_status": { + "type": "string", + "description": "The current status of the contact.", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "Unreachable", + "Reachable", + "Unknown", + "NonQualified", + "Removed" + ] + } + }, + "aor": { + "type": "string", + "description": "The Address of Record this contact belongs to.", + "required": true + }, + "roundtrip_usec": { + "type": "string", + "description": "Current round trip time, in microseconds, for the contact.", + "required": false + } + } + }, + "Peer": { + "id": "Peer", + "description": "Detailed information about a remote peer that communicates with Asterisk.", + "properties": { + "peer_status": { + "type": "string", + "description": "The current state of the peer. Note that the values of the status are dependent on the underlying peer technology.", + "required": true + }, + "cause": { + "type": "string", + "description": "An optional reason associated with the change in peer_status.", + "required": false + }, + "address": { + "type": "string", + "description": "The IP address of the peer.", + "required": false + }, + "port": { + "type": "string", + "description": "The port of the peer.", + "required": false + }, + "time": { + "type": "string", + "description": "The last known time the peer was contacted.", + "required": false + } + } + }, + "DeviceStateChanged": { + "id": "DeviceStateChanged", + "description": "Notification that a device state has changed.", + "properties": { + "device_state": { + "type": "DeviceState", + "description": "Device state object", + "required": true + } + } + }, + "PlaybackStarted": { + "id": "PlaybackStarted", + "description": "Event showing the start of a media playback operation.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "PlaybackContinuing": { + "id": "PlaybackContinuing", + "description": "Event showing the continuation of a media playback operation from one media URI to the next in the list.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "PlaybackFinished": { + "id": "PlaybackFinished", + "description": "Event showing the completion of a media playback operation.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "RecordingStarted": { + "id": "RecordingStarted", + "description": "Event showing the start of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "RecordingFinished": { + "id": "RecordingFinished", + "description": "Event showing the completion of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "RecordingFailed": { + "id": "RecordingFailed", + "description": "Event showing failure of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "ApplicationMoveFailed": { + "id": "ApplicationMoveFailed", + "description": "Notification that trying to move a channel to another Stasis application failed.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + }, + "destination": { + "required": true, + "type": "string" + }, + "args": { + "required": true, + "type": "List[string]", + "description": "Arguments to the application" + } + } + }, + "ApplicationReplaced": { + "id": "ApplicationReplaced", + "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.", + "properties": {} + }, + "BridgeCreated": { + "id": "BridgeCreated", + "description": "Notification that a bridge has been created.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeDestroyed": { + "id": "BridgeDestroyed", + "description": "Notification that a bridge has been destroyed.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeMerged": { + "id": "BridgeMerged", + "description": "Notification that one bridge has merged into another.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "bridge_from": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeVideoSourceChanged": { + "id": "BridgeVideoSourceChanged", + "description": "Notification that the source of video in a bridge has changed.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "old_video_source_id": { + "required": false, + "type": "string" + } + } + }, + "BridgeBlindTransfer": { + "id": "BridgeBlindTransfer", + "description": "Notification that a blind transfer has occurred.", + "properties": { + "channel": { + "description": "The channel performing the blind transfer", + "required": true, + "type": "Channel" + }, + "replace_channel": { + "description": "The channel that is replacing transferer when the transferee(s) can not be transferred directly", + "required": false, + "type": "Channel" + }, + "transferee": { + "description": "The channel that is being transferred", + "required": false, + "type": "Channel" + }, + "exten": { + "description": "The extension transferred to", + "required": true, + "type": "string" + }, + "context": { + "description": "The context transferred to", + "required": true, + "type": "string" + }, + "result": { + "description": "The result of the transfer attempt", + "required": true, + "type": "string" + }, + "is_external": { + "description": "Whether the transfer was externally initiated or not", + "required": true, + "type": "boolean" + }, + "bridge": { + "description": "The bridge being transferred", + "type": "Bridge" + } + } + }, + "BridgeAttendedTransfer": { + "id": "BridgeAttendedTransfer", + "description": "Notification that an attended transfer has occurred.", + "properties": { + "transferer_first_leg": { + "description": "First leg of the transferer", + "required": true, + "type": "Channel" + }, + "transferer_second_leg": { + "description": "Second leg of the transferer", + "required": true, + "type": "Channel" + }, + "replace_channel": { + "description": "The channel that is replacing transferer_first_leg in the swap", + "required": false, + "type": "Channel" + }, + "transferee": { + "description": "The channel that is being transferred", + "required": false, + "type": "Channel" + }, + "transfer_target": { + "description": "The channel that is being transferred to", + "required": false, + "type": "Channel" + }, + "result": { + "description": "The result of the transfer attempt", + "required": true, + "type": "string" + }, + "is_external": { + "description": "Whether the transfer was externally initiated or not", + "required": true, + "type": "boolean" + }, + "transferer_first_leg_bridge": { + "description": "Bridge the transferer first leg is in", + "type": "Bridge" + }, + "transferer_second_leg_bridge": { + "description": "Bridge the transferer second leg is in", + "type": "Bridge" + }, + "destination_type": { + "description": "How the transfer was accomplished", + "required": true, + "type": "string" + }, + "destination_bridge": { + "description": "Bridge that survived the merge result", + "type": "string" + }, + "destination_application": { + "description": "Application that has been transferred into", + "type": "string" + }, + "destination_link_first_leg": { + "description": "First leg of a link transfer result", + "type": "Channel" + }, + "destination_link_second_leg": { + "description": "Second leg of a link transfer result", + "type": "Channel" + }, + "destination_threeway_channel": { + "description": "Transferer channel that survived the threeway result", + "type": "Channel" + }, + "destination_threeway_bridge": { + "description": "Bridge that survived the threeway result", + "type": "Bridge" + } + } + }, + "ChannelCreated": { + "id": "ChannelCreated", + "description": "Notification that a channel has been created.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelDestroyed": { + "id": "ChannelDestroyed", + "description": "Notification that a channel has been destroyed.", + "properties": { + "cause": { + "required": true, + "description": "Integer representation of the cause of the hangup", + "type": "int" + }, + "cause_txt": { + "required": true, + "description": "Text representation of the cause of the hangup", + "type": "string" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelEnteredBridge": { + "id": "ChannelEnteredBridge", + "description": "Notification that a channel has entered a bridge.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "channel": { + "type": "Channel" + } + } + }, + "ChannelLeftBridge": { + "id": "ChannelLeftBridge", + "description": "Notification that a channel has left a bridge.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelStateChange": { + "id": "ChannelStateChange", + "description": "Notification of a channel's state change.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelDtmfReceived": { + "id": "ChannelDtmfReceived", + "description": "DTMF received on a channel.\n\nThis event is sent when the DTMF ends. There is no notification about the start of DTMF", + "properties": { + "digit": { + "required": true, + "type": "string", + "description": "DTMF digit received (0-9, A-E, # or *)" + }, + "duration_ms": { + "required": true, + "type": "int", + "description": "Number of milliseconds DTMF was received" + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which DTMF was received" + } + } + }, + "ChannelDialplan": { + "id": "ChannelDialplan", + "description": "Channel changed location in the dialplan.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that changed dialplan location." + }, + "dialplan_app": { + "required": true, + "type": "string", + "description": "The application about to be executed." + }, + "dialplan_app_data": { + "required": true, + "type": "string", + "description": "The data to be passed to the application." + } + } + }, + "ChannelCallerId": { + "id": "ChannelCallerId", + "description": "Channel changed Caller ID.", + "properties": { + "caller_presentation": { + "required": true, + "type": "int", + "description": "The integer representation of the Caller Presentation value." + }, + "caller_presentation_txt": { + "required": true, + "type": "string", + "description": "The text representation of the Caller Presentation value." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that changed Caller ID." + } + } + }, + "ChannelUserevent": { + "id": "ChannelUserevent", + "description": "User-generated event with additional user-defined fields in the object.", + "properties": { + "eventname": { + "required": true, + "type": "string", + "description": "The name of the user event." + }, + "channel": { + "required": false, + "type": "Channel", + "description": "A channel that is signaled with the user event." + }, + "bridge": { + "required": false, + "type": "Bridge", + "description": "A bridge that is signaled with the user event." + }, + "endpoint": { + "required": false, + "type": "Endpoint", + "description": "A endpoint that is signaled with the user event." + }, + "userevent": { + "required": true, + "type": "object", + "description": "Custom Userevent data" + } + } + }, + "ChannelHangupRequest": { + "id": "ChannelHangupRequest", + "description": "A hangup was requested on the channel.", + "properties": { + "cause": { + "type": "int", + "description": "Integer representation of the cause of the hangup." + }, + "soft": { + "type": "boolean", + "description": "Whether the hangup request was a soft hangup request." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which the hangup was requested." + } + } + }, + "ChannelVarset": { + "id": "ChannelVarset", + "description": "Channel variable changed.", + "properties": { + "variable": { + "required": true, + "type": "string", + "description": "The variable that changed." + }, + "value": { + "required": true, + "type": "string", + "description": "The new value of the variable." + }, + "channel": { + "required": false, + "type": "Channel", + "description": "The channel on which the variable was set.\n\nIf missing, the variable is a global variable." + } + } + }, + "ChannelHold": { + "id": "ChannelHold", + "description": "A channel initiated a media hold.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that initiated the hold event." + }, + "musicclass": { + "required": false, + "type": "string", + "description": "The music on hold class that the initiator requested." + } + } + }, + "ChannelUnhold": { + "id": "ChannelUnhold", + "description": "A channel initiated a media unhold.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that initiated the unhold event." + } + } + }, + "ChannelTalkingStarted": { + "id": "ChannelTalkingStarted", + "description": "Talking was detected on the channel.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which talking started." + } + } + }, + "ChannelTalkingFinished": { + "id": "ChannelTalkingFinished", + "description": "Talking is no longer detected on the channel.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which talking completed." + }, + "duration": { + "required": true, + "type": "int", + "description": "The length of time, in milliseconds, that talking was detected on the channel" + } + } + }, + "ContactStatusChange": { + "id": "ContactStatusChange", + "description": "The state of a contact on an endpoint has changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + }, + "contact_info": { + "required": true, + "type": "ContactInfo" + } + } + }, + "PeerStatusChange": { + "id": "PeerStatusChange", + "description": "The state of a peer associated with an endpoint has changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + }, + "peer": { + "required": true, + "type": "Peer" + } + } + }, + "EndpointStateChange": { + "id": "EndpointStateChange", + "description": "Endpoint state changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + } + } + }, + "Dial": { + "id": "Dial", + "description": "Dialing state has changed.", + "properties": { + "caller": { + "required": false, + "type": "Channel", + "description": "The calling channel." + }, + "peer": { + "required": true, + "type": "Channel", + "description": "The dialed channel." + }, + "forward": { + "required": false, + "type": "string", + "description": "Forwarding target requested by the original dialed channel." + }, + "forwarded": { + "required": false, + "type": "Channel", + "description": "Channel that the caller has been forwarded to." + }, + "dialstring": { + "required": false, + "type": "string", + "description": "The dial string for calling the peer channel." + }, + "dialstatus": { + "required": true, + "type": "string", + "description": "Current status of the dialing attempt to the peer." + } + } + }, + "StasisEnd": { + "id": "StasisEnd", + "description": "Notification that a channel has left a Stasis application.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "StasisStart": { + "id": "StasisStart", + "description": "Notification that a channel has entered a Stasis application.", + "properties": { + "args": { + "required": true, + "type": "List[string]", + "description": "Arguments to the application" + }, + "channel": { + "required": true, + "type": "Channel" + }, + "replace_channel": { + "required": false, + "type": "Channel" + } + } + }, + "TextMessageReceived": { + "id": "TextMessageReceived", + "description": "A text message was received from an endpoint.", + "properties": { + "message": { + "required": true, + "type": "TextMessage" + }, + "endpoint": { + "required": false, + "type": "Endpoint" + } + } + }, + "ChannelConnectedLine": { + "id": "ChannelConnectedLine", + "description": "Channel changed Connected Line.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel whose connected line has changed." + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_6_0_0/mailboxes.json b/codegen/src/main/resources/codegen-data/ari_6_0_0/mailboxes.json new file mode 100644 index 00000000..8f5941b8 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_6_0_0/mailboxes.json @@ -0,0 +1,137 @@ +{ + "_copyright": "Copyright (C) 2013, Digium, Inc.", + "_author": "Jonathan Rose ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/mailboxes.{format}", + "requiresModules": [ + "res_stasis_mailbox" + ], + "apis": [ + { + "path": "/mailboxes", + "description": "Mailboxes", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all mailboxes.", + "nickname": "list", + "responseClass": "List[Mailbox]" + } + ] + }, + { + "path": "/mailboxes/{mailboxName}", + "description": "Mailbox state", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve the current state of a mailbox.", + "nickname": "get", + "responseClass": "Mailbox", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Change the state of a mailbox. (Note - implicitly creates the mailbox).", + "nickname": "update", + "responseClass": "void", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "oldMessages", + "description": "Count of old messages in the mailbox", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "newMessages", + "description": "Count of new messages in the mailbox", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "int" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Destroy a mailbox.", + "nickname": "delete", + "responseClass": "void", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + } + ] + } + ], + "models": { + "Mailbox": { + "id": "Mailbox", + "description": "Represents the state of a mailbox.", + "properties": { + "name": { + "type": "string", + "description": "Name of the mailbox.", + "required": true + }, + "old_messages": { + "type": "int", + "description": "Count of old messages in the mailbox.", + "required": true + }, + "new_messages": { + "type": "int", + "description": "Count of new messages in the mailbox.", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_6_0_0/playbacks.json b/codegen/src/main/resources/codegen-data/ari_6_0_0/playbacks.json new file mode 100644 index 00000000..793986fc --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_6_0_0/playbacks.json @@ -0,0 +1,165 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/playbacks.{format}", + "requiresModules": [ + "res_stasis_playback" + ], + "apis": [ + { + "path": "/playbacks/{playbackId}", + "description": "Control object for a playback operation.", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a playback's details.", + "nickname": "get", + "responseClass": "Playback", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "The playback cannot be found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop a playback.", + "nickname": "stop", + "responseClass": "void", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "The playback cannot be found" + } + ] + } + ] + }, + { + "path": "/playbacks/{playbackId}/control", + "description": "Control object for a playback operation.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Control a playback.", + "nickname": "control", + "responseClass": "void", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "operation", + "description": "Operation to perform on the playback.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "restart", + "pause", + "unpause", + "reverse", + "forward" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "The provided operation parameter was invalid" + }, + { + "code": 404, + "reason": "The playback cannot be found" + }, + { + "code": 409, + "reason": "The operation cannot be performed in the playback's current state" + } +] + } + ] + } + ], + "models": { + "Playback": { + "id": "Playback", + "description": "Object representing the playback of media to a channel", + "properties": { + "id": { + "type": "string", + "description": "ID for this playback operation", + "required": true + }, + "media_uri": { + "type": "string", + "description": "The URI for the media currently being played back.", + "required": true + }, + "next_media_uri": { + "type": "string", + "description": "If a list of URIs is being played, the next media URI to be played back.", + "required": false + }, + "target_uri": { + "type": "string", + "description": "URI for the channel or bridge to play the media on", + "required": true + }, + "language": { + "type": "string", + "description": "For media types that support multiple languages, the language requested for playback." + }, + "state": { + "type": "string", + "description": "Current state of the playback operation.", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "queued", + "playing", + "continuing", + "done", + "failed" + ] + } + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_6_0_0/recordings.json b/codegen/src/main/resources/codegen-data/ari_6_0_0/recordings.json new file mode 100644 index 00000000..6ffd6d8e --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_6_0_0/recordings.json @@ -0,0 +1,413 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/recordings.{format}", + "requiresModules": [ + "res_stasis_recording" + ], + "apis": [ + { + "path": "/recordings/stored", + "description": "Recordings", + "operations": [ + { + "httpMethod": "GET", + "summary": "List recordings that are complete.", + "nickname": "listStored", + "responseClass": "List[StoredRecording]" + } + ] + }, + { + "path": "/recordings/stored/{recordingName}", + "description": "Individual recording", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a stored recording's details.", + "nickname": "getStored", + "responseClass": "StoredRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Delete a stored recording.", + "nickname": "deleteStored", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/stored/{recordingName}/file", + "description": "The actual file associated with the stored recording", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the file associated with the stored recording.", + "nickname": "getStoredFile", + "responseClass": "binary", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 403, + "reason": "The recording file could not be opened" + }, + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/stored/{recordingName}/copy", + "description": "Copy an individual recording", + "operations": [ + { + "httpMethod": "POST", + "summary": "Copy a stored recording.", + "nickname": "copyStored", + "responseClass": "StoredRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording to copy", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "destinationRecordingName", + "description": "The destination name of the recording", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "A recording with the same name already exists on the system" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}", + "description": "A recording that is in progress", + "operations": [ + { + "httpMethod": "GET", + "summary": "List live recordings.", + "nickname": "getLive", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop a live recording and discard it.", + "nickname": "cancel", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/stop", + "operations": [ + { + "httpMethod": "POST", + "summary": "Stop a live recording and store it.", + "nickname": "stop", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/pause", + "operations": [ + { + "httpMethod": "POST", + "summary": "Pause a live recording.", + "notes": "Pausing a recording suspends silence detection, which will be restarted when the recording is unpaused. Paused time is not included in the accounting for maxDurationSeconds.", + "nickname": "pause", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unpause a live recording.", + "nickname": "unpause", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/mute", + "operations": [ + { + "httpMethod": "POST", + "summary": "Mute a live recording.", + "notes": "Muting a recording suspends silence detection, which will be restarted when the recording is unmuted.", + "nickname": "mute", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unmute a live recording.", + "nickname": "unmute", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + } + ] + } + ], + "models": { + "StoredRecording": { + "id": "StoredRecording", + "description": "A past recording that may be played back.", + "properties": { + "name": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + }, + "LiveRecording": { + "id": "LiveRecording", + "description": "A recording that is in progress", + "properties": { + "name": { + "required": true, + "type": "string", + "description": "Base name for the recording" + }, + "format": { + "required": true, + "type": "string", + "description": "Recording format (wav, gsm, etc.)" + }, + "target_uri": { + "required": true, + "type": "string", + "description": "URI for the channel or bridge being recorded" + }, + "state": { + "required": true, + "type": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "queued", + "recording", + "paused", + "done", + "failed", + "canceled" + ] + } + }, + "duration": { + "required": false, + "type": "int", + "description": "Duration in seconds of the recording" + }, + "talking_duration": { + "required": false, + "type": "int", + "description": "Duration of talking, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds." + }, + "silence_duration": { + "required": false, + "type": "int", + "description": "Duration of silence, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds." + }, + "cause": { + "required": false, + "type": "string", + "description": "Cause for recording failure if failed" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_6_0_0/sounds.json b/codegen/src/main/resources/codegen-data/ari_6_0_0/sounds.json new file mode 100644 index 00000000..8fbe1c57 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_6_0_0/sounds.json @@ -0,0 +1,99 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/sounds.{format}", + "apis": [ + { + "path": "/sounds", + "description": "Sounds", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all sounds.", + "nickname": "list", + "responseClass": "List[Sound]", + "parameters": [ + { + "name": "lang", + "description": "Lookup sound for a specific language.", + "paramType": "query", + "dataType": "string", + "required": false + }, + { + "name": "format", + "description": "Lookup sound in a specific format.", + "paramType": "query", + "dataType": "string", + "required": false, + "__note": "core show translation can show translation paths between formats, along with relative costs. so this could be just installed format, or we could follow that for transcoded formats." + } + ] + } + ] + }, + { + "path": "/sounds/{soundId}", + "description": "Individual sound", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a sound's details.", + "nickname": "get", + "responseClass": "Sound", + "parameters": [ + { + "name": "soundId", + "description": "Sound's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ] + } + ] + } + ], + "models": { + "FormatLangPair": { + "id": "FormatLangPair", + "description": "Identifies the format and language of a sound file", + "properties": { + "language": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + }, + "Sound": { + "id": "Sound", + "description": "A media file that may be played back.", + "properties": { + "id": { + "required": true, + "description": "Sound's identifier.", + "type": "string" + }, + "text": { + "required": false, + "description": "Text description of the sound, usually the words spoken.", + "type": "string" + }, + "formats": { + "required": true, + "description": "The formats and languages in which this sound is available.", + "type": "List[FormatLangPair]" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_6_0_1/applications.json b/codegen/src/main/resources/codegen-data/ari_6_0_1/applications.json new file mode 100644 index 00000000..09c5cd5c --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_6_0_1/applications.json @@ -0,0 +1,223 @@ +{ + "_copyright": "Copyright (C) 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/applications.{format}", + "apis": [ + { + "path": "/applications", + "description": "Stasis applications", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all applications.", + "nickname": "list", + "responseClass": "List[Application]" + } + ] + }, + { + "path": "/applications/{applicationName}", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get details of an application.", + "nickname": "get", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Application does not exist." + } + ] + } + ] + }, + { + "path": "/applications/{applicationName}/subscription", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "POST", + "summary": "Subscribe an application to a event source.", + "notes": "Returns the state of the application after the subscriptions have changed", + "nickname": "subscribe", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "eventSource", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing parameter." + }, + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 422, + "reason": "Event source does not exist." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unsubscribe an application from an event source.", + "notes": "Returns the state of the application after the subscriptions have changed", + "nickname": "unsubscribe", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "eventSource", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing parameter; event source scheme not recognized." + }, + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 409, + "reason": "Application not subscribed to event source." + }, + { + "code": 422, + "reason": "Event source does not exist." + } + ] + } + ] + }, + { + "path": "/applications/{applicationName}/eventFilter", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Filter application events types.", + "notes": "Allowed and/or disallowed event type filtering can be done. The body (parameter) should specify a JSON key/value object that describes the type of event filtering needed. One, or both of the following keys can be designated:

\"allowed\" - Specifies an allowed list of event types
\"disallowed\" - Specifies a disallowed list of event types

Further, each of those key's value should be a JSON array that holds zero, or more JSON key/value objects. Each of these objects must contain the following key with an associated value:

\"type\" - The type name of the event to filter

The value must be the string name (case sensitive) of the event type that needs filtering. For example:

{ \"allowed\": [ { \"type\": \"StasisStart\" }, { \"type\": \"StasisEnd\" } ] }

As this specifies only an allowed list, then only those two event type messages are sent to the application. No other event messages are sent.

The following rules apply:

* If the body is empty, both the allowed and disallowed filters are set empty.
* If both list types are given then both are set to their respective values (note, specifying an empty array for a given type sets that type to empty).
* If only one list type is given then only that type is set. The other type is not updated.
* An empty \"allowed\" list means all events are allowed.
* An empty \"disallowed\" list means no events are disallowed.
* Disallowed events take precedence over allowed events if the event type is specified in both lists.", + "nickname": "filter", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "filter", + "description": "Specify which event types to allow/disallow", + "paramType": "body", + "required": false, + "dataType": "object", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Bad request." + }, + { + "code": 404, + "reason": "Application does not exist." + } + ] + } + ] + } + ], + "models": { + "Application": { + "id": "Application", + "description": "Details of a Stasis application", + "properties": { + "name": { + "type": "string", + "description": "Name of this application", + "required": true + }, + "channel_ids": { + "type": "List[string]", + "description": "Id's for channels subscribed to.", + "required": true + }, + "bridge_ids": { + "type": "List[string]", + "description": "Id's for bridges subscribed to.", + "required": true + }, + "endpoint_ids": { + "type": "List[string]", + "description": "{tech}/{resource} for endpoints subscribed to.", + "required": true + }, + "device_names": { + "type": "List[string]", + "description": "Names of the devices subscribed to.", + "required": true + }, + "events_allowed": { + "type": "List[object]", + "description": "Event types sent to the application.", + "required": true + }, + "events_disallowed": { + "type": "List[object]", + "description": "Event types not sent to the application.", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_6_0_1/asterisk.json b/codegen/src/main/resources/codegen-data/ari_6_0_1/asterisk.json new file mode 100644 index 00000000..841e6cd8 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_6_0_1/asterisk.json @@ -0,0 +1,725 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/asterisk.{format}", + "apis": [ + { + "path": "/asterisk/config/dynamic/{configClass}/{objectType}/{id}", + "description": "Asterisk dynamic configuration", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve a dynamic configuration object.", + "nickname": "getObject", + "responseClass": "List[ConfigTuple]", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to retrieve.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to retrieve.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "{configClass|objectType|id} not found" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Create or update a dynamic configuration object.", + "nickname": "updateObject", + "responseClass": "List[ConfigTuple]", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to create or update.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to create or update.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "fields", + "description": "The body object should have a value that is a list of ConfigTuples, which provide the fields to update. Ex. [ { \"attribute\": \"directmedia\", \"value\": \"false\" } ]", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Bad request body" + }, + { + "code": 403, + "reason": "Could not create or update object" + }, + { + "code": 404, + "reason": "{configClass|objectType} not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Delete a dynamic configuration object.", + "nickname": "deleteObject", + "responseClass": "void", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to delete.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to delete.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 403, + "reason": "Could not delete object" + }, + { + "code": 404, + "reason": "{configClass|objectType|id} not found" + } + ] + } + ] + }, + { + "path": "/asterisk/info", + "description": "Asterisk system information (similar to core show settings)", + "operations": [ + { + "httpMethod": "GET", + "summary": "Gets Asterisk system information.", + "nickname": "getInfo", + "responseClass": "AsteriskInfo", + "parameters": [ + { + "name": "only", + "description": "Filter information returned", + "paramType": "query", + "required": false, + "allowMultiple": true, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "build", + "system", + "config", + "status" + ] + } + } + ] + } + ] + }, + { + "path": "/asterisk/ping", + "description": "Asterisk ping", + "operations": [ + { + "httpMethod": "GET", + "summary": "Response pong message.", + "nickname": "ping", + "responseClass": "AsteriskPing" + } + ] + }, + { + "path": "/asterisk/modules", + "description": "Asterisk modules", + "operations": [ + { + "httpMethod": "GET", + "summary": "List Asterisk modules.", + "nickname": "listModules", + "responseClass": "List[Module]" + } + ] + }, + { + "path": "/asterisk/modules/{moduleName}", + "description": "Asterisk module", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get Asterisk module information.", + "nickname": "getModule", + "responseClass": "Module", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module could not be found in running modules." + }, + { + "code": 409, + "reason": "Module information could not be retrieved." + } + ] + }, + { + "httpMethod": "POST", + "summary": "Load an Asterisk module.", + "nickname": "loadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 409, + "reason": "Module could not be loaded." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unload an Asterisk module.", + "nickname": "unloadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module not found in running modules." + }, + { + "code": 409, + "reason": "Module could not be unloaded." + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Reload an Asterisk module.", + "nickname": "reloadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module not found in running modules." + }, + { + "code": 409, + "reason": "Module could not be reloaded." + } + ] + } + ] + }, + { + "path": "/asterisk/logging", + "description": "Asterisk log channels", + "operations": [ + { + "httpMethod": "GET", + "summary": "Gets Asterisk log channel information.", + "nickname": "listLogChannels", + "responseClass": "List[LogChannel]" + } + ] + }, + { + "path": "/asterisk/logging/{logChannelName}", + "description": "Asterisk log channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Adds a log channel.", + "nickname": "addLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "The log channel to add", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "configuration", + "description": "levels of the log channel", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Bad request body" + }, + { + "code": 409, + "reason": "Log channel could not be created." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Deletes a log channel.", + "nickname": "deleteLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "Log channels name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Log channel does not exist." + } + ] + } + ] + }, + { + "path": "/asterisk/logging/{logChannelName}/rotate", + "description": "Asterisk log channel", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Rotates a log channel.", + "nickname": "rotateLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "Log channel's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Log channel does not exist." + } + ] + } + ] + }, + { + "path": "/asterisk/variable", + "description": "Global variables", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the value of a global variable.", + "nickname": "getGlobalVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "variable", + "description": "The variable to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + } + ] + }, + { + "httpMethod": "POST", + "summary": "Set the value of a global variable.", + "nickname": "setGlobalVar", + "responseClass": "void", + "parameters": [ + { + "name": "variable", + "description": "The variable to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + } + ] + } + ] + } + ], + "models": { + "BuildInfo": { + "id": "BuildInfo", + "description": "Info about how Asterisk was built", + "properties": { + "os": { + "required": true, + "type": "string", + "description": "OS Asterisk was built on." + }, + "kernel": { + "required": true, + "type": "string", + "description": "Kernel version Asterisk was built on." + }, + "options": { + "required": true, + "type": "string", + "description": "Compile time options, or empty string if default." + }, + "machine": { + "required": true, + "type": "string", + "description": "Machine architecture (x86_64, i686, ppc, etc.)" + }, + "date": { + "required": true, + "type": "string", + "description": "Date and time when Asterisk was built." + }, + "user": { + "required": true, + "type": "string", + "description": "Username that build Asterisk" + } + } + }, + "SystemInfo": { + "id": "SystemInfo", + "description": "Info about Asterisk", + "properties": { + "version": { + "required": true, + "type": "string", + "description": "Asterisk version." + }, + "entity_id": { + "required": true, + "type": "string", + "description": "" + } + } + }, + "SetId": { + "id": "SetId", + "description": "Effective user/group id", + "properties": { + "user": { + "required": true, + "type": "string", + "description": "Effective user id." + }, + "group": { + "required": true, + "type": "string", + "description": "Effective group id." + } + } + }, + "ConfigInfo": { + "id": "ConfigInfo", + "description": "Info about Asterisk configuration", + "properties": { + "name": { + "required": true, + "type": "string", + "description": "Asterisk system name." + }, + "default_language": { + "required": true, + "type": "string", + "description": "Default language for media playback." + }, + "max_channels": { + "required": false, + "type": "int", + "description": "Maximum number of simultaneous channels." + }, + "max_open_files": { + "required": false, + "type": "int", + "description": "Maximum number of open file handles (files, sockets)." + }, + "max_load": { + "required": false, + "type": "double", + "description": "Maximum load avg on system." + }, + "setid": { + "required": true, + "type": "SetId", + "description": "Effective user/group id for running Asterisk." + } + } + }, + "StatusInfo": { + "id": "StatusInfo", + "description": "Info about Asterisk status", + "properties": { + "startup_time": { + "required": true, + "type": "Date", + "description": "Time when Asterisk was started." + }, + "last_reload_time": { + "required": true, + "type": "Date", + "description": "Time when Asterisk was last reloaded." + } + } + }, + "AsteriskInfo": { + "id": "AsteriskInfo", + "description": "Asterisk system information", + "properties": { + "build": { + "required": false, + "type": "BuildInfo", + "description": "Info about how Asterisk was built" + }, + "system": { + "required": false, + "type": "SystemInfo", + "description": "Info about the system running Asterisk" + }, + "config": { + "required": false, + "type": "ConfigInfo", + "description": "Info about Asterisk configuration" + }, + "status": { + "required": false, + "type": "StatusInfo", + "description": "Info about Asterisk status" + } + } + }, + "AsteriskPing": { + "id": "AsteriskPing", + "description": "Asterisk ping information", + "properties": { + "asterisk_id": { + "required": true, + "type": "string", + "description": "Asterisk id info" + }, + "ping": { + "required": true, + "type": "string", + "description": "Always string value is pong" + }, + "timestamp": { + "required": true, + "type": "string", + "description": "The timestamp string of request received time" + } + } + }, + "Module": { + "id": "Module", + "description": "Details of an Asterisk module", + "properties": { + "name": { + "type": "string", + "description": "The name of this module", + "required": true + }, + "description": { + "type": "string", + "description": "The description of this module", + "required": true + }, + "use_count": { + "type": "int", + "description": "The number of times this module is being used", + "required": true + }, + "status": { + "type": "string", + "description": "The running status of this module", + "required": true + }, + "support_level": { + "type": "string", + "description": "The support state of this module", + "required": true + } + } + }, + "LogChannel": { + "id": "LogChannel", + "description": "Details of an Asterisk log channel", + "properties": { + "channel": { + "type": "string", + "description": "The log channel path", + "required": true + }, + "type": { + "type": "string", + "description": "Types of logs for the log channel", + "required": true + }, + "status": { + "type": "string", + "description": "Whether or not a log type is enabled", + "required": true + }, + "configuration": { + "type": "string", + "description": "The various log levels", + "required": true + } + } + }, + "Variable": { + "id": "Variable", + "description": "The value of a channel variable", + "properties": { + "value": { + "required": true, + "type": "string", + "description": "The value of the variable requested" + } + } + }, + "ConfigTuple": { + "id": "ConfigTuple", + "description": "A key/value pair that makes up part of a configuration object.", + "properties": { + "attribute": { + "required": true, + "type": "string", + "description": "A configuration object attribute." + }, + "value": { + "required": true, + "type": "string", + "description": "The value for the attribute." + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_6_0_1/bridges.json b/codegen/src/main/resources/codegen-data/ari_6_0_1/bridges.json new file mode 100644 index 00000000..636d2540 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_6_0_1/bridges.json @@ -0,0 +1,774 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/bridges.{format}", + "requiresModules": [ + "res_stasis_recording", + "res_stasis_playback" + ], + "apis": [ + { + "path": "/bridges", + "description": "Active bridges", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all active bridges in Asterisk.", + "nickname": "list", + "responseClass": "List[Bridge]" + }, + { + "httpMethod": "POST", + "summary": "Create a new bridge.", + "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", + "nickname": "create", + "responseClass": "Bridge", + "parameters": [ + { + "name": "type", + "description": "Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media, video_sfu, video_single, sdp_label).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "bridgeId", + "description": "Unique ID to give to the bridge being created.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Name to give to the bridge being created.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}", + "description": "Individual bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Create a new bridge or updates an existing one.", + "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", + "nickname": "createWithId", + "responseClass": "Bridge", + "parameters": [ + { + "name": "type", + "description": "Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media, video_sfu, video_single, sdp_label) to set.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "bridgeId", + "description": "Unique ID to give to the bridge being created.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Set the name of the bridge.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ] + }, + { + "httpMethod": "GET", + "summary": "Get bridge details.", + "nickname": "get", + "responseClass": "Bridge", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Shut down a bridge.", + "notes": "If any channels are in this bridge, they will be removed and resume whatever they were doing beforehand.", + "nickname": "destroy", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/addChannel", + "description": "Add a channel to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Add a channel to a bridge.", + "nickname": "addChannel", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channel", + "description": "Ids of channels to add to bridge", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "role", + "description": "Channel's role in the bridge", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "absorbDTMF", + "description": "Absorb DTMF coming from this channel, preventing it to pass through to the bridge", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "mute", + "description": "Mute audio from this channel, preventing it to pass through to the bridge", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "inhibitConnectedLineUpdates", + "description": "Do not present the identity of the newly connected channel to other bridge members", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Channel not found" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application; Channel currently recording" + }, + { + "code": 422, + "reason": "Channel not in Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/removeChannel", + "description": "Remove a channel from a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Remove a channel from a bridge.", + "nickname": "removeChannel", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channel", + "description": "Ids of channels to remove from bridge", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Channel not found" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + }, + { + "code": 422, + "reason": "Channel not in this bridge" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/videoSource/{channelId}", + "description": "Set a channel as the video source in a multi-party bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Set a channel as the video source in a multi-party mixing bridge. This operation has no effect on bridges with two or fewer participants.", + "nickname": "setVideoSource", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge or Channel not found" + }, + { + "code": 409, + "reason": "Channel not in Stasis application" + }, + { + "code": 422, + "reason": "Channel not in this Bridge" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/videoSource", + "description": "Removes any explicit video source", + "operations": [ + { + "httpMethod": "DELETE", + "summary": "Removes any explicit video source in a multi-party mixing bridge. This operation has no effect on bridges with two or fewer participants. When no explicit video source is set, talk detection will be used to determine the active video stream.", + "nickname": "clearVideoSource", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/moh", + "description": "Play music on hold to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play music on hold to a bridge or change the MOH class that is playing.", + "nickname": "startMoh", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "mohClass", + "description": "Channel's id", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing music on hold to a bridge.", + "notes": "This will only stop music on hold being played via POST bridges/{bridgeId}/moh.", + "nickname": "stopMoh", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/play", + "description": "Play media to the participants of a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media on a bridge.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "play", + "responseClass": "Playback", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "playbackId", + "description": "Playback Id.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/play/{playbackId}", + "description": "Play media to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media on a bridge.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "playWithId", + "responseClass": "Playback", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + + } + ] + }, + { + "path": "/bridges/{bridgeId}/record", + "description": "Record audio on a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start a recording.", + "notes": "This records the mixed audio from all channels participating in this bridge.", + "nickname": "record", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Recording's filename", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "maxDurationSeconds", + "description": "Maximum duration of the recording, in seconds. 0 for no limit.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "maxSilenceSeconds", + "description": "Maximum duration of silence, in seconds. 0 for no limit.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "ifExists", + "description": "Action to take if a recording with the same name already exists.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "fail", + "allowableValues": { + "valueType": "LIST", + "values": [ + "fail", + "overwrite", + "append" + ] + } + }, + { + "name": "beep", + "description": "Play beep when recording begins", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "terminateOn", + "description": "DTMF input to terminate recording.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "any", + "*", + "#" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge is not in a Stasis application; A recording with the same name already exists on the system and can not be overwritten because it is in progress or ifExists=fail" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + } + ], + "models": { + "Bridge": { + "id": "Bridge", + "description": "The merging of media from one or more channels.\n\nEveryone on the bridge receives the same audio.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for this bridge", + "required": true + }, + "technology": { + "type": "string", + "description": "Name of the current bridging technology", + "required": true + }, + "bridge_type": { + "type": "string", + "description": "Type of bridge technology", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "mixing", + "holding" + ] + } + }, + "bridge_class": { + "type": "string", + "description": "Bridging class", + "required": true + }, + "creator": { + "type": "string", + "description": "Entity that created the bridge", + "required": true + }, + "name": { + "type": "string", + "description": "Name the creator gave the bridge", + "required": true + }, + "channels": { + "type": "List[string]", + "description": "Ids of channels participating in this bridge", + "required": true + }, + "video_mode": { + "type": "string", + "description": "The video mode the bridge is using. One of 'none', 'talker', 'sfu', or 'single'.", + "required": false + }, + "video_source_id": { + "type": "string", + "description": "The ID of the channel that is the source of video in this bridge, if one exists.", + "required": false + }, + "creationtime": { + "required": true, + "type": "Date", + "description": "Timestamp when bridge was created" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_6_0_1/channels.json b/codegen/src/main/resources/codegen-data/ari_6_0_1/channels.json new file mode 100644 index 00000000..2a1d0a0c --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_6_0_1/channels.json @@ -0,0 +1,2203 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/channels.{format}", + "requiresModules": [ + "res_stasis_answer", + "res_stasis_playback", + "res_stasis_recording", + "res_stasis_snoop" + ], + "apis": [ + { + "path": "/channels", + "description": "Active channels", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all active channels in Asterisk.", + "nickname": "list", + "responseClass": "List[Channel]" + }, + { + "httpMethod": "POST", + "summary": "Create a new channel (originate).", + "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.", + "nickname": "originate", + "responseClass": "Channel", + "parameters": [ + { + "name": "endpoint", + "description": "Endpoint to call.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to dial after the endpoint answers. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to dial after the endpoint answers. If omitted, uses 'default'. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to dial after the endpoint answers. If omitted, uses 1. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "long" + }, + { + "name": "label", + "description": "The label to dial after the endpoint answers. Will supersede 'priority' if provided. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The application that is subscribed to the originated channel. When the channel is answered, it will be passed to this Stasis application. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "callerId", + "description": "CallerID to use when dialing the endpoint or extension.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 30 + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "The unique id of the channel which is originating this one.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "formats", + "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for originating a channel." + }, + { + "code": 409, + "reason": "Channel with given unique ID already exists." + } + ] + } + ] + }, + { + "path": "/channels/create", + "description": "Create a channel and place it in a Stasis app, but do not dial the channel yet.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Create channel.", + "nickname": "create", + "responseClass": "Channel", + "parameters": [ + { + "name": "endpoint", + "description": "Endpoint for channel communication", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "Stasis Application to place channel into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "Unique ID of the calling channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "formats", + "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 409, + "reason": "Channel with given unique ID already exists." + } + ] + } + ] + }, + { + "path": "/channels/{channelId}", + "description": "Active channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "Channel details.", + "nickname": "get", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + } + ] + }, + { + "httpMethod": "POST", + "summary": "Create a new channel (originate with id).", + "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.", + "nickname": "originateWithId", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "endpoint", + "description": "Endpoint to call.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to dial after the endpoint answers. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to dial after the endpoint answers. If omitted, uses 'default'. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to dial after the endpoint answers. If omitted, uses 1. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "long" + }, + { + "name": "label", + "description": "The label to dial after the endpoint answers. Will supersede 'priority' if provided. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The application that is subscribed to the originated channel. When the channel is answered, it will be passed to this Stasis application. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "callerId", + "description": "CallerID to use when dialing the endpoint or extension.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 30 + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "The unique id of the channel which is originating this one.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "formats", + "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for originating a channel." + }, + { + "code": 409, + "reason": "Channel with given unique ID already exists." + } + ] + + }, + { + "httpMethod": "DELETE", + "summary": "Delete (i.e. hangup) a channel.", + "nickname": "hangup", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "reason_code", + "description": "The reason code for hanging up the channel for detail use. Mutually exclusive with 'reason'. See detail hangup codes at here. https://docs.asterisk.org/Configuration/Miscellaneous/Hangup-Cause-Mappings/", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "reason", + "description": "Reason for hanging up the channel for simple use. Mutually exclusive with 'reason_code'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "normal", + "busy", + "congestion", + "no_answer", + "timeout", + "rejected", + "unallocated", + "normal_unspecified", + "number_incomplete", + "codec_mismatch", + "interworking", + "failure", + "answered_elsewhere" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid reason for hangup provided" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/continue", + "description": "Exit application; continue execution in the dialplan", + "operations": [ + { + "httpMethod": "POST", + "summary": "Exit application; continue execution in the dialplan.", + "nickname": "continueInDialplan", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "label", + "description": "The label to continue to - will supersede 'priority' if both are provided.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/move", + "description": "Move the channel from one Stasis application to another.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Move the channel from one Stasis application to another.", + "nickname": "move", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The channel will be passed to this Stasis application.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": "404", + "reason": "Channel not found" + }, + { + "code": "409", + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/redirect", + "description": "Inform the channel that it should redirect itself to a different location. Note that this will almost certainly cause the channel to exit the application.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Redirect the channel to a different location.", + "nickname": "redirect", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "endpoint", + "description": "The endpoint to redirect the channel to", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Endpoint parameter not provided" + }, + { + "code": 404, + "reason": "Channel or endpoint not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 422, + "reason": "Endpoint is not the same type as the channel" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/answer", + "description": "Answer a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Answer a channel.", + "nickname": "answer", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/ring", + "description": "Send a ringing indication to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Indicate ringing to a channel.", + "nickname": "ring", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop ringing indication on a channel if locally generated.", + "nickname": "ringStop", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/dtmf", + "description": "Send DTMF to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Send provided DTMF to a given channel.", + "nickname": "sendDTMF", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "dtmf", + "description": "DTMF To send.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "before", + "description": "Amount of time to wait before DTMF digits (specified in milliseconds) start.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0 + }, + { + "name": "between", + "description": "Amount of time in between DTMF digits (specified in milliseconds).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 100 + }, + { + "name": "duration", + "description": "Length of each DTMF digit (specified in milliseconds).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 100 + }, + { + "name": "after", + "description": "Amount of time to wait after DTMF digits (specified in milliseconds) end.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0 + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "DTMF is required" + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/mute", + "description": "Mute a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Mute a channel.", + "nickname": "mute", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "Direction in which to mute audio", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both", + "in", + "out" + ] + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unmute a channel.", + "nickname": "unmute", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "Direction in which to unmute audio", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both", + "in", + "out" + ] + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/hold", + "description": "Put a channel on hold", + "operations": [ + { + "httpMethod": "POST", + "summary": "Hold a channel.", + "nickname": "hold", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Remove a channel from hold.", + "nickname": "unhold", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/moh", + "description": "Play music on hold to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play music on hold to a channel.", + "notes": "Using media operations such as /play on a channel playing MOH in this manner will suspend MOH without resuming automatically. If continuing music on hold is desired, the stasis application must reinitiate music on hold.", + "nickname": "startMoh", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "mohClass", + "description": "Music on hold class to use", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing music on hold to a channel.", + "nickname": "stopMoh", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/silence", + "description": "Play silence to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play silence to a channel.", + "notes": "Using media operations such as /play on a channel playing silence in this manner will suspend silence without resuming automatically.", + "nickname": "startSilence", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing silence to a channel.", + "nickname": "stopSilence", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/play", + "description": "Play media to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "play", + "responseClass": "Playback", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000 + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/play/{playbackId}", + "description": "Play media to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media and specify the playbackId.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "playWithId", + "responseClass": "Playback", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000 + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/record", + "description": "Record audio from a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start a recording.", + "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.", + "nickname": "record", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Recording's filename", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "maxDurationSeconds", + "description": "Maximum duration of the recording, in seconds. 0 for no limit", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "maxSilenceSeconds", + "description": "Maximum duration of silence, in seconds. 0 for no limit", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "ifExists", + "description": "Action to take if a recording with the same name already exists.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "fail", + "allowableValues": { + "valueType": "LIST", + "values": [ + "fail", + "overwrite", + "append" + ] + } + }, + { + "name": "beep", + "description": "Play beep when recording begins", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "terminateOn", + "description": "DTMF input to terminate recording", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "any", + "*", + "#" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "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" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/variable", + "description": "Variables on a channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the value of a channel variable or function.", + "nickname": "getChannelVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The channel variable or function to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Channel or variable not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "POST", + "summary": "Set the value of a channel variable or function.", + "nickname": "setChannelVar", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The channel variable or function to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/snoop", + "description": "Snoop (spy/whisper) on a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start snooping.", + "notes": "Snoop (spy/whisper) on a specific channel.", + "nickname": "snoopChannel", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "spy", + "description": "Direction of audio to spy on", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "whisper", + "description": "Direction of audio to whisper into", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "app", + "description": "Application the snooping channel is placed into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "snoopId", + "description": "Unique ID to assign to snooping channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/snoop/{snoopId}", + "description": "Snoop (spy/whisper) on a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start snooping.", + "notes": "Snoop (spy/whisper) on a specific channel.", + "nickname": "snoopChannelWithId", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "snoopId", + "description": "Unique ID to assign to snooping channel", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "spy", + "description": "Direction of audio to spy on", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "whisper", + "description": "Direction of audio to whisper into", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "app", + "description": "Application the snooping channel is placed into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/dial", + "description": "Dial a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Dial a created channel.", + "nickname": "dial", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "caller", + "description": "Channel ID of caller", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Dial timeout", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel cannot be found." + }, + { + "code": 409, + "reason": "Channel cannot be dialed." + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/rtp_statistics", + "description": "Get RTP statistics information for RTP on a channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "RTP stats on a channel.", + "nickname": "rtpstatistics", + "responseClass": "RTPstat", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel cannot be found." + } + ] + } + ] + }, + { + "path": "/channels/externalMedia", + "description": "Create a channel to an External Media source/sink.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start an External Media session.", + "notes": "Create a channel to an External Media source/sink.", + "nickname": "externalMedia", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "Stasis Application to place channel into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "external_host", + "description": "Hostname/ip:port of external host", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "encapsulation", + "description": "Payload encapsulation protocol", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "rtp", + "allowableValues": { + "valueType": "LIST", + "values": [ + "rtp", + "audiosocket" + ] + } + }, + { + "name": "transport", + "description": "Transport protocol", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "udp", + "allowableValues": { + "valueType": "LIST", + "values": [ + "udp", + "tcp" + ] + } + }, + { + "name": "connection_type", + "description": "Connection type (client/server)", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "client", + "allowableValues": { + "valueType": "LIST", + "values": [ + "client" + ] + } + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "External media direction", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both" + ] + } + }, + { + "name": "data", + "description": "An arbitrary data field", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 409, + "reason": "Channel is not in a Stasis application; Channel is already bridged" + } + ] + } + ] + } + ], + "models": { + "Dialed": { + "id": "Dialed", + "description": "Dialed channel information.", + "properties": {} + }, + "DialplanCEP": { + "id": "DialplanCEP", + "description": "Dialplan location (context/extension/priority)", + "properties": { + "context": { + "required": true, + "type": "string", + "description": "Context in the dialplan" + }, + "exten": { + "required": true, + "type": "string", + "description": "Extension in the dialplan" + }, + "priority": { + "required": true, + "type": "long", + "description": "Priority in the dialplan" + }, + "app_name": { + "required": true, + "type": "string", + "description": "Name of current dialplan application" + }, + "app_data": { + "required": true, + "type": "string", + "description": "Parameter of current dialplan application" + } + } + }, + "CallerID": { + "id": "CallerID", + "description": "Caller identification", + "properties": { + "name": { + "required": true, + "type": "string" + }, + "number": { + "required": true, + "type": "string" + } + } + }, + "RTPstat": { + "id": "RTPstat", + "description": "A statistics of a RTP.", + "properties": { + "txcount": { + "required": true, + "type": "int", + "description": "Number of packets transmitted." + }, + "rxcount": { + "required": true, + "type": "int", + "description": "Number of packets received." + }, + "txjitter": { + "required": false, + "type": "double", + "description": "Jitter on transmitted packets." + }, + "rxjitter": { + "required": false, + "type": "double", + "description": "Jitter on received packets." + }, + "remote_maxjitter": { + "required": false, + "type": "double", + "description": "Maximum jitter on remote side." + }, + "remote_minjitter": { + "required": false, + "type": "double", + "description": "Minimum jitter on remote side." + }, + "remote_normdevjitter": { + "required": false, + "type": "double", + "description": "Average jitter on remote side." + }, + "remote_stdevjitter": { + "required": false, + "type": "double", + "description": "Standard deviation jitter on remote side." + }, + "local_maxjitter": { + "required": false, + "type": "double", + "description": "Maximum jitter on local side." + }, + "local_minjitter": { + "required": false, + "type": "double", + "description": "Minimum jitter on local side." + }, + "local_normdevjitter": { + "required": false, + "type": "double", + "description": "Average jitter on local side." + }, + "local_stdevjitter": { + "required": false, + "type": "double", + "description": "Standard deviation jitter on local side." + }, + "txploss": { + "required": true, + "type": "int", + "description": "Number of transmitted packets lost." + }, + "rxploss": { + "required": true, + "type": "int", + "description": "Number of received packets lost." + }, + "remote_maxrxploss": { + "required": false, + "type": "double", + "description": "Maximum number of packets lost on remote side." + }, + "remote_minrxploss": { + "required": false, + "type": "double", + "description": "Minimum number of packets lost on remote side." + }, + "remote_normdevrxploss": { + "required": false, + "type": "double", + "description": "Average number of packets lost on remote side." + }, + "remote_stdevrxploss": { + "required": false, + "type": "double", + "description": "Standard deviation packets lost on remote side." + }, + "local_maxrxploss": { + "required": false, + "type": "double", + "description": "Maximum number of packets lost on local side." + }, + "local_minrxploss": { + "required": false, + "type": "double", + "description": "Minimum number of packets lost on local side." + }, + "local_normdevrxploss": { + "required": false, + "type": "double", + "description": "Average number of packets lost on local side." + }, + "local_stdevrxploss": { + "required": false, + "type": "double", + "description": "Standard deviation packets lost on local side." + }, + "rtt": { + "required": false, + "type": "double", + "description": "Total round trip time." + }, + "maxrtt": { + "required": false, + "type": "double", + "description": "Maximum round trip time." + }, + "minrtt": { + "required": false, + "type": "double", + "description": "Minimum round trip time." + }, + "normdevrtt": { + "required": false, + "type": "double", + "description": "Average round trip time." + }, + "stdevrtt": { + "required": false, + "type": "double", + "description": "Standard deviation round trip time." + }, + "local_ssrc": { + "required": true, + "type": "int", + "description": "Our SSRC." + }, + "remote_ssrc": { + "required": true, + "type": "int", + "description": "Their SSRC." + }, + "txoctetcount": { + "required": true, + "type": "int", + "description": "Number of octets transmitted." + }, + "rxoctetcount": { + "required": true, + "type": "int", + "description": "Number of octets received." + }, + "channel_uniqueid": { + "required": true, + "type": "string", + "description": "The Asterisk channel's unique ID that owns this instance." + } + } + }, + "Channel": { + "id": "Channel", + "description": "A specific communication connection between Asterisk and an Endpoint.", + "properties": { + "id": { + "required": true, + "type": "string", + "description": "Unique identifier of the channel.\n\nThis is the same as the Uniqueid field in AMI." + }, + "protocol_id": { + "required": true, + "type": "string", + "description": "Protocol id from underlying channel driver (i.e. Call-ID for chan_sip/chan_pjsip; will be empty if not applicable or not implemented by driver)." + }, + "name": { + "required": true, + "type": "string", + "description": "Name of the channel (i.e. SIP/foo-0000a7e3)" + }, + "state": { + "required": true, + "type": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "Down", + "Rsrved", + "OffHook", + "Dialing", + "Ring", + "Ringing", + "Up", + "Busy", + "Dialing Offhook", + "Pre-ring", + "Unknown" + ] + } + }, + "caller": { + "required": true, + "type": "CallerID" + }, + "connected": { + "required": true, + "type": "CallerID" + }, + "accountcode": { + "required": true, + "type": "string" + }, + "dialplan": { + "required": true, + "type": "DialplanCEP", + "description": "Current location in the dialplan" + }, + "creationtime": { + "required": true, + "type": "Date", + "description": "Timestamp when channel was created" + }, + "language": { + "required": true, + "type": "string", + "description": "The default spoken language" + }, + "channelvars": { + "required": false, + "type": "object", + "description": "Channel variables" + }, + "caller_rdnis": { + "type": "string", + "description": "The Caller ID RDNIS" + }, + "tenantid": { + "required": false, + "type": "string", + "description": "The Tenant ID for the channel" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_6_0_1/deviceStates.json b/codegen/src/main/resources/codegen-data/ari_6_0_1/deviceStates.json new file mode 100644 index 00000000..bd389355 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_6_0_1/deviceStates.json @@ -0,0 +1,154 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "Kevin Harwell ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/deviceStates.{format}", + "requiresModules": [ + "res_stasis_device_state" + ], + "apis": [ + { + "path": "/deviceStates", + "description": "Device states", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all ARI controlled device states.", + "nickname": "list", + "responseClass": "List[DeviceState]" + } + ] + }, + { + "path": "/deviceStates/{deviceName}", + "description": "Device state", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve the current state of a device.", + "nickname": "get", + "responseClass": "DeviceState", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Change the state of a device controlled by ARI. (Note - implicitly creates the device state).", + "nickname": "update", + "responseClass": "void", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "deviceState", + "description": "Device state value", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "NOT_INUSE", + "INUSE", + "BUSY", + "INVALID", + "UNAVAILABLE", + "RINGING", + "RINGINUSE", + "ONHOLD" + ] + } + + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Device name is missing" + }, + { + "code": 409, + "reason": "Uncontrolled device specified" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Destroy a device-state controlled by ARI.", + "nickname": "delete", + "responseClass": "void", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Device name is missing" + }, + { + "code": 409, + "reason": "Uncontrolled device specified" + } + ] + } + ] + } + ], + "models": { + "DeviceState": { + "id": "DeviceState", + "description": "Represents the state of a device.", + "properties": { + "name": { + "type": "string", + "description": "Name of the device.", + "required": true + }, + "state": { + "type": "string", + "description": "Device's state", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "UNKNOWN", + "NOT_INUSE", + "INUSE", + "BUSY", + "INVALID", + "UNAVAILABLE", + "RINGING", + "RINGINUSE", + "ONHOLD" + ] + } + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_6_0_1/endpoints.json b/codegen/src/main/resources/codegen-data/ari_6_0_1/endpoints.json new file mode 100644 index 00000000..7560b9cb --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_6_0_1/endpoints.json @@ -0,0 +1,397 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/endpoints.{format}", + "apis": [ + { + "path": "/endpoints", + "description": "Asterisk endpoints", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all endpoints.", + "nickname": "list", + "responseClass": "List[Endpoint]" + } + ] + }, + { + "path": "/endpoints/sendMessage", + "description": "Send a message to some technology URI or endpoint.", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Send a message to some technology URI or endpoint.", + "nickname": "sendMessage", + "responseClass": "void", + "parameters": [ + { + "name": "to", + "description": "The endpoint resource or technology specific URI to send the message to. Valid resources are sip, pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "from", + "description": "The endpoint resource or technology specific identity to send this message from. Valid resources are sip, pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "body", + "description": "The body of the message", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "descriptioni": "The \"variables\" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, pjsip and sip resource types will add the key/value pairs as SIP headers,", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoint not found" + } + ] + } + ] + }, + { + "path": "/endpoints/refer", + "description": "Refer an endpoint or technology URI to some technology URI or endpoint.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Refer an endpoint or technology URI to some technology URI or endpoint.", + "nickname": "refer", + "responseClass": "void", + "parameters": [ + { + "name": "to", + "description": "The endpoint resource or technology specific URI that should be referred to somewhere. Valid resource is pjsip.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "from", + "description": "The endpoint resource or technology specific identity to refer from.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "refer_to", + "description": "The endpoint resource or technology specific URI to refer to.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "to_self", + "description": "If true and \"refer_to\" refers to an Asterisk endpoint, the \"refer_to\" value is set to point to this Asterisk endpoint - so the referee is referred to Asterisk. Otherwise, use the contact URI associated with the endpoint.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, the pjsip resource type will add the key/value pairs as SIP headers. The \"display_name\" key is used by the PJSIP technology. Its value will be prepended as a display name to the Refer-To URI.", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for referring." + }, + { + "code": 404, + "reason": "Endpoint not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}", + "description": "Asterisk endpoints", + "operations": [ + { + "httpMethod": "GET", + "summary": "List available endoints for a given endpoint technology.", + "nickname": "listByTech", + "responseClass": "List[Endpoint]", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoints (sip,iax2,...)", + "paramType": "path", + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Endpoints not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}/{resource}", + "description": "Single endpoint", + "operations": [ + { + "httpMethod": "GET", + "summary": "Details for an endpoint.", + "nickname": "get", + "responseClass": "Endpoint", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "resource", + "description": "ID of the endpoint", + "paramType": "path", + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoints not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}/{resource}/sendMessage", + "description": "Send a message to some endpoint in a technology.", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Send a message to some endpoint in a technology.", + "nickname": "sendMessageToEndpoint", + "responseClass": "void", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "resource", + "description": "ID of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "from", + "description": "The endpoint resource or technology specific identity to send this message from. Valid resources are sip, pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "body", + "description": "The body of the message", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "descriptioni": "The \"variables\" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, pjsip and sip resource types will add the key/value pairs as SIP headers,", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoint not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}/{resource}/refer", + "description": "Refer an endpoint in a technology to some technology URI or endpoint..", + "operations": [ + { + "httpMethod": "POST", + "summary": "Refer an endpoint or technology URI to some technology URI or endpoint.", + "nickname": "referToEndpoint", + "responseClass": "void", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "resource", + "description": "ID of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "from", + "description": "The endpoint resource or technology specific identity to refer from.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "refer_to", + "description": "The endpoint resource or technology specific URI to refer to.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "to_self", + "description": "If true and \"refer_to\" refers to an Asterisk endpoint, the \"refer_to\" value is set to point to this Asterisk endpoint - so the referee is referred to Asterisk. Otherwise, use the contact URI associated with the endpoint.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, the pjsip resource type will add the key/value pairs as SIP headers,", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for referring." + }, + { + "code": 404, + "reason": "Endpoint not found" + } + ] + } + ] + } + ], + "models": { + "Endpoint": { + "id": "Endpoint", + "description": "An external device that may offer/accept calls to/from Asterisk.\n\nUnlike most resources, which have a single unique identifier, an endpoint is uniquely identified by the technology/resource pair.", + "properties": { + "technology": { + "type": "string", + "description": "Technology of the endpoint", + "required": true + }, + "resource": { + "type": "string", + "description": "Identifier of the endpoint, specific to the given technology.", + "required": true + }, + "state": { + "type": "string", + "description": "Endpoint's state", + "required": false, + "allowableValues": { + "valueType": "LIST", + "values": [ + "unknown", + "offline", + "online" + ] + } + }, + "channel_ids": { + "type": "List[string]", + "description": "Id's of channels associated with this endpoint", + "required": true + } + } + }, + "TextMessage": { + "id": "TextMessage", + "description": "A text message.", + "properties": { + "from": { + "type": "string", + "description": "A technology specific URI specifying the source of the message. For sip and pjsip technologies, any SIP URI can be specified. For xmpp, the URI must correspond to the client connection being used to send the message.", + "required": true + }, + "to": { + "type": "string", + "description": "A technology specific URI specifying the destination of the message. Valid technologies include sip, pjsip, and xmp. The destination of a message should be an endpoint.", + "required": true + }, + "body": { + "type": "string", + "description": "The text of the message.", + "required": true + }, + "variables": { + "type": "object", + "description": "Technology specific key/value pairs (JSON object) associated with the message.", + "required": false + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_6_0_1/events.json b/codegen/src/main/resources/codegen-data/ari_6_0_1/events.json new file mode 100644 index 00000000..c9822f6c --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_6_0_1/events.json @@ -0,0 +1,918 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.2", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/events.{format}", + "requiresModules": [ + "res_http_websocket" + ], + "apis": [ + { + "path": "/events", + "description": "Events from Asterisk to applications", + "operations": [ + { + "httpMethod": "GET", + "upgrade": "websocket", + "websocketProtocol": "ari", + "summary": "WebSocket connection for events.", + "nickname": "eventWebsocket", + "responseClass": "Message", + "parameters": [ + { + "name": "app", + "description": "Applications to subscribe to.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "subscribeAll", + "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'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean" + } + ] + } + ] + }, + { + "path": "/events/user/{eventName}", + "description": "Stasis application user events", + "operations": [ + { + "httpMethod": "POST", + "summary": "Generate a user event.", + "nickname": "userEvent", + "responseClass": "void", + "parameters": [ + { + "name": "eventName", + "description": "Event name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "application", + "description": "The name of the application that will receive this event", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "source", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}/{resource}, deviceState:{deviceName}", + "paramType": "query", + "required": false, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds custom key/value pairs to add to the user event. Ex. { \"variables\": { \"key\": \"value\" } }", + "paramType": "body", + "required": false, + "allowMultiple": false, + "dataType": "containers" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 422, + "reason": "Event source not found." + }, + { + "code": 400, + "reason": "Invalid even tsource URI or userevent data." + } + ] + } + ] + } + ], + "models": { + "Message": { + "id": "Message", + "description": "Base type for errors and events", + "discriminator": "type", + "properties": { + "type": { + "type": "string", + "required": true, + "description": "Indicates the type of this message." + }, + "asterisk_id": { + "type": "string", + "required": false, + "description": "The unique ID for the Asterisk instance that raised this event." + } + }, + "subTypes": [ + "MissingParams", + "Event" + ] + }, + "MissingParams": { + "id": "MissingParams", + "description": "Error event sent when required params are missing.", + "properties": { + "params": { + "required": true, + "type": "List[string]", + "description": "A list of the missing parameters" + } + } + }, + "Event": { + "id": "Event", + "description": "Base type for asynchronous events from Asterisk.", + "properties": { + "application": { + "type": "string", + "description": "Name of the application receiving the event.", + "required": true + }, + "timestamp": { + "type": "Date", + "description": "Time at which this event was created.", + "required": true + } + }, + "subTypes": [ + "DeviceStateChanged", + "PlaybackStarted", + "PlaybackContinuing", + "PlaybackFinished", + "RecordingStarted", + "RecordingFinished", + "RecordingFailed", + "ApplicationMoveFailed", + "ApplicationReplaced", + "BridgeCreated", + "BridgeDestroyed", + "BridgeMerged", + "BridgeBlindTransfer", + "BridgeAttendedTransfer", + "BridgeVideoSourceChanged", + "ChannelCreated", + "ChannelDestroyed", + "ChannelEnteredBridge", + "ChannelLeftBridge", + "ChannelStateChange", + "ChannelDtmfReceived", + "ChannelDialplan", + "ChannelCallerId", + "ChannelUserevent", + "ChannelHangupRequest", + "ChannelVarset", + "ChannelTalkingStarted", + "ChannelTalkingFinished", + "ChannelHold", + "ChannelUnhold", + "ContactStatusChange", + "EndpointStateChange", + "Dial", + "StasisEnd", + "StasisStart", + "TextMessageReceived", + "ChannelConnectedLine", + "PeerStatusChange" + ] + }, + "ContactInfo": { + "id": "ContactInfo", + "description": "Detailed information about a contact on an endpoint.", + "properties": { + "uri": { + "type": "string", + "description": "The location of the contact.", + "required": true + }, + "contact_status": { + "type": "string", + "description": "The current status of the contact.", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "Unreachable", + "Reachable", + "Unknown", + "NonQualified", + "Removed" + ] + } + }, + "aor": { + "type": "string", + "description": "The Address of Record this contact belongs to.", + "required": true + }, + "roundtrip_usec": { + "type": "string", + "description": "Current round trip time, in microseconds, for the contact.", + "required": false + } + } + }, + "Peer": { + "id": "Peer", + "description": "Detailed information about a remote peer that communicates with Asterisk.", + "properties": { + "peer_status": { + "type": "string", + "description": "The current state of the peer. Note that the values of the status are dependent on the underlying peer technology.", + "required": true + }, + "cause": { + "type": "string", + "description": "An optional reason associated with the change in peer_status.", + "required": false + }, + "address": { + "type": "string", + "description": "The IP address of the peer.", + "required": false + }, + "port": { + "type": "string", + "description": "The port of the peer.", + "required": false + }, + "time": { + "type": "string", + "description": "The last known time the peer was contacted.", + "required": false + } + } + }, + "DeviceStateChanged": { + "id": "DeviceStateChanged", + "description": "Notification that a device state has changed.", + "properties": { + "device_state": { + "type": "DeviceState", + "description": "Device state object", + "required": true + } + } + }, + "PlaybackStarted": { + "id": "PlaybackStarted", + "description": "Event showing the start of a media playback operation.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "PlaybackContinuing": { + "id": "PlaybackContinuing", + "description": "Event showing the continuation of a media playback operation from one media URI to the next in the list.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "PlaybackFinished": { + "id": "PlaybackFinished", + "description": "Event showing the completion of a media playback operation.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "RecordingStarted": { + "id": "RecordingStarted", + "description": "Event showing the start of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "RecordingFinished": { + "id": "RecordingFinished", + "description": "Event showing the completion of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "RecordingFailed": { + "id": "RecordingFailed", + "description": "Event showing failure of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "ApplicationMoveFailed": { + "id": "ApplicationMoveFailed", + "description": "Notification that trying to move a channel to another Stasis application failed.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + }, + "destination": { + "required": true, + "type": "string" + }, + "args": { + "required": true, + "type": "List[string]", + "description": "Arguments to the application" + } + } + }, + "ApplicationReplaced": { + "id": "ApplicationReplaced", + "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.", + "properties": {} + }, + "BridgeCreated": { + "id": "BridgeCreated", + "description": "Notification that a bridge has been created.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeDestroyed": { + "id": "BridgeDestroyed", + "description": "Notification that a bridge has been destroyed.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeMerged": { + "id": "BridgeMerged", + "description": "Notification that one bridge has merged into another.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "bridge_from": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeVideoSourceChanged": { + "id": "BridgeVideoSourceChanged", + "description": "Notification that the source of video in a bridge has changed.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "old_video_source_id": { + "required": false, + "type": "string" + } + } + }, + "BridgeBlindTransfer": { + "id": "BridgeBlindTransfer", + "description": "Notification that a blind transfer has occurred.", + "properties": { + "channel": { + "description": "The channel performing the blind transfer", + "required": true, + "type": "Channel" + }, + "replace_channel": { + "description": "The channel that is replacing transferer when the transferee(s) can not be transferred directly", + "required": false, + "type": "Channel" + }, + "transferee": { + "description": "The channel that is being transferred", + "required": false, + "type": "Channel" + }, + "exten": { + "description": "The extension transferred to", + "required": true, + "type": "string" + }, + "context": { + "description": "The context transferred to", + "required": true, + "type": "string" + }, + "result": { + "description": "The result of the transfer attempt", + "required": true, + "type": "string" + }, + "is_external": { + "description": "Whether the transfer was externally initiated or not", + "required": true, + "type": "boolean" + }, + "bridge": { + "description": "The bridge being transferred", + "type": "Bridge" + } + } + }, + "BridgeAttendedTransfer": { + "id": "BridgeAttendedTransfer", + "description": "Notification that an attended transfer has occurred.", + "properties": { + "transferer_first_leg": { + "description": "First leg of the transferer", + "required": true, + "type": "Channel" + }, + "transferer_second_leg": { + "description": "Second leg of the transferer", + "required": true, + "type": "Channel" + }, + "replace_channel": { + "description": "The channel that is replacing transferer_first_leg in the swap", + "required": false, + "type": "Channel" + }, + "transferee": { + "description": "The channel that is being transferred", + "required": false, + "type": "Channel" + }, + "transfer_target": { + "description": "The channel that is being transferred to", + "required": false, + "type": "Channel" + }, + "result": { + "description": "The result of the transfer attempt", + "required": true, + "type": "string" + }, + "is_external": { + "description": "Whether the transfer was externally initiated or not", + "required": true, + "type": "boolean" + }, + "transferer_first_leg_bridge": { + "description": "Bridge the transferer first leg is in", + "type": "Bridge" + }, + "transferer_second_leg_bridge": { + "description": "Bridge the transferer second leg is in", + "type": "Bridge" + }, + "destination_type": { + "description": "How the transfer was accomplished", + "required": true, + "type": "string" + }, + "destination_bridge": { + "description": "Bridge that survived the merge result", + "type": "string" + }, + "destination_application": { + "description": "Application that has been transferred into", + "type": "string" + }, + "destination_link_first_leg": { + "description": "First leg of a link transfer result", + "type": "Channel" + }, + "destination_link_second_leg": { + "description": "Second leg of a link transfer result", + "type": "Channel" + }, + "destination_threeway_channel": { + "description": "Transferer channel that survived the threeway result", + "type": "Channel" + }, + "destination_threeway_bridge": { + "description": "Bridge that survived the threeway result", + "type": "Bridge" + } + } + }, + "ChannelCreated": { + "id": "ChannelCreated", + "description": "Notification that a channel has been created.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelDestroyed": { + "id": "ChannelDestroyed", + "description": "Notification that a channel has been destroyed.", + "properties": { + "cause": { + "required": true, + "description": "Integer representation of the cause of the hangup", + "type": "int" + }, + "cause_txt": { + "required": true, + "description": "Text representation of the cause of the hangup", + "type": "string" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelEnteredBridge": { + "id": "ChannelEnteredBridge", + "description": "Notification that a channel has entered a bridge.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "channel": { + "type": "Channel" + } + } + }, + "ChannelLeftBridge": { + "id": "ChannelLeftBridge", + "description": "Notification that a channel has left a bridge.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelStateChange": { + "id": "ChannelStateChange", + "description": "Notification of a channel's state change.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelDtmfReceived": { + "id": "ChannelDtmfReceived", + "description": "DTMF received on a channel.\n\nThis event is sent when the DTMF ends. There is no notification about the start of DTMF", + "properties": { + "digit": { + "required": true, + "type": "string", + "description": "DTMF digit received (0-9, A-E, # or *)" + }, + "duration_ms": { + "required": true, + "type": "int", + "description": "Number of milliseconds DTMF was received" + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which DTMF was received" + } + } + }, + "ChannelDialplan": { + "id": "ChannelDialplan", + "description": "Channel changed location in the dialplan.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that changed dialplan location." + }, + "dialplan_app": { + "required": true, + "type": "string", + "description": "The application about to be executed." + }, + "dialplan_app_data": { + "required": true, + "type": "string", + "description": "The data to be passed to the application." + } + } + }, + "ChannelCallerId": { + "id": "ChannelCallerId", + "description": "Channel changed Caller ID.", + "properties": { + "caller_presentation": { + "required": true, + "type": "int", + "description": "The integer representation of the Caller Presentation value." + }, + "caller_presentation_txt": { + "required": true, + "type": "string", + "description": "The text representation of the Caller Presentation value." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that changed Caller ID." + } + } + }, + "ChannelUserevent": { + "id": "ChannelUserevent", + "description": "User-generated event with additional user-defined fields in the object.", + "properties": { + "eventname": { + "required": true, + "type": "string", + "description": "The name of the user event." + }, + "channel": { + "required": false, + "type": "Channel", + "description": "A channel that is signaled with the user event." + }, + "bridge": { + "required": false, + "type": "Bridge", + "description": "A bridge that is signaled with the user event." + }, + "endpoint": { + "required": false, + "type": "Endpoint", + "description": "A endpoint that is signaled with the user event." + }, + "userevent": { + "required": true, + "type": "object", + "description": "Custom Userevent data" + } + } + }, + "ChannelHangupRequest": { + "id": "ChannelHangupRequest", + "description": "A hangup was requested on the channel.", + "properties": { + "cause": { + "type": "int", + "description": "Integer representation of the cause of the hangup." + }, + "soft": { + "type": "boolean", + "description": "Whether the hangup request was a soft hangup request." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which the hangup was requested." + } + } + }, + "ChannelVarset": { + "id": "ChannelVarset", + "description": "Channel variable changed.", + "properties": { + "variable": { + "required": true, + "type": "string", + "description": "The variable that changed." + }, + "value": { + "required": true, + "type": "string", + "description": "The new value of the variable." + }, + "channel": { + "required": false, + "type": "Channel", + "description": "The channel on which the variable was set.\n\nIf missing, the variable is a global variable." + } + } + }, + "ChannelHold": { + "id": "ChannelHold", + "description": "A channel initiated a media hold.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that initiated the hold event." + }, + "musicclass": { + "required": false, + "type": "string", + "description": "The music on hold class that the initiator requested." + } + } + }, + "ChannelUnhold": { + "id": "ChannelUnhold", + "description": "A channel initiated a media unhold.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that initiated the unhold event." + } + } + }, + "ChannelTalkingStarted": { + "id": "ChannelTalkingStarted", + "description": "Talking was detected on the channel.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which talking started." + } + } + }, + "ChannelTalkingFinished": { + "id": "ChannelTalkingFinished", + "description": "Talking is no longer detected on the channel.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which talking completed." + }, + "duration": { + "required": true, + "type": "int", + "description": "The length of time, in milliseconds, that talking was detected on the channel" + } + } + }, + "ContactStatusChange": { + "id": "ContactStatusChange", + "description": "The state of a contact on an endpoint has changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + }, + "contact_info": { + "required": true, + "type": "ContactInfo" + } + } + }, + "PeerStatusChange": { + "id": "PeerStatusChange", + "description": "The state of a peer associated with an endpoint has changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + }, + "peer": { + "required": true, + "type": "Peer" + } + } + }, + "EndpointStateChange": { + "id": "EndpointStateChange", + "description": "Endpoint state changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + } + } + }, + "Dial": { + "id": "Dial", + "description": "Dialing state has changed.", + "properties": { + "caller": { + "required": false, + "type": "Channel", + "description": "The calling channel." + }, + "peer": { + "required": true, + "type": "Channel", + "description": "The dialed channel." + }, + "forward": { + "required": false, + "type": "string", + "description": "Forwarding target requested by the original dialed channel." + }, + "forwarded": { + "required": false, + "type": "Channel", + "description": "Channel that the caller has been forwarded to." + }, + "dialstring": { + "required": false, + "type": "string", + "description": "The dial string for calling the peer channel." + }, + "dialstatus": { + "required": true, + "type": "string", + "description": "Current status of the dialing attempt to the peer." + } + } + }, + "StasisEnd": { + "id": "StasisEnd", + "description": "Notification that a channel has left a Stasis application.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "StasisStart": { + "id": "StasisStart", + "description": "Notification that a channel has entered a Stasis application.", + "properties": { + "args": { + "required": true, + "type": "List[string]", + "description": "Arguments to the application" + }, + "channel": { + "required": true, + "type": "Channel" + }, + "replace_channel": { + "required": false, + "type": "Channel" + } + } + }, + "TextMessageReceived": { + "id": "TextMessageReceived", + "description": "A text message was received from an endpoint.", + "properties": { + "message": { + "required": true, + "type": "TextMessage" + }, + "endpoint": { + "required": false, + "type": "Endpoint" + } + } + }, + "ChannelConnectedLine": { + "id": "ChannelConnectedLine", + "description": "Channel changed Connected Line.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel whose connected line has changed." + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_6_0_1/mailboxes.json b/codegen/src/main/resources/codegen-data/ari_6_0_1/mailboxes.json new file mode 100644 index 00000000..8f5941b8 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_6_0_1/mailboxes.json @@ -0,0 +1,137 @@ +{ + "_copyright": "Copyright (C) 2013, Digium, Inc.", + "_author": "Jonathan Rose ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/mailboxes.{format}", + "requiresModules": [ + "res_stasis_mailbox" + ], + "apis": [ + { + "path": "/mailboxes", + "description": "Mailboxes", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all mailboxes.", + "nickname": "list", + "responseClass": "List[Mailbox]" + } + ] + }, + { + "path": "/mailboxes/{mailboxName}", + "description": "Mailbox state", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve the current state of a mailbox.", + "nickname": "get", + "responseClass": "Mailbox", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Change the state of a mailbox. (Note - implicitly creates the mailbox).", + "nickname": "update", + "responseClass": "void", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "oldMessages", + "description": "Count of old messages in the mailbox", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "newMessages", + "description": "Count of new messages in the mailbox", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "int" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Destroy a mailbox.", + "nickname": "delete", + "responseClass": "void", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + } + ] + } + ], + "models": { + "Mailbox": { + "id": "Mailbox", + "description": "Represents the state of a mailbox.", + "properties": { + "name": { + "type": "string", + "description": "Name of the mailbox.", + "required": true + }, + "old_messages": { + "type": "int", + "description": "Count of old messages in the mailbox.", + "required": true + }, + "new_messages": { + "type": "int", + "description": "Count of new messages in the mailbox.", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_6_0_1/playbacks.json b/codegen/src/main/resources/codegen-data/ari_6_0_1/playbacks.json new file mode 100644 index 00000000..793986fc --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_6_0_1/playbacks.json @@ -0,0 +1,165 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/playbacks.{format}", + "requiresModules": [ + "res_stasis_playback" + ], + "apis": [ + { + "path": "/playbacks/{playbackId}", + "description": "Control object for a playback operation.", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a playback's details.", + "nickname": "get", + "responseClass": "Playback", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "The playback cannot be found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop a playback.", + "nickname": "stop", + "responseClass": "void", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "The playback cannot be found" + } + ] + } + ] + }, + { + "path": "/playbacks/{playbackId}/control", + "description": "Control object for a playback operation.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Control a playback.", + "nickname": "control", + "responseClass": "void", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "operation", + "description": "Operation to perform on the playback.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "restart", + "pause", + "unpause", + "reverse", + "forward" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "The provided operation parameter was invalid" + }, + { + "code": 404, + "reason": "The playback cannot be found" + }, + { + "code": 409, + "reason": "The operation cannot be performed in the playback's current state" + } +] + } + ] + } + ], + "models": { + "Playback": { + "id": "Playback", + "description": "Object representing the playback of media to a channel", + "properties": { + "id": { + "type": "string", + "description": "ID for this playback operation", + "required": true + }, + "media_uri": { + "type": "string", + "description": "The URI for the media currently being played back.", + "required": true + }, + "next_media_uri": { + "type": "string", + "description": "If a list of URIs is being played, the next media URI to be played back.", + "required": false + }, + "target_uri": { + "type": "string", + "description": "URI for the channel or bridge to play the media on", + "required": true + }, + "language": { + "type": "string", + "description": "For media types that support multiple languages, the language requested for playback." + }, + "state": { + "type": "string", + "description": "Current state of the playback operation.", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "queued", + "playing", + "continuing", + "done", + "failed" + ] + } + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_6_0_1/recordings.json b/codegen/src/main/resources/codegen-data/ari_6_0_1/recordings.json new file mode 100644 index 00000000..6ffd6d8e --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_6_0_1/recordings.json @@ -0,0 +1,413 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/recordings.{format}", + "requiresModules": [ + "res_stasis_recording" + ], + "apis": [ + { + "path": "/recordings/stored", + "description": "Recordings", + "operations": [ + { + "httpMethod": "GET", + "summary": "List recordings that are complete.", + "nickname": "listStored", + "responseClass": "List[StoredRecording]" + } + ] + }, + { + "path": "/recordings/stored/{recordingName}", + "description": "Individual recording", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a stored recording's details.", + "nickname": "getStored", + "responseClass": "StoredRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Delete a stored recording.", + "nickname": "deleteStored", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/stored/{recordingName}/file", + "description": "The actual file associated with the stored recording", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the file associated with the stored recording.", + "nickname": "getStoredFile", + "responseClass": "binary", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 403, + "reason": "The recording file could not be opened" + }, + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/stored/{recordingName}/copy", + "description": "Copy an individual recording", + "operations": [ + { + "httpMethod": "POST", + "summary": "Copy a stored recording.", + "nickname": "copyStored", + "responseClass": "StoredRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording to copy", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "destinationRecordingName", + "description": "The destination name of the recording", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "A recording with the same name already exists on the system" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}", + "description": "A recording that is in progress", + "operations": [ + { + "httpMethod": "GET", + "summary": "List live recordings.", + "nickname": "getLive", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop a live recording and discard it.", + "nickname": "cancel", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/stop", + "operations": [ + { + "httpMethod": "POST", + "summary": "Stop a live recording and store it.", + "nickname": "stop", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/pause", + "operations": [ + { + "httpMethod": "POST", + "summary": "Pause a live recording.", + "notes": "Pausing a recording suspends silence detection, which will be restarted when the recording is unpaused. Paused time is not included in the accounting for maxDurationSeconds.", + "nickname": "pause", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unpause a live recording.", + "nickname": "unpause", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/mute", + "operations": [ + { + "httpMethod": "POST", + "summary": "Mute a live recording.", + "notes": "Muting a recording suspends silence detection, which will be restarted when the recording is unmuted.", + "nickname": "mute", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unmute a live recording.", + "nickname": "unmute", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + } + ] + } + ], + "models": { + "StoredRecording": { + "id": "StoredRecording", + "description": "A past recording that may be played back.", + "properties": { + "name": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + }, + "LiveRecording": { + "id": "LiveRecording", + "description": "A recording that is in progress", + "properties": { + "name": { + "required": true, + "type": "string", + "description": "Base name for the recording" + }, + "format": { + "required": true, + "type": "string", + "description": "Recording format (wav, gsm, etc.)" + }, + "target_uri": { + "required": true, + "type": "string", + "description": "URI for the channel or bridge being recorded" + }, + "state": { + "required": true, + "type": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "queued", + "recording", + "paused", + "done", + "failed", + "canceled" + ] + } + }, + "duration": { + "required": false, + "type": "int", + "description": "Duration in seconds of the recording" + }, + "talking_duration": { + "required": false, + "type": "int", + "description": "Duration of talking, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds." + }, + "silence_duration": { + "required": false, + "type": "int", + "description": "Duration of silence, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds." + }, + "cause": { + "required": false, + "type": "string", + "description": "Cause for recording failure if failed" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_6_0_1/sounds.json b/codegen/src/main/resources/codegen-data/ari_6_0_1/sounds.json new file mode 100644 index 00000000..8fbe1c57 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_6_0_1/sounds.json @@ -0,0 +1,99 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/sounds.{format}", + "apis": [ + { + "path": "/sounds", + "description": "Sounds", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all sounds.", + "nickname": "list", + "responseClass": "List[Sound]", + "parameters": [ + { + "name": "lang", + "description": "Lookup sound for a specific language.", + "paramType": "query", + "dataType": "string", + "required": false + }, + { + "name": "format", + "description": "Lookup sound in a specific format.", + "paramType": "query", + "dataType": "string", + "required": false, + "__note": "core show translation can show translation paths between formats, along with relative costs. so this could be just installed format, or we could follow that for transcoded formats." + } + ] + } + ] + }, + { + "path": "/sounds/{soundId}", + "description": "Individual sound", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a sound's details.", + "nickname": "get", + "responseClass": "Sound", + "parameters": [ + { + "name": "soundId", + "description": "Sound's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ] + } + ] + } + ], + "models": { + "FormatLangPair": { + "id": "FormatLangPair", + "description": "Identifies the format and language of a sound file", + "properties": { + "language": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + }, + "Sound": { + "id": "Sound", + "description": "A media file that may be played back.", + "properties": { + "id": { + "required": true, + "description": "Sound's identifier.", + "type": "string" + }, + "text": { + "required": false, + "description": "Text description of the sound, usually the words spoken.", + "type": "string" + }, + "formats": { + "required": true, + "description": "The formats and languages in which this sound is available.", + "type": "List[FormatLangPair]" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_7_0_0/applications.json b/codegen/src/main/resources/codegen-data/ari_7_0_0/applications.json new file mode 100644 index 00000000..09c5cd5c --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_7_0_0/applications.json @@ -0,0 +1,223 @@ +{ + "_copyright": "Copyright (C) 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/applications.{format}", + "apis": [ + { + "path": "/applications", + "description": "Stasis applications", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all applications.", + "nickname": "list", + "responseClass": "List[Application]" + } + ] + }, + { + "path": "/applications/{applicationName}", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get details of an application.", + "nickname": "get", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Application does not exist." + } + ] + } + ] + }, + { + "path": "/applications/{applicationName}/subscription", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "POST", + "summary": "Subscribe an application to a event source.", + "notes": "Returns the state of the application after the subscriptions have changed", + "nickname": "subscribe", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "eventSource", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing parameter." + }, + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 422, + "reason": "Event source does not exist." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unsubscribe an application from an event source.", + "notes": "Returns the state of the application after the subscriptions have changed", + "nickname": "unsubscribe", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "eventSource", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing parameter; event source scheme not recognized." + }, + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 409, + "reason": "Application not subscribed to event source." + }, + { + "code": 422, + "reason": "Event source does not exist." + } + ] + } + ] + }, + { + "path": "/applications/{applicationName}/eventFilter", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Filter application events types.", + "notes": "Allowed and/or disallowed event type filtering can be done. The body (parameter) should specify a JSON key/value object that describes the type of event filtering needed. One, or both of the following keys can be designated:

\"allowed\" - Specifies an allowed list of event types
\"disallowed\" - Specifies a disallowed list of event types

Further, each of those key's value should be a JSON array that holds zero, or more JSON key/value objects. Each of these objects must contain the following key with an associated value:

\"type\" - The type name of the event to filter

The value must be the string name (case sensitive) of the event type that needs filtering. For example:

{ \"allowed\": [ { \"type\": \"StasisStart\" }, { \"type\": \"StasisEnd\" } ] }

As this specifies only an allowed list, then only those two event type messages are sent to the application. No other event messages are sent.

The following rules apply:

* If the body is empty, both the allowed and disallowed filters are set empty.
* If both list types are given then both are set to their respective values (note, specifying an empty array for a given type sets that type to empty).
* If only one list type is given then only that type is set. The other type is not updated.
* An empty \"allowed\" list means all events are allowed.
* An empty \"disallowed\" list means no events are disallowed.
* Disallowed events take precedence over allowed events if the event type is specified in both lists.", + "nickname": "filter", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "filter", + "description": "Specify which event types to allow/disallow", + "paramType": "body", + "required": false, + "dataType": "object", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Bad request." + }, + { + "code": 404, + "reason": "Application does not exist." + } + ] + } + ] + } + ], + "models": { + "Application": { + "id": "Application", + "description": "Details of a Stasis application", + "properties": { + "name": { + "type": "string", + "description": "Name of this application", + "required": true + }, + "channel_ids": { + "type": "List[string]", + "description": "Id's for channels subscribed to.", + "required": true + }, + "bridge_ids": { + "type": "List[string]", + "description": "Id's for bridges subscribed to.", + "required": true + }, + "endpoint_ids": { + "type": "List[string]", + "description": "{tech}/{resource} for endpoints subscribed to.", + "required": true + }, + "device_names": { + "type": "List[string]", + "description": "Names of the devices subscribed to.", + "required": true + }, + "events_allowed": { + "type": "List[object]", + "description": "Event types sent to the application.", + "required": true + }, + "events_disallowed": { + "type": "List[object]", + "description": "Event types not sent to the application.", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_7_0_0/asterisk.json b/codegen/src/main/resources/codegen-data/ari_7_0_0/asterisk.json new file mode 100644 index 00000000..841e6cd8 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_7_0_0/asterisk.json @@ -0,0 +1,725 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/asterisk.{format}", + "apis": [ + { + "path": "/asterisk/config/dynamic/{configClass}/{objectType}/{id}", + "description": "Asterisk dynamic configuration", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve a dynamic configuration object.", + "nickname": "getObject", + "responseClass": "List[ConfigTuple]", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to retrieve.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to retrieve.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "{configClass|objectType|id} not found" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Create or update a dynamic configuration object.", + "nickname": "updateObject", + "responseClass": "List[ConfigTuple]", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to create or update.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to create or update.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "fields", + "description": "The body object should have a value that is a list of ConfigTuples, which provide the fields to update. Ex. [ { \"attribute\": \"directmedia\", \"value\": \"false\" } ]", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Bad request body" + }, + { + "code": 403, + "reason": "Could not create or update object" + }, + { + "code": 404, + "reason": "{configClass|objectType} not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Delete a dynamic configuration object.", + "nickname": "deleteObject", + "responseClass": "void", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to delete.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to delete.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 403, + "reason": "Could not delete object" + }, + { + "code": 404, + "reason": "{configClass|objectType|id} not found" + } + ] + } + ] + }, + { + "path": "/asterisk/info", + "description": "Asterisk system information (similar to core show settings)", + "operations": [ + { + "httpMethod": "GET", + "summary": "Gets Asterisk system information.", + "nickname": "getInfo", + "responseClass": "AsteriskInfo", + "parameters": [ + { + "name": "only", + "description": "Filter information returned", + "paramType": "query", + "required": false, + "allowMultiple": true, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "build", + "system", + "config", + "status" + ] + } + } + ] + } + ] + }, + { + "path": "/asterisk/ping", + "description": "Asterisk ping", + "operations": [ + { + "httpMethod": "GET", + "summary": "Response pong message.", + "nickname": "ping", + "responseClass": "AsteriskPing" + } + ] + }, + { + "path": "/asterisk/modules", + "description": "Asterisk modules", + "operations": [ + { + "httpMethod": "GET", + "summary": "List Asterisk modules.", + "nickname": "listModules", + "responseClass": "List[Module]" + } + ] + }, + { + "path": "/asterisk/modules/{moduleName}", + "description": "Asterisk module", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get Asterisk module information.", + "nickname": "getModule", + "responseClass": "Module", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module could not be found in running modules." + }, + { + "code": 409, + "reason": "Module information could not be retrieved." + } + ] + }, + { + "httpMethod": "POST", + "summary": "Load an Asterisk module.", + "nickname": "loadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 409, + "reason": "Module could not be loaded." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unload an Asterisk module.", + "nickname": "unloadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module not found in running modules." + }, + { + "code": 409, + "reason": "Module could not be unloaded." + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Reload an Asterisk module.", + "nickname": "reloadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module not found in running modules." + }, + { + "code": 409, + "reason": "Module could not be reloaded." + } + ] + } + ] + }, + { + "path": "/asterisk/logging", + "description": "Asterisk log channels", + "operations": [ + { + "httpMethod": "GET", + "summary": "Gets Asterisk log channel information.", + "nickname": "listLogChannels", + "responseClass": "List[LogChannel]" + } + ] + }, + { + "path": "/asterisk/logging/{logChannelName}", + "description": "Asterisk log channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Adds a log channel.", + "nickname": "addLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "The log channel to add", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "configuration", + "description": "levels of the log channel", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Bad request body" + }, + { + "code": 409, + "reason": "Log channel could not be created." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Deletes a log channel.", + "nickname": "deleteLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "Log channels name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Log channel does not exist." + } + ] + } + ] + }, + { + "path": "/asterisk/logging/{logChannelName}/rotate", + "description": "Asterisk log channel", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Rotates a log channel.", + "nickname": "rotateLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "Log channel's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Log channel does not exist." + } + ] + } + ] + }, + { + "path": "/asterisk/variable", + "description": "Global variables", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the value of a global variable.", + "nickname": "getGlobalVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "variable", + "description": "The variable to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + } + ] + }, + { + "httpMethod": "POST", + "summary": "Set the value of a global variable.", + "nickname": "setGlobalVar", + "responseClass": "void", + "parameters": [ + { + "name": "variable", + "description": "The variable to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + } + ] + } + ] + } + ], + "models": { + "BuildInfo": { + "id": "BuildInfo", + "description": "Info about how Asterisk was built", + "properties": { + "os": { + "required": true, + "type": "string", + "description": "OS Asterisk was built on." + }, + "kernel": { + "required": true, + "type": "string", + "description": "Kernel version Asterisk was built on." + }, + "options": { + "required": true, + "type": "string", + "description": "Compile time options, or empty string if default." + }, + "machine": { + "required": true, + "type": "string", + "description": "Machine architecture (x86_64, i686, ppc, etc.)" + }, + "date": { + "required": true, + "type": "string", + "description": "Date and time when Asterisk was built." + }, + "user": { + "required": true, + "type": "string", + "description": "Username that build Asterisk" + } + } + }, + "SystemInfo": { + "id": "SystemInfo", + "description": "Info about Asterisk", + "properties": { + "version": { + "required": true, + "type": "string", + "description": "Asterisk version." + }, + "entity_id": { + "required": true, + "type": "string", + "description": "" + } + } + }, + "SetId": { + "id": "SetId", + "description": "Effective user/group id", + "properties": { + "user": { + "required": true, + "type": "string", + "description": "Effective user id." + }, + "group": { + "required": true, + "type": "string", + "description": "Effective group id." + } + } + }, + "ConfigInfo": { + "id": "ConfigInfo", + "description": "Info about Asterisk configuration", + "properties": { + "name": { + "required": true, + "type": "string", + "description": "Asterisk system name." + }, + "default_language": { + "required": true, + "type": "string", + "description": "Default language for media playback." + }, + "max_channels": { + "required": false, + "type": "int", + "description": "Maximum number of simultaneous channels." + }, + "max_open_files": { + "required": false, + "type": "int", + "description": "Maximum number of open file handles (files, sockets)." + }, + "max_load": { + "required": false, + "type": "double", + "description": "Maximum load avg on system." + }, + "setid": { + "required": true, + "type": "SetId", + "description": "Effective user/group id for running Asterisk." + } + } + }, + "StatusInfo": { + "id": "StatusInfo", + "description": "Info about Asterisk status", + "properties": { + "startup_time": { + "required": true, + "type": "Date", + "description": "Time when Asterisk was started." + }, + "last_reload_time": { + "required": true, + "type": "Date", + "description": "Time when Asterisk was last reloaded." + } + } + }, + "AsteriskInfo": { + "id": "AsteriskInfo", + "description": "Asterisk system information", + "properties": { + "build": { + "required": false, + "type": "BuildInfo", + "description": "Info about how Asterisk was built" + }, + "system": { + "required": false, + "type": "SystemInfo", + "description": "Info about the system running Asterisk" + }, + "config": { + "required": false, + "type": "ConfigInfo", + "description": "Info about Asterisk configuration" + }, + "status": { + "required": false, + "type": "StatusInfo", + "description": "Info about Asterisk status" + } + } + }, + "AsteriskPing": { + "id": "AsteriskPing", + "description": "Asterisk ping information", + "properties": { + "asterisk_id": { + "required": true, + "type": "string", + "description": "Asterisk id info" + }, + "ping": { + "required": true, + "type": "string", + "description": "Always string value is pong" + }, + "timestamp": { + "required": true, + "type": "string", + "description": "The timestamp string of request received time" + } + } + }, + "Module": { + "id": "Module", + "description": "Details of an Asterisk module", + "properties": { + "name": { + "type": "string", + "description": "The name of this module", + "required": true + }, + "description": { + "type": "string", + "description": "The description of this module", + "required": true + }, + "use_count": { + "type": "int", + "description": "The number of times this module is being used", + "required": true + }, + "status": { + "type": "string", + "description": "The running status of this module", + "required": true + }, + "support_level": { + "type": "string", + "description": "The support state of this module", + "required": true + } + } + }, + "LogChannel": { + "id": "LogChannel", + "description": "Details of an Asterisk log channel", + "properties": { + "channel": { + "type": "string", + "description": "The log channel path", + "required": true + }, + "type": { + "type": "string", + "description": "Types of logs for the log channel", + "required": true + }, + "status": { + "type": "string", + "description": "Whether or not a log type is enabled", + "required": true + }, + "configuration": { + "type": "string", + "description": "The various log levels", + "required": true + } + } + }, + "Variable": { + "id": "Variable", + "description": "The value of a channel variable", + "properties": { + "value": { + "required": true, + "type": "string", + "description": "The value of the variable requested" + } + } + }, + "ConfigTuple": { + "id": "ConfigTuple", + "description": "A key/value pair that makes up part of a configuration object.", + "properties": { + "attribute": { + "required": true, + "type": "string", + "description": "A configuration object attribute." + }, + "value": { + "required": true, + "type": "string", + "description": "The value for the attribute." + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_7_0_0/bridges.json b/codegen/src/main/resources/codegen-data/ari_7_0_0/bridges.json new file mode 100644 index 00000000..bf0a0016 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_7_0_0/bridges.json @@ -0,0 +1,774 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/bridges.{format}", + "requiresModules": [ + "res_stasis_recording", + "res_stasis_playback" + ], + "apis": [ + { + "path": "/bridges", + "description": "Active bridges", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all active bridges in Asterisk.", + "nickname": "list", + "responseClass": "List[Bridge]" + }, + { + "httpMethod": "POST", + "summary": "Create a new bridge.", + "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", + "nickname": "create", + "responseClass": "Bridge", + "parameters": [ + { + "name": "type", + "description": "Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media, video_sfu, video_single).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "bridgeId", + "description": "Unique ID to give to the bridge being created.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Name to give to the bridge being created.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}", + "description": "Individual bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Create a new bridge or updates an existing one.", + "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", + "nickname": "createWithId", + "responseClass": "Bridge", + "parameters": [ + { + "name": "type", + "description": "Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media, video_sfu, video_single) to set.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "bridgeId", + "description": "Unique ID to give to the bridge being created.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Set the name of the bridge.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ] + }, + { + "httpMethod": "GET", + "summary": "Get bridge details.", + "nickname": "get", + "responseClass": "Bridge", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Shut down a bridge.", + "notes": "If any channels are in this bridge, they will be removed and resume whatever they were doing beforehand.", + "nickname": "destroy", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/addChannel", + "description": "Add a channel to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Add a channel to a bridge.", + "nickname": "addChannel", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channel", + "description": "Ids of channels to add to bridge", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "role", + "description": "Channel's role in the bridge", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "absorbDTMF", + "description": "Absorb DTMF coming from this channel, preventing it to pass through to the bridge", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "mute", + "description": "Mute audio from this channel, preventing it to pass through to the bridge", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "inhibitConnectedLineUpdates", + "description": "Do not present the identity of the newly connected channel to other bridge members", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Channel not found" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application; Channel currently recording" + }, + { + "code": 422, + "reason": "Channel not in Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/removeChannel", + "description": "Remove a channel from a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Remove a channel from a bridge.", + "nickname": "removeChannel", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channel", + "description": "Ids of channels to remove from bridge", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Channel not found" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + }, + { + "code": 422, + "reason": "Channel not in this bridge" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/videoSource/{channelId}", + "description": "Set a channel as the video source in a multi-party bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Set a channel as the video source in a multi-party mixing bridge. This operation has no effect on bridges with two or fewer participants.", + "nickname": "setVideoSource", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge or Channel not found" + }, + { + "code": 409, + "reason": "Channel not in Stasis application" + }, + { + "code": 422, + "reason": "Channel not in this Bridge" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/videoSource", + "description": "Removes any explicit video source", + "operations": [ + { + "httpMethod": "DELETE", + "summary": "Removes any explicit video source in a multi-party mixing bridge. This operation has no effect on bridges with two or fewer participants. When no explicit video source is set, talk detection will be used to determine the active video stream.", + "nickname": "clearVideoSource", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/moh", + "description": "Play music on hold to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play music on hold to a bridge or change the MOH class that is playing.", + "nickname": "startMoh", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "mohClass", + "description": "Channel's id", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing music on hold to a bridge.", + "notes": "This will only stop music on hold being played via POST bridges/{bridgeId}/moh.", + "nickname": "stopMoh", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/play", + "description": "Play media to the participants of a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media on a bridge.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "play", + "responseClass": "Playback", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "playbackId", + "description": "Playback Id.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/play/{playbackId}", + "description": "Play media to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media on a bridge.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "playWithId", + "responseClass": "Playback", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + + } + ] + }, + { + "path": "/bridges/{bridgeId}/record", + "description": "Record audio on a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start a recording.", + "notes": "This records the mixed audio from all channels participating in this bridge.", + "nickname": "record", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Recording's filename", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "maxDurationSeconds", + "description": "Maximum duration of the recording, in seconds. 0 for no limit.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "maxSilenceSeconds", + "description": "Maximum duration of silence, in seconds. 0 for no limit.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "ifExists", + "description": "Action to take if a recording with the same name already exists.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "fail", + "allowableValues": { + "valueType": "LIST", + "values": [ + "fail", + "overwrite", + "append" + ] + } + }, + { + "name": "beep", + "description": "Play beep when recording begins", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "terminateOn", + "description": "DTMF input to terminate recording.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "any", + "*", + "#" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge is not in a Stasis application; A recording with the same name already exists on the system and can not be overwritten because it is in progress or ifExists=fail" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + } + ], + "models": { + "Bridge": { + "id": "Bridge", + "description": "The merging of media from one or more channels.\n\nEveryone on the bridge receives the same audio.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for this bridge", + "required": true + }, + "technology": { + "type": "string", + "description": "Name of the current bridging technology", + "required": true + }, + "bridge_type": { + "type": "string", + "description": "Type of bridge technology", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "mixing", + "holding" + ] + } + }, + "bridge_class": { + "type": "string", + "description": "Bridging class", + "required": true + }, + "creator": { + "type": "string", + "description": "Entity that created the bridge", + "required": true + }, + "name": { + "type": "string", + "description": "Name the creator gave the bridge", + "required": true + }, + "channels": { + "type": "List[string]", + "description": "Ids of channels participating in this bridge", + "required": true + }, + "video_mode": { + "type": "string", + "description": "The video mode the bridge is using. One of 'none', 'talker', 'sfu', or 'single'.", + "required": false + }, + "video_source_id": { + "type": "string", + "description": "The ID of the channel that is the source of video in this bridge, if one exists.", + "required": false + }, + "creationtime": { + "required": true, + "type": "Date", + "description": "Timestamp when bridge was created" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_7_0_0/channels.json b/codegen/src/main/resources/codegen-data/ari_7_0_0/channels.json new file mode 100644 index 00000000..04d15773 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_7_0_0/channels.json @@ -0,0 +1,2189 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/channels.{format}", + "requiresModules": [ + "res_stasis_answer", + "res_stasis_playback", + "res_stasis_recording", + "res_stasis_snoop" + ], + "apis": [ + { + "path": "/channels", + "description": "Active channels", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all active channels in Asterisk.", + "nickname": "list", + "responseClass": "List[Channel]" + }, + { + "httpMethod": "POST", + "summary": "Create a new channel (originate).", + "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.", + "nickname": "originate", + "responseClass": "Channel", + "parameters": [ + { + "name": "endpoint", + "description": "Endpoint to call.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to dial after the endpoint answers. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to dial after the endpoint answers. If omitted, uses 'default'. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to dial after the endpoint answers. If omitted, uses 1. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "long" + }, + { + "name": "label", + "description": "The label to dial after the endpoint answers. Will supersede 'priority' if provided. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The application that is subscribed to the originated channel. When the channel is answered, it will be passed to this Stasis application. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "callerId", + "description": "CallerID to use when dialing the endpoint or extension.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 30 + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "The unique id of the channel which is originating this one.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "formats", + "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for originating a channel." + }, + { + "code": 409, + "reason": "Channel with given unique ID already exists." + } + ] + } + ] + }, + { + "path": "/channels/create", + "description": "Create a channel and place it in a Stasis app, but do not dial the channel yet.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Create channel.", + "nickname": "create", + "responseClass": "Channel", + "parameters": [ + { + "name": "endpoint", + "description": "Endpoint for channel communication", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "Stasis Application to place channel into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "Unique ID of the calling channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "formats", + "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 409, + "reason": "Channel with given unique ID already exists." + } + ] + } + ] + }, + { + "path": "/channels/{channelId}", + "description": "Active channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "Channel details.", + "nickname": "get", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + } + ] + }, + { + "httpMethod": "POST", + "summary": "Create a new channel (originate with id).", + "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.", + "nickname": "originateWithId", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "endpoint", + "description": "Endpoint to call.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to dial after the endpoint answers. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to dial after the endpoint answers. If omitted, uses 'default'. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to dial after the endpoint answers. If omitted, uses 1. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "long" + }, + { + "name": "label", + "description": "The label to dial after the endpoint answers. Will supersede 'priority' if provided. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The application that is subscribed to the originated channel. When the channel is answered, it will be passed to this Stasis application. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "callerId", + "description": "CallerID to use when dialing the endpoint or extension.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 30 + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "The unique id of the channel which is originating this one.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "formats", + "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for originating a channel." + }, + { + "code": 409, + "reason": "Channel with given unique ID already exists." + } + ] + + }, + { + "httpMethod": "DELETE", + "summary": "Delete (i.e. hangup) a channel.", + "nickname": "hangup", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "reason_code", + "description": "The reason code for hanging up the channel for detail use. Mutually exclusive with 'reason'. See detail hangup codes at here. https://wiki.asterisk.org/wiki/display/AST/Hangup+Cause+Mappings", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "reason", + "description": "Reason for hanging up the channel for simple use. Mutually exclusive with 'reason_code'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "normal", + "busy", + "congestion", + "no_answer", + "timeout", + "rejected", + "unallocated", + "normal_unspecified", + "number_incomplete", + "codec_mismatch", + "interworking", + "failure", + "answered_elsewhere" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid reason for hangup provided" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/continue", + "description": "Exit application; continue execution in the dialplan", + "operations": [ + { + "httpMethod": "POST", + "summary": "Exit application; continue execution in the dialplan.", + "nickname": "continueInDialplan", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "label", + "description": "The label to continue to - will supersede 'priority' if both are provided.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/move", + "description": "Move the channel from one Stasis application to another.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Move the channel from one Stasis application to another.", + "nickname": "move", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The channel will be passed to this Stasis application.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": "404", + "reason": "Channel not found" + }, + { + "code": "409", + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/redirect", + "description": "Inform the channel that it should redirect itself to a different location. Note that this will almost certainly cause the channel to exit the application.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Redirect the channel to a different location.", + "nickname": "redirect", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "endpoint", + "description": "The endpoint to redirect the channel to", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Endpoint parameter not provided" + }, + { + "code": 404, + "reason": "Channel or endpoint not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 422, + "reason": "Endpoint is not the same type as the channel" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/answer", + "description": "Answer a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Answer a channel.", + "nickname": "answer", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/ring", + "description": "Send a ringing indication to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Indicate ringing to a channel.", + "nickname": "ring", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop ringing indication on a channel if locally generated.", + "nickname": "ringStop", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/dtmf", + "description": "Send DTMF to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Send provided DTMF to a given channel.", + "nickname": "sendDTMF", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "dtmf", + "description": "DTMF To send.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "before", + "description": "Amount of time to wait before DTMF digits (specified in milliseconds) start.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0 + }, + { + "name": "between", + "description": "Amount of time in between DTMF digits (specified in milliseconds).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 100 + }, + { + "name": "duration", + "description": "Length of each DTMF digit (specified in milliseconds).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 100 + }, + { + "name": "after", + "description": "Amount of time to wait after DTMF digits (specified in milliseconds) end.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0 + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "DTMF is required" + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/mute", + "description": "Mute a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Mute a channel.", + "nickname": "mute", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "Direction in which to mute audio", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both", + "in", + "out" + ] + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unmute a channel.", + "nickname": "unmute", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "Direction in which to unmute audio", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both", + "in", + "out" + ] + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/hold", + "description": "Put a channel on hold", + "operations": [ + { + "httpMethod": "POST", + "summary": "Hold a channel.", + "nickname": "hold", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Remove a channel from hold.", + "nickname": "unhold", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/moh", + "description": "Play music on hold to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play music on hold to a channel.", + "notes": "Using media operations such as /play on a channel playing MOH in this manner will suspend MOH without resuming automatically. If continuing music on hold is desired, the stasis application must reinitiate music on hold.", + "nickname": "startMoh", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "mohClass", + "description": "Music on hold class to use", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing music on hold to a channel.", + "nickname": "stopMoh", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/silence", + "description": "Play silence to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play silence to a channel.", + "notes": "Using media operations such as /play on a channel playing silence in this manner will suspend silence without resuming automatically.", + "nickname": "startSilence", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing silence to a channel.", + "nickname": "stopSilence", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/play", + "description": "Play media to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "play", + "responseClass": "Playback", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000 + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/play/{playbackId}", + "description": "Play media to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media and specify the playbackId.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "playWithId", + "responseClass": "Playback", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000 + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/record", + "description": "Record audio from a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start a recording.", + "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.", + "nickname": "record", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Recording's filename", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "maxDurationSeconds", + "description": "Maximum duration of the recording, in seconds. 0 for no limit", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "maxSilenceSeconds", + "description": "Maximum duration of silence, in seconds. 0 for no limit", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "ifExists", + "description": "Action to take if a recording with the same name already exists.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "fail", + "allowableValues": { + "valueType": "LIST", + "values": [ + "fail", + "overwrite", + "append" + ] + } + }, + { + "name": "beep", + "description": "Play beep when recording begins", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "terminateOn", + "description": "DTMF input to terminate recording", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "any", + "*", + "#" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "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" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/variable", + "description": "Variables on a channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the value of a channel variable or function.", + "nickname": "getChannelVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The channel variable or function to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Channel or variable not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "POST", + "summary": "Set the value of a channel variable or function.", + "nickname": "setChannelVar", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The channel variable or function to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/snoop", + "description": "Snoop (spy/whisper) on a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start snooping.", + "notes": "Snoop (spy/whisper) on a specific channel.", + "nickname": "snoopChannel", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "spy", + "description": "Direction of audio to spy on", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "whisper", + "description": "Direction of audio to whisper into", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "app", + "description": "Application the snooping channel is placed into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "snoopId", + "description": "Unique ID to assign to snooping channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/snoop/{snoopId}", + "description": "Snoop (spy/whisper) on a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start snooping.", + "notes": "Snoop (spy/whisper) on a specific channel.", + "nickname": "snoopChannelWithId", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "snoopId", + "description": "Unique ID to assign to snooping channel", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "spy", + "description": "Direction of audio to spy on", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "whisper", + "description": "Direction of audio to whisper into", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "app", + "description": "Application the snooping channel is placed into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/dial", + "description": "Dial a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Dial a created channel.", + "nickname": "dial", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "caller", + "description": "Channel ID of caller", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Dial timeout", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel cannot be found." + }, + { + "code": 409, + "reason": "Channel cannot be dialed." + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/rtp_statistics", + "description": "Get RTP statistics information for RTP on a channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "RTP stats on a channel.", + "nickname": "rtpstatistics", + "responseClass": "RTPstat", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel cannot be found." + } + ] + } + ] + }, + { + "path": "/channels/externalMedia", + "description": "Create a channel to an External Media source/sink.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start an External Media session.", + "notes": "Create a channel to an External Media source/sink.", + "nickname": "externalMedia", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "Stasis Application to place channel into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "external_host", + "description": "Hostname/ip:port of external host", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "encapsulation", + "description": "Payload encapsulation protocol", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "rtp", + "allowableValues": { + "valueType": "LIST", + "values": [ + "rtp", + "audiosocket" + ] + } + }, + { + "name": "transport", + "description": "Transport protocol", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "udp", + "allowableValues": { + "valueType": "LIST", + "values": [ + "udp", + "tcp" + ] + } + }, + { + "name": "connection_type", + "description": "Connection type (client/server)", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "client", + "allowableValues": { + "valueType": "LIST", + "values": [ + "client" + ] + } + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "External media direction", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both" + ] + } + }, + { + "name": "data", + "description": "An arbitrary data field", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 409, + "reason": "Channel is not in a Stasis application; Channel is already bridged" + } + ] + } + ] + } + ], + "models": { + "Dialed": { + "id": "Dialed", + "description": "Dialed channel information.", + "properties": {} + }, + "DialplanCEP": { + "id": "DialplanCEP", + "description": "Dialplan location (context/extension/priority)", + "properties": { + "context": { + "required": true, + "type": "string", + "description": "Context in the dialplan" + }, + "exten": { + "required": true, + "type": "string", + "description": "Extension in the dialplan" + }, + "priority": { + "required": true, + "type": "long", + "description": "Priority in the dialplan" + }, + "app_name": { + "required": true, + "type": "string", + "description": "Name of current dialplan application" + }, + "app_data": { + "required": true, + "type": "string", + "description": "Parameter of current dialplan application" + } + } + }, + "CallerID": { + "id": "CallerID", + "description": "Caller identification", + "properties": { + "name": { + "required": true, + "type": "string" + }, + "number": { + "required": true, + "type": "string" + } + } + }, + "RTPstat": { + "id": "RTPstat", + "description": "A statistics of a RTP.", + "properties": { + "txcount": { + "required": true, + "type": "int", + "description": "Number of packets transmitted." + }, + "rxcount": { + "required": true, + "type": "int", + "description": "Number of packets received." + }, + "txjitter": { + "required": false, + "type": "double", + "description": "Jitter on transmitted packets." + }, + "rxjitter": { + "required": false, + "type": "double", + "description": "Jitter on received packets." + }, + "remote_maxjitter": { + "required": false, + "type": "double", + "description": "Maximum jitter on remote side." + }, + "remote_minjitter": { + "required": false, + "type": "double", + "description": "Minimum jitter on remote side." + }, + "remote_normdevjitter": { + "required": false, + "type": "double", + "description": "Average jitter on remote side." + }, + "remote_stdevjitter": { + "required": false, + "type": "double", + "description": "Standard deviation jitter on remote side." + }, + "local_maxjitter": { + "required": false, + "type": "double", + "description": "Maximum jitter on local side." + }, + "local_minjitter": { + "required": false, + "type": "double", + "description": "Minimum jitter on local side." + }, + "local_normdevjitter": { + "required": false, + "type": "double", + "description": "Average jitter on local side." + }, + "local_stdevjitter": { + "required": false, + "type": "double", + "description": "Standard deviation jitter on local side." + }, + "txploss": { + "required": true, + "type": "int", + "description": "Number of transmitted packets lost." + }, + "rxploss": { + "required": true, + "type": "int", + "description": "Number of received packets lost." + }, + "remote_maxrxploss": { + "required": false, + "type": "double", + "description": "Maximum number of packets lost on remote side." + }, + "remote_minrxploss": { + "required": false, + "type": "double", + "description": "Minimum number of packets lost on remote side." + }, + "remote_normdevrxploss": { + "required": false, + "type": "double", + "description": "Average number of packets lost on remote side." + }, + "remote_stdevrxploss": { + "required": false, + "type": "double", + "description": "Standard deviation packets lost on remote side." + }, + "local_maxrxploss": { + "required": false, + "type": "double", + "description": "Maximum number of packets lost on local side." + }, + "local_minrxploss": { + "required": false, + "type": "double", + "description": "Minimum number of packets lost on local side." + }, + "local_normdevrxploss": { + "required": false, + "type": "double", + "description": "Average number of packets lost on local side." + }, + "local_stdevrxploss": { + "required": false, + "type": "double", + "description": "Standard deviation packets lost on local side." + }, + "rtt": { + "required": false, + "type": "double", + "description": "Total round trip time." + }, + "maxrtt": { + "required": false, + "type": "double", + "description": "Maximum round trip time." + }, + "minrtt": { + "required": false, + "type": "double", + "description": "Minimum round trip time." + }, + "normdevrtt": { + "required": false, + "type": "double", + "description": "Average round trip time." + }, + "stdevrtt": { + "required": false, + "type": "double", + "description": "Standard deviation round trip time." + }, + "local_ssrc": { + "required": true, + "type": "int", + "description": "Our SSRC." + }, + "remote_ssrc": { + "required": true, + "type": "int", + "description": "Their SSRC." + }, + "txoctetcount": { + "required": true, + "type": "int", + "description": "Number of octets transmitted." + }, + "rxoctetcount": { + "required": true, + "type": "int", + "description": "Number of octets received." + }, + "channel_uniqueid": { + "required": true, + "type": "string", + "description": "The Asterisk channel's unique ID that owns this instance." + } + } + }, + "Channel": { + "id": "Channel", + "description": "A specific communication connection between Asterisk and an Endpoint.", + "properties": { + "id": { + "required": true, + "type": "string", + "description": "Unique identifier of the channel.\n\nThis is the same as the Uniqueid field in AMI." + }, + "name": { + "required": true, + "type": "string", + "description": "Name of the channel (i.e. SIP/foo-0000a7e3)" + }, + "state": { + "required": true, + "type": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "Down", + "Rsrved", + "OffHook", + "Dialing", + "Ring", + "Ringing", + "Up", + "Busy", + "Dialing Offhook", + "Pre-ring", + "Unknown" + ] + } + }, + "caller": { + "required": true, + "type": "CallerID" + }, + "connected": { + "required": true, + "type": "CallerID" + }, + "accountcode": { + "required": true, + "type": "string" + }, + "dialplan": { + "required": true, + "type": "DialplanCEP", + "description": "Current location in the dialplan" + }, + "creationtime": { + "required": true, + "type": "Date", + "description": "Timestamp when channel was created" + }, + "language": { + "required": true, + "type": "string", + "description": "The default spoken language" + }, + "channelvars": { + "required": false, + "type": "object", + "description": "Channel variables" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_7_0_0/deviceStates.json b/codegen/src/main/resources/codegen-data/ari_7_0_0/deviceStates.json new file mode 100644 index 00000000..bd389355 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_7_0_0/deviceStates.json @@ -0,0 +1,154 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "Kevin Harwell ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/deviceStates.{format}", + "requiresModules": [ + "res_stasis_device_state" + ], + "apis": [ + { + "path": "/deviceStates", + "description": "Device states", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all ARI controlled device states.", + "nickname": "list", + "responseClass": "List[DeviceState]" + } + ] + }, + { + "path": "/deviceStates/{deviceName}", + "description": "Device state", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve the current state of a device.", + "nickname": "get", + "responseClass": "DeviceState", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Change the state of a device controlled by ARI. (Note - implicitly creates the device state).", + "nickname": "update", + "responseClass": "void", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "deviceState", + "description": "Device state value", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "NOT_INUSE", + "INUSE", + "BUSY", + "INVALID", + "UNAVAILABLE", + "RINGING", + "RINGINUSE", + "ONHOLD" + ] + } + + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Device name is missing" + }, + { + "code": 409, + "reason": "Uncontrolled device specified" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Destroy a device-state controlled by ARI.", + "nickname": "delete", + "responseClass": "void", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Device name is missing" + }, + { + "code": 409, + "reason": "Uncontrolled device specified" + } + ] + } + ] + } + ], + "models": { + "DeviceState": { + "id": "DeviceState", + "description": "Represents the state of a device.", + "properties": { + "name": { + "type": "string", + "description": "Name of the device.", + "required": true + }, + "state": { + "type": "string", + "description": "Device's state", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "UNKNOWN", + "NOT_INUSE", + "INUSE", + "BUSY", + "INVALID", + "UNAVAILABLE", + "RINGING", + "RINGINUSE", + "ONHOLD" + ] + } + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_7_0_0/endpoints.json b/codegen/src/main/resources/codegen-data/ari_7_0_0/endpoints.json new file mode 100644 index 00000000..1f77d370 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_7_0_0/endpoints.json @@ -0,0 +1,263 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/endpoints.{format}", + "apis": [ + { + "path": "/endpoints", + "description": "Asterisk endpoints", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all endpoints.", + "nickname": "list", + "responseClass": "List[Endpoint]" + } + ] + }, + { + "path": "/endpoints/sendMessage", + "description": "Send a message to some technology URI or endpoint.", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Send a message to some technology URI or endpoint.", + "nickname": "sendMessage", + "responseClass": "void", + "parameters": [ + { + "name": "to", + "description": "The endpoint resource or technology specific URI to send the message to. Valid resources are sip, pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "from", + "description": "The endpoint resource or technology specific identity to send this message from. Valid resources are sip, pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "body", + "description": "The body of the message", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "descriptioni": "The \"variables\" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, pjsip and sip resource types will add the key/value pairs as SIP headers,", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoint not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}", + "description": "Asterisk endpoints", + "operations": [ + { + "httpMethod": "GET", + "summary": "List available endoints for a given endpoint technology.", + "nickname": "listByTech", + "responseClass": "List[Endpoint]", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoints (sip,iax2,...)", + "paramType": "path", + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Endpoints not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}/{resource}", + "description": "Single endpoint", + "operations": [ + { + "httpMethod": "GET", + "summary": "Details for an endpoint.", + "nickname": "get", + "responseClass": "Endpoint", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "resource", + "description": "ID of the endpoint", + "paramType": "path", + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoints not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}/{resource}/sendMessage", + "description": "Send a message to some endpoint in a technology.", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Send a message to some endpoint in a technology.", + "nickname": "sendMessageToEndpoint", + "responseClass": "void", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "resource", + "description": "ID of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "from", + "description": "The endpoint resource or technology specific identity to send this message from. Valid resources are sip, pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "body", + "description": "The body of the message", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "descriptioni": "The \"variables\" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, pjsip and sip resource types will add the key/value pairs as SIP headers,", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoint not found" + } + ] + } + ] + } + ], + "models": { + "Endpoint": { + "id": "Endpoint", + "description": "An external device that may offer/accept calls to/from Asterisk.\n\nUnlike most resources, which have a single unique identifier, an endpoint is uniquely identified by the technology/resource pair.", + "properties": { + "technology": { + "type": "string", + "description": "Technology of the endpoint", + "required": true + }, + "resource": { + "type": "string", + "description": "Identifier of the endpoint, specific to the given technology.", + "required": true + }, + "state": { + "type": "string", + "description": "Endpoint's state", + "required": false, + "allowableValues": { + "valueType": "LIST", + "values": [ + "unknown", + "offline", + "online" + ] + } + }, + "channel_ids": { + "type": "List[string]", + "description": "Id's of channels associated with this endpoint", + "required": true + } + } + }, + "TextMessage": { + "id": "TextMessage", + "description": "A text message.", + "properties": { + "from": { + "type": "string", + "description": "A technology specific URI specifying the source of the message. For sip and pjsip technologies, any SIP URI can be specified. For xmpp, the URI must correspond to the client connection being used to send the message.", + "required": true + }, + "to": { + "type": "string", + "description": "A technology specific URI specifying the destination of the message. Valid technologies include sip, pjsip, and xmp. The destination of a message should be an endpoint.", + "required": true + }, + "body": { + "type": "string", + "description": "The text of the message.", + "required": true + }, + "variables": { + "type": "object", + "description": "Technology specific key/value pairs (JSON object) associated with the message.", + "required": false + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_7_0_0/events.json b/codegen/src/main/resources/codegen-data/ari_7_0_0/events.json new file mode 100644 index 00000000..c9822f6c --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_7_0_0/events.json @@ -0,0 +1,918 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.2", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/events.{format}", + "requiresModules": [ + "res_http_websocket" + ], + "apis": [ + { + "path": "/events", + "description": "Events from Asterisk to applications", + "operations": [ + { + "httpMethod": "GET", + "upgrade": "websocket", + "websocketProtocol": "ari", + "summary": "WebSocket connection for events.", + "nickname": "eventWebsocket", + "responseClass": "Message", + "parameters": [ + { + "name": "app", + "description": "Applications to subscribe to.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "subscribeAll", + "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'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean" + } + ] + } + ] + }, + { + "path": "/events/user/{eventName}", + "description": "Stasis application user events", + "operations": [ + { + "httpMethod": "POST", + "summary": "Generate a user event.", + "nickname": "userEvent", + "responseClass": "void", + "parameters": [ + { + "name": "eventName", + "description": "Event name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "application", + "description": "The name of the application that will receive this event", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "source", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}/{resource}, deviceState:{deviceName}", + "paramType": "query", + "required": false, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds custom key/value pairs to add to the user event. Ex. { \"variables\": { \"key\": \"value\" } }", + "paramType": "body", + "required": false, + "allowMultiple": false, + "dataType": "containers" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 422, + "reason": "Event source not found." + }, + { + "code": 400, + "reason": "Invalid even tsource URI or userevent data." + } + ] + } + ] + } + ], + "models": { + "Message": { + "id": "Message", + "description": "Base type for errors and events", + "discriminator": "type", + "properties": { + "type": { + "type": "string", + "required": true, + "description": "Indicates the type of this message." + }, + "asterisk_id": { + "type": "string", + "required": false, + "description": "The unique ID for the Asterisk instance that raised this event." + } + }, + "subTypes": [ + "MissingParams", + "Event" + ] + }, + "MissingParams": { + "id": "MissingParams", + "description": "Error event sent when required params are missing.", + "properties": { + "params": { + "required": true, + "type": "List[string]", + "description": "A list of the missing parameters" + } + } + }, + "Event": { + "id": "Event", + "description": "Base type for asynchronous events from Asterisk.", + "properties": { + "application": { + "type": "string", + "description": "Name of the application receiving the event.", + "required": true + }, + "timestamp": { + "type": "Date", + "description": "Time at which this event was created.", + "required": true + } + }, + "subTypes": [ + "DeviceStateChanged", + "PlaybackStarted", + "PlaybackContinuing", + "PlaybackFinished", + "RecordingStarted", + "RecordingFinished", + "RecordingFailed", + "ApplicationMoveFailed", + "ApplicationReplaced", + "BridgeCreated", + "BridgeDestroyed", + "BridgeMerged", + "BridgeBlindTransfer", + "BridgeAttendedTransfer", + "BridgeVideoSourceChanged", + "ChannelCreated", + "ChannelDestroyed", + "ChannelEnteredBridge", + "ChannelLeftBridge", + "ChannelStateChange", + "ChannelDtmfReceived", + "ChannelDialplan", + "ChannelCallerId", + "ChannelUserevent", + "ChannelHangupRequest", + "ChannelVarset", + "ChannelTalkingStarted", + "ChannelTalkingFinished", + "ChannelHold", + "ChannelUnhold", + "ContactStatusChange", + "EndpointStateChange", + "Dial", + "StasisEnd", + "StasisStart", + "TextMessageReceived", + "ChannelConnectedLine", + "PeerStatusChange" + ] + }, + "ContactInfo": { + "id": "ContactInfo", + "description": "Detailed information about a contact on an endpoint.", + "properties": { + "uri": { + "type": "string", + "description": "The location of the contact.", + "required": true + }, + "contact_status": { + "type": "string", + "description": "The current status of the contact.", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "Unreachable", + "Reachable", + "Unknown", + "NonQualified", + "Removed" + ] + } + }, + "aor": { + "type": "string", + "description": "The Address of Record this contact belongs to.", + "required": true + }, + "roundtrip_usec": { + "type": "string", + "description": "Current round trip time, in microseconds, for the contact.", + "required": false + } + } + }, + "Peer": { + "id": "Peer", + "description": "Detailed information about a remote peer that communicates with Asterisk.", + "properties": { + "peer_status": { + "type": "string", + "description": "The current state of the peer. Note that the values of the status are dependent on the underlying peer technology.", + "required": true + }, + "cause": { + "type": "string", + "description": "An optional reason associated with the change in peer_status.", + "required": false + }, + "address": { + "type": "string", + "description": "The IP address of the peer.", + "required": false + }, + "port": { + "type": "string", + "description": "The port of the peer.", + "required": false + }, + "time": { + "type": "string", + "description": "The last known time the peer was contacted.", + "required": false + } + } + }, + "DeviceStateChanged": { + "id": "DeviceStateChanged", + "description": "Notification that a device state has changed.", + "properties": { + "device_state": { + "type": "DeviceState", + "description": "Device state object", + "required": true + } + } + }, + "PlaybackStarted": { + "id": "PlaybackStarted", + "description": "Event showing the start of a media playback operation.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "PlaybackContinuing": { + "id": "PlaybackContinuing", + "description": "Event showing the continuation of a media playback operation from one media URI to the next in the list.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "PlaybackFinished": { + "id": "PlaybackFinished", + "description": "Event showing the completion of a media playback operation.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "RecordingStarted": { + "id": "RecordingStarted", + "description": "Event showing the start of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "RecordingFinished": { + "id": "RecordingFinished", + "description": "Event showing the completion of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "RecordingFailed": { + "id": "RecordingFailed", + "description": "Event showing failure of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "ApplicationMoveFailed": { + "id": "ApplicationMoveFailed", + "description": "Notification that trying to move a channel to another Stasis application failed.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + }, + "destination": { + "required": true, + "type": "string" + }, + "args": { + "required": true, + "type": "List[string]", + "description": "Arguments to the application" + } + } + }, + "ApplicationReplaced": { + "id": "ApplicationReplaced", + "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.", + "properties": {} + }, + "BridgeCreated": { + "id": "BridgeCreated", + "description": "Notification that a bridge has been created.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeDestroyed": { + "id": "BridgeDestroyed", + "description": "Notification that a bridge has been destroyed.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeMerged": { + "id": "BridgeMerged", + "description": "Notification that one bridge has merged into another.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "bridge_from": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeVideoSourceChanged": { + "id": "BridgeVideoSourceChanged", + "description": "Notification that the source of video in a bridge has changed.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "old_video_source_id": { + "required": false, + "type": "string" + } + } + }, + "BridgeBlindTransfer": { + "id": "BridgeBlindTransfer", + "description": "Notification that a blind transfer has occurred.", + "properties": { + "channel": { + "description": "The channel performing the blind transfer", + "required": true, + "type": "Channel" + }, + "replace_channel": { + "description": "The channel that is replacing transferer when the transferee(s) can not be transferred directly", + "required": false, + "type": "Channel" + }, + "transferee": { + "description": "The channel that is being transferred", + "required": false, + "type": "Channel" + }, + "exten": { + "description": "The extension transferred to", + "required": true, + "type": "string" + }, + "context": { + "description": "The context transferred to", + "required": true, + "type": "string" + }, + "result": { + "description": "The result of the transfer attempt", + "required": true, + "type": "string" + }, + "is_external": { + "description": "Whether the transfer was externally initiated or not", + "required": true, + "type": "boolean" + }, + "bridge": { + "description": "The bridge being transferred", + "type": "Bridge" + } + } + }, + "BridgeAttendedTransfer": { + "id": "BridgeAttendedTransfer", + "description": "Notification that an attended transfer has occurred.", + "properties": { + "transferer_first_leg": { + "description": "First leg of the transferer", + "required": true, + "type": "Channel" + }, + "transferer_second_leg": { + "description": "Second leg of the transferer", + "required": true, + "type": "Channel" + }, + "replace_channel": { + "description": "The channel that is replacing transferer_first_leg in the swap", + "required": false, + "type": "Channel" + }, + "transferee": { + "description": "The channel that is being transferred", + "required": false, + "type": "Channel" + }, + "transfer_target": { + "description": "The channel that is being transferred to", + "required": false, + "type": "Channel" + }, + "result": { + "description": "The result of the transfer attempt", + "required": true, + "type": "string" + }, + "is_external": { + "description": "Whether the transfer was externally initiated or not", + "required": true, + "type": "boolean" + }, + "transferer_first_leg_bridge": { + "description": "Bridge the transferer first leg is in", + "type": "Bridge" + }, + "transferer_second_leg_bridge": { + "description": "Bridge the transferer second leg is in", + "type": "Bridge" + }, + "destination_type": { + "description": "How the transfer was accomplished", + "required": true, + "type": "string" + }, + "destination_bridge": { + "description": "Bridge that survived the merge result", + "type": "string" + }, + "destination_application": { + "description": "Application that has been transferred into", + "type": "string" + }, + "destination_link_first_leg": { + "description": "First leg of a link transfer result", + "type": "Channel" + }, + "destination_link_second_leg": { + "description": "Second leg of a link transfer result", + "type": "Channel" + }, + "destination_threeway_channel": { + "description": "Transferer channel that survived the threeway result", + "type": "Channel" + }, + "destination_threeway_bridge": { + "description": "Bridge that survived the threeway result", + "type": "Bridge" + } + } + }, + "ChannelCreated": { + "id": "ChannelCreated", + "description": "Notification that a channel has been created.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelDestroyed": { + "id": "ChannelDestroyed", + "description": "Notification that a channel has been destroyed.", + "properties": { + "cause": { + "required": true, + "description": "Integer representation of the cause of the hangup", + "type": "int" + }, + "cause_txt": { + "required": true, + "description": "Text representation of the cause of the hangup", + "type": "string" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelEnteredBridge": { + "id": "ChannelEnteredBridge", + "description": "Notification that a channel has entered a bridge.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "channel": { + "type": "Channel" + } + } + }, + "ChannelLeftBridge": { + "id": "ChannelLeftBridge", + "description": "Notification that a channel has left a bridge.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelStateChange": { + "id": "ChannelStateChange", + "description": "Notification of a channel's state change.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelDtmfReceived": { + "id": "ChannelDtmfReceived", + "description": "DTMF received on a channel.\n\nThis event is sent when the DTMF ends. There is no notification about the start of DTMF", + "properties": { + "digit": { + "required": true, + "type": "string", + "description": "DTMF digit received (0-9, A-E, # or *)" + }, + "duration_ms": { + "required": true, + "type": "int", + "description": "Number of milliseconds DTMF was received" + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which DTMF was received" + } + } + }, + "ChannelDialplan": { + "id": "ChannelDialplan", + "description": "Channel changed location in the dialplan.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that changed dialplan location." + }, + "dialplan_app": { + "required": true, + "type": "string", + "description": "The application about to be executed." + }, + "dialplan_app_data": { + "required": true, + "type": "string", + "description": "The data to be passed to the application." + } + } + }, + "ChannelCallerId": { + "id": "ChannelCallerId", + "description": "Channel changed Caller ID.", + "properties": { + "caller_presentation": { + "required": true, + "type": "int", + "description": "The integer representation of the Caller Presentation value." + }, + "caller_presentation_txt": { + "required": true, + "type": "string", + "description": "The text representation of the Caller Presentation value." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that changed Caller ID." + } + } + }, + "ChannelUserevent": { + "id": "ChannelUserevent", + "description": "User-generated event with additional user-defined fields in the object.", + "properties": { + "eventname": { + "required": true, + "type": "string", + "description": "The name of the user event." + }, + "channel": { + "required": false, + "type": "Channel", + "description": "A channel that is signaled with the user event." + }, + "bridge": { + "required": false, + "type": "Bridge", + "description": "A bridge that is signaled with the user event." + }, + "endpoint": { + "required": false, + "type": "Endpoint", + "description": "A endpoint that is signaled with the user event." + }, + "userevent": { + "required": true, + "type": "object", + "description": "Custom Userevent data" + } + } + }, + "ChannelHangupRequest": { + "id": "ChannelHangupRequest", + "description": "A hangup was requested on the channel.", + "properties": { + "cause": { + "type": "int", + "description": "Integer representation of the cause of the hangup." + }, + "soft": { + "type": "boolean", + "description": "Whether the hangup request was a soft hangup request." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which the hangup was requested." + } + } + }, + "ChannelVarset": { + "id": "ChannelVarset", + "description": "Channel variable changed.", + "properties": { + "variable": { + "required": true, + "type": "string", + "description": "The variable that changed." + }, + "value": { + "required": true, + "type": "string", + "description": "The new value of the variable." + }, + "channel": { + "required": false, + "type": "Channel", + "description": "The channel on which the variable was set.\n\nIf missing, the variable is a global variable." + } + } + }, + "ChannelHold": { + "id": "ChannelHold", + "description": "A channel initiated a media hold.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that initiated the hold event." + }, + "musicclass": { + "required": false, + "type": "string", + "description": "The music on hold class that the initiator requested." + } + } + }, + "ChannelUnhold": { + "id": "ChannelUnhold", + "description": "A channel initiated a media unhold.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that initiated the unhold event." + } + } + }, + "ChannelTalkingStarted": { + "id": "ChannelTalkingStarted", + "description": "Talking was detected on the channel.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which talking started." + } + } + }, + "ChannelTalkingFinished": { + "id": "ChannelTalkingFinished", + "description": "Talking is no longer detected on the channel.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which talking completed." + }, + "duration": { + "required": true, + "type": "int", + "description": "The length of time, in milliseconds, that talking was detected on the channel" + } + } + }, + "ContactStatusChange": { + "id": "ContactStatusChange", + "description": "The state of a contact on an endpoint has changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + }, + "contact_info": { + "required": true, + "type": "ContactInfo" + } + } + }, + "PeerStatusChange": { + "id": "PeerStatusChange", + "description": "The state of a peer associated with an endpoint has changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + }, + "peer": { + "required": true, + "type": "Peer" + } + } + }, + "EndpointStateChange": { + "id": "EndpointStateChange", + "description": "Endpoint state changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + } + } + }, + "Dial": { + "id": "Dial", + "description": "Dialing state has changed.", + "properties": { + "caller": { + "required": false, + "type": "Channel", + "description": "The calling channel." + }, + "peer": { + "required": true, + "type": "Channel", + "description": "The dialed channel." + }, + "forward": { + "required": false, + "type": "string", + "description": "Forwarding target requested by the original dialed channel." + }, + "forwarded": { + "required": false, + "type": "Channel", + "description": "Channel that the caller has been forwarded to." + }, + "dialstring": { + "required": false, + "type": "string", + "description": "The dial string for calling the peer channel." + }, + "dialstatus": { + "required": true, + "type": "string", + "description": "Current status of the dialing attempt to the peer." + } + } + }, + "StasisEnd": { + "id": "StasisEnd", + "description": "Notification that a channel has left a Stasis application.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "StasisStart": { + "id": "StasisStart", + "description": "Notification that a channel has entered a Stasis application.", + "properties": { + "args": { + "required": true, + "type": "List[string]", + "description": "Arguments to the application" + }, + "channel": { + "required": true, + "type": "Channel" + }, + "replace_channel": { + "required": false, + "type": "Channel" + } + } + }, + "TextMessageReceived": { + "id": "TextMessageReceived", + "description": "A text message was received from an endpoint.", + "properties": { + "message": { + "required": true, + "type": "TextMessage" + }, + "endpoint": { + "required": false, + "type": "Endpoint" + } + } + }, + "ChannelConnectedLine": { + "id": "ChannelConnectedLine", + "description": "Channel changed Connected Line.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel whose connected line has changed." + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_7_0_0/mailboxes.json b/codegen/src/main/resources/codegen-data/ari_7_0_0/mailboxes.json new file mode 100644 index 00000000..8f5941b8 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_7_0_0/mailboxes.json @@ -0,0 +1,137 @@ +{ + "_copyright": "Copyright (C) 2013, Digium, Inc.", + "_author": "Jonathan Rose ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/mailboxes.{format}", + "requiresModules": [ + "res_stasis_mailbox" + ], + "apis": [ + { + "path": "/mailboxes", + "description": "Mailboxes", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all mailboxes.", + "nickname": "list", + "responseClass": "List[Mailbox]" + } + ] + }, + { + "path": "/mailboxes/{mailboxName}", + "description": "Mailbox state", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve the current state of a mailbox.", + "nickname": "get", + "responseClass": "Mailbox", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Change the state of a mailbox. (Note - implicitly creates the mailbox).", + "nickname": "update", + "responseClass": "void", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "oldMessages", + "description": "Count of old messages in the mailbox", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "newMessages", + "description": "Count of new messages in the mailbox", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "int" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Destroy a mailbox.", + "nickname": "delete", + "responseClass": "void", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + } + ] + } + ], + "models": { + "Mailbox": { + "id": "Mailbox", + "description": "Represents the state of a mailbox.", + "properties": { + "name": { + "type": "string", + "description": "Name of the mailbox.", + "required": true + }, + "old_messages": { + "type": "int", + "description": "Count of old messages in the mailbox.", + "required": true + }, + "new_messages": { + "type": "int", + "description": "Count of new messages in the mailbox.", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_7_0_0/playbacks.json b/codegen/src/main/resources/codegen-data/ari_7_0_0/playbacks.json new file mode 100644 index 00000000..793986fc --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_7_0_0/playbacks.json @@ -0,0 +1,165 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/playbacks.{format}", + "requiresModules": [ + "res_stasis_playback" + ], + "apis": [ + { + "path": "/playbacks/{playbackId}", + "description": "Control object for a playback operation.", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a playback's details.", + "nickname": "get", + "responseClass": "Playback", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "The playback cannot be found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop a playback.", + "nickname": "stop", + "responseClass": "void", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "The playback cannot be found" + } + ] + } + ] + }, + { + "path": "/playbacks/{playbackId}/control", + "description": "Control object for a playback operation.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Control a playback.", + "nickname": "control", + "responseClass": "void", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "operation", + "description": "Operation to perform on the playback.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "restart", + "pause", + "unpause", + "reverse", + "forward" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "The provided operation parameter was invalid" + }, + { + "code": 404, + "reason": "The playback cannot be found" + }, + { + "code": 409, + "reason": "The operation cannot be performed in the playback's current state" + } +] + } + ] + } + ], + "models": { + "Playback": { + "id": "Playback", + "description": "Object representing the playback of media to a channel", + "properties": { + "id": { + "type": "string", + "description": "ID for this playback operation", + "required": true + }, + "media_uri": { + "type": "string", + "description": "The URI for the media currently being played back.", + "required": true + }, + "next_media_uri": { + "type": "string", + "description": "If a list of URIs is being played, the next media URI to be played back.", + "required": false + }, + "target_uri": { + "type": "string", + "description": "URI for the channel or bridge to play the media on", + "required": true + }, + "language": { + "type": "string", + "description": "For media types that support multiple languages, the language requested for playback." + }, + "state": { + "type": "string", + "description": "Current state of the playback operation.", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "queued", + "playing", + "continuing", + "done", + "failed" + ] + } + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_7_0_0/recordings.json b/codegen/src/main/resources/codegen-data/ari_7_0_0/recordings.json new file mode 100644 index 00000000..6ffd6d8e --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_7_0_0/recordings.json @@ -0,0 +1,413 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/recordings.{format}", + "requiresModules": [ + "res_stasis_recording" + ], + "apis": [ + { + "path": "/recordings/stored", + "description": "Recordings", + "operations": [ + { + "httpMethod": "GET", + "summary": "List recordings that are complete.", + "nickname": "listStored", + "responseClass": "List[StoredRecording]" + } + ] + }, + { + "path": "/recordings/stored/{recordingName}", + "description": "Individual recording", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a stored recording's details.", + "nickname": "getStored", + "responseClass": "StoredRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Delete a stored recording.", + "nickname": "deleteStored", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/stored/{recordingName}/file", + "description": "The actual file associated with the stored recording", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the file associated with the stored recording.", + "nickname": "getStoredFile", + "responseClass": "binary", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 403, + "reason": "The recording file could not be opened" + }, + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/stored/{recordingName}/copy", + "description": "Copy an individual recording", + "operations": [ + { + "httpMethod": "POST", + "summary": "Copy a stored recording.", + "nickname": "copyStored", + "responseClass": "StoredRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording to copy", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "destinationRecordingName", + "description": "The destination name of the recording", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "A recording with the same name already exists on the system" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}", + "description": "A recording that is in progress", + "operations": [ + { + "httpMethod": "GET", + "summary": "List live recordings.", + "nickname": "getLive", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop a live recording and discard it.", + "nickname": "cancel", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/stop", + "operations": [ + { + "httpMethod": "POST", + "summary": "Stop a live recording and store it.", + "nickname": "stop", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/pause", + "operations": [ + { + "httpMethod": "POST", + "summary": "Pause a live recording.", + "notes": "Pausing a recording suspends silence detection, which will be restarted when the recording is unpaused. Paused time is not included in the accounting for maxDurationSeconds.", + "nickname": "pause", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unpause a live recording.", + "nickname": "unpause", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/mute", + "operations": [ + { + "httpMethod": "POST", + "summary": "Mute a live recording.", + "notes": "Muting a recording suspends silence detection, which will be restarted when the recording is unmuted.", + "nickname": "mute", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unmute a live recording.", + "nickname": "unmute", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + } + ] + } + ], + "models": { + "StoredRecording": { + "id": "StoredRecording", + "description": "A past recording that may be played back.", + "properties": { + "name": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + }, + "LiveRecording": { + "id": "LiveRecording", + "description": "A recording that is in progress", + "properties": { + "name": { + "required": true, + "type": "string", + "description": "Base name for the recording" + }, + "format": { + "required": true, + "type": "string", + "description": "Recording format (wav, gsm, etc.)" + }, + "target_uri": { + "required": true, + "type": "string", + "description": "URI for the channel or bridge being recorded" + }, + "state": { + "required": true, + "type": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "queued", + "recording", + "paused", + "done", + "failed", + "canceled" + ] + } + }, + "duration": { + "required": false, + "type": "int", + "description": "Duration in seconds of the recording" + }, + "talking_duration": { + "required": false, + "type": "int", + "description": "Duration of talking, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds." + }, + "silence_duration": { + "required": false, + "type": "int", + "description": "Duration of silence, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds." + }, + "cause": { + "required": false, + "type": "string", + "description": "Cause for recording failure if failed" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_7_0_0/sounds.json b/codegen/src/main/resources/codegen-data/ari_7_0_0/sounds.json new file mode 100644 index 00000000..8fbe1c57 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_7_0_0/sounds.json @@ -0,0 +1,99 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/sounds.{format}", + "apis": [ + { + "path": "/sounds", + "description": "Sounds", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all sounds.", + "nickname": "list", + "responseClass": "List[Sound]", + "parameters": [ + { + "name": "lang", + "description": "Lookup sound for a specific language.", + "paramType": "query", + "dataType": "string", + "required": false + }, + { + "name": "format", + "description": "Lookup sound in a specific format.", + "paramType": "query", + "dataType": "string", + "required": false, + "__note": "core show translation can show translation paths between formats, along with relative costs. so this could be just installed format, or we could follow that for transcoded formats." + } + ] + } + ] + }, + { + "path": "/sounds/{soundId}", + "description": "Individual sound", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a sound's details.", + "nickname": "get", + "responseClass": "Sound", + "parameters": [ + { + "name": "soundId", + "description": "Sound's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ] + } + ] + } + ], + "models": { + "FormatLangPair": { + "id": "FormatLangPair", + "description": "Identifies the format and language of a sound file", + "properties": { + "language": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + }, + "Sound": { + "id": "Sound", + "description": "A media file that may be played back.", + "properties": { + "id": { + "required": true, + "description": "Sound's identifier.", + "type": "string" + }, + "text": { + "required": false, + "description": "Text description of the sound, usually the words spoken.", + "type": "string" + }, + "formats": { + "required": true, + "description": "The formats and languages in which this sound is available.", + "type": "List[FormatLangPair]" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_7_0_1/applications.json b/codegen/src/main/resources/codegen-data/ari_7_0_1/applications.json new file mode 100644 index 00000000..09c5cd5c --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_7_0_1/applications.json @@ -0,0 +1,223 @@ +{ + "_copyright": "Copyright (C) 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/applications.{format}", + "apis": [ + { + "path": "/applications", + "description": "Stasis applications", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all applications.", + "nickname": "list", + "responseClass": "List[Application]" + } + ] + }, + { + "path": "/applications/{applicationName}", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get details of an application.", + "nickname": "get", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Application does not exist." + } + ] + } + ] + }, + { + "path": "/applications/{applicationName}/subscription", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "POST", + "summary": "Subscribe an application to a event source.", + "notes": "Returns the state of the application after the subscriptions have changed", + "nickname": "subscribe", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "eventSource", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing parameter." + }, + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 422, + "reason": "Event source does not exist." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unsubscribe an application from an event source.", + "notes": "Returns the state of the application after the subscriptions have changed", + "nickname": "unsubscribe", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "eventSource", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing parameter; event source scheme not recognized." + }, + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 409, + "reason": "Application not subscribed to event source." + }, + { + "code": 422, + "reason": "Event source does not exist." + } + ] + } + ] + }, + { + "path": "/applications/{applicationName}/eventFilter", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Filter application events types.", + "notes": "Allowed and/or disallowed event type filtering can be done. The body (parameter) should specify a JSON key/value object that describes the type of event filtering needed. One, or both of the following keys can be designated:

\"allowed\" - Specifies an allowed list of event types
\"disallowed\" - Specifies a disallowed list of event types

Further, each of those key's value should be a JSON array that holds zero, or more JSON key/value objects. Each of these objects must contain the following key with an associated value:

\"type\" - The type name of the event to filter

The value must be the string name (case sensitive) of the event type that needs filtering. For example:

{ \"allowed\": [ { \"type\": \"StasisStart\" }, { \"type\": \"StasisEnd\" } ] }

As this specifies only an allowed list, then only those two event type messages are sent to the application. No other event messages are sent.

The following rules apply:

* If the body is empty, both the allowed and disallowed filters are set empty.
* If both list types are given then both are set to their respective values (note, specifying an empty array for a given type sets that type to empty).
* If only one list type is given then only that type is set. The other type is not updated.
* An empty \"allowed\" list means all events are allowed.
* An empty \"disallowed\" list means no events are disallowed.
* Disallowed events take precedence over allowed events if the event type is specified in both lists.", + "nickname": "filter", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "filter", + "description": "Specify which event types to allow/disallow", + "paramType": "body", + "required": false, + "dataType": "object", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Bad request." + }, + { + "code": 404, + "reason": "Application does not exist." + } + ] + } + ] + } + ], + "models": { + "Application": { + "id": "Application", + "description": "Details of a Stasis application", + "properties": { + "name": { + "type": "string", + "description": "Name of this application", + "required": true + }, + "channel_ids": { + "type": "List[string]", + "description": "Id's for channels subscribed to.", + "required": true + }, + "bridge_ids": { + "type": "List[string]", + "description": "Id's for bridges subscribed to.", + "required": true + }, + "endpoint_ids": { + "type": "List[string]", + "description": "{tech}/{resource} for endpoints subscribed to.", + "required": true + }, + "device_names": { + "type": "List[string]", + "description": "Names of the devices subscribed to.", + "required": true + }, + "events_allowed": { + "type": "List[object]", + "description": "Event types sent to the application.", + "required": true + }, + "events_disallowed": { + "type": "List[object]", + "description": "Event types not sent to the application.", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_7_0_1/asterisk.json b/codegen/src/main/resources/codegen-data/ari_7_0_1/asterisk.json new file mode 100644 index 00000000..841e6cd8 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_7_0_1/asterisk.json @@ -0,0 +1,725 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/asterisk.{format}", + "apis": [ + { + "path": "/asterisk/config/dynamic/{configClass}/{objectType}/{id}", + "description": "Asterisk dynamic configuration", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve a dynamic configuration object.", + "nickname": "getObject", + "responseClass": "List[ConfigTuple]", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to retrieve.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to retrieve.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "{configClass|objectType|id} not found" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Create or update a dynamic configuration object.", + "nickname": "updateObject", + "responseClass": "List[ConfigTuple]", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to create or update.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to create or update.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "fields", + "description": "The body object should have a value that is a list of ConfigTuples, which provide the fields to update. Ex. [ { \"attribute\": \"directmedia\", \"value\": \"false\" } ]", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Bad request body" + }, + { + "code": 403, + "reason": "Could not create or update object" + }, + { + "code": 404, + "reason": "{configClass|objectType} not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Delete a dynamic configuration object.", + "nickname": "deleteObject", + "responseClass": "void", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to delete.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to delete.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 403, + "reason": "Could not delete object" + }, + { + "code": 404, + "reason": "{configClass|objectType|id} not found" + } + ] + } + ] + }, + { + "path": "/asterisk/info", + "description": "Asterisk system information (similar to core show settings)", + "operations": [ + { + "httpMethod": "GET", + "summary": "Gets Asterisk system information.", + "nickname": "getInfo", + "responseClass": "AsteriskInfo", + "parameters": [ + { + "name": "only", + "description": "Filter information returned", + "paramType": "query", + "required": false, + "allowMultiple": true, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "build", + "system", + "config", + "status" + ] + } + } + ] + } + ] + }, + { + "path": "/asterisk/ping", + "description": "Asterisk ping", + "operations": [ + { + "httpMethod": "GET", + "summary": "Response pong message.", + "nickname": "ping", + "responseClass": "AsteriskPing" + } + ] + }, + { + "path": "/asterisk/modules", + "description": "Asterisk modules", + "operations": [ + { + "httpMethod": "GET", + "summary": "List Asterisk modules.", + "nickname": "listModules", + "responseClass": "List[Module]" + } + ] + }, + { + "path": "/asterisk/modules/{moduleName}", + "description": "Asterisk module", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get Asterisk module information.", + "nickname": "getModule", + "responseClass": "Module", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module could not be found in running modules." + }, + { + "code": 409, + "reason": "Module information could not be retrieved." + } + ] + }, + { + "httpMethod": "POST", + "summary": "Load an Asterisk module.", + "nickname": "loadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 409, + "reason": "Module could not be loaded." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unload an Asterisk module.", + "nickname": "unloadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module not found in running modules." + }, + { + "code": 409, + "reason": "Module could not be unloaded." + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Reload an Asterisk module.", + "nickname": "reloadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module not found in running modules." + }, + { + "code": 409, + "reason": "Module could not be reloaded." + } + ] + } + ] + }, + { + "path": "/asterisk/logging", + "description": "Asterisk log channels", + "operations": [ + { + "httpMethod": "GET", + "summary": "Gets Asterisk log channel information.", + "nickname": "listLogChannels", + "responseClass": "List[LogChannel]" + } + ] + }, + { + "path": "/asterisk/logging/{logChannelName}", + "description": "Asterisk log channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Adds a log channel.", + "nickname": "addLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "The log channel to add", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "configuration", + "description": "levels of the log channel", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Bad request body" + }, + { + "code": 409, + "reason": "Log channel could not be created." + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Deletes a log channel.", + "nickname": "deleteLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "Log channels name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Log channel does not exist." + } + ] + } + ] + }, + { + "path": "/asterisk/logging/{logChannelName}/rotate", + "description": "Asterisk log channel", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Rotates a log channel.", + "nickname": "rotateLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "Log channel's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Log channel does not exist." + } + ] + } + ] + }, + { + "path": "/asterisk/variable", + "description": "Global variables", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the value of a global variable.", + "nickname": "getGlobalVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "variable", + "description": "The variable to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + } + ] + }, + { + "httpMethod": "POST", + "summary": "Set the value of a global variable.", + "nickname": "setGlobalVar", + "responseClass": "void", + "parameters": [ + { + "name": "variable", + "description": "The variable to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + } + ] + } + ] + } + ], + "models": { + "BuildInfo": { + "id": "BuildInfo", + "description": "Info about how Asterisk was built", + "properties": { + "os": { + "required": true, + "type": "string", + "description": "OS Asterisk was built on." + }, + "kernel": { + "required": true, + "type": "string", + "description": "Kernel version Asterisk was built on." + }, + "options": { + "required": true, + "type": "string", + "description": "Compile time options, or empty string if default." + }, + "machine": { + "required": true, + "type": "string", + "description": "Machine architecture (x86_64, i686, ppc, etc.)" + }, + "date": { + "required": true, + "type": "string", + "description": "Date and time when Asterisk was built." + }, + "user": { + "required": true, + "type": "string", + "description": "Username that build Asterisk" + } + } + }, + "SystemInfo": { + "id": "SystemInfo", + "description": "Info about Asterisk", + "properties": { + "version": { + "required": true, + "type": "string", + "description": "Asterisk version." + }, + "entity_id": { + "required": true, + "type": "string", + "description": "" + } + } + }, + "SetId": { + "id": "SetId", + "description": "Effective user/group id", + "properties": { + "user": { + "required": true, + "type": "string", + "description": "Effective user id." + }, + "group": { + "required": true, + "type": "string", + "description": "Effective group id." + } + } + }, + "ConfigInfo": { + "id": "ConfigInfo", + "description": "Info about Asterisk configuration", + "properties": { + "name": { + "required": true, + "type": "string", + "description": "Asterisk system name." + }, + "default_language": { + "required": true, + "type": "string", + "description": "Default language for media playback." + }, + "max_channels": { + "required": false, + "type": "int", + "description": "Maximum number of simultaneous channels." + }, + "max_open_files": { + "required": false, + "type": "int", + "description": "Maximum number of open file handles (files, sockets)." + }, + "max_load": { + "required": false, + "type": "double", + "description": "Maximum load avg on system." + }, + "setid": { + "required": true, + "type": "SetId", + "description": "Effective user/group id for running Asterisk." + } + } + }, + "StatusInfo": { + "id": "StatusInfo", + "description": "Info about Asterisk status", + "properties": { + "startup_time": { + "required": true, + "type": "Date", + "description": "Time when Asterisk was started." + }, + "last_reload_time": { + "required": true, + "type": "Date", + "description": "Time when Asterisk was last reloaded." + } + } + }, + "AsteriskInfo": { + "id": "AsteriskInfo", + "description": "Asterisk system information", + "properties": { + "build": { + "required": false, + "type": "BuildInfo", + "description": "Info about how Asterisk was built" + }, + "system": { + "required": false, + "type": "SystemInfo", + "description": "Info about the system running Asterisk" + }, + "config": { + "required": false, + "type": "ConfigInfo", + "description": "Info about Asterisk configuration" + }, + "status": { + "required": false, + "type": "StatusInfo", + "description": "Info about Asterisk status" + } + } + }, + "AsteriskPing": { + "id": "AsteriskPing", + "description": "Asterisk ping information", + "properties": { + "asterisk_id": { + "required": true, + "type": "string", + "description": "Asterisk id info" + }, + "ping": { + "required": true, + "type": "string", + "description": "Always string value is pong" + }, + "timestamp": { + "required": true, + "type": "string", + "description": "The timestamp string of request received time" + } + } + }, + "Module": { + "id": "Module", + "description": "Details of an Asterisk module", + "properties": { + "name": { + "type": "string", + "description": "The name of this module", + "required": true + }, + "description": { + "type": "string", + "description": "The description of this module", + "required": true + }, + "use_count": { + "type": "int", + "description": "The number of times this module is being used", + "required": true + }, + "status": { + "type": "string", + "description": "The running status of this module", + "required": true + }, + "support_level": { + "type": "string", + "description": "The support state of this module", + "required": true + } + } + }, + "LogChannel": { + "id": "LogChannel", + "description": "Details of an Asterisk log channel", + "properties": { + "channel": { + "type": "string", + "description": "The log channel path", + "required": true + }, + "type": { + "type": "string", + "description": "Types of logs for the log channel", + "required": true + }, + "status": { + "type": "string", + "description": "Whether or not a log type is enabled", + "required": true + }, + "configuration": { + "type": "string", + "description": "The various log levels", + "required": true + } + } + }, + "Variable": { + "id": "Variable", + "description": "The value of a channel variable", + "properties": { + "value": { + "required": true, + "type": "string", + "description": "The value of the variable requested" + } + } + }, + "ConfigTuple": { + "id": "ConfigTuple", + "description": "A key/value pair that makes up part of a configuration object.", + "properties": { + "attribute": { + "required": true, + "type": "string", + "description": "A configuration object attribute." + }, + "value": { + "required": true, + "type": "string", + "description": "The value for the attribute." + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_7_0_1/bridges.json b/codegen/src/main/resources/codegen-data/ari_7_0_1/bridges.json new file mode 100644 index 00000000..bf0a0016 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_7_0_1/bridges.json @@ -0,0 +1,774 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/bridges.{format}", + "requiresModules": [ + "res_stasis_recording", + "res_stasis_playback" + ], + "apis": [ + { + "path": "/bridges", + "description": "Active bridges", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all active bridges in Asterisk.", + "nickname": "list", + "responseClass": "List[Bridge]" + }, + { + "httpMethod": "POST", + "summary": "Create a new bridge.", + "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", + "nickname": "create", + "responseClass": "Bridge", + "parameters": [ + { + "name": "type", + "description": "Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media, video_sfu, video_single).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "bridgeId", + "description": "Unique ID to give to the bridge being created.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Name to give to the bridge being created.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}", + "description": "Individual bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Create a new bridge or updates an existing one.", + "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", + "nickname": "createWithId", + "responseClass": "Bridge", + "parameters": [ + { + "name": "type", + "description": "Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media, video_sfu, video_single) to set.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "bridgeId", + "description": "Unique ID to give to the bridge being created.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Set the name of the bridge.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ] + }, + { + "httpMethod": "GET", + "summary": "Get bridge details.", + "nickname": "get", + "responseClass": "Bridge", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Shut down a bridge.", + "notes": "If any channels are in this bridge, they will be removed and resume whatever they were doing beforehand.", + "nickname": "destroy", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/addChannel", + "description": "Add a channel to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Add a channel to a bridge.", + "nickname": "addChannel", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channel", + "description": "Ids of channels to add to bridge", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "role", + "description": "Channel's role in the bridge", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "absorbDTMF", + "description": "Absorb DTMF coming from this channel, preventing it to pass through to the bridge", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "mute", + "description": "Mute audio from this channel, preventing it to pass through to the bridge", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "inhibitConnectedLineUpdates", + "description": "Do not present the identity of the newly connected channel to other bridge members", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Channel not found" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application; Channel currently recording" + }, + { + "code": 422, + "reason": "Channel not in Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/removeChannel", + "description": "Remove a channel from a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Remove a channel from a bridge.", + "nickname": "removeChannel", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channel", + "description": "Ids of channels to remove from bridge", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Channel not found" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + }, + { + "code": 422, + "reason": "Channel not in this bridge" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/videoSource/{channelId}", + "description": "Set a channel as the video source in a multi-party bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Set a channel as the video source in a multi-party mixing bridge. This operation has no effect on bridges with two or fewer participants.", + "nickname": "setVideoSource", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge or Channel not found" + }, + { + "code": 409, + "reason": "Channel not in Stasis application" + }, + { + "code": 422, + "reason": "Channel not in this Bridge" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/videoSource", + "description": "Removes any explicit video source", + "operations": [ + { + "httpMethod": "DELETE", + "summary": "Removes any explicit video source in a multi-party mixing bridge. This operation has no effect on bridges with two or fewer participants. When no explicit video source is set, talk detection will be used to determine the active video stream.", + "nickname": "clearVideoSource", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/moh", + "description": "Play music on hold to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play music on hold to a bridge or change the MOH class that is playing.", + "nickname": "startMoh", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "mohClass", + "description": "Channel's id", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing music on hold to a bridge.", + "notes": "This will only stop music on hold being played via POST bridges/{bridgeId}/moh.", + "nickname": "stopMoh", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/play", + "description": "Play media to the participants of a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media on a bridge.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "play", + "responseClass": "Playback", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "playbackId", + "description": "Playback Id.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/play/{playbackId}", + "description": "Play media to a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media on a bridge.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "playWithId", + "responseClass": "Playback", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + + } + ] + }, + { + "path": "/bridges/{bridgeId}/record", + "description": "Record audio on a bridge", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start a recording.", + "notes": "This records the mixed audio from all channels participating in this bridge.", + "nickname": "record", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Recording's filename", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "maxDurationSeconds", + "description": "Maximum duration of the recording, in seconds. 0 for no limit.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "maxSilenceSeconds", + "description": "Maximum duration of silence, in seconds. 0 for no limit.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "ifExists", + "description": "Action to take if a recording with the same name already exists.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "fail", + "allowableValues": { + "valueType": "LIST", + "values": [ + "fail", + "overwrite", + "append" + ] + } + }, + { + "name": "beep", + "description": "Play beep when recording begins", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "terminateOn", + "description": "DTMF input to terminate recording.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "any", + "*", + "#" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge is not in a Stasis application; A recording with the same name already exists on the system and can not be overwritten because it is in progress or ifExists=fail" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + } + ], + "models": { + "Bridge": { + "id": "Bridge", + "description": "The merging of media from one or more channels.\n\nEveryone on the bridge receives the same audio.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for this bridge", + "required": true + }, + "technology": { + "type": "string", + "description": "Name of the current bridging technology", + "required": true + }, + "bridge_type": { + "type": "string", + "description": "Type of bridge technology", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "mixing", + "holding" + ] + } + }, + "bridge_class": { + "type": "string", + "description": "Bridging class", + "required": true + }, + "creator": { + "type": "string", + "description": "Entity that created the bridge", + "required": true + }, + "name": { + "type": "string", + "description": "Name the creator gave the bridge", + "required": true + }, + "channels": { + "type": "List[string]", + "description": "Ids of channels participating in this bridge", + "required": true + }, + "video_mode": { + "type": "string", + "description": "The video mode the bridge is using. One of 'none', 'talker', 'sfu', or 'single'.", + "required": false + }, + "video_source_id": { + "type": "string", + "description": "The ID of the channel that is the source of video in this bridge, if one exists.", + "required": false + }, + "creationtime": { + "required": true, + "type": "Date", + "description": "Timestamp when bridge was created" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_7_0_1/channels.json b/codegen/src/main/resources/codegen-data/ari_7_0_1/channels.json new file mode 100644 index 00000000..269976df --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_7_0_1/channels.json @@ -0,0 +1,2194 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/channels.{format}", + "requiresModules": [ + "res_stasis_answer", + "res_stasis_playback", + "res_stasis_recording", + "res_stasis_snoop" + ], + "apis": [ + { + "path": "/channels", + "description": "Active channels", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all active channels in Asterisk.", + "nickname": "list", + "responseClass": "List[Channel]" + }, + { + "httpMethod": "POST", + "summary": "Create a new channel (originate).", + "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.", + "nickname": "originate", + "responseClass": "Channel", + "parameters": [ + { + "name": "endpoint", + "description": "Endpoint to call.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to dial after the endpoint answers. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to dial after the endpoint answers. If omitted, uses 'default'. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to dial after the endpoint answers. If omitted, uses 1. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "long" + }, + { + "name": "label", + "description": "The label to dial after the endpoint answers. Will supersede 'priority' if provided. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The application that is subscribed to the originated channel. When the channel is answered, it will be passed to this Stasis application. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "callerId", + "description": "CallerID to use when dialing the endpoint or extension.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 30 + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "The unique id of the channel which is originating this one.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "formats", + "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for originating a channel." + }, + { + "code": 409, + "reason": "Channel with given unique ID already exists." + } + ] + } + ] + }, + { + "path": "/channels/create", + "description": "Create a channel and place it in a Stasis app, but do not dial the channel yet.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Create channel.", + "nickname": "create", + "responseClass": "Channel", + "parameters": [ + { + "name": "endpoint", + "description": "Endpoint for channel communication", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "Stasis Application to place channel into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "Unique ID of the calling channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "formats", + "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 409, + "reason": "Channel with given unique ID already exists." + } + ] + } + ] + }, + { + "path": "/channels/{channelId}", + "description": "Active channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "Channel details.", + "nickname": "get", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + } + ] + }, + { + "httpMethod": "POST", + "summary": "Create a new channel (originate with id).", + "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.", + "nickname": "originateWithId", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "endpoint", + "description": "Endpoint to call.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to dial after the endpoint answers. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to dial after the endpoint answers. If omitted, uses 'default'. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to dial after the endpoint answers. If omitted, uses 1. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "long" + }, + { + "name": "label", + "description": "The label to dial after the endpoint answers. Will supersede 'priority' if provided. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The application that is subscribed to the originated channel. When the channel is answered, it will be passed to this Stasis application. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "callerId", + "description": "CallerID to use when dialing the endpoint or extension.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 30 + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "The unique id of the channel which is originating this one.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "formats", + "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for originating a channel." + }, + { + "code": 409, + "reason": "Channel with given unique ID already exists." + } + ] + + }, + { + "httpMethod": "DELETE", + "summary": "Delete (i.e. hangup) a channel.", + "nickname": "hangup", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "reason_code", + "description": "The reason code for hanging up the channel for detail use. Mutually exclusive with 'reason'. See detail hangup codes at here. https://wiki.asterisk.org/wiki/display/AST/Hangup+Cause+Mappings", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "reason", + "description": "Reason for hanging up the channel for simple use. Mutually exclusive with 'reason_code'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "normal", + "busy", + "congestion", + "no_answer", + "timeout", + "rejected", + "unallocated", + "normal_unspecified", + "number_incomplete", + "codec_mismatch", + "interworking", + "failure", + "answered_elsewhere" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid reason for hangup provided" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/continue", + "description": "Exit application; continue execution in the dialplan", + "operations": [ + { + "httpMethod": "POST", + "summary": "Exit application; continue execution in the dialplan.", + "nickname": "continueInDialplan", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "label", + "description": "The label to continue to - will supersede 'priority' if both are provided.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/move", + "description": "Move the channel from one Stasis application to another.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Move the channel from one Stasis application to another.", + "nickname": "move", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The channel will be passed to this Stasis application.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": "404", + "reason": "Channel not found" + }, + { + "code": "409", + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/redirect", + "description": "Inform the channel that it should redirect itself to a different location. Note that this will almost certainly cause the channel to exit the application.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Redirect the channel to a different location.", + "nickname": "redirect", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "endpoint", + "description": "The endpoint to redirect the channel to", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Endpoint parameter not provided" + }, + { + "code": 404, + "reason": "Channel or endpoint not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 422, + "reason": "Endpoint is not the same type as the channel" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/answer", + "description": "Answer a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Answer a channel.", + "nickname": "answer", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/ring", + "description": "Send a ringing indication to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Indicate ringing to a channel.", + "nickname": "ring", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop ringing indication on a channel if locally generated.", + "nickname": "ringStop", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/dtmf", + "description": "Send DTMF to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Send provided DTMF to a given channel.", + "nickname": "sendDTMF", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "dtmf", + "description": "DTMF To send.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "before", + "description": "Amount of time to wait before DTMF digits (specified in milliseconds) start.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0 + }, + { + "name": "between", + "description": "Amount of time in between DTMF digits (specified in milliseconds).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 100 + }, + { + "name": "duration", + "description": "Length of each DTMF digit (specified in milliseconds).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 100 + }, + { + "name": "after", + "description": "Amount of time to wait after DTMF digits (specified in milliseconds) end.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0 + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "DTMF is required" + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/mute", + "description": "Mute a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Mute a channel.", + "nickname": "mute", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "Direction in which to mute audio", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both", + "in", + "out" + ] + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unmute a channel.", + "nickname": "unmute", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "Direction in which to unmute audio", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both", + "in", + "out" + ] + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/hold", + "description": "Put a channel on hold", + "operations": [ + { + "httpMethod": "POST", + "summary": "Hold a channel.", + "nickname": "hold", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Remove a channel from hold.", + "nickname": "unhold", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/moh", + "description": "Play music on hold to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play music on hold to a channel.", + "notes": "Using media operations such as /play on a channel playing MOH in this manner will suspend MOH without resuming automatically. If continuing music on hold is desired, the stasis application must reinitiate music on hold.", + "nickname": "startMoh", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "mohClass", + "description": "Music on hold class to use", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing music on hold to a channel.", + "nickname": "stopMoh", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/silence", + "description": "Play silence to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play silence to a channel.", + "notes": "Using media operations such as /play on a channel playing silence in this manner will suspend silence without resuming automatically.", + "nickname": "startSilence", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing silence to a channel.", + "nickname": "stopSilence", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/play", + "description": "Play media to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "play", + "responseClass": "Playback", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000 + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/play/{playbackId}", + "description": "Play media to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start playback of media and specify the playbackId.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "playWithId", + "responseClass": "Playback", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000 + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/record", + "description": "Record audio from a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start a recording.", + "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.", + "nickname": "record", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Recording's filename", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "maxDurationSeconds", + "description": "Maximum duration of the recording, in seconds. 0 for no limit", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "maxSilenceSeconds", + "description": "Maximum duration of silence, in seconds. 0 for no limit", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "ifExists", + "description": "Action to take if a recording with the same name already exists.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "fail", + "allowableValues": { + "valueType": "LIST", + "values": [ + "fail", + "overwrite", + "append" + ] + } + }, + { + "name": "beep", + "description": "Play beep when recording begins", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "terminateOn", + "description": "DTMF input to terminate recording", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "any", + "*", + "#" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "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" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/variable", + "description": "Variables on a channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the value of a channel variable or function.", + "nickname": "getChannelVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The channel variable or function to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Channel or variable not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "POST", + "summary": "Set the value of a channel variable or function.", + "nickname": "setChannelVar", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The channel variable or function to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/snoop", + "description": "Snoop (spy/whisper) on a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start snooping.", + "notes": "Snoop (spy/whisper) on a specific channel.", + "nickname": "snoopChannel", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "spy", + "description": "Direction of audio to spy on", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "whisper", + "description": "Direction of audio to whisper into", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "app", + "description": "Application the snooping channel is placed into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "snoopId", + "description": "Unique ID to assign to snooping channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/snoop/{snoopId}", + "description": "Snoop (spy/whisper) on a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start snooping.", + "notes": "Snoop (spy/whisper) on a specific channel.", + "nickname": "snoopChannelWithId", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "snoopId", + "description": "Unique ID to assign to snooping channel", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "spy", + "description": "Direction of audio to spy on", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "whisper", + "description": "Direction of audio to whisper into", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "app", + "description": "Application the snooping channel is placed into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/dial", + "description": "Dial a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Dial a created channel.", + "nickname": "dial", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "caller", + "description": "Channel ID of caller", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Dial timeout", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel cannot be found." + }, + { + "code": 409, + "reason": "Channel cannot be dialed." + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/rtp_statistics", + "description": "Get RTP statistics information for RTP on a channel", + "operations": [ + { + "httpMethod": "GET", + "summary": "RTP stats on a channel.", + "nickname": "rtpstatistics", + "responseClass": "RTPstat", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel cannot be found." + } + ] + } + ] + }, + { + "path": "/channels/externalMedia", + "description": "Create a channel to an External Media source/sink.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Start an External Media session.", + "notes": "Create a channel to an External Media source/sink.", + "nickname": "externalMedia", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "Stasis Application to place channel into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "external_host", + "description": "Hostname/ip:port of external host", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "encapsulation", + "description": "Payload encapsulation protocol", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "rtp", + "allowableValues": { + "valueType": "LIST", + "values": [ + "rtp", + "audiosocket" + ] + } + }, + { + "name": "transport", + "description": "Transport protocol", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "udp", + "allowableValues": { + "valueType": "LIST", + "values": [ + "udp", + "tcp" + ] + } + }, + { + "name": "connection_type", + "description": "Connection type (client/server)", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "client", + "allowableValues": { + "valueType": "LIST", + "values": [ + "client" + ] + } + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "External media direction", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both" + ] + } + }, + { + "name": "data", + "description": "An arbitrary data field", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 409, + "reason": "Channel is not in a Stasis application; Channel is already bridged" + } + ] + } + ] + } + ], + "models": { + "Dialed": { + "id": "Dialed", + "description": "Dialed channel information.", + "properties": {} + }, + "DialplanCEP": { + "id": "DialplanCEP", + "description": "Dialplan location (context/extension/priority)", + "properties": { + "context": { + "required": true, + "type": "string", + "description": "Context in the dialplan" + }, + "exten": { + "required": true, + "type": "string", + "description": "Extension in the dialplan" + }, + "priority": { + "required": true, + "type": "long", + "description": "Priority in the dialplan" + }, + "app_name": { + "required": true, + "type": "string", + "description": "Name of current dialplan application" + }, + "app_data": { + "required": true, + "type": "string", + "description": "Parameter of current dialplan application" + } + } + }, + "CallerID": { + "id": "CallerID", + "description": "Caller identification", + "properties": { + "name": { + "required": true, + "type": "string" + }, + "number": { + "required": true, + "type": "string" + } + } + }, + "RTPstat": { + "id": "RTPstat", + "description": "A statistics of a RTP.", + "properties": { + "txcount": { + "required": true, + "type": "int", + "description": "Number of packets transmitted." + }, + "rxcount": { + "required": true, + "type": "int", + "description": "Number of packets received." + }, + "txjitter": { + "required": false, + "type": "double", + "description": "Jitter on transmitted packets." + }, + "rxjitter": { + "required": false, + "type": "double", + "description": "Jitter on received packets." + }, + "remote_maxjitter": { + "required": false, + "type": "double", + "description": "Maximum jitter on remote side." + }, + "remote_minjitter": { + "required": false, + "type": "double", + "description": "Minimum jitter on remote side." + }, + "remote_normdevjitter": { + "required": false, + "type": "double", + "description": "Average jitter on remote side." + }, + "remote_stdevjitter": { + "required": false, + "type": "double", + "description": "Standard deviation jitter on remote side." + }, + "local_maxjitter": { + "required": false, + "type": "double", + "description": "Maximum jitter on local side." + }, + "local_minjitter": { + "required": false, + "type": "double", + "description": "Minimum jitter on local side." + }, + "local_normdevjitter": { + "required": false, + "type": "double", + "description": "Average jitter on local side." + }, + "local_stdevjitter": { + "required": false, + "type": "double", + "description": "Standard deviation jitter on local side." + }, + "txploss": { + "required": true, + "type": "int", + "description": "Number of transmitted packets lost." + }, + "rxploss": { + "required": true, + "type": "int", + "description": "Number of received packets lost." + }, + "remote_maxrxploss": { + "required": false, + "type": "double", + "description": "Maximum number of packets lost on remote side." + }, + "remote_minrxploss": { + "required": false, + "type": "double", + "description": "Minimum number of packets lost on remote side." + }, + "remote_normdevrxploss": { + "required": false, + "type": "double", + "description": "Average number of packets lost on remote side." + }, + "remote_stdevrxploss": { + "required": false, + "type": "double", + "description": "Standard deviation packets lost on remote side." + }, + "local_maxrxploss": { + "required": false, + "type": "double", + "description": "Maximum number of packets lost on local side." + }, + "local_minrxploss": { + "required": false, + "type": "double", + "description": "Minimum number of packets lost on local side." + }, + "local_normdevrxploss": { + "required": false, + "type": "double", + "description": "Average number of packets lost on local side." + }, + "local_stdevrxploss": { + "required": false, + "type": "double", + "description": "Standard deviation packets lost on local side." + }, + "rtt": { + "required": false, + "type": "double", + "description": "Total round trip time." + }, + "maxrtt": { + "required": false, + "type": "double", + "description": "Maximum round trip time." + }, + "minrtt": { + "required": false, + "type": "double", + "description": "Minimum round trip time." + }, + "normdevrtt": { + "required": false, + "type": "double", + "description": "Average round trip time." + }, + "stdevrtt": { + "required": false, + "type": "double", + "description": "Standard deviation round trip time." + }, + "local_ssrc": { + "required": true, + "type": "int", + "description": "Our SSRC." + }, + "remote_ssrc": { + "required": true, + "type": "int", + "description": "Their SSRC." + }, + "txoctetcount": { + "required": true, + "type": "int", + "description": "Number of octets transmitted." + }, + "rxoctetcount": { + "required": true, + "type": "int", + "description": "Number of octets received." + }, + "channel_uniqueid": { + "required": true, + "type": "string", + "description": "The Asterisk channel's unique ID that owns this instance." + } + } + }, + "Channel": { + "id": "Channel", + "description": "A specific communication connection between Asterisk and an Endpoint.", + "properties": { + "id": { + "required": true, + "type": "string", + "description": "Unique identifier of the channel.\n\nThis is the same as the Uniqueid field in AMI." + }, + "protocol_id": { + "required": true, + "type": "string", + "description": "Protocol id from underlying channel driver (i.e. Call-ID for chan_sip/chan_pjsip; will be empty if not applicable or not implemented by driver)." + }, + "name": { + "required": true, + "type": "string", + "description": "Name of the channel (i.e. SIP/foo-0000a7e3)" + }, + "state": { + "required": true, + "type": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "Down", + "Rsrved", + "OffHook", + "Dialing", + "Ring", + "Ringing", + "Up", + "Busy", + "Dialing Offhook", + "Pre-ring", + "Unknown" + ] + } + }, + "caller": { + "required": true, + "type": "CallerID" + }, + "connected": { + "required": true, + "type": "CallerID" + }, + "accountcode": { + "required": true, + "type": "string" + }, + "dialplan": { + "required": true, + "type": "DialplanCEP", + "description": "Current location in the dialplan" + }, + "creationtime": { + "required": true, + "type": "Date", + "description": "Timestamp when channel was created" + }, + "language": { + "required": true, + "type": "string", + "description": "The default spoken language" + }, + "channelvars": { + "required": false, + "type": "object", + "description": "Channel variables" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_7_0_1/deviceStates.json b/codegen/src/main/resources/codegen-data/ari_7_0_1/deviceStates.json new file mode 100644 index 00000000..bd389355 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_7_0_1/deviceStates.json @@ -0,0 +1,154 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "Kevin Harwell ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/deviceStates.{format}", + "requiresModules": [ + "res_stasis_device_state" + ], + "apis": [ + { + "path": "/deviceStates", + "description": "Device states", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all ARI controlled device states.", + "nickname": "list", + "responseClass": "List[DeviceState]" + } + ] + }, + { + "path": "/deviceStates/{deviceName}", + "description": "Device state", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve the current state of a device.", + "nickname": "get", + "responseClass": "DeviceState", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Change the state of a device controlled by ARI. (Note - implicitly creates the device state).", + "nickname": "update", + "responseClass": "void", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "deviceState", + "description": "Device state value", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "NOT_INUSE", + "INUSE", + "BUSY", + "INVALID", + "UNAVAILABLE", + "RINGING", + "RINGINUSE", + "ONHOLD" + ] + } + + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Device name is missing" + }, + { + "code": 409, + "reason": "Uncontrolled device specified" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Destroy a device-state controlled by ARI.", + "nickname": "delete", + "responseClass": "void", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Device name is missing" + }, + { + "code": 409, + "reason": "Uncontrolled device specified" + } + ] + } + ] + } + ], + "models": { + "DeviceState": { + "id": "DeviceState", + "description": "Represents the state of a device.", + "properties": { + "name": { + "type": "string", + "description": "Name of the device.", + "required": true + }, + "state": { + "type": "string", + "description": "Device's state", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "UNKNOWN", + "NOT_INUSE", + "INUSE", + "BUSY", + "INVALID", + "UNAVAILABLE", + "RINGING", + "RINGINUSE", + "ONHOLD" + ] + } + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_7_0_1/endpoints.json b/codegen/src/main/resources/codegen-data/ari_7_0_1/endpoints.json new file mode 100644 index 00000000..1f77d370 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_7_0_1/endpoints.json @@ -0,0 +1,263 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/endpoints.{format}", + "apis": [ + { + "path": "/endpoints", + "description": "Asterisk endpoints", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all endpoints.", + "nickname": "list", + "responseClass": "List[Endpoint]" + } + ] + }, + { + "path": "/endpoints/sendMessage", + "description": "Send a message to some technology URI or endpoint.", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Send a message to some technology URI or endpoint.", + "nickname": "sendMessage", + "responseClass": "void", + "parameters": [ + { + "name": "to", + "description": "The endpoint resource or technology specific URI to send the message to. Valid resources are sip, pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "from", + "description": "The endpoint resource or technology specific identity to send this message from. Valid resources are sip, pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "body", + "description": "The body of the message", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "descriptioni": "The \"variables\" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, pjsip and sip resource types will add the key/value pairs as SIP headers,", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoint not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}", + "description": "Asterisk endpoints", + "operations": [ + { + "httpMethod": "GET", + "summary": "List available endoints for a given endpoint technology.", + "nickname": "listByTech", + "responseClass": "List[Endpoint]", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoints (sip,iax2,...)", + "paramType": "path", + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Endpoints not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}/{resource}", + "description": "Single endpoint", + "operations": [ + { + "httpMethod": "GET", + "summary": "Details for an endpoint.", + "nickname": "get", + "responseClass": "Endpoint", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "resource", + "description": "ID of the endpoint", + "paramType": "path", + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoints not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}/{resource}/sendMessage", + "description": "Send a message to some endpoint in a technology.", + "operations": [ + { + "httpMethod": "PUT", + "summary": "Send a message to some endpoint in a technology.", + "nickname": "sendMessageToEndpoint", + "responseClass": "void", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "resource", + "description": "ID of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "from", + "description": "The endpoint resource or technology specific identity to send this message from. Valid resources are sip, pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "body", + "description": "The body of the message", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "descriptioni": "The \"variables\" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, pjsip and sip resource types will add the key/value pairs as SIP headers,", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoint not found" + } + ] + } + ] + } + ], + "models": { + "Endpoint": { + "id": "Endpoint", + "description": "An external device that may offer/accept calls to/from Asterisk.\n\nUnlike most resources, which have a single unique identifier, an endpoint is uniquely identified by the technology/resource pair.", + "properties": { + "technology": { + "type": "string", + "description": "Technology of the endpoint", + "required": true + }, + "resource": { + "type": "string", + "description": "Identifier of the endpoint, specific to the given technology.", + "required": true + }, + "state": { + "type": "string", + "description": "Endpoint's state", + "required": false, + "allowableValues": { + "valueType": "LIST", + "values": [ + "unknown", + "offline", + "online" + ] + } + }, + "channel_ids": { + "type": "List[string]", + "description": "Id's of channels associated with this endpoint", + "required": true + } + } + }, + "TextMessage": { + "id": "TextMessage", + "description": "A text message.", + "properties": { + "from": { + "type": "string", + "description": "A technology specific URI specifying the source of the message. For sip and pjsip technologies, any SIP URI can be specified. For xmpp, the URI must correspond to the client connection being used to send the message.", + "required": true + }, + "to": { + "type": "string", + "description": "A technology specific URI specifying the destination of the message. Valid technologies include sip, pjsip, and xmp. The destination of a message should be an endpoint.", + "required": true + }, + "body": { + "type": "string", + "description": "The text of the message.", + "required": true + }, + "variables": { + "type": "object", + "description": "Technology specific key/value pairs (JSON object) associated with the message.", + "required": false + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_7_0_1/events.json b/codegen/src/main/resources/codegen-data/ari_7_0_1/events.json new file mode 100644 index 00000000..c9822f6c --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_7_0_1/events.json @@ -0,0 +1,918 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.2", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/events.{format}", + "requiresModules": [ + "res_http_websocket" + ], + "apis": [ + { + "path": "/events", + "description": "Events from Asterisk to applications", + "operations": [ + { + "httpMethod": "GET", + "upgrade": "websocket", + "websocketProtocol": "ari", + "summary": "WebSocket connection for events.", + "nickname": "eventWebsocket", + "responseClass": "Message", + "parameters": [ + { + "name": "app", + "description": "Applications to subscribe to.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "subscribeAll", + "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'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean" + } + ] + } + ] + }, + { + "path": "/events/user/{eventName}", + "description": "Stasis application user events", + "operations": [ + { + "httpMethod": "POST", + "summary": "Generate a user event.", + "nickname": "userEvent", + "responseClass": "void", + "parameters": [ + { + "name": "eventName", + "description": "Event name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "application", + "description": "The name of the application that will receive this event", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "source", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}/{resource}, deviceState:{deviceName}", + "paramType": "query", + "required": false, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds custom key/value pairs to add to the user event. Ex. { \"variables\": { \"key\": \"value\" } }", + "paramType": "body", + "required": false, + "allowMultiple": false, + "dataType": "containers" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 422, + "reason": "Event source not found." + }, + { + "code": 400, + "reason": "Invalid even tsource URI or userevent data." + } + ] + } + ] + } + ], + "models": { + "Message": { + "id": "Message", + "description": "Base type for errors and events", + "discriminator": "type", + "properties": { + "type": { + "type": "string", + "required": true, + "description": "Indicates the type of this message." + }, + "asterisk_id": { + "type": "string", + "required": false, + "description": "The unique ID for the Asterisk instance that raised this event." + } + }, + "subTypes": [ + "MissingParams", + "Event" + ] + }, + "MissingParams": { + "id": "MissingParams", + "description": "Error event sent when required params are missing.", + "properties": { + "params": { + "required": true, + "type": "List[string]", + "description": "A list of the missing parameters" + } + } + }, + "Event": { + "id": "Event", + "description": "Base type for asynchronous events from Asterisk.", + "properties": { + "application": { + "type": "string", + "description": "Name of the application receiving the event.", + "required": true + }, + "timestamp": { + "type": "Date", + "description": "Time at which this event was created.", + "required": true + } + }, + "subTypes": [ + "DeviceStateChanged", + "PlaybackStarted", + "PlaybackContinuing", + "PlaybackFinished", + "RecordingStarted", + "RecordingFinished", + "RecordingFailed", + "ApplicationMoveFailed", + "ApplicationReplaced", + "BridgeCreated", + "BridgeDestroyed", + "BridgeMerged", + "BridgeBlindTransfer", + "BridgeAttendedTransfer", + "BridgeVideoSourceChanged", + "ChannelCreated", + "ChannelDestroyed", + "ChannelEnteredBridge", + "ChannelLeftBridge", + "ChannelStateChange", + "ChannelDtmfReceived", + "ChannelDialplan", + "ChannelCallerId", + "ChannelUserevent", + "ChannelHangupRequest", + "ChannelVarset", + "ChannelTalkingStarted", + "ChannelTalkingFinished", + "ChannelHold", + "ChannelUnhold", + "ContactStatusChange", + "EndpointStateChange", + "Dial", + "StasisEnd", + "StasisStart", + "TextMessageReceived", + "ChannelConnectedLine", + "PeerStatusChange" + ] + }, + "ContactInfo": { + "id": "ContactInfo", + "description": "Detailed information about a contact on an endpoint.", + "properties": { + "uri": { + "type": "string", + "description": "The location of the contact.", + "required": true + }, + "contact_status": { + "type": "string", + "description": "The current status of the contact.", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "Unreachable", + "Reachable", + "Unknown", + "NonQualified", + "Removed" + ] + } + }, + "aor": { + "type": "string", + "description": "The Address of Record this contact belongs to.", + "required": true + }, + "roundtrip_usec": { + "type": "string", + "description": "Current round trip time, in microseconds, for the contact.", + "required": false + } + } + }, + "Peer": { + "id": "Peer", + "description": "Detailed information about a remote peer that communicates with Asterisk.", + "properties": { + "peer_status": { + "type": "string", + "description": "The current state of the peer. Note that the values of the status are dependent on the underlying peer technology.", + "required": true + }, + "cause": { + "type": "string", + "description": "An optional reason associated with the change in peer_status.", + "required": false + }, + "address": { + "type": "string", + "description": "The IP address of the peer.", + "required": false + }, + "port": { + "type": "string", + "description": "The port of the peer.", + "required": false + }, + "time": { + "type": "string", + "description": "The last known time the peer was contacted.", + "required": false + } + } + }, + "DeviceStateChanged": { + "id": "DeviceStateChanged", + "description": "Notification that a device state has changed.", + "properties": { + "device_state": { + "type": "DeviceState", + "description": "Device state object", + "required": true + } + } + }, + "PlaybackStarted": { + "id": "PlaybackStarted", + "description": "Event showing the start of a media playback operation.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "PlaybackContinuing": { + "id": "PlaybackContinuing", + "description": "Event showing the continuation of a media playback operation from one media URI to the next in the list.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "PlaybackFinished": { + "id": "PlaybackFinished", + "description": "Event showing the completion of a media playback operation.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "RecordingStarted": { + "id": "RecordingStarted", + "description": "Event showing the start of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "RecordingFinished": { + "id": "RecordingFinished", + "description": "Event showing the completion of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "RecordingFailed": { + "id": "RecordingFailed", + "description": "Event showing failure of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "ApplicationMoveFailed": { + "id": "ApplicationMoveFailed", + "description": "Notification that trying to move a channel to another Stasis application failed.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + }, + "destination": { + "required": true, + "type": "string" + }, + "args": { + "required": true, + "type": "List[string]", + "description": "Arguments to the application" + } + } + }, + "ApplicationReplaced": { + "id": "ApplicationReplaced", + "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.", + "properties": {} + }, + "BridgeCreated": { + "id": "BridgeCreated", + "description": "Notification that a bridge has been created.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeDestroyed": { + "id": "BridgeDestroyed", + "description": "Notification that a bridge has been destroyed.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeMerged": { + "id": "BridgeMerged", + "description": "Notification that one bridge has merged into another.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "bridge_from": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeVideoSourceChanged": { + "id": "BridgeVideoSourceChanged", + "description": "Notification that the source of video in a bridge has changed.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "old_video_source_id": { + "required": false, + "type": "string" + } + } + }, + "BridgeBlindTransfer": { + "id": "BridgeBlindTransfer", + "description": "Notification that a blind transfer has occurred.", + "properties": { + "channel": { + "description": "The channel performing the blind transfer", + "required": true, + "type": "Channel" + }, + "replace_channel": { + "description": "The channel that is replacing transferer when the transferee(s) can not be transferred directly", + "required": false, + "type": "Channel" + }, + "transferee": { + "description": "The channel that is being transferred", + "required": false, + "type": "Channel" + }, + "exten": { + "description": "The extension transferred to", + "required": true, + "type": "string" + }, + "context": { + "description": "The context transferred to", + "required": true, + "type": "string" + }, + "result": { + "description": "The result of the transfer attempt", + "required": true, + "type": "string" + }, + "is_external": { + "description": "Whether the transfer was externally initiated or not", + "required": true, + "type": "boolean" + }, + "bridge": { + "description": "The bridge being transferred", + "type": "Bridge" + } + } + }, + "BridgeAttendedTransfer": { + "id": "BridgeAttendedTransfer", + "description": "Notification that an attended transfer has occurred.", + "properties": { + "transferer_first_leg": { + "description": "First leg of the transferer", + "required": true, + "type": "Channel" + }, + "transferer_second_leg": { + "description": "Second leg of the transferer", + "required": true, + "type": "Channel" + }, + "replace_channel": { + "description": "The channel that is replacing transferer_first_leg in the swap", + "required": false, + "type": "Channel" + }, + "transferee": { + "description": "The channel that is being transferred", + "required": false, + "type": "Channel" + }, + "transfer_target": { + "description": "The channel that is being transferred to", + "required": false, + "type": "Channel" + }, + "result": { + "description": "The result of the transfer attempt", + "required": true, + "type": "string" + }, + "is_external": { + "description": "Whether the transfer was externally initiated or not", + "required": true, + "type": "boolean" + }, + "transferer_first_leg_bridge": { + "description": "Bridge the transferer first leg is in", + "type": "Bridge" + }, + "transferer_second_leg_bridge": { + "description": "Bridge the transferer second leg is in", + "type": "Bridge" + }, + "destination_type": { + "description": "How the transfer was accomplished", + "required": true, + "type": "string" + }, + "destination_bridge": { + "description": "Bridge that survived the merge result", + "type": "string" + }, + "destination_application": { + "description": "Application that has been transferred into", + "type": "string" + }, + "destination_link_first_leg": { + "description": "First leg of a link transfer result", + "type": "Channel" + }, + "destination_link_second_leg": { + "description": "Second leg of a link transfer result", + "type": "Channel" + }, + "destination_threeway_channel": { + "description": "Transferer channel that survived the threeway result", + "type": "Channel" + }, + "destination_threeway_bridge": { + "description": "Bridge that survived the threeway result", + "type": "Bridge" + } + } + }, + "ChannelCreated": { + "id": "ChannelCreated", + "description": "Notification that a channel has been created.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelDestroyed": { + "id": "ChannelDestroyed", + "description": "Notification that a channel has been destroyed.", + "properties": { + "cause": { + "required": true, + "description": "Integer representation of the cause of the hangup", + "type": "int" + }, + "cause_txt": { + "required": true, + "description": "Text representation of the cause of the hangup", + "type": "string" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelEnteredBridge": { + "id": "ChannelEnteredBridge", + "description": "Notification that a channel has entered a bridge.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "channel": { + "type": "Channel" + } + } + }, + "ChannelLeftBridge": { + "id": "ChannelLeftBridge", + "description": "Notification that a channel has left a bridge.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelStateChange": { + "id": "ChannelStateChange", + "description": "Notification of a channel's state change.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelDtmfReceived": { + "id": "ChannelDtmfReceived", + "description": "DTMF received on a channel.\n\nThis event is sent when the DTMF ends. There is no notification about the start of DTMF", + "properties": { + "digit": { + "required": true, + "type": "string", + "description": "DTMF digit received (0-9, A-E, # or *)" + }, + "duration_ms": { + "required": true, + "type": "int", + "description": "Number of milliseconds DTMF was received" + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which DTMF was received" + } + } + }, + "ChannelDialplan": { + "id": "ChannelDialplan", + "description": "Channel changed location in the dialplan.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that changed dialplan location." + }, + "dialplan_app": { + "required": true, + "type": "string", + "description": "The application about to be executed." + }, + "dialplan_app_data": { + "required": true, + "type": "string", + "description": "The data to be passed to the application." + } + } + }, + "ChannelCallerId": { + "id": "ChannelCallerId", + "description": "Channel changed Caller ID.", + "properties": { + "caller_presentation": { + "required": true, + "type": "int", + "description": "The integer representation of the Caller Presentation value." + }, + "caller_presentation_txt": { + "required": true, + "type": "string", + "description": "The text representation of the Caller Presentation value." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that changed Caller ID." + } + } + }, + "ChannelUserevent": { + "id": "ChannelUserevent", + "description": "User-generated event with additional user-defined fields in the object.", + "properties": { + "eventname": { + "required": true, + "type": "string", + "description": "The name of the user event." + }, + "channel": { + "required": false, + "type": "Channel", + "description": "A channel that is signaled with the user event." + }, + "bridge": { + "required": false, + "type": "Bridge", + "description": "A bridge that is signaled with the user event." + }, + "endpoint": { + "required": false, + "type": "Endpoint", + "description": "A endpoint that is signaled with the user event." + }, + "userevent": { + "required": true, + "type": "object", + "description": "Custom Userevent data" + } + } + }, + "ChannelHangupRequest": { + "id": "ChannelHangupRequest", + "description": "A hangup was requested on the channel.", + "properties": { + "cause": { + "type": "int", + "description": "Integer representation of the cause of the hangup." + }, + "soft": { + "type": "boolean", + "description": "Whether the hangup request was a soft hangup request." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which the hangup was requested." + } + } + }, + "ChannelVarset": { + "id": "ChannelVarset", + "description": "Channel variable changed.", + "properties": { + "variable": { + "required": true, + "type": "string", + "description": "The variable that changed." + }, + "value": { + "required": true, + "type": "string", + "description": "The new value of the variable." + }, + "channel": { + "required": false, + "type": "Channel", + "description": "The channel on which the variable was set.\n\nIf missing, the variable is a global variable." + } + } + }, + "ChannelHold": { + "id": "ChannelHold", + "description": "A channel initiated a media hold.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that initiated the hold event." + }, + "musicclass": { + "required": false, + "type": "string", + "description": "The music on hold class that the initiator requested." + } + } + }, + "ChannelUnhold": { + "id": "ChannelUnhold", + "description": "A channel initiated a media unhold.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that initiated the unhold event." + } + } + }, + "ChannelTalkingStarted": { + "id": "ChannelTalkingStarted", + "description": "Talking was detected on the channel.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which talking started." + } + } + }, + "ChannelTalkingFinished": { + "id": "ChannelTalkingFinished", + "description": "Talking is no longer detected on the channel.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which talking completed." + }, + "duration": { + "required": true, + "type": "int", + "description": "The length of time, in milliseconds, that talking was detected on the channel" + } + } + }, + "ContactStatusChange": { + "id": "ContactStatusChange", + "description": "The state of a contact on an endpoint has changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + }, + "contact_info": { + "required": true, + "type": "ContactInfo" + } + } + }, + "PeerStatusChange": { + "id": "PeerStatusChange", + "description": "The state of a peer associated with an endpoint has changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + }, + "peer": { + "required": true, + "type": "Peer" + } + } + }, + "EndpointStateChange": { + "id": "EndpointStateChange", + "description": "Endpoint state changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + } + } + }, + "Dial": { + "id": "Dial", + "description": "Dialing state has changed.", + "properties": { + "caller": { + "required": false, + "type": "Channel", + "description": "The calling channel." + }, + "peer": { + "required": true, + "type": "Channel", + "description": "The dialed channel." + }, + "forward": { + "required": false, + "type": "string", + "description": "Forwarding target requested by the original dialed channel." + }, + "forwarded": { + "required": false, + "type": "Channel", + "description": "Channel that the caller has been forwarded to." + }, + "dialstring": { + "required": false, + "type": "string", + "description": "The dial string for calling the peer channel." + }, + "dialstatus": { + "required": true, + "type": "string", + "description": "Current status of the dialing attempt to the peer." + } + } + }, + "StasisEnd": { + "id": "StasisEnd", + "description": "Notification that a channel has left a Stasis application.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "StasisStart": { + "id": "StasisStart", + "description": "Notification that a channel has entered a Stasis application.", + "properties": { + "args": { + "required": true, + "type": "List[string]", + "description": "Arguments to the application" + }, + "channel": { + "required": true, + "type": "Channel" + }, + "replace_channel": { + "required": false, + "type": "Channel" + } + } + }, + "TextMessageReceived": { + "id": "TextMessageReceived", + "description": "A text message was received from an endpoint.", + "properties": { + "message": { + "required": true, + "type": "TextMessage" + }, + "endpoint": { + "required": false, + "type": "Endpoint" + } + } + }, + "ChannelConnectedLine": { + "id": "ChannelConnectedLine", + "description": "Channel changed Connected Line.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel whose connected line has changed." + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_7_0_1/mailboxes.json b/codegen/src/main/resources/codegen-data/ari_7_0_1/mailboxes.json new file mode 100644 index 00000000..8f5941b8 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_7_0_1/mailboxes.json @@ -0,0 +1,137 @@ +{ + "_copyright": "Copyright (C) 2013, Digium, Inc.", + "_author": "Jonathan Rose ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/mailboxes.{format}", + "requiresModules": [ + "res_stasis_mailbox" + ], + "apis": [ + { + "path": "/mailboxes", + "description": "Mailboxes", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all mailboxes.", + "nickname": "list", + "responseClass": "List[Mailbox]" + } + ] + }, + { + "path": "/mailboxes/{mailboxName}", + "description": "Mailbox state", + "operations": [ + { + "httpMethod": "GET", + "summary": "Retrieve the current state of a mailbox.", + "nickname": "get", + "responseClass": "Mailbox", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + }, + { + "httpMethod": "PUT", + "summary": "Change the state of a mailbox. (Note - implicitly creates the mailbox).", + "nickname": "update", + "responseClass": "void", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "oldMessages", + "description": "Count of old messages in the mailbox", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "newMessages", + "description": "Count of new messages in the mailbox", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "int" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Destroy a mailbox.", + "nickname": "delete", + "responseClass": "void", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + } + ] + } + ], + "models": { + "Mailbox": { + "id": "Mailbox", + "description": "Represents the state of a mailbox.", + "properties": { + "name": { + "type": "string", + "description": "Name of the mailbox.", + "required": true + }, + "old_messages": { + "type": "int", + "description": "Count of old messages in the mailbox.", + "required": true + }, + "new_messages": { + "type": "int", + "description": "Count of new messages in the mailbox.", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_7_0_1/playbacks.json b/codegen/src/main/resources/codegen-data/ari_7_0_1/playbacks.json new file mode 100644 index 00000000..793986fc --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_7_0_1/playbacks.json @@ -0,0 +1,165 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/playbacks.{format}", + "requiresModules": [ + "res_stasis_playback" + ], + "apis": [ + { + "path": "/playbacks/{playbackId}", + "description": "Control object for a playback operation.", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a playback's details.", + "nickname": "get", + "responseClass": "Playback", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "The playback cannot be found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop a playback.", + "nickname": "stop", + "responseClass": "void", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "The playback cannot be found" + } + ] + } + ] + }, + { + "path": "/playbacks/{playbackId}/control", + "description": "Control object for a playback operation.", + "operations": [ + { + "httpMethod": "POST", + "summary": "Control a playback.", + "nickname": "control", + "responseClass": "void", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "operation", + "description": "Operation to perform on the playback.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "restart", + "pause", + "unpause", + "reverse", + "forward" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "The provided operation parameter was invalid" + }, + { + "code": 404, + "reason": "The playback cannot be found" + }, + { + "code": 409, + "reason": "The operation cannot be performed in the playback's current state" + } +] + } + ] + } + ], + "models": { + "Playback": { + "id": "Playback", + "description": "Object representing the playback of media to a channel", + "properties": { + "id": { + "type": "string", + "description": "ID for this playback operation", + "required": true + }, + "media_uri": { + "type": "string", + "description": "The URI for the media currently being played back.", + "required": true + }, + "next_media_uri": { + "type": "string", + "description": "If a list of URIs is being played, the next media URI to be played back.", + "required": false + }, + "target_uri": { + "type": "string", + "description": "URI for the channel or bridge to play the media on", + "required": true + }, + "language": { + "type": "string", + "description": "For media types that support multiple languages, the language requested for playback." + }, + "state": { + "type": "string", + "description": "Current state of the playback operation.", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "queued", + "playing", + "continuing", + "done", + "failed" + ] + } + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_7_0_1/recordings.json b/codegen/src/main/resources/codegen-data/ari_7_0_1/recordings.json new file mode 100644 index 00000000..6ffd6d8e --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_7_0_1/recordings.json @@ -0,0 +1,413 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/recordings.{format}", + "requiresModules": [ + "res_stasis_recording" + ], + "apis": [ + { + "path": "/recordings/stored", + "description": "Recordings", + "operations": [ + { + "httpMethod": "GET", + "summary": "List recordings that are complete.", + "nickname": "listStored", + "responseClass": "List[StoredRecording]" + } + ] + }, + { + "path": "/recordings/stored/{recordingName}", + "description": "Individual recording", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a stored recording's details.", + "nickname": "getStored", + "responseClass": "StoredRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Delete a stored recording.", + "nickname": "deleteStored", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/stored/{recordingName}/file", + "description": "The actual file associated with the stored recording", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get the file associated with the stored recording.", + "nickname": "getStoredFile", + "responseClass": "binary", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 403, + "reason": "The recording file could not be opened" + }, + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/stored/{recordingName}/copy", + "description": "Copy an individual recording", + "operations": [ + { + "httpMethod": "POST", + "summary": "Copy a stored recording.", + "nickname": "copyStored", + "responseClass": "StoredRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording to copy", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "destinationRecordingName", + "description": "The destination name of the recording", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "A recording with the same name already exists on the system" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}", + "description": "A recording that is in progress", + "operations": [ + { + "httpMethod": "GET", + "summary": "List live recordings.", + "nickname": "getLive", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop a live recording and discard it.", + "nickname": "cancel", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/stop", + "operations": [ + { + "httpMethod": "POST", + "summary": "Stop a live recording and store it.", + "nickname": "stop", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/pause", + "operations": [ + { + "httpMethod": "POST", + "summary": "Pause a live recording.", + "notes": "Pausing a recording suspends silence detection, which will be restarted when the recording is unpaused. Paused time is not included in the accounting for maxDurationSeconds.", + "nickname": "pause", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unpause a live recording.", + "nickname": "unpause", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/mute", + "operations": [ + { + "httpMethod": "POST", + "summary": "Mute a live recording.", + "notes": "Muting a recording suspends silence detection, which will be restarted when the recording is unmuted.", + "nickname": "mute", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Unmute a live recording.", + "nickname": "unmute", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + } + ] + } + ], + "models": { + "StoredRecording": { + "id": "StoredRecording", + "description": "A past recording that may be played back.", + "properties": { + "name": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + }, + "LiveRecording": { + "id": "LiveRecording", + "description": "A recording that is in progress", + "properties": { + "name": { + "required": true, + "type": "string", + "description": "Base name for the recording" + }, + "format": { + "required": true, + "type": "string", + "description": "Recording format (wav, gsm, etc.)" + }, + "target_uri": { + "required": true, + "type": "string", + "description": "URI for the channel or bridge being recorded" + }, + "state": { + "required": true, + "type": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "queued", + "recording", + "paused", + "done", + "failed", + "canceled" + ] + } + }, + "duration": { + "required": false, + "type": "int", + "description": "Duration in seconds of the recording" + }, + "talking_duration": { + "required": false, + "type": "int", + "description": "Duration of talking, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds." + }, + "silence_duration": { + "required": false, + "type": "int", + "description": "Duration of silence, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds." + }, + "cause": { + "required": false, + "type": "string", + "description": "Cause for recording failure if failed" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_7_0_1/sounds.json b/codegen/src/main/resources/codegen-data/ari_7_0_1/sounds.json new file mode 100644 index 00000000..8fbe1c57 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_7_0_1/sounds.json @@ -0,0 +1,99 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/sounds.{format}", + "apis": [ + { + "path": "/sounds", + "description": "Sounds", + "operations": [ + { + "httpMethod": "GET", + "summary": "List all sounds.", + "nickname": "list", + "responseClass": "List[Sound]", + "parameters": [ + { + "name": "lang", + "description": "Lookup sound for a specific language.", + "paramType": "query", + "dataType": "string", + "required": false + }, + { + "name": "format", + "description": "Lookup sound in a specific format.", + "paramType": "query", + "dataType": "string", + "required": false, + "__note": "core show translation can show translation paths between formats, along with relative costs. so this could be just installed format, or we could follow that for transcoded formats." + } + ] + } + ] + }, + { + "path": "/sounds/{soundId}", + "description": "Individual sound", + "operations": [ + { + "httpMethod": "GET", + "summary": "Get a sound's details.", + "nickname": "get", + "responseClass": "Sound", + "parameters": [ + { + "name": "soundId", + "description": "Sound's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ] + } + ] + } + ], + "models": { + "FormatLangPair": { + "id": "FormatLangPair", + "description": "Identifies the format and language of a sound file", + "properties": { + "language": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + }, + "Sound": { + "id": "Sound", + "description": "A media file that may be played back.", + "properties": { + "id": { + "required": true, + "description": "Sound's identifier.", + "type": "string" + }, + "text": { + "required": false, + "description": "Text description of the sound, usually the words spoken.", + "type": "string" + }, + "formats": { + "required": true, + "description": "The formats and languages in which this sound is available.", + "type": "List[FormatLangPair]" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_8_0_0/applications.json b/codegen/src/main/resources/codegen-data/ari_8_0_0/applications.json new file mode 100644 index 00000000..8ad9f36d --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_8_0_0/applications.json @@ -0,0 +1,242 @@ +{ + "_copyright": "Copyright (C) 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/applications.{format}", + "since": [ + "13.0.0" + ], + "apis": [ + { + "path": "/applications", + "description": "Stasis applications", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "13.0.0" + ], + "summary": "List all applications.", + "nickname": "list", + "responseClass": "List[Application]" + } + ] + }, + { + "path": "/applications/{applicationName}", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "13.0.0" + ], + "summary": "Get details of an application.", + "nickname": "get", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Application does not exist." + } + ] + } + ] + }, + { + "path": "/applications/{applicationName}/subscription", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "13.0.0" + ], + "summary": "Subscribe an application to a event source.", + "notes": "Returns the state of the application after the subscriptions have changed", + "nickname": "subscribe", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "eventSource", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing parameter." + }, + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 422, + "reason": "Event source does not exist." + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "13.0.0" + ], + "summary": "Unsubscribe an application from an event source.", + "notes": "Returns the state of the application after the subscriptions have changed", + "nickname": "unsubscribe", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "eventSource", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing parameter; event source scheme not recognized." + }, + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 409, + "reason": "Application not subscribed to event source." + }, + { + "code": 422, + "reason": "Event source does not exist." + } + ] + } + ] + }, + { + "path": "/applications/{applicationName}/eventFilter", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "PUT", + "since": [ + "13.26.0", + "16.3.0" + ], + "summary": "Filter application events types.", + "notes": "Allowed and/or disallowed event type filtering can be done. The body (parameter) should specify a JSON key/value object that describes the type of event filtering needed. One, or both of the following keys can be designated:

\"allowed\" - Specifies an allowed list of event types
\"disallowed\" - Specifies a disallowed list of event types

Further, each of those key's value should be a JSON array that holds zero, or more JSON key/value objects. Each of these objects must contain the following key with an associated value:

\"type\" - The type name of the event to filter

The value must be the string name (case sensitive) of the event type that needs filtering. For example:

{ \"allowed\": [ { \"type\": \"StasisStart\" }, { \"type\": \"StasisEnd\" } ] }

As this specifies only an allowed list, then only those two event type messages are sent to the application. No other event messages are sent.

The following rules apply:

* If the body is empty, both the allowed and disallowed filters are set empty.
* If both list types are given then both are set to their respective values (note, specifying an empty array for a given type sets that type to empty).
* If only one list type is given then only that type is set. The other type is not updated.
* An empty \"allowed\" list means all events are allowed.
* An empty \"disallowed\" list means no events are disallowed.
* Disallowed events take precedence over allowed events if the event type is specified in both lists.", + "nickname": "filter", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "filter", + "description": "Specify which event types to allow/disallow", + "paramType": "body", + "required": false, + "dataType": "object", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Bad request." + }, + { + "code": 404, + "reason": "Application does not exist." + } + ] + } + ] + } + ], + "models": { + "Application": { + "id": "Application", + "description": "Details of a Stasis application", + "properties": { + "name": { + "type": "string", + "description": "Name of this application", + "required": true + }, + "channel_ids": { + "type": "List[string]", + "description": "Id's for channels subscribed to.", + "required": true + }, + "bridge_ids": { + "type": "List[string]", + "description": "Id's for bridges subscribed to.", + "required": true + }, + "endpoint_ids": { + "type": "List[string]", + "description": "{tech}/{resource} for endpoints subscribed to.", + "required": true + }, + "device_names": { + "type": "List[string]", + "description": "Names of the devices subscribed to.", + "required": true + }, + "events_allowed": { + "type": "List[object]", + "description": "Event types sent to the application.", + "required": true + }, + "events_disallowed": { + "type": "List[object]", + "description": "Event types not sent to the application.", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_8_0_0/asterisk.json b/codegen/src/main/resources/codegen-data/ari_8_0_0/asterisk.json new file mode 100644 index 00000000..83fef8b7 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_8_0_0/asterisk.json @@ -0,0 +1,777 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/asterisk.{format}", + "since": [ + "12.0.0" + ], + "apis": [ + { + "path": "/asterisk/config/dynamic/{configClass}/{objectType}/{id}", + "description": "Asterisk dynamic configuration", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "13.5.0" + ], + "summary": "Retrieve a dynamic configuration object.", + "nickname": "getObject", + "responseClass": "List[ConfigTuple]", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to retrieve.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to retrieve.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "{configClass|objectType|id} not found" + } + ] + }, + { + "httpMethod": "PUT", + "since": [ + "13.5.0" + ], + "summary": "Create or update a dynamic configuration object.", + "nickname": "updateObject", + "responseClass": "List[ConfigTuple]", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to create or update.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to create or update.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "fields", + "description": "The body object should have a value that is a list of ConfigTuples, which provide the fields to update. Ex. [ { \"attribute\": \"directmedia\", \"value\": \"false\" } ]", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Bad request body" + }, + { + "code": 403, + "reason": "Could not create or update object" + }, + { + "code": 404, + "reason": "{configClass|objectType} not found" + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "13.5.0" + ], + "summary": "Delete a dynamic configuration object.", + "nickname": "deleteObject", + "responseClass": "void", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to delete.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to delete.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 403, + "reason": "Could not delete object" + }, + { + "code": 404, + "reason": "{configClass|objectType|id} not found" + } + ] + } + ] + }, + { + "path": "/asterisk/info", + "description": "Asterisk system information (similar to core show settings)", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "Gets Asterisk system information.", + "nickname": "getInfo", + "responseClass": "AsteriskInfo", + "parameters": [ + { + "name": "only", + "description": "Filter information returned", + "paramType": "query", + "required": false, + "allowMultiple": true, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "build", + "system", + "config", + "status" + ] + } + } + ] + } + ] + }, + { + "path": "/asterisk/ping", + "description": "Asterisk ping", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "13.25.0", + "16.2.0" + ], + "summary": "Response pong message.", + "nickname": "ping", + "responseClass": "AsteriskPing" + } + ] + }, + { + "path": "/asterisk/modules", + "description": "Asterisk modules", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "13.5.0" + ], + "summary": "List Asterisk modules.", + "nickname": "listModules", + "responseClass": "List[Module]" + } + ] + }, + { + "path": "/asterisk/modules/{moduleName}", + "description": "Asterisk module", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "13.5.0" + ], + "summary": "Get Asterisk module information.", + "nickname": "getModule", + "responseClass": "Module", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module could not be found in running modules." + }, + { + "code": 409, + "reason": "Module information could not be retrieved." + } + ] + }, + { + "httpMethod": "POST", + "since": [ + "13.5.0" + ], + "summary": "Load an Asterisk module.", + "nickname": "loadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 409, + "reason": "Module could not be loaded." + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "13.5.0" + ], + "summary": "Unload an Asterisk module.", + "nickname": "unloadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module not found in running modules." + }, + { + "code": 409, + "reason": "Module could not be unloaded." + } + ] + }, + { + "httpMethod": "PUT", + "since": [ + "13.5.0" + ], + "summary": "Reload an Asterisk module.", + "nickname": "reloadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module not found in running modules." + }, + { + "code": 409, + "reason": "Module could not be reloaded." + } + ] + } + ] + }, + { + "path": "/asterisk/logging", + "description": "Asterisk log channels", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "13.6.0" + ], + "summary": "Gets Asterisk log channel information.", + "nickname": "listLogChannels", + "responseClass": "List[LogChannel]" + } + ] + }, + { + "path": "/asterisk/logging/{logChannelName}", + "description": "Asterisk log channel", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "13.6.0" + ], + "summary": "Adds a log channel.", + "nickname": "addLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "The log channel to add", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "configuration", + "description": "levels of the log channel", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Bad request body" + }, + { + "code": 409, + "reason": "Log channel could not be created." + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "13.6.0" + ], + "summary": "Deletes a log channel.", + "nickname": "deleteLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "Log channels name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Log channel does not exist." + } + ] + } + ] + }, + { + "path": "/asterisk/logging/{logChannelName}/rotate", + "description": "Asterisk log channel", + "operations": [ + { + "httpMethod": "PUT", + "since": [ + "13.6.0" + ], + "summary": "Rotates a log channel.", + "nickname": "rotateLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "Log channel's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Log channel does not exist." + } + ] + } + ] + }, + { + "path": "/asterisk/variable", + "description": "Global variables", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "Get the value of a global variable.", + "nickname": "getGlobalVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "variable", + "description": "The variable to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + } + ] + }, + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Set the value of a global variable.", + "nickname": "setGlobalVar", + "responseClass": "void", + "parameters": [ + { + "name": "variable", + "description": "The variable to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + } + ] + } + ] + } + ], + "models": { + "BuildInfo": { + "id": "BuildInfo", + "description": "Info about how Asterisk was built", + "properties": { + "os": { + "required": true, + "type": "string", + "description": "OS Asterisk was built on." + }, + "kernel": { + "required": true, + "type": "string", + "description": "Kernel version Asterisk was built on." + }, + "options": { + "required": true, + "type": "string", + "description": "Compile time options, or empty string if default." + }, + "machine": { + "required": true, + "type": "string", + "description": "Machine architecture (x86_64, i686, ppc, etc.)" + }, + "date": { + "required": true, + "type": "string", + "description": "Date and time when Asterisk was built." + }, + "user": { + "required": true, + "type": "string", + "description": "Username that build Asterisk" + } + } + }, + "SystemInfo": { + "id": "SystemInfo", + "description": "Info about Asterisk", + "properties": { + "version": { + "required": true, + "type": "string", + "description": "Asterisk version." + }, + "entity_id": { + "required": true, + "type": "string", + "description": "" + } + } + }, + "SetId": { + "id": "SetId", + "description": "Effective user/group id", + "properties": { + "user": { + "required": true, + "type": "string", + "description": "Effective user id." + }, + "group": { + "required": true, + "type": "string", + "description": "Effective group id." + } + } + }, + "ConfigInfo": { + "id": "ConfigInfo", + "description": "Info about Asterisk configuration", + "properties": { + "name": { + "required": true, + "type": "string", + "description": "Asterisk system name." + }, + "default_language": { + "required": true, + "type": "string", + "description": "Default language for media playback." + }, + "max_channels": { + "required": false, + "type": "int", + "description": "Maximum number of simultaneous channels." + }, + "max_open_files": { + "required": false, + "type": "int", + "description": "Maximum number of open file handles (files, sockets)." + }, + "max_load": { + "required": false, + "type": "double", + "description": "Maximum load avg on system." + }, + "setid": { + "required": true, + "type": "SetId", + "description": "Effective user/group id for running Asterisk." + } + } + }, + "StatusInfo": { + "id": "StatusInfo", + "description": "Info about Asterisk status", + "properties": { + "startup_time": { + "required": true, + "type": "Date", + "description": "Time when Asterisk was started." + }, + "last_reload_time": { + "required": true, + "type": "Date", + "description": "Time when Asterisk was last reloaded." + } + } + }, + "AsteriskInfo": { + "id": "AsteriskInfo", + "description": "Asterisk system information", + "properties": { + "build": { + "required": false, + "type": "BuildInfo", + "description": "Info about how Asterisk was built" + }, + "system": { + "required": false, + "type": "SystemInfo", + "description": "Info about the system running Asterisk" + }, + "config": { + "required": false, + "type": "ConfigInfo", + "description": "Info about Asterisk configuration" + }, + "status": { + "required": false, + "type": "StatusInfo", + "description": "Info about Asterisk status" + } + } + }, + "AsteriskPing": { + "id": "AsteriskPing", + "description": "Asterisk ping information", + "properties": { + "asterisk_id": { + "required": true, + "type": "string", + "description": "Asterisk id info" + }, + "ping": { + "required": true, + "type": "string", + "description": "Always string value is pong" + }, + "timestamp": { + "required": true, + "type": "string", + "description": "The timestamp string of request received time" + } + } + }, + "Module": { + "id": "Module", + "description": "Details of an Asterisk module", + "properties": { + "name": { + "type": "string", + "description": "The name of this module", + "required": true + }, + "description": { + "type": "string", + "description": "The description of this module", + "required": true + }, + "use_count": { + "type": "int", + "description": "The number of times this module is being used", + "required": true + }, + "status": { + "type": "string", + "description": "The running status of this module", + "required": true + }, + "support_level": { + "type": "string", + "description": "The support state of this module", + "required": true + } + } + }, + "LogChannel": { + "id": "LogChannel", + "description": "Details of an Asterisk log channel", + "properties": { + "channel": { + "type": "string", + "description": "The log channel path", + "required": true + }, + "type": { + "type": "string", + "description": "Types of logs for the log channel", + "required": true + }, + "status": { + "type": "string", + "description": "Whether or not a log type is enabled", + "required": true + }, + "configuration": { + "type": "string", + "description": "The various log levels", + "required": true + } + } + }, + "Variable": { + "id": "Variable", + "description": "The value of a channel variable", + "properties": { + "value": { + "required": true, + "type": "string", + "description": "The value of the variable requested" + } + } + }, + "ConfigTuple": { + "id": "ConfigTuple", + "description": "A key/value pair that makes up part of a configuration object.", + "properties": { + "attribute": { + "required": true, + "type": "string", + "description": "A configuration object attribute." + }, + "value": { + "required": true, + "type": "string", + "description": "The value for the attribute." + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_8_0_0/bridges.json b/codegen/src/main/resources/codegen-data/ari_8_0_0/bridges.json new file mode 100644 index 00000000..ae5ee56f --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_8_0_0/bridges.json @@ -0,0 +1,864 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/bridges.{format}", + "since": [ + "12.0.0" + ], + "requiresModules": [ + "res_stasis_recording", + "res_stasis_playback" + ], + "apis": [ + { + "path": "/bridges", + "description": "Active bridges", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "List all active bridges in Asterisk.", + "nickname": "list", + "responseClass": "List[Bridge]" + }, + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Create a new bridge.", + "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", + "nickname": "create", + "responseClass": "Bridge", + "parameters": [ + { + "name": "type", + "description": "Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media, video_sfu, video_single, sdp_label).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "bridgeId", + "description": "Unique ID to give to the bridge being created.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Name to give to the bridge being created.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 409, + "reason": "Bridge with the same bridgeId already exists" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}", + "description": "Individual bridge", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.2.0" + ], + "summary": "Create a new bridge.", + "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", + "nickname": "createWithId", + "responseClass": "Bridge", + "parameters": [ + { + "name": "type", + "description": "Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media, video_sfu, video_single, sdp_label) to set.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "bridgeId", + "description": "Unique ID to give to the bridge being created.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Set the name of the bridge.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 409, + "reason": "Bridge with the same bridgeId already exists" + } + ] + }, + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "Get bridge details.", + "nickname": "get", + "responseClass": "Bridge", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "12.0.0" + ], + "summary": "Shut down a bridge.", + "notes": "If any channels are in this bridge, they will be removed and resume whatever they were doing beforehand.", + "nickname": "destroy", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/addChannel", + "description": "Add a channel to a bridge", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Add a channel to a bridge.", + "nickname": "addChannel", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channel", + "description": "Ids of channels to add to bridge", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "role", + "description": "Channel's role in the bridge", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "absorbDTMF", + "description": "Absorb DTMF coming from this channel, preventing it to pass through to the bridge", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "mute", + "description": "Mute audio from this channel, preventing it to pass through to the bridge", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "inhibitConnectedLineUpdates", + "description": "Do not present the identity of the newly connected channel to other bridge members", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Channel not found" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application; Channel currently recording" + }, + { + "code": 422, + "reason": "Channel not in Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/removeChannel", + "description": "Remove a channel from a bridge", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Remove a channel from a bridge.", + "nickname": "removeChannel", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channel", + "description": "Ids of channels to remove from bridge", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Channel not found" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + }, + { + "code": 422, + "reason": "Channel not in this bridge" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/videoSource/{channelId}", + "description": "Set a channel as the video source in a multi-party bridge", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "13.13.0", + "14.2.0" + ], + "summary": "Set a channel as the video source in a multi-party mixing bridge. This operation has no effect on bridges with two or fewer participants.", + "nickname": "setVideoSource", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge or Channel not found" + }, + { + "code": 409, + "reason": "Channel not in Stasis application" + }, + { + "code": 422, + "reason": "Channel not in this Bridge" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/videoSource", + "description": "Removes any explicit video source", + "operations": [ + { + "httpMethod": "DELETE", + "since": [ + "13.13.0", + "14.2.0" + ], + "summary": "Removes any explicit video source in a multi-party mixing bridge. This operation has no effect on bridges with two or fewer participants. When no explicit video source is set, talk detection will be used to determine the active video stream.", + "nickname": "clearVideoSource", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/moh", + "description": "Play music on hold to a bridge", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Play music on hold to a bridge or change the MOH class that is playing.", + "nickname": "startMoh", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "mohClass", + "description": "Channel's id", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "12.0.0" + ], + "summary": "Stop playing music on hold to a bridge.", + "notes": "This will only stop music on hold being played via POST bridges/{bridgeId}/moh.", + "nickname": "stopMoh", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/play", + "description": "Play media to the participants of a bridge", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Start playback of media on a bridge.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "play", + "responseClass": "Playback", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "announcer_format", + "description": "Format of the 'Anouncer' channel attached to the bridge. Defaults to the format of the channel in the bridge with the highest sampe rate.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "playbackId", + "description": "Playback Id.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/play/{playbackId}", + "description": "Play media to a bridge", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.3.0" + ], + "summary": "Start playback of media on a bridge.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "playWithId", + "responseClass": "Playback", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "announcer_format", + "description": "Format of the 'Anouncer' channel attached to the bridge. Defaults to the format of the channel in the bridge with the highest sampe rate.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + + } + ] + }, + { + "path": "/bridges/{bridgeId}/record", + "description": "Record audio on a bridge", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Start a recording.", + "notes": "This records the mixed audio from all channels participating in this bridge.", + "nickname": "record", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Recording's filename", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "recorder_format", + "description": "Format of the 'Recorder' channel attached to the bridge. Defaults to the same format as the 'format' parameter.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "maxDurationSeconds", + "description": "Maximum duration of the recording, in seconds. 0 for no limit.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "maxSilenceSeconds", + "description": "Maximum duration of silence, in seconds. 0 for no limit.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "ifExists", + "description": "Action to take if a recording with the same name already exists.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "fail", + "allowableValues": { + "valueType": "LIST", + "values": [ + "fail", + "overwrite", + "append" + ] + } + }, + { + "name": "beep", + "description": "Play beep when recording begins", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "terminateOn", + "description": "DTMF input to terminate recording.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "any", + "*", + "#" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge is not in a Stasis application; A recording with the same name already exists on the system and can not be overwritten because it is in progress or ifExists=fail" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + } + ], + "models": { + "Bridge": { + "id": "Bridge", + "description": "The merging of media from one or more channels.\n\nEveryone on the bridge receives the same audio.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for this bridge", + "required": true + }, + "technology": { + "type": "string", + "description": "Name of the current bridging technology", + "required": true + }, + "bridge_type": { + "type": "string", + "description": "Type of bridge technology", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "mixing", + "holding" + ] + } + }, + "bridge_class": { + "type": "string", + "description": "Bridging class", + "required": true + }, + "creator": { + "type": "string", + "description": "Entity that created the bridge", + "required": true + }, + "name": { + "type": "string", + "description": "Name the creator gave the bridge", + "required": true + }, + "channels": { + "type": "List[string]", + "description": "Ids of channels participating in this bridge", + "required": true + }, + "video_mode": { + "type": "string", + "description": "The video mode the bridge is using. One of 'none', 'talker', 'sfu', or 'single'.", + "required": false + }, + "video_source_id": { + "type": "string", + "description": "The ID of the channel that is the source of video in this bridge, if one exists.", + "required": false + }, + "creationtime": { + "required": true, + "type": "Date", + "description": "Timestamp when bridge was created" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_8_0_0/channels.json b/codegen/src/main/resources/codegen-data/ari_8_0_0/channels.json new file mode 100644 index 00000000..e5ec6a4b --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_8_0_0/channels.json @@ -0,0 +1,2407 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/channels.{format}", + "since": [ + "12.0.0" + ], + "requiresModules": [ + "res_stasis_answer", + "res_stasis_playback", + "res_stasis_recording", + "res_stasis_snoop" + ], + "apis": [ + { + "path": "/channels", + "description": "Active channels", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "List all active channels in Asterisk.", + "nickname": "list", + "responseClass": "List[Channel]" + }, + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Create a new channel (originate).", + "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.", + "nickname": "originate", + "responseClass": "Channel", + "parameters": [ + { + "name": "endpoint", + "description": "Endpoint to call.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to dial after the endpoint answers. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to dial after the endpoint answers. If omitted, uses 'default'. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to dial after the endpoint answers. If omitted, uses 1. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "long" + }, + { + "name": "label", + "description": "The label to dial after the endpoint answers. Will supersede 'priority' if provided. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The application that is subscribed to the originated channel. When the channel is answered, it will be passed to this Stasis application. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "callerId", + "description": "CallerID to use when dialing the endpoint or extension.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 30 + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "The unique id of the channel which is originating this one.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "formats", + "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for originating a channel." + }, + { + "code": 409, + "reason": "Channel with given unique ID already exists." + } + ] + } + ] + }, + { + "path": "/channels/create", + "description": "Create a channel and place it in a Stasis app, but do not dial the channel yet.", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "14.0.0" + ], + "summary": "Create channel.", + "nickname": "create", + "responseClass": "Channel", + "parameters": [ + { + "name": "endpoint", + "description": "Endpoint for channel communication", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "Stasis Application to place channel into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "Unique ID of the calling channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "formats", + "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 409, + "reason": "Channel with given unique ID already exists." + } + ] + } + ] + }, + { + "path": "/channels/{channelId}", + "description": "Active channel", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "Channel details.", + "nickname": "get", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + } + ] + }, + { + "httpMethod": "POST", + "since": [ + "12.2.0" + ], + "summary": "Create a new channel (originate with id).", + "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.", + "nickname": "originateWithId", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "endpoint", + "description": "Endpoint to call.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to dial after the endpoint answers. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to dial after the endpoint answers. If omitted, uses 'default'. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to dial after the endpoint answers. If omitted, uses 1. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "long" + }, + { + "name": "label", + "description": "The label to dial after the endpoint answers. Will supersede 'priority' if provided. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The application that is subscribed to the originated channel. When the channel is answered, it will be passed to this Stasis application. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "callerId", + "description": "CallerID to use when dialing the endpoint or extension.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 30 + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "The unique id of the channel which is originating this one.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "formats", + "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for originating a channel." + }, + { + "code": 409, + "reason": "Channel with given unique ID already exists." + } + ] + + }, + { + "httpMethod": "DELETE", + "since": [ + "12.0.0" + ], + "summary": "Delete (i.e. hangup) a channel.", + "nickname": "hangup", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "reason_code", + "description": "The reason code for hanging up the channel for detail use. Mutually exclusive with 'reason'. See detail hangup codes at here. https://docs.asterisk.org/Configuration/Miscellaneous/Hangup-Cause-Mappings/", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "reason", + "description": "Reason for hanging up the channel for simple use. Mutually exclusive with 'reason_code'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "normal", + "busy", + "congestion", + "no_answer", + "timeout", + "rejected", + "unallocated", + "normal_unspecified", + "number_incomplete", + "codec_mismatch", + "interworking", + "failure", + "answered_elsewhere" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid reason for hangup provided" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/continue", + "description": "Exit application; continue execution in the dialplan", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Exit application; continue execution in the dialplan.", + "nickname": "continueInDialplan", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "label", + "description": "The label to continue to - will supersede 'priority' if both are provided.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/move", + "description": "Move the channel from one Stasis application to another.", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "13.26.0", + "16.3.0" + ], + "summary": "Move the channel from one Stasis application to another.", + "nickname": "move", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The channel will be passed to this Stasis application.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": "404", + "reason": "Channel not found" + }, + { + "code": "409", + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/redirect", + "description": "Inform the channel that it should redirect itself to a different location. Note that this will almost certainly cause the channel to exit the application.", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "13.3.0" + ], + "summary": "Redirect the channel to a different location.", + "nickname": "redirect", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "endpoint", + "description": "The endpoint to redirect the channel to", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Endpoint parameter not provided" + }, + { + "code": 404, + "reason": "Channel or endpoint not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 422, + "reason": "Endpoint is not the same type as the channel" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/answer", + "description": "Answer a channel", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Answer a channel.", + "nickname": "answer", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/ring", + "description": "Send a ringing indication to a channel", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Indicate ringing to a channel.", + "nickname": "ring", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "12.0.0" + ], + "summary": "Stop ringing indication on a channel if locally generated.", + "nickname": "ringStop", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/progress", + "description": "Indicate progress on a channel", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "22.6.0", + "21.11.0", + "20.16.0" + ], + "summary": "Indicate progress on a channel.", + "nickname": "progress", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/dtmf", + "description": "Send DTMF to a channel", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Send provided DTMF to a given channel.", + "nickname": "sendDTMF", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "dtmf", + "description": "DTMF To send.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "before", + "description": "Amount of time to wait before DTMF digits (specified in milliseconds) start.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0 + }, + { + "name": "between", + "description": "Amount of time in between DTMF digits (specified in milliseconds).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 100 + }, + { + "name": "duration", + "description": "Length of each DTMF digit (specified in milliseconds).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 100 + }, + { + "name": "after", + "description": "Amount of time to wait after DTMF digits (specified in milliseconds) end.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0 + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "DTMF is required" + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/mute", + "description": "Mute a channel", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Mute a channel.", + "nickname": "mute", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "Direction in which to mute audio", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both", + "in", + "out" + ] + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "12.0.0" + ], + "summary": "Unmute a channel.", + "nickname": "unmute", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "Direction in which to unmute audio", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both", + "in", + "out" + ] + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/hold", + "description": "Put a channel on hold", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Hold a channel.", + "nickname": "hold", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "12.0.0" + ], + "summary": "Remove a channel from hold.", + "nickname": "unhold", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/moh", + "description": "Play music on hold to a channel", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Play music on hold to a channel.", + "notes": "Using media operations such as /play on a channel playing MOH in this manner will suspend MOH without resuming automatically. If continuing music on hold is desired, the stasis application must reinitiate music on hold.", + "nickname": "startMoh", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "mohClass", + "description": "Music on hold class to use", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "12.0.0" + ], + "summary": "Stop playing music on hold to a channel.", + "nickname": "stopMoh", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/silence", + "description": "Play silence to a channel", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Play silence to a channel.", + "notes": "Using media operations such as /play on a channel playing silence in this manner will suspend silence without resuming automatically.", + "nickname": "startSilence", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "12.0.0" + ], + "summary": "Stop playing silence to a channel.", + "nickname": "stopSilence", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/play", + "description": "Play media to a channel", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Start playback of media.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "play", + "responseClass": "Playback", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000 + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/play/{playbackId}", + "description": "Play media to a channel", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.2.0" + ], + "summary": "Start playback of media and specify the playbackId.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "playWithId", + "responseClass": "Playback", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000 + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/record", + "description": "Record audio from a channel", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Start a recording.", + "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.", + "nickname": "record", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Recording's filename", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "maxDurationSeconds", + "description": "Maximum duration of the recording, in seconds. 0 for no limit", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "maxSilenceSeconds", + "description": "Maximum duration of silence, in seconds. 0 for no limit", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "ifExists", + "description": "Action to take if a recording with the same name already exists.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "fail", + "allowableValues": { + "valueType": "LIST", + "values": [ + "fail", + "overwrite", + "append" + ] + } + }, + { + "name": "beep", + "description": "Play beep when recording begins", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "terminateOn", + "description": "DTMF input to terminate recording", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "any", + "*", + "#" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel is not in a Stasis application; the channel is currently bridged with other channels; A recording with the same name already exists on the system and can not be overwritten because it is in progress or ifExists=fail" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/variable", + "description": "Variables on a channel", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "Get the value of a channel variable or function.", + "nickname": "getChannelVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The channel variable or function to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Channel or variable not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Set the value of a channel variable or function.", + "nickname": "setChannelVar", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The channel variable or function to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/snoop", + "description": "Snoop (spy/whisper) on a channel", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Start snooping.", + "notes": "Snoop (spy/whisper) on a specific channel.", + "nickname": "snoopChannel", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "spy", + "description": "Direction of audio to spy on", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "whisper", + "description": "Direction of audio to whisper into", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "app", + "description": "Application the snooping channel is placed into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "snoopId", + "description": "Unique ID to assign to snooping channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/snoop/{snoopId}", + "description": "Snoop (spy/whisper) on a channel", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.2.0" + ], + "summary": "Start snooping.", + "notes": "Snoop (spy/whisper) on a specific channel.", + "nickname": "snoopChannelWithId", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "snoopId", + "description": "Unique ID to assign to snooping channel", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "spy", + "description": "Direction of audio to spy on", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "whisper", + "description": "Direction of audio to whisper into", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "app", + "description": "Application the snooping channel is placed into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/dial", + "description": "Dial a channel", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "14.0.0" + ], + "summary": "Dial a created channel.", + "nickname": "dial", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "caller", + "description": "Channel ID of caller", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Dial timeout", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel cannot be found." + }, + { + "code": 409, + "reason": "Channel cannot be dialed." + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/rtp_statistics", + "description": "Get RTP statistics information for RTP on a channel", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "13.27.0", + "16.4.0" + ], + "summary": "RTP stats on a channel.", + "nickname": "rtpstatistics", + "responseClass": "RTPstat", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel cannot be found." + } + ] + } + ] + }, + { + "path": "/channels/externalMedia", + "description": "Create a channel to an External Media source/sink.", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "16.6.0", + "17.1.0" + ], + "summary": "Start an External Media session.", + "notes": "Create a channel to an External Media source/sink. The combination of transport and encapsulation will select one of chan_rtp(udp/rtp), chan_audiosocket(tcp/audiosocket) or chan_websocket(websocket/none) channel drivers.", + "nickname": "externalMedia", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "Stasis Application to place channel into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "external_host", + "description": "Hostname/ip:port or websocket_client connection ID of external host. May be empty for a websocket server connection.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "encapsulation", + "description": "Payload encapsulation protocol. Must be 'none' for the websocket transport.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "rtp", + "allowableValues": { + "valueType": "LIST", + "values": [ + "rtp", + "audiosocket", + "none" + ] + } + }, + { + "name": "transport", + "description": "Transport protocol", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "udp", + "allowableValues": { + "valueType": "LIST", + "values": [ + "udp", + "tcp", + "websocket" + ] + } + }, + { + "name": "connection_type", + "description": "Connection type (client/server). 'server' is only valid for the websocket transport.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "client", + "allowableValues": { + "valueType": "LIST", + "values": [ + "client", + "server" + ] + } + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "External media direction", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both" + ] + } + }, + { + "name": "data", + "description": "An arbitrary data field", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "transport_data", + "description": "Transport-specific data. For websocket this is appended to the dialstring.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 409, + "reason": "Channel is not in a Stasis application; Channel is already bridged" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/transfer_progress", + "description": "Inform the channel that the transfer is in progress.", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "22.3.0", + "21.8.0", + "20.13.0" + ], + "summary": "Inform the channel about the progress of the attended/blind transfer.", + "nickname": "transfer_progress", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "states", + "description": "The state of the progress", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Endpoint parameter not provided" + }, + { + "code": 404, + "reason": "Channel or endpoint not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + } + ], + "models": { + "Dialed": { + "id": "Dialed", + "description": "Dialed channel information.", + "properties": {} + }, + "DialplanCEP": { + "id": "DialplanCEP", + "description": "Dialplan location (context/extension/priority)", + "properties": { + "context": { + "required": true, + "type": "string", + "description": "Context in the dialplan" + }, + "exten": { + "required": true, + "type": "string", + "description": "Extension in the dialplan" + }, + "priority": { + "required": true, + "type": "long", + "description": "Priority in the dialplan" + }, + "app_name": { + "required": true, + "type": "string", + "description": "Name of current dialplan application" + }, + "app_data": { + "required": true, + "type": "string", + "description": "Parameter of current dialplan application" + } + } + }, + "CallerID": { + "id": "CallerID", + "description": "Caller identification", + "properties": { + "name": { + "required": true, + "type": "string" + }, + "number": { + "required": true, + "type": "string" + } + } + }, + "RTPstat": { + "id": "RTPstat", + "description": "A statistics of a RTP.", + "properties": { + "txcount": { + "required": true, + "type": "int", + "description": "Number of packets transmitted." + }, + "rxcount": { + "required": true, + "type": "int", + "description": "Number of packets received." + }, + "txjitter": { + "required": false, + "type": "double", + "description": "Jitter on transmitted packets." + }, + "rxjitter": { + "required": false, + "type": "double", + "description": "Jitter on received packets." + }, + "remote_maxjitter": { + "required": false, + "type": "double", + "description": "Maximum jitter on remote side." + }, + "remote_minjitter": { + "required": false, + "type": "double", + "description": "Minimum jitter on remote side." + }, + "remote_normdevjitter": { + "required": false, + "type": "double", + "description": "Average jitter on remote side." + }, + "remote_stdevjitter": { + "required": false, + "type": "double", + "description": "Standard deviation jitter on remote side." + }, + "local_maxjitter": { + "required": false, + "type": "double", + "description": "Maximum jitter on local side." + }, + "local_minjitter": { + "required": false, + "type": "double", + "description": "Minimum jitter on local side." + }, + "local_normdevjitter": { + "required": false, + "type": "double", + "description": "Average jitter on local side." + }, + "local_stdevjitter": { + "required": false, + "type": "double", + "description": "Standard deviation jitter on local side." + }, + "txploss": { + "required": true, + "type": "int", + "description": "Number of transmitted packets lost." + }, + "rxploss": { + "required": true, + "type": "int", + "description": "Number of received packets lost." + }, + "remote_maxrxploss": { + "required": false, + "type": "double", + "description": "Maximum number of packets lost on remote side." + }, + "remote_minrxploss": { + "required": false, + "type": "double", + "description": "Minimum number of packets lost on remote side." + }, + "remote_normdevrxploss": { + "required": false, + "type": "double", + "description": "Average number of packets lost on remote side." + }, + "remote_stdevrxploss": { + "required": false, + "type": "double", + "description": "Standard deviation packets lost on remote side." + }, + "local_maxrxploss": { + "required": false, + "type": "double", + "description": "Maximum number of packets lost on local side." + }, + "local_minrxploss": { + "required": false, + "type": "double", + "description": "Minimum number of packets lost on local side." + }, + "local_normdevrxploss": { + "required": false, + "type": "double", + "description": "Average number of packets lost on local side." + }, + "local_stdevrxploss": { + "required": false, + "type": "double", + "description": "Standard deviation packets lost on local side." + }, + "rtt": { + "required": false, + "type": "double", + "description": "Total round trip time." + }, + "maxrtt": { + "required": false, + "type": "double", + "description": "Maximum round trip time." + }, + "minrtt": { + "required": false, + "type": "double", + "description": "Minimum round trip time." + }, + "normdevrtt": { + "required": false, + "type": "double", + "description": "Average round trip time." + }, + "stdevrtt": { + "required": false, + "type": "double", + "description": "Standard deviation round trip time." + }, + "local_ssrc": { + "required": true, + "type": "int", + "description": "Our SSRC." + }, + "remote_ssrc": { + "required": true, + "type": "int", + "description": "Their SSRC." + }, + "txoctetcount": { + "required": true, + "type": "int", + "description": "Number of octets transmitted." + }, + "rxoctetcount": { + "required": true, + "type": "int", + "description": "Number of octets received." + }, + "channel_uniqueid": { + "required": true, + "type": "string", + "description": "The Asterisk channel's unique ID that owns this instance." + } + } + }, + "Channel": { + "id": "Channel", + "description": "A specific communication connection between Asterisk and an Endpoint.", + "properties": { + "id": { + "required": true, + "type": "string", + "description": "Unique identifier of the channel.\n\nThis is the same as the Uniqueid field in AMI." + }, + "protocol_id": { + "required": true, + "type": "string", + "description": "Protocol id from underlying channel driver (i.e. Call-ID for chan_sip/chan_pjsip; will be empty if not applicable or not implemented by driver)." + }, + "name": { + "required": true, + "type": "string", + "description": "Name of the channel (i.e. SIP/foo-0000a7e3)" + }, + "state": { + "required": true, + "type": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "Down", + "Rsrved", + "OffHook", + "Dialing", + "Ring", + "Ringing", + "Up", + "Busy", + "Dialing Offhook", + "Pre-ring", + "Unknown" + ] + } + }, + "caller": { + "required": true, + "type": "CallerID" + }, + "connected": { + "required": true, + "type": "CallerID" + }, + "accountcode": { + "required": true, + "type": "string" + }, + "dialplan": { + "required": true, + "type": "DialplanCEP", + "description": "Current location in the dialplan" + }, + "creationtime": { + "required": true, + "type": "Date", + "description": "Timestamp when channel was created" + }, + "language": { + "required": true, + "type": "string", + "description": "The default spoken language" + }, + "channelvars": { + "required": false, + "type": "object", + "description": "Channel variables" + }, + "caller_rdnis": { + "type": "string", + "description": "The Caller ID RDNIS" + }, + "tenantid": { + "required": false, + "type": "string", + "description": "The Tenant ID for the channel" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_8_0_0/deviceStates.json b/codegen/src/main/resources/codegen-data/ari_8_0_0/deviceStates.json new file mode 100644 index 00000000..f0a889bc --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_8_0_0/deviceStates.json @@ -0,0 +1,169 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "Kevin Harwell ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/deviceStates.{format}", + "since": [ + "12.0.0" + ], + "requiresModules": [ + "res_stasis_device_state" + ], + "apis": [ + { + "path": "/deviceStates", + "description": "Device states", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "List all ARI controlled device states.", + "nickname": "list", + "responseClass": "List[DeviceState]" + } + ] + }, + { + "path": "/deviceStates/{deviceName}", + "description": "Device state", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "Retrieve the current state of a device.", + "nickname": "get", + "responseClass": "DeviceState", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ] + }, + { + "httpMethod": "PUT", + "since": [ + "12.0.0" + ], + "summary": "Change the state of a device controlled by ARI. (Note - implicitly creates the device state).", + "nickname": "update", + "responseClass": "void", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "deviceState", + "description": "Device state value", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "NOT_INUSE", + "INUSE", + "BUSY", + "INVALID", + "UNAVAILABLE", + "RINGING", + "RINGINUSE", + "ONHOLD" + ] + } + + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Device name is missing" + }, + { + "code": 409, + "reason": "Uncontrolled device specified" + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "12.0.0" + ], + "summary": "Destroy a device-state controlled by ARI.", + "nickname": "delete", + "responseClass": "void", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Device name is missing" + }, + { + "code": 409, + "reason": "Uncontrolled device specified" + } + ] + } + ] + } + ], + "models": { + "DeviceState": { + "id": "DeviceState", + "description": "Represents the state of a device.", + "properties": { + "name": { + "type": "string", + "description": "Name of the device.", + "required": true + }, + "state": { + "type": "string", + "description": "Device's state", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "UNKNOWN", + "NOT_INUSE", + "INUSE", + "BUSY", + "INVALID", + "UNAVAILABLE", + "RINGING", + "RINGINUSE", + "ONHOLD" + ] + } + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_8_0_0/endpoints.json b/codegen/src/main/resources/codegen-data/ari_8_0_0/endpoints.json new file mode 100644 index 00000000..93c406f7 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_8_0_0/endpoints.json @@ -0,0 +1,423 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/endpoints.{format}", + "since": [ + "12.0.0" + ], + "apis": [ + { + "path": "/endpoints", + "description": "Asterisk endpoints", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "List all endpoints.", + "nickname": "list", + "responseClass": "List[Endpoint]" + } + ] + }, + { + "path": "/endpoints/sendMessage", + "description": "Send a message to some technology URI or endpoint.", + "operations": [ + { + "httpMethod": "PUT", + "since": [ + "13.0.0" + ], + "summary": "Send a message to some technology URI or endpoint.", + "nickname": "sendMessage", + "responseClass": "void", + "parameters": [ + { + "name": "to", + "description": "The endpoint resource or technology specific URI to send the message to. Valid resources are sip, pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "from", + "description": "The endpoint resource or technology specific identity to send this message from. Valid resources are sip, pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "body", + "description": "The body of the message", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "descriptioni": "The \"variables\" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, pjsip and sip resource types will add the key/value pairs as SIP headers,", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoint not found" + } + ] + } + ] + }, + { + "path": "/endpoints/refer", + "description": "Refer an endpoint or technology URI to some technology URI or endpoint.", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "18.20.0", + "20.5.0" + ], + "summary": "Refer an endpoint or technology URI to some technology URI or endpoint.", + "nickname": "refer", + "responseClass": "void", + "parameters": [ + { + "name": "to", + "description": "The endpoint resource or technology specific URI that should be referred to somewhere. Valid resource is pjsip.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "from", + "description": "The endpoint resource or technology specific identity to refer from.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "refer_to", + "description": "The endpoint resource or technology specific URI to refer to.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "to_self", + "description": "If true and \"refer_to\" refers to an Asterisk endpoint, the \"refer_to\" value is set to point to this Asterisk endpoint - so the referee is referred to Asterisk. Otherwise, use the contact URI associated with the endpoint.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, the pjsip resource type will add the key/value pairs as SIP headers. The \"display_name\" key is used by the PJSIP technology. Its value will be prepended as a display name to the Refer-To URI.", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for referring." + }, + { + "code": 404, + "reason": "Endpoint not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}", + "description": "Asterisk endpoints", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "List available endoints for a given endpoint technology.", + "nickname": "listByTech", + "responseClass": "List[Endpoint]", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoints (sip,iax2,...)", + "paramType": "path", + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Endpoints not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}/{resource}", + "description": "Single endpoint", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "Details for an endpoint.", + "nickname": "get", + "responseClass": "Endpoint", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "resource", + "description": "ID of the endpoint", + "paramType": "path", + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoints not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}/{resource}/sendMessage", + "description": "Send a message to some endpoint in a technology.", + "operations": [ + { + "httpMethod": "PUT", + "since": [ + "13.0.0" + ], + "summary": "Send a message to some endpoint in a technology.", + "nickname": "sendMessageToEndpoint", + "responseClass": "void", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "resource", + "description": "ID of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "from", + "description": "The endpoint resource or technology specific identity to send this message from. Valid resources are sip, pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "body", + "description": "The body of the message", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "descriptioni": "The \"variables\" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, pjsip and sip resource types will add the key/value pairs as SIP headers,", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoint not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}/{resource}/refer", + "description": "Refer an endpoint in a technology to some technology URI or endpoint..", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "18.20.0", + "20.5.0" + ], + "summary": "Refer an endpoint or technology URI to some technology URI or endpoint.", + "nickname": "referToEndpoint", + "responseClass": "void", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "resource", + "description": "ID of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "from", + "description": "The endpoint resource or technology specific identity to refer from.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "refer_to", + "description": "The endpoint resource or technology specific URI to refer to.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "to_self", + "description": "If true and \"refer_to\" refers to an Asterisk endpoint, the \"refer_to\" value is set to point to this Asterisk endpoint - so the referee is referred to Asterisk. Otherwise, use the contact URI associated with the endpoint.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, the pjsip resource type will add the key/value pairs as SIP headers,", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for referring." + }, + { + "code": 404, + "reason": "Endpoint not found" + } + ] + } + ] + } + ], + "models": { + "Endpoint": { + "id": "Endpoint", + "description": "An external device that may offer/accept calls to/from Asterisk.\n\nUnlike most resources, which have a single unique identifier, an endpoint is uniquely identified by the technology/resource pair.", + "properties": { + "technology": { + "type": "string", + "description": "Technology of the endpoint", + "required": true + }, + "resource": { + "type": "string", + "description": "Identifier of the endpoint, specific to the given technology.", + "required": true + }, + "state": { + "type": "string", + "description": "Endpoint's state", + "required": false, + "allowableValues": { + "valueType": "LIST", + "values": [ + "unknown", + "offline", + "online" + ] + } + }, + "channel_ids": { + "type": "List[string]", + "description": "Id's of channels associated with this endpoint", + "required": true + } + } + }, + "TextMessage": { + "id": "TextMessage", + "description": "A text message.", + "properties": { + "from": { + "type": "string", + "description": "A technology specific URI specifying the source of the message. For sip and pjsip technologies, any SIP URI can be specified. For xmpp, the URI must correspond to the client connection being used to send the message.", + "required": true + }, + "to": { + "type": "string", + "description": "A technology specific URI specifying the destination of the message. Valid technologies include sip, pjsip, and xmp. The destination of a message should be an endpoint.", + "required": true + }, + "body": { + "type": "string", + "description": "The text of the message.", + "required": true + }, + "variables": { + "type": "object", + "description": "Technology specific key/value pairs (JSON object) associated with the message.", + "required": false + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_8_0_0/events.json b/codegen/src/main/resources/codegen-data/ari_8_0_0/events.json new file mode 100644 index 00000000..b7d14ef1 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_8_0_0/events.json @@ -0,0 +1,1172 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.2", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/events.{format}", + "since": [ + "12.0.0" + ], + "requiresModules": [ + "res_http_websocket" + ], + "apis": [ + { + "path": "/events", + "description": "Events from Asterisk to applications", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "upgrade": "websocket", + "websocketProtocol": "ari", + "summary": "WebSocket connection for events.", + "nickname": "eventWebsocket", + "responseClass": "Message", + "parameters": [ + { + "name": "app", + "description": "Applications to subscribe to.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "subscribeAll", + "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'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean" + } + ] + } + ] + }, + { + "path": "/events/user/{eventName}", + "description": "Stasis application user events", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.3.0" + ], + "summary": "Generate a user event.", + "nickname": "userEvent", + "responseClass": "void", + "parameters": [ + { + "name": "eventName", + "description": "Event name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "application", + "description": "The name of the application that will receive this event", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "source", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}/{resource}, deviceState:{deviceName}", + "paramType": "query", + "required": false, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds custom key/value pairs to add to the user event. Ex. { \"variables\": { \"key\": \"value\" } }", + "paramType": "body", + "required": false, + "allowMultiple": false, + "dataType": "containers" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 422, + "reason": "Event source not found." + }, + { + "code": 400, + "reason": "Invalid even tsource URI or userevent data." + } + ] + } + ] + } + ], + "models": { + "Message": { + "id": "Message", + "description": "Base type for errors and events", + "discriminator": "type", + "properties": { + "type": { + "type": "string", + "required": true, + "description": "Indicates the type of this message." + }, + "asterisk_id": { + "type": "string", + "required": false, + "description": "The unique ID for the Asterisk instance that raised this event." + } + }, + "subTypes": [ + "MissingParams", + "Event" + ] + }, + "MissingParams": { + "id": "MissingParams", + "description": "Error event sent when required params are missing.", + "properties": { + "params": { + "required": true, + "type": "List[string]", + "description": "A list of the missing parameters" + } + } + }, + "Event": { + "id": "Event", + "description": "Base type for asynchronous events from Asterisk.", + "properties": { + "application": { + "type": "string", + "description": "Name of the application receiving the event.", + "required": true + }, + "timestamp": { + "type": "Date", + "description": "Time at which this event was created.", + "required": true + } + }, + "subTypes": [ + "DeviceStateChanged", + "PlaybackStarted", + "PlaybackContinuing", + "PlaybackFinished", + "RecordingStarted", + "RecordingFinished", + "RecordingFailed", + "ApplicationMoveFailed", + "ApplicationRegistered", + "ApplicationUnregistered", + "ApplicationReplaced", + "BridgeCreated", + "BridgeDestroyed", + "BridgeMerged", + "BridgeBlindTransfer", + "BridgeAttendedTransfer", + "BridgeVideoSourceChanged", + "ChannelCreated", + "ChannelDestroyed", + "ChannelEnteredBridge", + "ChannelLeftBridge", + "ChannelStateChange", + "ChannelDtmfReceived", + "ChannelDialplan", + "ChannelCallerId", + "ChannelUserevent", + "ChannelHangupRequest", + "ChannelVarset", + "ChannelTalkingStarted", + "ChannelTalkingFinished", + "ChannelHold", + "ChannelUnhold", + "ContactStatusChange", + "EndpointStateChange", + "Dial", + "StasisEnd", + "StasisStart", + "TextMessageReceived", + "ChannelConnectedLine", + "PeerStatusChange", + "ChannelTransfer", + "RESTResponse" + ] + }, + "ContactInfo": { + "id": "ContactInfo", + "description": "Detailed information about a contact on an endpoint.", + "properties": { + "uri": { + "type": "string", + "description": "The location of the contact.", + "required": true + }, + "contact_status": { + "type": "string", + "description": "The current status of the contact.", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "Unreachable", + "Reachable", + "Unknown", + "NonQualified", + "Removed" + ] + } + }, + "aor": { + "type": "string", + "description": "The Address of Record this contact belongs to.", + "required": true + }, + "roundtrip_usec": { + "type": "string", + "description": "Current round trip time, in microseconds, for the contact.", + "required": false + } + } + }, + "Peer": { + "id": "Peer", + "description": "Detailed information about a remote peer that communicates with Asterisk.", + "properties": { + "peer_status": { + "type": "string", + "description": "The current state of the peer. Note that the values of the status are dependent on the underlying peer technology.", + "required": true + }, + "cause": { + "type": "string", + "description": "An optional reason associated with the change in peer_status.", + "required": false + }, + "address": { + "type": "string", + "description": "The IP address of the peer.", + "required": false + }, + "port": { + "type": "string", + "description": "The port of the peer.", + "required": false + }, + "time": { + "type": "string", + "description": "The last known time the peer was contacted.", + "required": false + } + } + }, + "DeviceStateChanged": { + "id": "DeviceStateChanged", + "description": "Notification that a device state has changed.", + "properties": { + "device_state": { + "type": "DeviceState", + "description": "Device state object", + "required": true + } + } + }, + "PlaybackStarted": { + "id": "PlaybackStarted", + "description": "Event showing the start of a media playback operation.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "PlaybackContinuing": { + "id": "PlaybackContinuing", + "description": "Event showing the continuation of a media playback operation from one media URI to the next in the list.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "PlaybackFinished": { + "id": "PlaybackFinished", + "description": "Event showing the completion of a media playback operation.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "RecordingStarted": { + "id": "RecordingStarted", + "description": "Event showing the start of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "RecordingFinished": { + "id": "RecordingFinished", + "description": "Event showing the completion of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "RecordingFailed": { + "id": "RecordingFailed", + "description": "Event showing failure of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "ApplicationMoveFailed": { + "id": "ApplicationMoveFailed", + "description": "Notification that trying to move a channel to another Stasis application failed.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + }, + "destination": { + "required": true, + "type": "string" + }, + "args": { + "required": true, + "type": "List[string]", + "description": "Arguments to the application" + } + } + }, + "ApplicationRegistered": { + "id": "ApplicationRegistered", + "description": "Notification that a Stasis app has been registered.", + "properties": {} + }, + "ApplicationUnregistered": { + "id": "ApplicationUnregistered", + "description": "Notification that a Stasis app has been unregistered.", + "properties": {} + }, + "ApplicationReplaced": { + "id": "ApplicationReplaced", + "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.", + "properties": {} + }, + "BridgeCreated": { + "id": "BridgeCreated", + "description": "Notification that a bridge has been created.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeDestroyed": { + "id": "BridgeDestroyed", + "description": "Notification that a bridge has been destroyed.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeMerged": { + "id": "BridgeMerged", + "description": "Notification that one bridge has merged into another.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "bridge_from": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeVideoSourceChanged": { + "id": "BridgeVideoSourceChanged", + "description": "Notification that the source of video in a bridge has changed.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "old_video_source_id": { + "required": false, + "type": "string" + } + } + }, + "BridgeBlindTransfer": { + "id": "BridgeBlindTransfer", + "description": "Notification that a blind transfer has occurred.", + "properties": { + "channel": { + "description": "The channel performing the blind transfer", + "required": true, + "type": "Channel" + }, + "replace_channel": { + "description": "The channel that is replacing transferer when the transferee(s) can not be transferred directly", + "required": false, + "type": "Channel" + }, + "transferee": { + "description": "The channel that is being transferred", + "required": false, + "type": "Channel" + }, + "exten": { + "description": "The extension transferred to", + "required": true, + "type": "string" + }, + "context": { + "description": "The context transferred to", + "required": true, + "type": "string" + }, + "result": { + "description": "The result of the transfer attempt", + "required": true, + "type": "string" + }, + "is_external": { + "description": "Whether the transfer was externally initiated or not", + "required": true, + "type": "boolean" + }, + "bridge": { + "description": "The bridge being transferred", + "type": "Bridge" + } + } + }, + "BridgeAttendedTransfer": { + "id": "BridgeAttendedTransfer", + "description": "Notification that an attended transfer has occurred.", + "properties": { + "transferer_first_leg": { + "description": "First leg of the transferer", + "required": true, + "type": "Channel" + }, + "transferer_second_leg": { + "description": "Second leg of the transferer", + "required": true, + "type": "Channel" + }, + "replace_channel": { + "description": "The channel that is replacing transferer_first_leg in the swap", + "required": false, + "type": "Channel" + }, + "transferee": { + "description": "The channel that is being transferred", + "required": false, + "type": "Channel" + }, + "transfer_target": { + "description": "The channel that is being transferred to", + "required": false, + "type": "Channel" + }, + "result": { + "description": "The result of the transfer attempt", + "required": true, + "type": "string" + }, + "is_external": { + "description": "Whether the transfer was externally initiated or not", + "required": true, + "type": "boolean" + }, + "transferer_first_leg_bridge": { + "description": "Bridge the transferer first leg is in", + "type": "Bridge" + }, + "transferer_second_leg_bridge": { + "description": "Bridge the transferer second leg is in", + "type": "Bridge" + }, + "destination_type": { + "description": "How the transfer was accomplished", + "required": true, + "type": "string" + }, + "destination_bridge": { + "description": "Bridge that survived the merge result", + "type": "string" + }, + "destination_application": { + "description": "Application that has been transferred into", + "type": "string" + }, + "destination_link_first_leg": { + "description": "First leg of a link transfer result", + "type": "Channel" + }, + "destination_link_second_leg": { + "description": "Second leg of a link transfer result", + "type": "Channel" + }, + "destination_threeway_channel": { + "description": "Transferer channel that survived the threeway result", + "type": "Channel" + }, + "destination_threeway_bridge": { + "description": "Bridge that survived the threeway result", + "type": "Bridge" + } + } + }, + "ChannelCreated": { + "id": "ChannelCreated", + "description": "Notification that a channel has been created.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelDestroyed": { + "id": "ChannelDestroyed", + "description": "Notification that a channel has been destroyed.", + "properties": { + "cause": { + "required": true, + "description": "Integer representation of the cause of the hangup", + "type": "int" + }, + "cause_txt": { + "required": true, + "description": "Text representation of the cause of the hangup", + "type": "string" + }, + "tech_cause": { + "type": "int", + "description": "Integer representation of the technology-specific off-nominal cause of the hangup." + }, + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelEnteredBridge": { + "id": "ChannelEnteredBridge", + "description": "Notification that a channel has entered a bridge.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "channel": { + "type": "Channel" + } + } + }, + "ChannelLeftBridge": { + "id": "ChannelLeftBridge", + "description": "Notification that a channel has left a bridge.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelStateChange": { + "id": "ChannelStateChange", + "description": "Notification of a channel's state change.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelDtmfReceived": { + "id": "ChannelDtmfReceived", + "description": "DTMF received on a channel.\n\nThis event is sent when the DTMF ends. There is no notification about the start of DTMF", + "properties": { + "digit": { + "required": true, + "type": "string", + "description": "DTMF digit received (0-9, A-E, # or *)" + }, + "duration_ms": { + "required": true, + "type": "int", + "description": "Number of milliseconds DTMF was received" + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which DTMF was received" + } + } + }, + "ChannelDialplan": { + "id": "ChannelDialplan", + "description": "Channel changed location in the dialplan.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that changed dialplan location." + }, + "dialplan_app": { + "required": true, + "type": "string", + "description": "The application about to be executed." + }, + "dialplan_app_data": { + "required": true, + "type": "string", + "description": "The data to be passed to the application." + } + } + }, + "ChannelCallerId": { + "id": "ChannelCallerId", + "description": "Channel changed Caller ID.", + "properties": { + "caller_presentation": { + "required": true, + "type": "int", + "description": "The integer representation of the Caller Presentation value." + }, + "caller_presentation_txt": { + "required": true, + "type": "string", + "description": "The text representation of the Caller Presentation value." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that changed Caller ID." + } + } + }, + "ChannelUserevent": { + "id": "ChannelUserevent", + "description": "User-generated event with additional user-defined fields in the object.", + "properties": { + "eventname": { + "required": true, + "type": "string", + "description": "The name of the user event." + }, + "channel": { + "required": false, + "type": "Channel", + "description": "A channel that is signaled with the user event." + }, + "bridge": { + "required": false, + "type": "Bridge", + "description": "A bridge that is signaled with the user event." + }, + "endpoint": { + "required": false, + "type": "Endpoint", + "description": "A endpoint that is signaled with the user event." + }, + "userevent": { + "required": true, + "type": "object", + "description": "Custom Userevent data" + } + } + }, + "ChannelHangupRequest": { + "id": "ChannelHangupRequest", + "description": "A hangup was requested on the channel.", + "properties": { + "cause": { + "type": "int", + "description": "Integer representation of the cause of the hangup." + }, + "tech_cause": { + "type": "int", + "description": "Integer representation of the technology-specific off-nominal cause of the hangup." + }, + "soft": { + "type": "boolean", + "description": "Whether the hangup request was a soft hangup request." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which the hangup was requested." + } + } + }, + "ChannelVarset": { + "id": "ChannelVarset", + "description": "Channel variable changed.", + "properties": { + "variable": { + "required": true, + "type": "string", + "description": "The variable that changed." + }, + "value": { + "required": true, + "type": "string", + "description": "The new value of the variable." + }, + "channel": { + "required": false, + "type": "Channel", + "description": "The channel on which the variable was set.\n\nIf missing, the variable is a global variable." + } + } + }, + "ChannelHold": { + "id": "ChannelHold", + "description": "A channel initiated a media hold.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that initiated the hold event." + }, + "musicclass": { + "required": false, + "type": "string", + "description": "The music on hold class that the initiator requested." + } + } + }, + "ChannelUnhold": { + "id": "ChannelUnhold", + "description": "A channel initiated a media unhold.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that initiated the unhold event." + } + } + }, + "ChannelTalkingStarted": { + "id": "ChannelTalkingStarted", + "description": "Talking was detected on the channel.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which talking started." + } + } + }, + "ChannelTalkingFinished": { + "id": "ChannelTalkingFinished", + "description": "Talking is no longer detected on the channel.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which talking completed." + }, + "duration": { + "required": true, + "type": "int", + "description": "The length of time, in milliseconds, that talking was detected on the channel" + } + } + }, + "ContactStatusChange": { + "id": "ContactStatusChange", + "description": "The state of a contact on an endpoint has changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + }, + "contact_info": { + "required": true, + "type": "ContactInfo" + } + } + }, + "PeerStatusChange": { + "id": "PeerStatusChange", + "description": "The state of a peer associated with an endpoint has changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + }, + "peer": { + "required": true, + "type": "Peer" + } + } + }, + "EndpointStateChange": { + "id": "EndpointStateChange", + "description": "Endpoint state changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + } + } + }, + "Dial": { + "id": "Dial", + "description": "Dialing state has changed.", + "properties": { + "caller": { + "required": false, + "type": "Channel", + "description": "The calling channel." + }, + "peer": { + "required": true, + "type": "Channel", + "description": "The dialed channel." + }, + "forward": { + "required": false, + "type": "string", + "description": "Forwarding target requested by the original dialed channel." + }, + "forwarded": { + "required": false, + "type": "Channel", + "description": "Channel that the caller has been forwarded to." + }, + "dialstring": { + "required": false, + "type": "string", + "description": "The dial string for calling the peer channel." + }, + "dialstatus": { + "required": true, + "type": "string", + "description": "Current status of the dialing attempt to the peer." + } + } + }, + "StasisEnd": { + "id": "StasisEnd", + "description": "Notification that a channel has left a Stasis application.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "StasisStart": { + "id": "StasisStart", + "description": "Notification that a channel has entered a Stasis application.", + "properties": { + "args": { + "required": true, + "type": "List[string]", + "description": "Arguments to the application" + }, + "channel": { + "required": true, + "type": "Channel" + }, + "replace_channel": { + "required": false, + "type": "Channel" + } + } + }, + "TextMessageReceived": { + "id": "TextMessageReceived", + "description": "A text message was received from an endpoint.", + "properties": { + "message": { + "required": true, + "type": "TextMessage" + }, + "endpoint": { + "required": false, + "type": "Endpoint" + } + } + }, + "ChannelConnectedLine": { + "id": "ChannelConnectedLine", + "description": "Channel changed Connected Line.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel whose connected line has changed." + } + } + }, + "ChannelTransfer": { + "id": "ChannelTransfer", + "description": "transfer on a channel.", + "properties": { + "state": { + "required": false, + "type": "string", + "description": "Transfer State" + }, + "refer_to": { + "required": true, + "type": "ReferTo", + "description": "Refer-To information with optionally both affected channels" + }, + "referred_by": { + "required": true, + "type": "ReferredBy", + "description": "Referred-By SIP Header according rfc3892" + } + } + }, + "ReferTo": { + "id": "ReferTo", + "description": "transfer destination requested by transferee", + "properties": { + "requested_destination": { + "required": true, + "type": "RequiredDestination" + }, + "destination_channel": { + "required": false, + "type": "Channel", + "description": "The Channel Object, that is to be replaced" + }, + "connected_channel": { + "required": false, + "type": "Channel", + "description": "Channel, connected to the to be replaced channel" + }, + "bridge": { + "required": false, + "type": "Bridge", + "description": "Bridge connecting both destination channels" + } + } + }, + "ReferredBy": { + "id": "ReferredBy", + "description": "transfer destination requested by transferee", + "properties": { + "source_channel": { + "required": true, + "type": "Channel", + "description": "The channel on which the refer was received" + }, + "connected_channel": { + "required": false, + "type": "Channel", + "description": "Channel, Connected to the channel, receiving the transfer request on." + }, + "bridge": { + "required": false, + "type": "Bridge", + "description": "Bridge connecting both Channels" + } + } + }, + "RequiredDestination": { + "id": "RequiredDestination", + "description": "Information about the requested destination", + "properties": { + "protocol_id": { + "required": false, + "type": "string", + "description": "the requested protocol-id by the referee in case of SIP channel, this is a SIP Call ID, Mutually exclusive to destination" + }, + "destination": { + "required": false, + "type": "string", + "description": "Destination User Part. Only for Blind transfer. Mutually exclusive to protocol_id" + }, + "additional_protocol_params": { + "required": false, + "type": "List[AdditionalParam]", + "description": "List of additional protocol specific information" + } + } + }, + "AdditionalParam": { + "id": "AdditionalParam", + "description": "Protocol specific additional parameter", + "properties": { + "parameter_name": { + "required": true, + "type": "string", + "description": "Name of the parameter" + }, + "parameter_value": { + "required": true, + "type": "string", + "description": "Value of the parameter" + } + } + }, + "RESTHeader": { + "id": "RESTHeader", + "description": "REST over Websocket header", + "properties": { + "name": { + "type": "string", + "description": "Header name", + "required": true + }, + "value": { + "required": true, + "type": "string", + "description": "Header value" + } + } + }, + "RESTQueryStringParameter": { + "id": "RESTQueryStringParameter", + "description": "REST over Websocket Query String Parameter", + "properties": { + "name": { + "type": "string", + "description": "Parameter name", + "required": true + }, + "value": { + "required": true, + "type": "string", + "description": "Parameter value" + } + } + }, + "RESTRequest": { + "id": "RESTRequest", + "description": "REST over Websocket Request.", + "properties": { + "type": { + "type": "string", + "description": "Message type. Must be 'RESTRequest'", + "required": true + }, + "transaction_id": { + "type": "string", + "description": "Opaque transaction id. Can be any valid string. Will be returned in any response to this request.", + "required": true + }, + "request_id": { + "type": "string", + "description": "Opaque request id. Can be any valid string. Will be returned in any response to this request.", + "required": true + }, + "method": { + "required": true, + "type": "string", + "description": "HTTP method (GET, PUT, POST, DELETE, etc.)" + }, + "uri": { + "required": true, + "type": "string", + "description": "Resource URI with optional query string parameters." + }, + "content_type": { + "required": false, + "type": "string", + "description": "The Content-Type of the message body." + }, + "query_strings": { + "required": false, + "type": "List[RESTQueryStringParameter]", + "description": "Request query string parameters." + }, + "message_body": { + "required": false, + "type": "string", + "description": "Request message body. Only content types application/json and application/x-www-form-urlencoded are supported." + } + } + }, + "RESTResponse": { + "id": "RESTResponse", + "description": "REST over Websocket Response.", + "properties": { + "transaction_id": { + "type": "string", + "description": "Opaque transaction id. Will be whatever was specified on the original request.", + "required": true + }, + "request_id": { + "type": "string", + "description": "Opaque request id. Will be whatever was specified on the original request.", + "required": true + }, + "status_code": { + "required": true, + "type": "int", + "description": "HTTP status code" + }, + "reason_phrase": { + "required": true, + "type": "string", + "description": "HTTP reason phrase" + }, + "uri": { + "required": true, + "type": "string", + "description": "Original request resource URI" + }, + "content_type": { + "required": false, + "type": "string", + "description": "The Content-Type of the message body." + }, + "message_body": { + "required": false, + "type": "string", + "description": "Response message body" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_8_0_0/mailboxes.json b/codegen/src/main/resources/codegen-data/ari_8_0_0/mailboxes.json new file mode 100644 index 00000000..d99e1eac --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_8_0_0/mailboxes.json @@ -0,0 +1,152 @@ +{ + "_copyright": "Copyright (C) 2013, Digium, Inc.", + "_author": "Jonathan Rose ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/mailboxes.{format}", + "since": [ + "12.1.0" + ], + "requiresModules": [ + "res_stasis_mailbox" + ], + "apis": [ + { + "path": "/mailboxes", + "description": "Mailboxes", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.1.0" + ], + "summary": "List all mailboxes.", + "nickname": "list", + "responseClass": "List[Mailbox]" + } + ] + }, + { + "path": "/mailboxes/{mailboxName}", + "description": "Mailbox state", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.1.0" + ], + "summary": "Retrieve the current state of a mailbox.", + "nickname": "get", + "responseClass": "Mailbox", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + }, + { + "httpMethod": "PUT", + "since": [ + "12.1.0" + ], + "summary": "Change the state of a mailbox. (Note - implicitly creates the mailbox).", + "nickname": "update", + "responseClass": "void", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "oldMessages", + "description": "Count of old messages in the mailbox", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "newMessages", + "description": "Count of new messages in the mailbox", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "int" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "12.1.0" + ], + "summary": "Destroy a mailbox.", + "nickname": "delete", + "responseClass": "void", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + } + ] + } + ], + "models": { + "Mailbox": { + "id": "Mailbox", + "description": "Represents the state of a mailbox.", + "properties": { + "name": { + "type": "string", + "description": "Name of the mailbox.", + "required": true + }, + "old_messages": { + "type": "int", + "description": "Count of old messages in the mailbox.", + "required": true + }, + "new_messages": { + "type": "int", + "description": "Count of new messages in the mailbox.", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_8_0_0/playbacks.json b/codegen/src/main/resources/codegen-data/ari_8_0_0/playbacks.json new file mode 100644 index 00000000..a7892f18 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_8_0_0/playbacks.json @@ -0,0 +1,177 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/playbacks.{format}", + "since": [ + "12.0.0" + ], + "requiresModules": [ + "res_stasis_playback" + ], + "apis": [ + { + "path": "/playbacks/{playbackId}", + "description": "Control object for a playback operation.", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "Get a playback's details.", + "nickname": "get", + "responseClass": "Playback", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "The playback cannot be found" + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "12.0.0" + ], + "summary": "Stop a playback.", + "nickname": "stop", + "responseClass": "void", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "The playback cannot be found" + } + ] + } + ] + }, + { + "path": "/playbacks/{playbackId}/control", + "description": "Control object for a playback operation.", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Control a playback.", + "nickname": "control", + "responseClass": "void", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "operation", + "description": "Operation to perform on the playback.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "restart", + "pause", + "unpause", + "reverse", + "forward" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "The provided operation parameter was invalid" + }, + { + "code": 404, + "reason": "The playback cannot be found" + }, + { + "code": 409, + "reason": "The operation cannot be performed in the playback's current state" + } +] + } + ] + } + ], + "models": { + "Playback": { + "id": "Playback", + "description": "Object representing the playback of media to a channel", + "properties": { + "id": { + "type": "string", + "description": "ID for this playback operation", + "required": true + }, + "media_uri": { + "type": "string", + "description": "The URI for the media currently being played back.", + "required": true + }, + "next_media_uri": { + "type": "string", + "description": "If a list of URIs is being played, the next media URI to be played back.", + "required": false + }, + "target_uri": { + "type": "string", + "description": "URI for the channel or bridge to play the media on", + "required": true + }, + "language": { + "type": "string", + "description": "For media types that support multiple languages, the language requested for playback." + }, + "state": { + "type": "string", + "description": "Current state of the playback operation.", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "queued", + "playing", + "continuing", + "done", + "failed" + ] + } + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_8_0_0/recordings.json b/codegen/src/main/resources/codegen-data/ari_8_0_0/recordings.json new file mode 100644 index 00000000..1496db8a --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_8_0_0/recordings.json @@ -0,0 +1,452 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/recordings.{format}", + "since": [ + "12.0.0" + ], + "requiresModules": [ + "res_stasis_recording" + ], + "apis": [ + { + "path": "/recordings/stored", + "description": "Recordings", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "List recordings that are complete.", + "nickname": "listStored", + "responseClass": "List[StoredRecording]" + } + ] + }, + { + "path": "/recordings/stored/{recordingName}", + "description": "Individual recording", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "Get a stored recording's details.", + "nickname": "getStored", + "responseClass": "StoredRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "12.0.0" + ], + "summary": "Delete a stored recording.", + "nickname": "deleteStored", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/stored/{recordingName}/file", + "description": "The actual file associated with the stored recording", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "14.0.0" + ], + "summary": "Get the file associated with the stored recording.", + "nickname": "getStoredFile", + "responseClass": "binary", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 403, + "reason": "The recording file could not be opened" + }, + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/stored/{recordingName}/copy", + "description": "Copy an individual recording", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.5.0" + ], + "summary": "Copy a stored recording.", + "nickname": "copyStored", + "responseClass": "StoredRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording to copy", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "destinationRecordingName", + "description": "The destination name of the recording", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "A recording with the same name already exists on the system" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}", + "description": "A recording that is in progress", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "List live recordings.", + "nickname": "getLive", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "12.0.0" + ], + "summary": "Stop a live recording and discard it.", + "nickname": "cancel", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/stop", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Stop a live recording and store it.", + "nickname": "stop", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/pause", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Pause a live recording.", + "notes": "Pausing a recording suspends silence detection, which will be restarted when the recording is unpaused. Paused time is not included in the accounting for maxDurationSeconds.", + "nickname": "pause", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "12.0.0" + ], + "summary": "Unpause a live recording.", + "nickname": "unpause", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/mute", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Mute a live recording.", + "notes": "Muting a recording suspends silence detection, which will be restarted when the recording is unmuted.", + "nickname": "mute", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "12.0.0" + ], + "summary": "Unmute a live recording.", + "nickname": "unmute", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + } + ] + } + ], + "models": { + "StoredRecording": { + "id": "StoredRecording", + "description": "A past recording that may be played back.", + "properties": { + "name": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + }, + "LiveRecording": { + "id": "LiveRecording", + "description": "A recording that is in progress", + "properties": { + "name": { + "required": true, + "type": "string", + "description": "Base name for the recording" + }, + "format": { + "required": true, + "type": "string", + "description": "Recording format (wav, gsm, etc.)" + }, + "target_uri": { + "required": true, + "type": "string", + "description": "URI for the channel or bridge being recorded" + }, + "state": { + "required": true, + "type": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "queued", + "recording", + "paused", + "done", + "failed", + "canceled" + ] + } + }, + "duration": { + "required": false, + "type": "int", + "description": "Duration in seconds of the recording" + }, + "talking_duration": { + "required": false, + "type": "int", + "description": "Duration of talking, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds." + }, + "silence_duration": { + "required": false, + "type": "int", + "description": "Duration of silence, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds." + }, + "cause": { + "required": false, + "type": "string", + "description": "Cause for recording failure if failed" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_8_0_0/sounds.json b/codegen/src/main/resources/codegen-data/ari_8_0_0/sounds.json new file mode 100644 index 00000000..aee4d369 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_8_0_0/sounds.json @@ -0,0 +1,108 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/sounds.{format}", + "since": [ + "12.0.0" + ], + "apis": [ + { + "path": "/sounds", + "description": "Sounds", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "List all sounds.", + "nickname": "list", + "responseClass": "List[Sound]", + "parameters": [ + { + "name": "lang", + "description": "Lookup sound for a specific language.", + "paramType": "query", + "dataType": "string", + "required": false + }, + { + "name": "format", + "description": "Lookup sound in a specific format.", + "paramType": "query", + "dataType": "string", + "required": false, + "__note": "core show translation can show translation paths between formats, along with relative costs. so this could be just installed format, or we could follow that for transcoded formats." + } + ] + } + ] + }, + { + "path": "/sounds/{soundId}", + "description": "Individual sound", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "Get a sound's details.", + "nickname": "get", + "responseClass": "Sound", + "parameters": [ + { + "name": "soundId", + "description": "Sound's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ] + } + ] + } + ], + "models": { + "FormatLangPair": { + "id": "FormatLangPair", + "description": "Identifies the format and language of a sound file", + "properties": { + "language": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + }, + "Sound": { + "id": "Sound", + "description": "A media file that may be played back.", + "properties": { + "id": { + "required": true, + "description": "Sound's identifier.", + "type": "string" + }, + "text": { + "required": false, + "description": "Text description of the sound, usually the words spoken.", + "type": "string" + }, + "formats": { + "required": true, + "description": "The formats and languages in which this sound is available.", + "type": "List[FormatLangPair]" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_9_0_0/applications.json b/codegen/src/main/resources/codegen-data/ari_9_0_0/applications.json new file mode 100644 index 00000000..8ad9f36d --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_9_0_0/applications.json @@ -0,0 +1,242 @@ +{ + "_copyright": "Copyright (C) 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/applications.{format}", + "since": [ + "13.0.0" + ], + "apis": [ + { + "path": "/applications", + "description": "Stasis applications", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "13.0.0" + ], + "summary": "List all applications.", + "nickname": "list", + "responseClass": "List[Application]" + } + ] + }, + { + "path": "/applications/{applicationName}", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "13.0.0" + ], + "summary": "Get details of an application.", + "nickname": "get", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Application does not exist." + } + ] + } + ] + }, + { + "path": "/applications/{applicationName}/subscription", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "13.0.0" + ], + "summary": "Subscribe an application to a event source.", + "notes": "Returns the state of the application after the subscriptions have changed", + "nickname": "subscribe", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "eventSource", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing parameter." + }, + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 422, + "reason": "Event source does not exist." + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "13.0.0" + ], + "summary": "Unsubscribe an application from an event source.", + "notes": "Returns the state of the application after the subscriptions have changed", + "nickname": "unsubscribe", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "eventSource", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing parameter; event source scheme not recognized." + }, + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 409, + "reason": "Application not subscribed to event source." + }, + { + "code": 422, + "reason": "Event source does not exist." + } + ] + } + ] + }, + { + "path": "/applications/{applicationName}/eventFilter", + "description": "Stasis application", + "operations": [ + { + "httpMethod": "PUT", + "since": [ + "13.26.0", + "16.3.0" + ], + "summary": "Filter application events types.", + "notes": "Allowed and/or disallowed event type filtering can be done. The body (parameter) should specify a JSON key/value object that describes the type of event filtering needed. One, or both of the following keys can be designated:

\"allowed\" - Specifies an allowed list of event types
\"disallowed\" - Specifies a disallowed list of event types

Further, each of those key's value should be a JSON array that holds zero, or more JSON key/value objects. Each of these objects must contain the following key with an associated value:

\"type\" - The type name of the event to filter

The value must be the string name (case sensitive) of the event type that needs filtering. For example:

{ \"allowed\": [ { \"type\": \"StasisStart\" }, { \"type\": \"StasisEnd\" } ] }

As this specifies only an allowed list, then only those two event type messages are sent to the application. No other event messages are sent.

The following rules apply:

* If the body is empty, both the allowed and disallowed filters are set empty.
* If both list types are given then both are set to their respective values (note, specifying an empty array for a given type sets that type to empty).
* If only one list type is given then only that type is set. The other type is not updated.
* An empty \"allowed\" list means all events are allowed.
* An empty \"disallowed\" list means no events are disallowed.
* Disallowed events take precedence over allowed events if the event type is specified in both lists.", + "nickname": "filter", + "responseClass": "Application", + "parameters": [ + { + "name": "applicationName", + "description": "Application's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "filter", + "description": "Specify which event types to allow/disallow", + "paramType": "body", + "required": false, + "dataType": "object", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Bad request." + }, + { + "code": 404, + "reason": "Application does not exist." + } + ] + } + ] + } + ], + "models": { + "Application": { + "id": "Application", + "description": "Details of a Stasis application", + "properties": { + "name": { + "type": "string", + "description": "Name of this application", + "required": true + }, + "channel_ids": { + "type": "List[string]", + "description": "Id's for channels subscribed to.", + "required": true + }, + "bridge_ids": { + "type": "List[string]", + "description": "Id's for bridges subscribed to.", + "required": true + }, + "endpoint_ids": { + "type": "List[string]", + "description": "{tech}/{resource} for endpoints subscribed to.", + "required": true + }, + "device_names": { + "type": "List[string]", + "description": "Names of the devices subscribed to.", + "required": true + }, + "events_allowed": { + "type": "List[object]", + "description": "Event types sent to the application.", + "required": true + }, + "events_disallowed": { + "type": "List[object]", + "description": "Event types not sent to the application.", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_9_0_0/asterisk.json b/codegen/src/main/resources/codegen-data/ari_9_0_0/asterisk.json new file mode 100644 index 00000000..83fef8b7 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_9_0_0/asterisk.json @@ -0,0 +1,777 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/asterisk.{format}", + "since": [ + "12.0.0" + ], + "apis": [ + { + "path": "/asterisk/config/dynamic/{configClass}/{objectType}/{id}", + "description": "Asterisk dynamic configuration", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "13.5.0" + ], + "summary": "Retrieve a dynamic configuration object.", + "nickname": "getObject", + "responseClass": "List[ConfigTuple]", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to retrieve.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to retrieve.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "{configClass|objectType|id} not found" + } + ] + }, + { + "httpMethod": "PUT", + "since": [ + "13.5.0" + ], + "summary": "Create or update a dynamic configuration object.", + "nickname": "updateObject", + "responseClass": "List[ConfigTuple]", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to create or update.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to create or update.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "fields", + "description": "The body object should have a value that is a list of ConfigTuples, which provide the fields to update. Ex. [ { \"attribute\": \"directmedia\", \"value\": \"false\" } ]", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Bad request body" + }, + { + "code": 403, + "reason": "Could not create or update object" + }, + { + "code": 404, + "reason": "{configClass|objectType} not found" + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "13.5.0" + ], + "summary": "Delete a dynamic configuration object.", + "nickname": "deleteObject", + "responseClass": "void", + "parameters": [ + { + "name": "configClass", + "description": "The configuration class containing dynamic configuration objects.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "objectType", + "description": "The type of configuration object to delete.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "id", + "description": "The unique identifier of the object to delete.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 403, + "reason": "Could not delete object" + }, + { + "code": 404, + "reason": "{configClass|objectType|id} not found" + } + ] + } + ] + }, + { + "path": "/asterisk/info", + "description": "Asterisk system information (similar to core show settings)", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "Gets Asterisk system information.", + "nickname": "getInfo", + "responseClass": "AsteriskInfo", + "parameters": [ + { + "name": "only", + "description": "Filter information returned", + "paramType": "query", + "required": false, + "allowMultiple": true, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "build", + "system", + "config", + "status" + ] + } + } + ] + } + ] + }, + { + "path": "/asterisk/ping", + "description": "Asterisk ping", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "13.25.0", + "16.2.0" + ], + "summary": "Response pong message.", + "nickname": "ping", + "responseClass": "AsteriskPing" + } + ] + }, + { + "path": "/asterisk/modules", + "description": "Asterisk modules", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "13.5.0" + ], + "summary": "List Asterisk modules.", + "nickname": "listModules", + "responseClass": "List[Module]" + } + ] + }, + { + "path": "/asterisk/modules/{moduleName}", + "description": "Asterisk module", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "13.5.0" + ], + "summary": "Get Asterisk module information.", + "nickname": "getModule", + "responseClass": "Module", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module could not be found in running modules." + }, + { + "code": 409, + "reason": "Module information could not be retrieved." + } + ] + }, + { + "httpMethod": "POST", + "since": [ + "13.5.0" + ], + "summary": "Load an Asterisk module.", + "nickname": "loadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 409, + "reason": "Module could not be loaded." + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "13.5.0" + ], + "summary": "Unload an Asterisk module.", + "nickname": "unloadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module not found in running modules." + }, + { + "code": 409, + "reason": "Module could not be unloaded." + } + ] + }, + { + "httpMethod": "PUT", + "since": [ + "13.5.0" + ], + "summary": "Reload an Asterisk module.", + "nickname": "reloadModule", + "responseClass": "void", + "parameters": [ + { + "name": "moduleName", + "description": "Module's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Module not found in running modules." + }, + { + "code": 409, + "reason": "Module could not be reloaded." + } + ] + } + ] + }, + { + "path": "/asterisk/logging", + "description": "Asterisk log channels", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "13.6.0" + ], + "summary": "Gets Asterisk log channel information.", + "nickname": "listLogChannels", + "responseClass": "List[LogChannel]" + } + ] + }, + { + "path": "/asterisk/logging/{logChannelName}", + "description": "Asterisk log channel", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "13.6.0" + ], + "summary": "Adds a log channel.", + "nickname": "addLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "The log channel to add", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "configuration", + "description": "levels of the log channel", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Bad request body" + }, + { + "code": 409, + "reason": "Log channel could not be created." + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "13.6.0" + ], + "summary": "Deletes a log channel.", + "nickname": "deleteLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "Log channels name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Log channel does not exist." + } + ] + } + ] + }, + { + "path": "/asterisk/logging/{logChannelName}/rotate", + "description": "Asterisk log channel", + "operations": [ + { + "httpMethod": "PUT", + "since": [ + "13.6.0" + ], + "summary": "Rotates a log channel.", + "nickname": "rotateLog", + "responseClass": "void", + "parameters": [ + { + "name": "logChannelName", + "description": "Log channel's name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Log channel does not exist." + } + ] + } + ] + }, + { + "path": "/asterisk/variable", + "description": "Global variables", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "Get the value of a global variable.", + "nickname": "getGlobalVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "variable", + "description": "The variable to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + } + ] + }, + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Set the value of a global variable.", + "nickname": "setGlobalVar", + "responseClass": "void", + "parameters": [ + { + "name": "variable", + "description": "The variable to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + } + ] + } + ] + } + ], + "models": { + "BuildInfo": { + "id": "BuildInfo", + "description": "Info about how Asterisk was built", + "properties": { + "os": { + "required": true, + "type": "string", + "description": "OS Asterisk was built on." + }, + "kernel": { + "required": true, + "type": "string", + "description": "Kernel version Asterisk was built on." + }, + "options": { + "required": true, + "type": "string", + "description": "Compile time options, or empty string if default." + }, + "machine": { + "required": true, + "type": "string", + "description": "Machine architecture (x86_64, i686, ppc, etc.)" + }, + "date": { + "required": true, + "type": "string", + "description": "Date and time when Asterisk was built." + }, + "user": { + "required": true, + "type": "string", + "description": "Username that build Asterisk" + } + } + }, + "SystemInfo": { + "id": "SystemInfo", + "description": "Info about Asterisk", + "properties": { + "version": { + "required": true, + "type": "string", + "description": "Asterisk version." + }, + "entity_id": { + "required": true, + "type": "string", + "description": "" + } + } + }, + "SetId": { + "id": "SetId", + "description": "Effective user/group id", + "properties": { + "user": { + "required": true, + "type": "string", + "description": "Effective user id." + }, + "group": { + "required": true, + "type": "string", + "description": "Effective group id." + } + } + }, + "ConfigInfo": { + "id": "ConfigInfo", + "description": "Info about Asterisk configuration", + "properties": { + "name": { + "required": true, + "type": "string", + "description": "Asterisk system name." + }, + "default_language": { + "required": true, + "type": "string", + "description": "Default language for media playback." + }, + "max_channels": { + "required": false, + "type": "int", + "description": "Maximum number of simultaneous channels." + }, + "max_open_files": { + "required": false, + "type": "int", + "description": "Maximum number of open file handles (files, sockets)." + }, + "max_load": { + "required": false, + "type": "double", + "description": "Maximum load avg on system." + }, + "setid": { + "required": true, + "type": "SetId", + "description": "Effective user/group id for running Asterisk." + } + } + }, + "StatusInfo": { + "id": "StatusInfo", + "description": "Info about Asterisk status", + "properties": { + "startup_time": { + "required": true, + "type": "Date", + "description": "Time when Asterisk was started." + }, + "last_reload_time": { + "required": true, + "type": "Date", + "description": "Time when Asterisk was last reloaded." + } + } + }, + "AsteriskInfo": { + "id": "AsteriskInfo", + "description": "Asterisk system information", + "properties": { + "build": { + "required": false, + "type": "BuildInfo", + "description": "Info about how Asterisk was built" + }, + "system": { + "required": false, + "type": "SystemInfo", + "description": "Info about the system running Asterisk" + }, + "config": { + "required": false, + "type": "ConfigInfo", + "description": "Info about Asterisk configuration" + }, + "status": { + "required": false, + "type": "StatusInfo", + "description": "Info about Asterisk status" + } + } + }, + "AsteriskPing": { + "id": "AsteriskPing", + "description": "Asterisk ping information", + "properties": { + "asterisk_id": { + "required": true, + "type": "string", + "description": "Asterisk id info" + }, + "ping": { + "required": true, + "type": "string", + "description": "Always string value is pong" + }, + "timestamp": { + "required": true, + "type": "string", + "description": "The timestamp string of request received time" + } + } + }, + "Module": { + "id": "Module", + "description": "Details of an Asterisk module", + "properties": { + "name": { + "type": "string", + "description": "The name of this module", + "required": true + }, + "description": { + "type": "string", + "description": "The description of this module", + "required": true + }, + "use_count": { + "type": "int", + "description": "The number of times this module is being used", + "required": true + }, + "status": { + "type": "string", + "description": "The running status of this module", + "required": true + }, + "support_level": { + "type": "string", + "description": "The support state of this module", + "required": true + } + } + }, + "LogChannel": { + "id": "LogChannel", + "description": "Details of an Asterisk log channel", + "properties": { + "channel": { + "type": "string", + "description": "The log channel path", + "required": true + }, + "type": { + "type": "string", + "description": "Types of logs for the log channel", + "required": true + }, + "status": { + "type": "string", + "description": "Whether or not a log type is enabled", + "required": true + }, + "configuration": { + "type": "string", + "description": "The various log levels", + "required": true + } + } + }, + "Variable": { + "id": "Variable", + "description": "The value of a channel variable", + "properties": { + "value": { + "required": true, + "type": "string", + "description": "The value of the variable requested" + } + } + }, + "ConfigTuple": { + "id": "ConfigTuple", + "description": "A key/value pair that makes up part of a configuration object.", + "properties": { + "attribute": { + "required": true, + "type": "string", + "description": "A configuration object attribute." + }, + "value": { + "required": true, + "type": "string", + "description": "The value for the attribute." + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_9_0_0/bridges.json b/codegen/src/main/resources/codegen-data/ari_9_0_0/bridges.json new file mode 100644 index 00000000..4cd15b97 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_9_0_0/bridges.json @@ -0,0 +1,833 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/bridges.{format}", + "since": [ + "12.0.0" + ], + "requiresModules": [ + "res_stasis_recording", + "res_stasis_playback" + ], + "apis": [ + { + "path": "/bridges", + "description": "Active bridges", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "List all active bridges in Asterisk.", + "nickname": "list", + "responseClass": "List[Bridge]" + }, + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Create a new bridge.", + "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", + "nickname": "create", + "responseClass": "Bridge", + "parameters": [ + { + "name": "type", + "description": "Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media, video_sfu, video_single, sdp_label).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "bridgeId", + "description": "Unique ID to give to the bridge being created.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Name to give to the bridge being created.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 409, + "reason": "Bridge with the same bridgeId already exists" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}", + "description": "Individual bridge", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.2.0" + ], + "summary": "Create a new bridge.", + "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.", + "nickname": "createWithId", + "responseClass": "Bridge", + "parameters": [ + { + "name": "type", + "description": "Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media, video_sfu, video_single, sdp_label) to set.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "bridgeId", + "description": "Unique ID to give to the bridge being created.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Set the name of the bridge.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 409, + "reason": "Bridge with the same bridgeId already exists" + } + ] + }, + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "Get bridge details.", + "nickname": "get", + "responseClass": "Bridge", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "12.0.0" + ], + "summary": "Shut down a bridge.", + "notes": "If any channels are in this bridge, they will be removed and resume whatever they were doing beforehand.", + "nickname": "destroy", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/addChannel", + "description": "Add a channel to a bridge", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Add a channel to a bridge.", + "nickname": "addChannel", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channel", + "description": "Ids of channels to add to bridge", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "role", + "description": "Channel's role in the bridge", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "absorbDTMF", + "description": "Absorb DTMF coming from this channel, preventing it to pass through to the bridge", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "mute", + "description": "Mute audio from this channel, preventing it to pass through to the bridge", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "inhibitConnectedLineUpdates", + "description": "Do not present the identity of the newly connected channel to other bridge members", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Channel not found" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application; Channel currently recording" + }, + { + "code": 422, + "reason": "Channel not in Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/removeChannel", + "description": "Remove a channel from a bridge", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Remove a channel from a bridge.", + "nickname": "removeChannel", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channel", + "description": "Ids of channels to remove from bridge", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Channel not found" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + }, + { + "code": 422, + "reason": "Channel not in this bridge" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/videoSource/{channelId}", + "description": "Set a channel as the video source in a multi-party bridge", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "13.13.0", + "14.2.0" + ], + "summary": "Set a channel as the video source in a multi-party mixing bridge. This operation has no effect on bridges with two or fewer participants.", + "nickname": "setVideoSource", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge or Channel not found" + }, + { + "code": 409, + "reason": "Channel not in Stasis application" + }, + { + "code": 422, + "reason": "Channel not in this Bridge" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/videoSource", + "description": "Removes any explicit video source", + "operations": [ + { + "httpMethod": "DELETE", + "since": [ + "13.13.0", + "14.2.0" + ], + "summary": "Removes any explicit video source in a multi-party mixing bridge. This operation has no effect on bridges with two or fewer participants. When no explicit video source is set, talk detection will be used to determine the active video stream.", + "nickname": "clearVideoSource", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/moh", + "description": "Play music on hold to a bridge", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Play music on hold to a bridge or change the MOH class that is playing.", + "nickname": "startMoh", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "mohClass", + "description": "Channel's id", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "12.0.0" + ], + "summary": "Stop playing music on hold to a bridge.", + "notes": "This will only stop music on hold being played via POST bridges/{bridgeId}/moh.", + "nickname": "stopMoh", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/play", + "description": "Play media to the participants of a bridge", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Start playback of media on a bridge.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "play", + "responseClass": "Playback", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "playbackId", + "description": "Playback Id.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/play/{playbackId}", + "description": "Play media to a bridge", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.3.0" + ], + "summary": "Start playback of media on a bridge.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "playWithId", + "responseClass": "Playback", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + + } + ] + }, + { + "path": "/bridges/{bridgeId}/record", + "description": "Record audio on a bridge", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Start a recording.", + "notes": "This records the mixed audio from all channels participating in this bridge.", + "nickname": "record", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Recording's filename", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "maxDurationSeconds", + "description": "Maximum duration of the recording, in seconds. 0 for no limit.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "maxSilenceSeconds", + "description": "Maximum duration of silence, in seconds. 0 for no limit.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "ifExists", + "description": "Action to take if a recording with the same name already exists.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "fail", + "allowableValues": { + "valueType": "LIST", + "values": [ + "fail", + "overwrite", + "append" + ] + } + }, + { + "name": "beep", + "description": "Play beep when recording begins", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "terminateOn", + "description": "DTMF input to terminate recording.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "any", + "*", + "#" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge is not in a Stasis application; A recording with the same name already exists on the system and can not be overwritten because it is in progress or ifExists=fail" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + } + ], + "models": { + "Bridge": { + "id": "Bridge", + "description": "The merging of media from one or more channels.\n\nEveryone on the bridge receives the same audio.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for this bridge", + "required": true + }, + "technology": { + "type": "string", + "description": "Name of the current bridging technology", + "required": true + }, + "bridge_type": { + "type": "string", + "description": "Type of bridge technology", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "mixing", + "holding" + ] + } + }, + "bridge_class": { + "type": "string", + "description": "Bridging class", + "required": true + }, + "creator": { + "type": "string", + "description": "Entity that created the bridge", + "required": true + }, + "name": { + "type": "string", + "description": "Name the creator gave the bridge", + "required": true + }, + "channels": { + "type": "List[string]", + "description": "Ids of channels participating in this bridge", + "required": true + }, + "video_mode": { + "type": "string", + "description": "The video mode the bridge is using. One of 'none', 'talker', 'sfu', or 'single'.", + "required": false + }, + "video_source_id": { + "type": "string", + "description": "The ID of the channel that is the source of video in this bridge, if one exists.", + "required": false + }, + "creationtime": { + "required": true, + "type": "Date", + "description": "Timestamp when bridge was created" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_9_0_0/channels.json b/codegen/src/main/resources/codegen-data/ari_9_0_0/channels.json new file mode 100644 index 00000000..a50b8720 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_9_0_0/channels.json @@ -0,0 +1,2399 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/channels.{format}", + "since": [ + "12.0.0" + ], + "requiresModules": [ + "res_stasis_answer", + "res_stasis_playback", + "res_stasis_recording", + "res_stasis_snoop" + ], + "apis": [ + { + "path": "/channels", + "description": "Active channels", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "List all active channels in Asterisk.", + "nickname": "list", + "responseClass": "List[Channel]" + }, + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Create a new channel (originate).", + "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.", + "nickname": "originate", + "responseClass": "Channel", + "parameters": [ + { + "name": "endpoint", + "description": "Endpoint to call.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to dial after the endpoint answers. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to dial after the endpoint answers. If omitted, uses 'default'. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to dial after the endpoint answers. If omitted, uses 1. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "long" + }, + { + "name": "label", + "description": "The label to dial after the endpoint answers. Will supersede 'priority' if provided. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The application that is subscribed to the originated channel. When the channel is answered, it will be passed to this Stasis application. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "callerId", + "description": "CallerID to use when dialing the endpoint or extension.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 30 + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "The unique id of the channel which is originating this one.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "formats", + "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for originating a channel." + }, + { + "code": 409, + "reason": "Channel with given unique ID already exists." + } + ] + } + ] + }, + { + "path": "/channels/create", + "description": "Create a channel and place it in a Stasis app, but do not dial the channel yet.", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "14.0.0" + ], + "summary": "Create channel.", + "nickname": "create", + "responseClass": "Channel", + "parameters": [ + { + "name": "endpoint", + "description": "Endpoint for channel communication", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "Stasis Application to place channel into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "Unique ID of the calling channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "formats", + "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 409, + "reason": "Channel with given unique ID already exists." + } + ] + } + ] + }, + { + "path": "/channels/{channelId}", + "description": "Active channel", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "Channel details.", + "nickname": "get", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + } + ] + }, + { + "httpMethod": "POST", + "since": [ + "12.2.0" + ], + "summary": "Create a new channel (originate with id).", + "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.", + "nickname": "originateWithId", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "endpoint", + "description": "Endpoint to call.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to dial after the endpoint answers. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to dial after the endpoint answers. If omitted, uses 'default'. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to dial after the endpoint answers. If omitted, uses 1. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "long" + }, + { + "name": "label", + "description": "The label to dial after the endpoint answers. Will supersede 'priority' if provided. Mutually exclusive with 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The application that is subscribed to the originated channel. When the channel is answered, it will be passed to this Stasis application. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "callerId", + "description": "CallerID to use when dialing the endpoint or extension.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 30 + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "otherChannelId", + "description": "The unique id to assign the second channel when using local channels.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "originator", + "description": "The unique id of the channel which is originating this one.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "formats", + "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\". Format names can be found with \"core show codecs\".", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for originating a channel." + }, + { + "code": 409, + "reason": "Channel with given unique ID already exists." + } + ] + + }, + { + "httpMethod": "DELETE", + "since": [ + "12.0.0" + ], + "summary": "Delete (i.e. hangup) a channel.", + "nickname": "hangup", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "reason_code", + "description": "The reason code for hanging up the channel for detail use. Mutually exclusive with 'reason'. See detail hangup codes at here. https://docs.asterisk.org/Configuration/Miscellaneous/Hangup-Cause-Mappings/", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "reason", + "description": "Reason for hanging up the channel for simple use. Mutually exclusive with 'reason_code'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "normal", + "busy", + "congestion", + "no_answer", + "timeout", + "rejected", + "unallocated", + "normal_unspecified", + "number_incomplete", + "codec_mismatch", + "interworking", + "failure", + "answered_elsewhere" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid reason for hangup provided" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/continue", + "description": "Exit application; continue execution in the dialplan", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Exit application; continue execution in the dialplan.", + "nickname": "continueInDialplan", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "context", + "description": "The context to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "extension", + "description": "The extension to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "priority", + "description": "The priority to continue to.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "label", + "description": "The label to continue to - will supersede 'priority' if both are provided.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/move", + "description": "Move the channel from one Stasis application to another.", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "13.26.0", + "16.3.0" + ], + "summary": "Move the channel from one Stasis application to another.", + "nickname": "move", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "The channel will be passed to this Stasis application.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application provided by 'app'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": "404", + "reason": "Channel not found" + }, + { + "code": "409", + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/redirect", + "description": "Inform the channel that it should redirect itself to a different location. Note that this will almost certainly cause the channel to exit the application.", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "13.3.0" + ], + "summary": "Redirect the channel to a different location.", + "nickname": "redirect", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "endpoint", + "description": "The endpoint to redirect the channel to", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Endpoint parameter not provided" + }, + { + "code": 404, + "reason": "Channel or endpoint not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 422, + "reason": "Endpoint is not the same type as the channel" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/answer", + "description": "Answer a channel", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Answer a channel.", + "nickname": "answer", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/ring", + "description": "Send a ringing indication to a channel", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Indicate ringing to a channel.", + "nickname": "ring", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "12.0.0" + ], + "summary": "Stop ringing indication on a channel if locally generated.", + "nickname": "ringStop", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/progress", + "description": "Indicate progress on a channel", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "22.6.0", + "21.11.0", + "20.16.0" + ], + "summary": "Indicate progress on a channel.", + "nickname": "progress", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/dtmf", + "description": "Send DTMF to a channel", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Send provided DTMF to a given channel.", + "nickname": "sendDTMF", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "dtmf", + "description": "DTMF To send.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "before", + "description": "Amount of time to wait before DTMF digits (specified in milliseconds) start.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0 + }, + { + "name": "between", + "description": "Amount of time in between DTMF digits (specified in milliseconds).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 100 + }, + { + "name": "duration", + "description": "Length of each DTMF digit (specified in milliseconds).", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 100 + }, + { + "name": "after", + "description": "Amount of time to wait after DTMF digits (specified in milliseconds) end.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0 + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "DTMF is required" + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/mute", + "description": "Mute a channel", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Mute a channel.", + "nickname": "mute", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "Direction in which to mute audio", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both", + "in", + "out" + ] + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "12.0.0" + ], + "summary": "Unmute a channel.", + "nickname": "unmute", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "Direction in which to unmute audio", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both", + "in", + "out" + ] + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/hold", + "description": "Put a channel on hold", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Hold a channel.", + "nickname": "hold", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "12.0.0" + ], + "summary": "Remove a channel from hold.", + "nickname": "unhold", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/moh", + "description": "Play music on hold to a channel", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Play music on hold to a channel.", + "notes": "Using media operations such as /play on a channel playing MOH in this manner will suspend MOH without resuming automatically. If continuing music on hold is desired, the stasis application must reinitiate music on hold.", + "nickname": "startMoh", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "mohClass", + "description": "Music on hold class to use", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "12.0.0" + ], + "summary": "Stop playing music on hold to a channel.", + "nickname": "stopMoh", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/silence", + "description": "Play silence to a channel", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Play silence to a channel.", + "notes": "Using media operations such as /play on a channel playing silence in this manner will suspend silence without resuming automatically.", + "nickname": "startSilence", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "12.0.0" + ], + "summary": "Stop playing silence to a channel.", + "nickname": "stopSilence", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/play", + "description": "Play media to a channel", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Start playback of media.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "play", + "responseClass": "Playback", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000 + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/play/{playbackId}", + "description": "Play media to a channel", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.2.0" + ], + "summary": "Start playback of media and specify the playbackId.", + "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)", + "nickname": "playWithId", + "responseClass": "Playback", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "playbackId", + "description": "Playback ID.", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "media", + "description": "Media URIs to play.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "offsetms", + "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "skipms", + "description": "Number of milliseconds to skip for forward/reverse operations.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 3000 + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/record", + "description": "Record audio from a channel", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Start a recording.", + "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.", + "nickname": "record", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "name", + "description": "Recording's filename", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "maxDurationSeconds", + "description": "Maximum duration of the recording, in seconds. 0 for no limit", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "maxSilenceSeconds", + "description": "Maximum duration of silence, in seconds. 0 for no limit", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + }, + { + "name": "ifExists", + "description": "Action to take if a recording with the same name already exists.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "fail", + "allowableValues": { + "valueType": "LIST", + "values": [ + "fail", + "overwrite", + "append" + ] + } + }, + { + "name": "beep", + "description": "Play beep when recording begins", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "terminateOn", + "description": "DTMF input to terminate recording", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "any", + "*", + "#" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel is not in a Stasis application; the channel is currently bridged with other channels; A recording with the same name already exists on the system and can not be overwritten because it is in progress or ifExists=fail" + }, + { + "code": 422, + "reason": "The format specified is unknown on this system" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/variable", + "description": "Variables on a channel", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "Get the value of a channel variable or function.", + "nickname": "getChannelVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The channel variable or function to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Channel or variable not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Set the value of a channel variable or function.", + "nickname": "setChannelVar", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The channel variable or function to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/snoop", + "description": "Snoop (spy/whisper) on a channel", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Start snooping.", + "notes": "Snoop (spy/whisper) on a specific channel.", + "nickname": "snoopChannel", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "spy", + "description": "Direction of audio to spy on", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "whisper", + "description": "Direction of audio to whisper into", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "app", + "description": "Application the snooping channel is placed into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "snoopId", + "description": "Unique ID to assign to snooping channel", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/snoop/{snoopId}", + "description": "Snoop (spy/whisper) on a channel", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.2.0" + ], + "summary": "Start snooping.", + "notes": "Snoop (spy/whisper) on a specific channel.", + "nickname": "snoopChannelWithId", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "snoopId", + "description": "Unique ID to assign to snooping channel", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "spy", + "description": "Direction of audio to spy on", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "whisper", + "description": "Direction of audio to whisper into", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "none", + "allowableValues": { + "valueType": "LIST", + "values": [ + "none", + "both", + "out", + "in" + ] + } + }, + { + "name": "app", + "description": "Application the snooping channel is placed into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "appArgs", + "description": "The application arguments to pass to the Stasis application", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 404, + "reason": "Channel not found" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/dial", + "description": "Dial a channel", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "14.0.0" + ], + "summary": "Dial a created channel.", + "nickname": "dial", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "caller", + "description": "Channel ID of caller", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "timeout", + "description": "Dial timeout", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "int", + "defaultValue": 0, + "allowableValues": { + "valueType": "RANGE", + "min": 0 + } + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel cannot be found." + }, + { + "code": 409, + "reason": "Channel cannot be dialed." + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/rtp_statistics", + "description": "Get RTP statistics information for RTP on a channel", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "13.27.0", + "16.4.0" + ], + "summary": "RTP stats on a channel.", + "nickname": "rtpstatistics", + "responseClass": "RTPstat", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel cannot be found." + } + ] + } + ] + }, + { + "path": "/channels/externalMedia", + "description": "Create a channel to an External Media source/sink.", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "16.6.0", + "17.1.0" + ], + "summary": "Start an External Media session.", + "notes": "Create a channel to an External Media source/sink. The combination of transport and encapsulation will select one of chan_rtp(udp/rtp), chan_audiosocket(tcp/audiosocket) or chan_websocket(websocket/none) channel drivers.", + "nickname": "externalMedia", + "responseClass": "Channel", + "parameters": [ + { + "name": "channelId", + "description": "The unique id to assign the channel on creation.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "app", + "description": "Stasis Application to place channel into", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + }, + { + "name": "external_host", + "description": "Hostname/ip:port or websocket_client connection ID of external host. May be empty for a websocket server connection.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "encapsulation", + "description": "Payload encapsulation protocol. Must be 'none' for the websocket transport.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "rtp", + "allowableValues": { + "valueType": "LIST", + "values": [ + "rtp", + "audiosocket", + "none" + ] + } + }, + { + "name": "transport", + "description": "Transport protocol", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "udp", + "allowableValues": { + "valueType": "LIST", + "values": [ + "udp", + "tcp", + "websocket" + ] + } + }, + { + "name": "connection_type", + "description": "Connection type (client/server). 'server' is only valid for the websocket transport.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "client", + "allowableValues": { + "valueType": "LIST", + "values": [ + "client", + "server" + ] + } + }, + { + "name": "format", + "description": "Format to encode audio in", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "direction", + "description": "External media direction", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string", + "defaultValue": "both", + "allowableValues": { + "valueType": "LIST", + "values": [ + "both" + ] + } + }, + { + "name": "data", + "description": "An arbitrary data field", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters" + }, + { + "code": 409, + "reason": "Channel is not in a Stasis application; Channel is already bridged" + } + ] + } + ] + }, + { + "path": "/channels/{channelId}/transfer_progress", + "description": "Inform the channel that the transfer is in progress.", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "22.3.0", + "21.8.0", + "20.13.0" + ], + "summary": "Inform the channel about the progress of the attended/blind transfer.", + "nickname": "transfer_progress", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "states", + "description": "The state of the progress", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Endpoint parameter not provided" + }, + { + "code": 404, + "reason": "Channel or endpoint not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" + } + ] + } + ] + } + ], + "models": { + "Dialed": { + "id": "Dialed", + "description": "Dialed channel information.", + "properties": {} + }, + "DialplanCEP": { + "id": "DialplanCEP", + "description": "Dialplan location (context/extension/priority)", + "properties": { + "context": { + "required": true, + "type": "string", + "description": "Context in the dialplan" + }, + "exten": { + "required": true, + "type": "string", + "description": "Extension in the dialplan" + }, + "priority": { + "required": true, + "type": "long", + "description": "Priority in the dialplan" + }, + "app_name": { + "required": true, + "type": "string", + "description": "Name of current dialplan application" + }, + "app_data": { + "required": true, + "type": "string", + "description": "Parameter of current dialplan application" + } + } + }, + "CallerID": { + "id": "CallerID", + "description": "Caller identification", + "properties": { + "name": { + "required": true, + "type": "string" + }, + "number": { + "required": true, + "type": "string" + } + } + }, + "RTPstat": { + "id": "RTPstat", + "description": "A statistics of a RTP.", + "properties": { + "txcount": { + "required": true, + "type": "int", + "description": "Number of packets transmitted." + }, + "rxcount": { + "required": true, + "type": "int", + "description": "Number of packets received." + }, + "txjitter": { + "required": false, + "type": "double", + "description": "Jitter on transmitted packets." + }, + "rxjitter": { + "required": false, + "type": "double", + "description": "Jitter on received packets." + }, + "remote_maxjitter": { + "required": false, + "type": "double", + "description": "Maximum jitter on remote side." + }, + "remote_minjitter": { + "required": false, + "type": "double", + "description": "Minimum jitter on remote side." + }, + "remote_normdevjitter": { + "required": false, + "type": "double", + "description": "Average jitter on remote side." + }, + "remote_stdevjitter": { + "required": false, + "type": "double", + "description": "Standard deviation jitter on remote side." + }, + "local_maxjitter": { + "required": false, + "type": "double", + "description": "Maximum jitter on local side." + }, + "local_minjitter": { + "required": false, + "type": "double", + "description": "Minimum jitter on local side." + }, + "local_normdevjitter": { + "required": false, + "type": "double", + "description": "Average jitter on local side." + }, + "local_stdevjitter": { + "required": false, + "type": "double", + "description": "Standard deviation jitter on local side." + }, + "txploss": { + "required": true, + "type": "int", + "description": "Number of transmitted packets lost." + }, + "rxploss": { + "required": true, + "type": "int", + "description": "Number of received packets lost." + }, + "remote_maxrxploss": { + "required": false, + "type": "double", + "description": "Maximum number of packets lost on remote side." + }, + "remote_minrxploss": { + "required": false, + "type": "double", + "description": "Minimum number of packets lost on remote side." + }, + "remote_normdevrxploss": { + "required": false, + "type": "double", + "description": "Average number of packets lost on remote side." + }, + "remote_stdevrxploss": { + "required": false, + "type": "double", + "description": "Standard deviation packets lost on remote side." + }, + "local_maxrxploss": { + "required": false, + "type": "double", + "description": "Maximum number of packets lost on local side." + }, + "local_minrxploss": { + "required": false, + "type": "double", + "description": "Minimum number of packets lost on local side." + }, + "local_normdevrxploss": { + "required": false, + "type": "double", + "description": "Average number of packets lost on local side." + }, + "local_stdevrxploss": { + "required": false, + "type": "double", + "description": "Standard deviation packets lost on local side." + }, + "rtt": { + "required": false, + "type": "double", + "description": "Total round trip time." + }, + "maxrtt": { + "required": false, + "type": "double", + "description": "Maximum round trip time." + }, + "minrtt": { + "required": false, + "type": "double", + "description": "Minimum round trip time." + }, + "normdevrtt": { + "required": false, + "type": "double", + "description": "Average round trip time." + }, + "stdevrtt": { + "required": false, + "type": "double", + "description": "Standard deviation round trip time." + }, + "local_ssrc": { + "required": true, + "type": "int", + "description": "Our SSRC." + }, + "remote_ssrc": { + "required": true, + "type": "int", + "description": "Their SSRC." + }, + "txoctetcount": { + "required": true, + "type": "int", + "description": "Number of octets transmitted." + }, + "rxoctetcount": { + "required": true, + "type": "int", + "description": "Number of octets received." + }, + "channel_uniqueid": { + "required": true, + "type": "string", + "description": "The Asterisk channel's unique ID that owns this instance." + } + } + }, + "Channel": { + "id": "Channel", + "description": "A specific communication connection between Asterisk and an Endpoint.", + "properties": { + "id": { + "required": true, + "type": "string", + "description": "Unique identifier of the channel.\n\nThis is the same as the Uniqueid field in AMI." + }, + "protocol_id": { + "required": true, + "type": "string", + "description": "Protocol id from underlying channel driver (i.e. Call-ID for chan_pjsip; will be empty if not applicable or not implemented by driver)." + }, + "name": { + "required": true, + "type": "string", + "description": "Name of the channel (i.e. SIP/foo-0000a7e3)" + }, + "state": { + "required": true, + "type": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "Down", + "Rsrved", + "OffHook", + "Dialing", + "Ring", + "Ringing", + "Up", + "Busy", + "Dialing Offhook", + "Pre-ring", + "Unknown" + ] + } + }, + "caller": { + "required": true, + "type": "CallerID" + }, + "connected": { + "required": true, + "type": "CallerID" + }, + "accountcode": { + "required": true, + "type": "string" + }, + "dialplan": { + "required": true, + "type": "DialplanCEP", + "description": "Current location in the dialplan" + }, + "creationtime": { + "required": true, + "type": "Date", + "description": "Timestamp when channel was created" + }, + "language": { + "required": true, + "type": "string", + "description": "The default spoken language" + }, + "channelvars": { + "required": false, + "type": "object", + "description": "Channel variables" + }, + "caller_rdnis": { + "type": "string", + "description": "The Caller ID RDNIS" + }, + "tenantid": { + "required": false, + "type": "string", + "description": "The Tenant ID for the channel" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_9_0_0/deviceStates.json b/codegen/src/main/resources/codegen-data/ari_9_0_0/deviceStates.json new file mode 100644 index 00000000..f0a889bc --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_9_0_0/deviceStates.json @@ -0,0 +1,169 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "Kevin Harwell ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/deviceStates.{format}", + "since": [ + "12.0.0" + ], + "requiresModules": [ + "res_stasis_device_state" + ], + "apis": [ + { + "path": "/deviceStates", + "description": "Device states", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "List all ARI controlled device states.", + "nickname": "list", + "responseClass": "List[DeviceState]" + } + ] + }, + { + "path": "/deviceStates/{deviceName}", + "description": "Device state", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "Retrieve the current state of a device.", + "nickname": "get", + "responseClass": "DeviceState", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ] + }, + { + "httpMethod": "PUT", + "since": [ + "12.0.0" + ], + "summary": "Change the state of a device controlled by ARI. (Note - implicitly creates the device state).", + "nickname": "update", + "responseClass": "void", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "deviceState", + "description": "Device state value", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "NOT_INUSE", + "INUSE", + "BUSY", + "INVALID", + "UNAVAILABLE", + "RINGING", + "RINGINUSE", + "ONHOLD" + ] + } + + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Device name is missing" + }, + { + "code": 409, + "reason": "Uncontrolled device specified" + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "12.0.0" + ], + "summary": "Destroy a device-state controlled by ARI.", + "nickname": "delete", + "responseClass": "void", + "parameters": [ + { + "name": "deviceName", + "description": "Name of the device", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Device name is missing" + }, + { + "code": 409, + "reason": "Uncontrolled device specified" + } + ] + } + ] + } + ], + "models": { + "DeviceState": { + "id": "DeviceState", + "description": "Represents the state of a device.", + "properties": { + "name": { + "type": "string", + "description": "Name of the device.", + "required": true + }, + "state": { + "type": "string", + "description": "Device's state", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "UNKNOWN", + "NOT_INUSE", + "INUSE", + "BUSY", + "INVALID", + "UNAVAILABLE", + "RINGING", + "RINGINUSE", + "ONHOLD" + ] + } + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_9_0_0/endpoints.json b/codegen/src/main/resources/codegen-data/ari_9_0_0/endpoints.json new file mode 100644 index 00000000..233f2c84 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_9_0_0/endpoints.json @@ -0,0 +1,423 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/endpoints.{format}", + "since": [ + "12.0.0" + ], + "apis": [ + { + "path": "/endpoints", + "description": "Asterisk endpoints", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "List all endpoints.", + "nickname": "list", + "responseClass": "List[Endpoint]" + } + ] + }, + { + "path": "/endpoints/sendMessage", + "description": "Send a message to some technology URI or endpoint.", + "operations": [ + { + "httpMethod": "PUT", + "since": [ + "13.0.0" + ], + "summary": "Send a message to some technology URI or endpoint.", + "nickname": "sendMessage", + "responseClass": "void", + "parameters": [ + { + "name": "to", + "description": "The endpoint resource or technology specific URI to send the message to. Valid resources are pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "from", + "description": "The endpoint resource or technology specific identity to send this message from. Valid resources are pjsip, and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "body", + "description": "The body of the message", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "descriptioni": "The \"variables\" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, pjsip and sip resource types will add the key/value pairs as SIP headers,", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoint not found" + } + ] + } + ] + }, + { + "path": "/endpoints/refer", + "description": "Refer an endpoint or technology URI to some technology URI or endpoint.", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "18.20.0", + "20.5.0" + ], + "summary": "Refer an endpoint or technology URI to some technology URI or endpoint.", + "nickname": "refer", + "responseClass": "void", + "parameters": [ + { + "name": "to", + "description": "The endpoint resource or technology specific URI that should be referred to somewhere. Valid resource is pjsip.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "from", + "description": "The endpoint resource or technology specific identity to refer from.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "refer_to", + "description": "The endpoint resource or technology specific URI to refer to.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "to_self", + "description": "If true and \"refer_to\" refers to an Asterisk endpoint, the \"refer_to\" value is set to point to this Asterisk endpoint - so the referee is referred to Asterisk. Otherwise, use the contact URI associated with the endpoint.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, the pjsip resource type will add the key/value pairs as SIP headers. The \"display_name\" key is used by the PJSIP technology. Its value will be prepended as a display name to the Refer-To URI.", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for referring." + }, + { + "code": 404, + "reason": "Endpoint not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}", + "description": "Asterisk endpoints", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "List available endoints for a given endpoint technology.", + "nickname": "listByTech", + "responseClass": "List[Endpoint]", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoints (pjsip,iax2,...)", + "paramType": "path", + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Endpoints not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}/{resource}", + "description": "Single endpoint", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "Details for an endpoint.", + "nickname": "get", + "responseClass": "Endpoint", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "resource", + "description": "ID of the endpoint", + "paramType": "path", + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoints not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}/{resource}/sendMessage", + "description": "Send a message to some endpoint in a technology.", + "operations": [ + { + "httpMethod": "PUT", + "since": [ + "13.0.0" + ], + "summary": "Send a message to some endpoint in a technology.", + "nickname": "sendMessageToEndpoint", + "responseClass": "void", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "resource", + "description": "ID of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "from", + "description": "The endpoint resource or technology specific identity to send this message from. Valid resources are pjsip and xmpp.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "body", + "description": "The body of the message", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "descriptioni": "The \"variables\" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, pjsip and sip resource types will add the key/value pairs as SIP headers,", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for sending a message." + }, + { + "code": 404, + "reason": "Endpoint not found" + } + ] + } + ] + }, + { + "path": "/endpoints/{tech}/{resource}/refer", + "description": "Refer an endpoint in a technology to some technology URI or endpoint..", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "18.20.0", + "20.5.0" + ], + "summary": "Refer an endpoint or technology URI to some technology URI or endpoint.", + "nickname": "referToEndpoint", + "responseClass": "void", + "parameters": [ + { + "name": "tech", + "description": "Technology of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "resource", + "description": "ID of the endpoint", + "paramType": "path", + "dataType": "string" + }, + { + "name": "from", + "description": "The endpoint resource or technology specific identity to refer from.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "refer_to", + "description": "The endpoint resource or technology specific URI to refer to.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "to_self", + "description": "If true and \"refer_to\" refers to an Asterisk endpoint, the \"refer_to\" value is set to point to this Asterisk endpoint - so the referee is referred to Asterisk. Otherwise, use the contact URI associated with the endpoint.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, the pjsip resource type will add the key/value pairs as SIP headers,", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Invalid parameters for referring." + }, + { + "code": 404, + "reason": "Endpoint not found" + } + ] + } + ] + } + ], + "models": { + "Endpoint": { + "id": "Endpoint", + "description": "An external device that may offer/accept calls to/from Asterisk.\n\nUnlike most resources, which have a single unique identifier, an endpoint is uniquely identified by the technology/resource pair.", + "properties": { + "technology": { + "type": "string", + "description": "Technology of the endpoint", + "required": true + }, + "resource": { + "type": "string", + "description": "Identifier of the endpoint, specific to the given technology.", + "required": true + }, + "state": { + "type": "string", + "description": "Endpoint's state", + "required": false, + "allowableValues": { + "valueType": "LIST", + "values": [ + "unknown", + "offline", + "online" + ] + } + }, + "channel_ids": { + "type": "List[string]", + "description": "Id's of channels associated with this endpoint", + "required": true + } + } + }, + "TextMessage": { + "id": "TextMessage", + "description": "A text message.", + "properties": { + "from": { + "type": "string", + "description": "A technology specific URI specifying the source of the message. For pjsip technology, any SIP URI can be specified. For xmpp, the URI must correspond to the client connection being used to send the message.", + "required": true + }, + "to": { + "type": "string", + "description": "A technology specific URI specifying the destination of the message. Valid technologies include pjsip, and xmp. The destination of a message should be an endpoint.", + "required": true + }, + "body": { + "type": "string", + "description": "The text of the message.", + "required": true + }, + "variables": { + "type": "object", + "description": "Technology specific key/value pairs (JSON object) associated with the message.", + "required": false + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_9_0_0/events.json b/codegen/src/main/resources/codegen-data/ari_9_0_0/events.json new file mode 100644 index 00000000..e6fec303 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_9_0_0/events.json @@ -0,0 +1,1164 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.2", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/events.{format}", + "since": [ + "12.0.0" + ], + "requiresModules": [ + "res_http_websocket" + ], + "apis": [ + { + "path": "/events", + "description": "Events from Asterisk to applications", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "upgrade": "websocket", + "websocketProtocol": "ari", + "summary": "WebSocket connection for events.", + "nickname": "eventWebsocket", + "responseClass": "Message", + "parameters": [ + { + "name": "app", + "description": "Applications to subscribe to.", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "subscribeAll", + "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'.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean" + } + ] + } + ] + }, + { + "path": "/events/user/{eventName}", + "description": "Stasis application user events", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.3.0" + ], + "summary": "Generate a user event.", + "nickname": "userEvent", + "responseClass": "void", + "parameters": [ + { + "name": "eventName", + "description": "Event name", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "application", + "description": "The name of the application that will receive this event", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "source", + "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}/{resource}, deviceState:{deviceName}", + "paramType": "query", + "required": false, + "allowMultiple": true, + "dataType": "string" + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds custom key/value pairs to add to the user event. Ex. { \"variables\": { \"key\": \"value\" } }", + "paramType": "body", + "required": false, + "allowMultiple": false, + "dataType": "containers" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Application does not exist." + }, + { + "code": 422, + "reason": "Event source not found." + }, + { + "code": 400, + "reason": "Invalid even tsource URI or userevent data." + } + ] + } + ] + } + ], + "models": { + "Message": { + "id": "Message", + "description": "Base type for errors and events", + "discriminator": "type", + "properties": { + "type": { + "type": "string", + "required": true, + "description": "Indicates the type of this message." + }, + "asterisk_id": { + "type": "string", + "required": false, + "description": "The unique ID for the Asterisk instance that raised this event." + } + }, + "subTypes": [ + "MissingParams", + "Event" + ] + }, + "MissingParams": { + "id": "MissingParams", + "description": "Error event sent when required params are missing.", + "properties": { + "params": { + "required": true, + "type": "List[string]", + "description": "A list of the missing parameters" + } + } + }, + "Event": { + "id": "Event", + "description": "Base type for asynchronous events from Asterisk.", + "properties": { + "application": { + "type": "string", + "description": "Name of the application receiving the event.", + "required": true + }, + "timestamp": { + "type": "Date", + "description": "Time at which this event was created.", + "required": true + } + }, + "subTypes": [ + "DeviceStateChanged", + "PlaybackStarted", + "PlaybackContinuing", + "PlaybackFinished", + "RecordingStarted", + "RecordingFinished", + "RecordingFailed", + "ApplicationMoveFailed", + "ApplicationRegistered", + "ApplicationUnregistered", + "ApplicationReplaced", + "BridgeCreated", + "BridgeDestroyed", + "BridgeMerged", + "BridgeBlindTransfer", + "BridgeAttendedTransfer", + "BridgeVideoSourceChanged", + "ChannelCreated", + "ChannelDestroyed", + "ChannelEnteredBridge", + "ChannelLeftBridge", + "ChannelStateChange", + "ChannelDtmfReceived", + "ChannelDialplan", + "ChannelCallerId", + "ChannelUserevent", + "ChannelHangupRequest", + "ChannelVarset", + "ChannelTalkingStarted", + "ChannelTalkingFinished", + "ChannelHold", + "ChannelUnhold", + "ContactStatusChange", + "EndpointStateChange", + "Dial", + "StasisEnd", + "StasisStart", + "TextMessageReceived", + "ChannelConnectedLine", + "PeerStatusChange", + "ChannelTransfer", + "RESTResponse" + ] + }, + "ContactInfo": { + "id": "ContactInfo", + "description": "Detailed information about a contact on an endpoint.", + "properties": { + "uri": { + "type": "string", + "description": "The location of the contact.", + "required": true + }, + "contact_status": { + "type": "string", + "description": "The current status of the contact.", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "Unreachable", + "Reachable", + "Unknown", + "NonQualified", + "Removed" + ] + } + }, + "aor": { + "type": "string", + "description": "The Address of Record this contact belongs to.", + "required": true + }, + "roundtrip_usec": { + "type": "string", + "description": "Current round trip time, in microseconds, for the contact.", + "required": false + } + } + }, + "Peer": { + "id": "Peer", + "description": "Detailed information about a remote peer that communicates with Asterisk.", + "properties": { + "peer_status": { + "type": "string", + "description": "The current state of the peer. Note that the values of the status are dependent on the underlying peer technology.", + "required": true + }, + "cause": { + "type": "string", + "description": "An optional reason associated with the change in peer_status.", + "required": false + }, + "address": { + "type": "string", + "description": "The IP address of the peer.", + "required": false + }, + "port": { + "type": "string", + "description": "The port of the peer.", + "required": false + }, + "time": { + "type": "string", + "description": "The last known time the peer was contacted.", + "required": false + } + } + }, + "DeviceStateChanged": { + "id": "DeviceStateChanged", + "description": "Notification that a device state has changed.", + "properties": { + "device_state": { + "type": "DeviceState", + "description": "Device state object", + "required": true + } + } + }, + "PlaybackStarted": { + "id": "PlaybackStarted", + "description": "Event showing the start of a media playback operation.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "PlaybackContinuing": { + "id": "PlaybackContinuing", + "description": "Event showing the continuation of a media playback operation from one media URI to the next in the list.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "PlaybackFinished": { + "id": "PlaybackFinished", + "description": "Event showing the completion of a media playback operation.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "RecordingStarted": { + "id": "RecordingStarted", + "description": "Event showing the start of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "RecordingFinished": { + "id": "RecordingFinished", + "description": "Event showing the completion of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "RecordingFailed": { + "id": "RecordingFailed", + "description": "Event showing failure of a recording operation.", + "properties": { + "recording": { + "type": "LiveRecording", + "description": "Recording control object", + "required": true + } + } + }, + "ApplicationMoveFailed": { + "id": "ApplicationMoveFailed", + "description": "Notification that trying to move a channel to another Stasis application failed.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + }, + "destination": { + "required": true, + "type": "string" + }, + "args": { + "required": true, + "type": "List[string]", + "description": "Arguments to the application" + } + } + }, + "ApplicationRegistered": { + "id": "ApplicationRegistered", + "description": "Notification that a Stasis app has been registered.", + "properties": {} + }, + "ApplicationUnregistered": { + "id": "ApplicationUnregistered", + "description": "Notification that a Stasis app has been unregistered.", + "properties": {} + }, + "ApplicationReplaced": { + "id": "ApplicationReplaced", + "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.", + "properties": {} + }, + "BridgeCreated": { + "id": "BridgeCreated", + "description": "Notification that a bridge has been created.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeDestroyed": { + "id": "BridgeDestroyed", + "description": "Notification that a bridge has been destroyed.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeMerged": { + "id": "BridgeMerged", + "description": "Notification that one bridge has merged into another.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "bridge_from": { + "required": true, + "type": "Bridge" + } + } + }, + "BridgeVideoSourceChanged": { + "id": "BridgeVideoSourceChanged", + "description": "Notification that the source of video in a bridge has changed.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "old_video_source_id": { + "required": false, + "type": "string" + } + } + }, + "BridgeBlindTransfer": { + "id": "BridgeBlindTransfer", + "description": "Notification that a blind transfer has occurred.", + "properties": { + "channel": { + "description": "The channel performing the blind transfer", + "required": true, + "type": "Channel" + }, + "replace_channel": { + "description": "The channel that is replacing transferer when the transferee(s) can not be transferred directly", + "required": false, + "type": "Channel" + }, + "transferee": { + "description": "The channel that is being transferred", + "required": false, + "type": "Channel" + }, + "exten": { + "description": "The extension transferred to", + "required": true, + "type": "string" + }, + "context": { + "description": "The context transferred to", + "required": true, + "type": "string" + }, + "result": { + "description": "The result of the transfer attempt", + "required": true, + "type": "string" + }, + "is_external": { + "description": "Whether the transfer was externally initiated or not", + "required": true, + "type": "boolean" + }, + "bridge": { + "description": "The bridge being transferred", + "type": "Bridge" + } + } + }, + "BridgeAttendedTransfer": { + "id": "BridgeAttendedTransfer", + "description": "Notification that an attended transfer has occurred.", + "properties": { + "transferer_first_leg": { + "description": "First leg of the transferer", + "required": true, + "type": "Channel" + }, + "transferer_second_leg": { + "description": "Second leg of the transferer", + "required": true, + "type": "Channel" + }, + "replace_channel": { + "description": "The channel that is replacing transferer_first_leg in the swap", + "required": false, + "type": "Channel" + }, + "transferee": { + "description": "The channel that is being transferred", + "required": false, + "type": "Channel" + }, + "transfer_target": { + "description": "The channel that is being transferred to", + "required": false, + "type": "Channel" + }, + "result": { + "description": "The result of the transfer attempt", + "required": true, + "type": "string" + }, + "is_external": { + "description": "Whether the transfer was externally initiated or not", + "required": true, + "type": "boolean" + }, + "transferer_first_leg_bridge": { + "description": "Bridge the transferer first leg is in", + "type": "Bridge" + }, + "transferer_second_leg_bridge": { + "description": "Bridge the transferer second leg is in", + "type": "Bridge" + }, + "destination_type": { + "description": "How the transfer was accomplished", + "required": true, + "type": "string" + }, + "destination_bridge": { + "description": "Bridge that survived the merge result", + "type": "string" + }, + "destination_application": { + "description": "Application that has been transferred into", + "type": "string" + }, + "destination_link_first_leg": { + "description": "First leg of a link transfer result", + "type": "Channel" + }, + "destination_link_second_leg": { + "description": "Second leg of a link transfer result", + "type": "Channel" + }, + "destination_threeway_channel": { + "description": "Transferer channel that survived the threeway result", + "type": "Channel" + }, + "destination_threeway_bridge": { + "description": "Bridge that survived the threeway result", + "type": "Bridge" + } + } + }, + "ChannelCreated": { + "id": "ChannelCreated", + "description": "Notification that a channel has been created.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelDestroyed": { + "id": "ChannelDestroyed", + "description": "Notification that a channel has been destroyed.", + "properties": { + "cause": { + "required": true, + "description": "Integer representation of the cause of the hangup", + "type": "int" + }, + "cause_txt": { + "required": true, + "description": "Text representation of the cause of the hangup", + "type": "string" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelEnteredBridge": { + "id": "ChannelEnteredBridge", + "description": "Notification that a channel has entered a bridge.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "channel": { + "type": "Channel" + } + } + }, + "ChannelLeftBridge": { + "id": "ChannelLeftBridge", + "description": "Notification that a channel has left a bridge.", + "properties": { + "bridge": { + "required": true, + "type": "Bridge" + }, + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelStateChange": { + "id": "ChannelStateChange", + "description": "Notification of a channel's state change.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "ChannelDtmfReceived": { + "id": "ChannelDtmfReceived", + "description": "DTMF received on a channel.\n\nThis event is sent when the DTMF ends. There is no notification about the start of DTMF", + "properties": { + "digit": { + "required": true, + "type": "string", + "description": "DTMF digit received (0-9, A-E, # or *)" + }, + "duration_ms": { + "required": true, + "type": "int", + "description": "Number of milliseconds DTMF was received" + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which DTMF was received" + } + } + }, + "ChannelDialplan": { + "id": "ChannelDialplan", + "description": "Channel changed location in the dialplan.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that changed dialplan location." + }, + "dialplan_app": { + "required": true, + "type": "string", + "description": "The application about to be executed." + }, + "dialplan_app_data": { + "required": true, + "type": "string", + "description": "The data to be passed to the application." + } + } + }, + "ChannelCallerId": { + "id": "ChannelCallerId", + "description": "Channel changed Caller ID.", + "properties": { + "caller_presentation": { + "required": true, + "type": "int", + "description": "The integer representation of the Caller Presentation value." + }, + "caller_presentation_txt": { + "required": true, + "type": "string", + "description": "The text representation of the Caller Presentation value." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that changed Caller ID." + } + } + }, + "ChannelUserevent": { + "id": "ChannelUserevent", + "description": "User-generated event with additional user-defined fields in the object.", + "properties": { + "eventname": { + "required": true, + "type": "string", + "description": "The name of the user event." + }, + "channel": { + "required": false, + "type": "Channel", + "description": "A channel that is signaled with the user event." + }, + "bridge": { + "required": false, + "type": "Bridge", + "description": "A bridge that is signaled with the user event." + }, + "endpoint": { + "required": false, + "type": "Endpoint", + "description": "A endpoint that is signaled with the user event." + }, + "userevent": { + "required": true, + "type": "object", + "description": "Custom Userevent data" + } + } + }, + "ChannelHangupRequest": { + "id": "ChannelHangupRequest", + "description": "A hangup was requested on the channel.", + "properties": { + "cause": { + "type": "int", + "description": "Integer representation of the cause of the hangup." + }, + "soft": { + "type": "boolean", + "description": "Whether the hangup request was a soft hangup request." + }, + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which the hangup was requested." + } + } + }, + "ChannelVarset": { + "id": "ChannelVarset", + "description": "Channel variable changed.", + "properties": { + "variable": { + "required": true, + "type": "string", + "description": "The variable that changed." + }, + "value": { + "required": true, + "type": "string", + "description": "The new value of the variable." + }, + "channel": { + "required": false, + "type": "Channel", + "description": "The channel on which the variable was set.\n\nIf missing, the variable is a global variable." + } + } + }, + "ChannelHold": { + "id": "ChannelHold", + "description": "A channel initiated a media hold.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that initiated the hold event." + }, + "musicclass": { + "required": false, + "type": "string", + "description": "The music on hold class that the initiator requested." + } + } + }, + "ChannelUnhold": { + "id": "ChannelUnhold", + "description": "A channel initiated a media unhold.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that initiated the unhold event." + } + } + }, + "ChannelTalkingStarted": { + "id": "ChannelTalkingStarted", + "description": "Talking was detected on the channel.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which talking started." + } + } + }, + "ChannelTalkingFinished": { + "id": "ChannelTalkingFinished", + "description": "Talking is no longer detected on the channel.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel on which talking completed." + }, + "duration": { + "required": true, + "type": "int", + "description": "The length of time, in milliseconds, that talking was detected on the channel" + } + } + }, + "ContactStatusChange": { + "id": "ContactStatusChange", + "description": "The state of a contact on an endpoint has changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + }, + "contact_info": { + "required": true, + "type": "ContactInfo" + } + } + }, + "PeerStatusChange": { + "id": "PeerStatusChange", + "description": "The state of a peer associated with an endpoint has changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + }, + "peer": { + "required": true, + "type": "Peer" + } + } + }, + "EndpointStateChange": { + "id": "EndpointStateChange", + "description": "Endpoint state changed.", + "properties": { + "endpoint": { + "required": true, + "type": "Endpoint" + } + } + }, + "Dial": { + "id": "Dial", + "description": "Dialing state has changed.", + "properties": { + "caller": { + "required": false, + "type": "Channel", + "description": "The calling channel." + }, + "peer": { + "required": true, + "type": "Channel", + "description": "The dialed channel." + }, + "forward": { + "required": false, + "type": "string", + "description": "Forwarding target requested by the original dialed channel." + }, + "forwarded": { + "required": false, + "type": "Channel", + "description": "Channel that the caller has been forwarded to." + }, + "dialstring": { + "required": false, + "type": "string", + "description": "The dial string for calling the peer channel." + }, + "dialstatus": { + "required": true, + "type": "string", + "description": "Current status of the dialing attempt to the peer." + } + } + }, + "StasisEnd": { + "id": "StasisEnd", + "description": "Notification that a channel has left a Stasis application.", + "properties": { + "channel": { + "required": true, + "type": "Channel" + } + } + }, + "StasisStart": { + "id": "StasisStart", + "description": "Notification that a channel has entered a Stasis application.", + "properties": { + "args": { + "required": true, + "type": "List[string]", + "description": "Arguments to the application" + }, + "channel": { + "required": true, + "type": "Channel" + }, + "replace_channel": { + "required": false, + "type": "Channel" + } + } + }, + "TextMessageReceived": { + "id": "TextMessageReceived", + "description": "A text message was received from an endpoint.", + "properties": { + "message": { + "required": true, + "type": "TextMessage" + }, + "endpoint": { + "required": false, + "type": "Endpoint" + } + } + }, + "ChannelConnectedLine": { + "id": "ChannelConnectedLine", + "description": "Channel changed Connected Line.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel whose connected line has changed." + } + } + }, + "ChannelTransfer": { + "id": "ChannelTransfer", + "description": "transfer on a channel.", + "properties": { + "state": { + "required": false, + "type": "string", + "description": "Transfer State" + }, + "refer_to": { + "required": true, + "type": "ReferTo", + "description": "Refer-To information with optionally both affected channels" + }, + "referred_by": { + "required": true, + "type": "ReferredBy", + "description": "Referred-By SIP Header according rfc3892" + } + } + }, + "ReferTo": { + "id": "ReferTo", + "description": "transfer destination requested by transferee", + "properties": { + "requested_destination": { + "required": true, + "type": "RequiredDestination" + }, + "destination_channel": { + "required": false, + "type": "Channel", + "description": "The Channel Object, that is to be replaced" + }, + "connected_channel": { + "required": false, + "type": "Channel", + "description": "Channel, connected to the to be replaced channel" + }, + "bridge": { + "required": false, + "type": "Bridge", + "description": "Bridge connecting both destination channels" + } + } + }, + "ReferredBy": { + "id": "ReferredBy", + "description": "transfer destination requested by transferee", + "properties": { + "source_channel": { + "required": true, + "type": "Channel", + "description": "The channel on which the refer was received" + }, + "connected_channel": { + "required": false, + "type": "Channel", + "description": "Channel, Connected to the channel, receiving the transfer request on." + }, + "bridge": { + "required": false, + "type": "Bridge", + "description": "Bridge connecting both Channels" + } + } + }, + "RequiredDestination": { + "id": "RequiredDestination", + "description": "Information about the requested destination", + "properties": { + "protocol_id": { + "required": false, + "type": "string", + "description": "the requested protocol-id by the referee in case of SIP channel, this is a SIP Call ID, Mutually exclusive to destination" + }, + "destination": { + "required": false, + "type": "string", + "description": "Destination User Part. Only for Blind transfer. Mutually exclusive to protocol_id" + }, + "additional_protocol_params": { + "required": false, + "type": "List[AdditionalParam]", + "description": "List of additional protocol specific information" + } + } + }, + "AdditionalParam": { + "id": "AdditionalParam", + "description": "Protocol specific additional parameter", + "properties": { + "parameter_name": { + "required": true, + "type": "string", + "description": "Name of the parameter" + }, + "parameter_value": { + "required": true, + "type": "string", + "description": "Value of the parameter" + } + } + }, + "RESTHeader": { + "id": "RESTHeader", + "description": "REST over Websocket header", + "properties": { + "name": { + "type": "string", + "description": "Header name", + "required": true + }, + "value": { + "required": true, + "type": "string", + "description": "Header value" + } + } + }, + "RESTQueryStringParameter": { + "id": "RESTQueryStringParameter", + "description": "REST over Websocket Query String Parameter", + "properties": { + "name": { + "type": "string", + "description": "Parameter name", + "required": true + }, + "value": { + "required": true, + "type": "string", + "description": "Parameter value" + } + } + }, + "RESTRequest": { + "id": "RESTRequest", + "description": "REST over Websocket Request.", + "properties": { + "type": { + "type": "string", + "description": "Message type. Must be 'RESTRequest'", + "required": true + }, + "transaction_id": { + "type": "string", + "description": "Opaque transaction id. Can be any valid string. Will be returned in any response to this request.", + "required": true + }, + "request_id": { + "type": "string", + "description": "Opaque request id. Can be any valid string. Will be returned in any response to this request.", + "required": true + }, + "method": { + "required": true, + "type": "string", + "description": "HTTP method (GET, PUT, POST, DELETE, etc.)" + }, + "uri": { + "required": true, + "type": "string", + "description": "Resource URI with optional query string parameters." + }, + "content_type": { + "required": false, + "type": "string", + "description": "The Content-Type of the message body." + }, + "query_strings": { + "required": false, + "type": "List[RESTQueryStringParameter]", + "description": "Request query string parameters." + }, + "message_body": { + "required": false, + "type": "string", + "description": "Request message body. Only content types application/json and application/x-www-form-urlencoded are supported." + } + } + }, + "RESTResponse": { + "id": "RESTResponse", + "description": "REST over Websocket Response.", + "properties": { + "transaction_id": { + "type": "string", + "description": "Opaque transaction id. Will be whatever was specified on the original request.", + "required": true + }, + "request_id": { + "type": "string", + "description": "Opaque request id. Will be whatever was specified on the original request.", + "required": true + }, + "status_code": { + "required": true, + "type": "int", + "description": "HTTP status code" + }, + "reason_phrase": { + "required": true, + "type": "string", + "description": "HTTP reason phrase" + }, + "uri": { + "required": true, + "type": "string", + "description": "Original request resource URI" + }, + "content_type": { + "required": false, + "type": "string", + "description": "The Content-Type of the message body." + }, + "message_body": { + "required": false, + "type": "string", + "description": "Response message body" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_9_0_0/mailboxes.json b/codegen/src/main/resources/codegen-data/ari_9_0_0/mailboxes.json new file mode 100644 index 00000000..d99e1eac --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_9_0_0/mailboxes.json @@ -0,0 +1,152 @@ +{ + "_copyright": "Copyright (C) 2013, Digium, Inc.", + "_author": "Jonathan Rose ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/mailboxes.{format}", + "since": [ + "12.1.0" + ], + "requiresModules": [ + "res_stasis_mailbox" + ], + "apis": [ + { + "path": "/mailboxes", + "description": "Mailboxes", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.1.0" + ], + "summary": "List all mailboxes.", + "nickname": "list", + "responseClass": "List[Mailbox]" + } + ] + }, + { + "path": "/mailboxes/{mailboxName}", + "description": "Mailbox state", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.1.0" + ], + "summary": "Retrieve the current state of a mailbox.", + "nickname": "get", + "responseClass": "Mailbox", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + }, + { + "httpMethod": "PUT", + "since": [ + "12.1.0" + ], + "summary": "Change the state of a mailbox. (Note - implicitly creates the mailbox).", + "nickname": "update", + "responseClass": "void", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "oldMessages", + "description": "Count of old messages in the mailbox", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "int" + }, + { + "name": "newMessages", + "description": "Count of new messages in the mailbox", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "int" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "12.1.0" + ], + "summary": "Destroy a mailbox.", + "nickname": "delete", + "responseClass": "void", + "parameters": [ + { + "name": "mailboxName", + "description": "Name of the mailbox", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Mailbox not found" + } + ] + } + ] + } + ], + "models": { + "Mailbox": { + "id": "Mailbox", + "description": "Represents the state of a mailbox.", + "properties": { + "name": { + "type": "string", + "description": "Name of the mailbox.", + "required": true + }, + "old_messages": { + "type": "int", + "description": "Count of old messages in the mailbox.", + "required": true + }, + "new_messages": { + "type": "int", + "description": "Count of new messages in the mailbox.", + "required": true + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_9_0_0/playbacks.json b/codegen/src/main/resources/codegen-data/ari_9_0_0/playbacks.json new file mode 100644 index 00000000..a7892f18 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_9_0_0/playbacks.json @@ -0,0 +1,177 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/playbacks.{format}", + "since": [ + "12.0.0" + ], + "requiresModules": [ + "res_stasis_playback" + ], + "apis": [ + { + "path": "/playbacks/{playbackId}", + "description": "Control object for a playback operation.", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "Get a playback's details.", + "nickname": "get", + "responseClass": "Playback", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "The playback cannot be found" + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "12.0.0" + ], + "summary": "Stop a playback.", + "nickname": "stop", + "responseClass": "void", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "The playback cannot be found" + } + ] + } + ] + }, + { + "path": "/playbacks/{playbackId}/control", + "description": "Control object for a playback operation.", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Control a playback.", + "nickname": "control", + "responseClass": "void", + "parameters": [ + { + "name": "playbackId", + "description": "Playback's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "operation", + "description": "Operation to perform on the playback.", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "restart", + "pause", + "unpause", + "reverse", + "forward" + ] + } + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "The provided operation parameter was invalid" + }, + { + "code": 404, + "reason": "The playback cannot be found" + }, + { + "code": 409, + "reason": "The operation cannot be performed in the playback's current state" + } +] + } + ] + } + ], + "models": { + "Playback": { + "id": "Playback", + "description": "Object representing the playback of media to a channel", + "properties": { + "id": { + "type": "string", + "description": "ID for this playback operation", + "required": true + }, + "media_uri": { + "type": "string", + "description": "The URI for the media currently being played back.", + "required": true + }, + "next_media_uri": { + "type": "string", + "description": "If a list of URIs is being played, the next media URI to be played back.", + "required": false + }, + "target_uri": { + "type": "string", + "description": "URI for the channel or bridge to play the media on", + "required": true + }, + "language": { + "type": "string", + "description": "For media types that support multiple languages, the language requested for playback." + }, + "state": { + "type": "string", + "description": "Current state of the playback operation.", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "queued", + "playing", + "continuing", + "done", + "failed" + ] + } + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_9_0_0/recordings.json b/codegen/src/main/resources/codegen-data/ari_9_0_0/recordings.json new file mode 100644 index 00000000..1496db8a --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_9_0_0/recordings.json @@ -0,0 +1,452 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/recordings.{format}", + "since": [ + "12.0.0" + ], + "requiresModules": [ + "res_stasis_recording" + ], + "apis": [ + { + "path": "/recordings/stored", + "description": "Recordings", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "List recordings that are complete.", + "nickname": "listStored", + "responseClass": "List[StoredRecording]" + } + ] + }, + { + "path": "/recordings/stored/{recordingName}", + "description": "Individual recording", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "Get a stored recording's details.", + "nickname": "getStored", + "responseClass": "StoredRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "12.0.0" + ], + "summary": "Delete a stored recording.", + "nickname": "deleteStored", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/stored/{recordingName}/file", + "description": "The actual file associated with the stored recording", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "14.0.0" + ], + "summary": "Get the file associated with the stored recording.", + "nickname": "getStoredFile", + "responseClass": "binary", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 403, + "reason": "The recording file could not be opened" + }, + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/stored/{recordingName}/copy", + "description": "Copy an individual recording", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.5.0" + ], + "summary": "Copy a stored recording.", + "nickname": "copyStored", + "responseClass": "StoredRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording to copy", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "destinationRecordingName", + "description": "The destination name of the recording", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "A recording with the same name already exists on the system" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}", + "description": "A recording that is in progress", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "List live recordings.", + "nickname": "getLive", + "responseClass": "LiveRecording", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "12.0.0" + ], + "summary": "Stop a live recording and discard it.", + "nickname": "cancel", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/stop", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Stop a live recording and store it.", + "nickname": "stop", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/pause", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Pause a live recording.", + "notes": "Pausing a recording suspends silence detection, which will be restarted when the recording is unpaused. Paused time is not included in the accounting for maxDurationSeconds.", + "nickname": "pause", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "12.0.0" + ], + "summary": "Unpause a live recording.", + "nickname": "unpause", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + } + ] + }, + { + "path": "/recordings/live/{recordingName}/mute", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "12.0.0" + ], + "summary": "Mute a live recording.", + "notes": "Muting a recording suspends silence detection, which will be restarted when the recording is unmuted.", + "nickname": "mute", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + }, + { + "httpMethod": "DELETE", + "since": [ + "12.0.0" + ], + "summary": "Unmute a live recording.", + "nickname": "unmute", + "responseClass": "void", + "parameters": [ + { + "name": "recordingName", + "description": "The name of the recording", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Recording not found" + }, + { + "code": 409, + "reason": "Recording not in session" + } + ] + } + ] + } + ], + "models": { + "StoredRecording": { + "id": "StoredRecording", + "description": "A past recording that may be played back.", + "properties": { + "name": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + }, + "LiveRecording": { + "id": "LiveRecording", + "description": "A recording that is in progress", + "properties": { + "name": { + "required": true, + "type": "string", + "description": "Base name for the recording" + }, + "format": { + "required": true, + "type": "string", + "description": "Recording format (wav, gsm, etc.)" + }, + "target_uri": { + "required": true, + "type": "string", + "description": "URI for the channel or bridge being recorded" + }, + "state": { + "required": true, + "type": "string", + "allowableValues": { + "valueType": "LIST", + "values": [ + "queued", + "recording", + "paused", + "done", + "failed", + "canceled" + ] + } + }, + "duration": { + "required": false, + "type": "int", + "description": "Duration in seconds of the recording" + }, + "talking_duration": { + "required": false, + "type": "int", + "description": "Duration of talking, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds." + }, + "silence_duration": { + "required": false, + "type": "int", + "description": "Duration of silence, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds." + }, + "cause": { + "required": false, + "type": "string", + "description": "Cause for recording failure if failed" + } + } + } + } +} diff --git a/codegen/src/main/resources/codegen-data/ari_9_0_0/sounds.json b/codegen/src/main/resources/codegen-data/ari_9_0_0/sounds.json new file mode 100644 index 00000000..aee4d369 --- /dev/null +++ b/codegen/src/main/resources/codegen-data/ari_9_0_0/sounds.json @@ -0,0 +1,108 @@ +{ + "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", + "_author": "David M. Lee, II ", + "_svn_revision": "$Revision$", + "apiVersion": "2.0.0", + "swaggerVersion": "1.1", + "basePath": "http://localhost:8088/ari", + "resourcePath": "/api-docs/sounds.{format}", + "since": [ + "12.0.0" + ], + "apis": [ + { + "path": "/sounds", + "description": "Sounds", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "List all sounds.", + "nickname": "list", + "responseClass": "List[Sound]", + "parameters": [ + { + "name": "lang", + "description": "Lookup sound for a specific language.", + "paramType": "query", + "dataType": "string", + "required": false + }, + { + "name": "format", + "description": "Lookup sound in a specific format.", + "paramType": "query", + "dataType": "string", + "required": false, + "__note": "core show translation can show translation paths between formats, along with relative costs. so this could be just installed format, or we could follow that for transcoded formats." + } + ] + } + ] + }, + { + "path": "/sounds/{soundId}", + "description": "Individual sound", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "12.0.0" + ], + "summary": "Get a sound's details.", + "nickname": "get", + "responseClass": "Sound", + "parameters": [ + { + "name": "soundId", + "description": "Sound's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ] + } + ] + } + ], + "models": { + "FormatLangPair": { + "id": "FormatLangPair", + "description": "Identifies the format and language of a sound file", + "properties": { + "language": { + "required": true, + "type": "string" + }, + "format": { + "required": true, + "type": "string" + } + } + }, + "Sound": { + "id": "Sound", + "description": "A media file that may be played back.", + "properties": { + "id": { + "required": true, + "description": "Sound's identifier.", + "type": "string" + }, + "text": { + "required": false, + "description": "Text description of the sound, usually the words spoken.", + "type": "string" + }, + "formats": { + "required": true, + "description": "The formats and languages in which this sound is available.", + "type": "List[FormatLangPair]" + } + } + } + } +} diff --git a/codegen/versions-template.md b/codegen/versions-template.md new file mode 100644 index 00000000..bd91ab10 --- /dev/null +++ b/codegen/versions-template.md @@ -0,0 +1,10 @@ +## ARI Versions + +Within the Asterisk project ARI is versioned, these version numbers are not the same as the Asterisk version and also unrelated to ARI4Java's version. +It is important to note the version of Asterisk you are running, so you can instantiate the library using the correct version. +While using `AriVersion.IM_FEELING_LUCKY` tries to determine the correct version, it is recommended to rather specify a version for application stability. Generally it is safe to use an older version of ARI on a new Asterisk, but not the other way around. + +The table below is built up using the git tags to link the Asterisk version to the corresponding ARI version: + +| Asterisk | ARI | +| :-- | :-- | diff --git a/docs/FAQ.md b/docs/FAQ.md deleted file mode 100644 index 40fa17f2..00000000 --- a/docs/FAQ.md +++ /dev/null @@ -1,15 +0,0 @@ -The ari4java Frequently Asked Questions (FAQs) -============================================== - -I get an error java.lang.UnsupportedOperationException: Method availble from ..." when calling a method -------------------------------------------------------------------------------------------------------- - -Most likely you are not binding to the correct version of Asterisk ARI for your Asterisk version. -While the API exposed is an union of all possible API's, different versions of ARI will implement -a subset of possible methods. So they exist in Java code, but they might not be callable on your very API. - -A common cause for this issue is using IM_FEELING_LUCKY as the ARI version, as version autodetection does not -really work now - see [Issue #18](https://github.com/l3nz/ari4java/issues/18). - - - diff --git a/docs/HELLOWORLD.md b/docs/HELLOWORLD.md deleted file mode 100644 index a82f40a8..00000000 --- a/docs/HELLOWORLD.md +++ /dev/null @@ -1,83 +0,0 @@ -Hello ARI World with ari4java -============================= - -This tutorial aims at showing a number of things: - -* Setting up Asterisk for working with ARI -* Connecting to ARI -* Running a simple call -* Showing how you could make it all non-blocking - -Enought to get us started! - - -Create an ARI account on Asterisk ---------------------------------- - - -Edit /etc/asterisk/ari.conf and create a user "ari4java" that we will use for connecting. - - [general] - enabled = yes - - [ari4java] - type = user - read_only = no - password = yothere - password_format = plain - -Edit /etc/asterisk/http.conf and turn on the embedded HTTP server. - - [general] - enabled=yes - bindaddr=0.0.0.0 - bindport=8088 - -Reload Asterisk and connect to its CLI; if all goes well you should see: - - localhost*CLI> ari show users - r/o? Username - ---- -------- - No ari4java - - -Hello ARI World ---------------- - -In order to get started quickly with the ari4java library, we suggest -downloading all libs to a "libs" folder to be added to your local project: - - gradle downloadJars - -Now create a Java class. The plainest thing we can do is getting a list of -all active channels on the server. This is simple to do and only requires -an HTTP round-trip, that for simplicty's sake will happen synchronously. - -So we first create an ARI object that acts as your master connector. -You are going to use this to call each and every action. - - ARI ari = AriFactory.nettyHttp("http://10.10.5.41:8088/", "ari4java", "yothere", - AriVersion.ARI_1_5_0); - -The easiest thing we can do now is to query the list of active channels. -In order to do this we call the list() method on the Channels action. -All commands we can send are organized into a set of Actions. - - List channels = ari.channels().list(); - -Please note that what we get back is Java objects, not just JSON blobs. -Everything is strongly typed. - -A second thing to note is that this could be done in a non-blocking way as well, -just by calling the method - - list(AriCallback> callback); - -instead of the plain list() method. - -A working example can be found under the examples tree, as -in https://github.com/l3nz/ari4java/blob/master/examples/helloworld/HelloAriWorld.java - -Happy hacking! - - diff --git a/examples/Dockerfile b/examples/Dockerfile new file mode 100644 index 00000000..8ddd4afc --- /dev/null +++ b/examples/Dockerfile @@ -0,0 +1,32 @@ +# Docker image to use with Vagrant +# Aims to be as similar to normal Vagrant usage as possible +# Adds SSH daemon, Systemd +# Adapted from https://github.com/BashtonLtd/docker-vagrant-images/blob/master/ubuntu1404/Dockerfile + +FROM ubuntu:noble +ENV container docker +RUN apt update && apt -y upgrade + +# Install system dependencies, you may not need all of these +RUN apt install -y --no-install-recommends ssh sudo libffi-dev systemd openssh-client nano wget curl less + +# Add vagrant user and key for SSH +RUN useradd --create-home -s /bin/bash vagrant +RUN echo -n 'vagrant:vagrant' | chpasswd +RUN echo 'vagrant ALL = NOPASSWD: ALL' > /etc/sudoers.d/vagrant +RUN chmod 440 /etc/sudoers.d/vagrant +RUN mkdir -p /home/vagrant/.ssh +RUN chmod 700 /home/vagrant/.ssh +RUN echo "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzIw+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoPkcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NOTd0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcWyLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQ==" > /home/vagrant/.ssh/authorized_keys +RUN chmod 600 /home/vagrant/.ssh/authorized_keys +RUN chown -R vagrant:vagrant /home/vagrant/.ssh +RUN sed -i -e 's/Defaults.*requiretty/#&/' /etc/sudoers +RUN sed -i -e 's/\(UsePAM \)yes/\1 no/' /etc/ssh/sshd_config + +# Start SSH +RUN mkdir /var/run/sshd +EXPOSE 22 +RUN /usr/sbin/sshd + +# Start Systemd (systemctl) +CMD ["/lib/systemd/systemd"] diff --git a/examples/README.md b/examples/README.md new file mode 100644 index 00000000..64558a7e --- /dev/null +++ b/examples/README.md @@ -0,0 +1,2 @@ +# Examples +Check out the [Wiki on GitHub](https://github.com/ari4java/ari4java/wiki/Examples) for more details. diff --git a/examples/Vagrantfile b/examples/Vagrantfile new file mode 100644 index 00000000..9636f439 --- /dev/null +++ b/examples/Vagrantfile @@ -0,0 +1,35 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : + +# use NET_BRIDGE=on to create a bridge interface with dynamic ip from your network. +# Used for testing from an external source like a cell phone with Zoiper or the like +# Note: Wifi with WPA2-Enterprise does not work, the interface doesn't get an IP +# Note: for M1 Mac use the --provider docker flag, the NET_BRIDGE is not compatible with docker +if not ENV["NET_BRIDGE"] then ENV["NET_BRIDGE"] = "off" end + +Vagrant.configure("2") do |config| + config.vm.box = "cloud-image/ubuntu-24.04" + config.vm.synced_folder "./vagrant", "/vagrant" + config.vm.provider "virtualbox" do |v, override| + v.memory = 1024 + v.cpus = 2 + override.vm.network "private_network", ip: "192.168.56.44" + if ENV["NET_BRIDGE"] == "on" then + override.vm.network "public_network", use_dhcp_assigned_default_route: false + end + override.vm.provision :shell, :path => "vagrant/scripts/provision.sh" + end + config.vm.provider "docker" do |d, override| + override.vm.box = nil + d.build_dir = "." + override.ssh.insert_key = true + d.has_ssh = true + d.privileged = true + override.vm.network :forwarded_port, guest: 8089, host: 8089 + override.vm.network :forwarded_port, guest: 5060, host: 5060, protocol: "udp" + for i in 20000..20010 + override.vm.network :forwarded_port, guest: i, host: i, protocol: "udp" + end + override.vm.provision :shell, :path => "vagrant/scripts/provision.sh", :args => ["docker"] + end +end diff --git a/examples/build.gradle b/examples/build.gradle new file mode 100755 index 00000000..73ea9eec --- /dev/null +++ b/examples/build.gradle @@ -0,0 +1,34 @@ +plugins { + id "java" +} + +repositories { + mavenCentral() +} + +dependencies { + if (file("../.inc-examples").exists()) { + implementation project(":") + } else { + implementation "io.github.ari4java:ari4java:+" + } + implementation "ch.qos.logback:logback-classic:1.5.26" + implementation "io.netty:netty-all:4.2.9.Final" +} + +java { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 +} + +task runWeaselsExample(type: JavaExec) { + dependsOn build + classpath = sourceSets.main.runtimeClasspath + mainClass = "ch.loway.oss.ari4java.examples.Weasels" +} + +task runComprehensiveExample(type: JavaExec) { + dependsOn build + classpath = sourceSets.main.runtimeClasspath + mainClass = "ch.loway.oss.ari4java.examples.comprehensive.Boot" +} diff --git a/examples/gradle/wrapper/gradle-wrapper.jar b/examples/gradle/wrapper/gradle-wrapper.jar new file mode 100755 index 00000000..7454180f Binary files /dev/null and b/examples/gradle/wrapper/gradle-wrapper.jar differ diff --git a/examples/gradle/wrapper/gradle-wrapper.properties b/examples/gradle/wrapper/gradle-wrapper.properties new file mode 100755 index 00000000..3ae1e2f1 --- /dev/null +++ b/examples/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/examples/gradlew b/examples/gradlew new file mode 100755 index 00000000..1b6c7873 --- /dev/null +++ b/examples/gradlew @@ -0,0 +1,234 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit + +APP_NAME="Gradle" +APP_BASE_NAME=${0##*/} + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/examples/gradlew.bat b/examples/gradlew.bat new file mode 100755 index 00000000..ac1b06f9 --- /dev/null +++ b/examples/gradlew.bat @@ -0,0 +1,89 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/examples/helloworld/HelloAriWorld.java b/examples/helloworld/HelloAriWorld.java deleted file mode 100644 index 5c3f33c9..00000000 --- a/examples/helloworld/HelloAriWorld.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Hello ARI World! - */ -package helloworld; - -import ch.loway.oss.ari4java.ARI; -import ch.loway.oss.ari4java.AriFactory; -import ch.loway.oss.ari4java.AriVersion; -import ch.loway.oss.ari4java.generated.AsteriskInfo; -import ch.loway.oss.ari4java.generated.Channel; -import java.util.List; - -/** - * This is a sample printig current system information. - * - * @author lenz - */ -public class HelloAriWorld { - - /** - * @param args the command line arguments - */ - public static void main(String[] args) { - - System.out.println("Hello ARI world!"); - - try { - - ARI ari = AriFactory.nettyHttp( - "http://10.10.5.41:8088/", - "ari4java", "yothere", - AriVersion.ARI_1_5_0); - - AsteriskInfo info = ari.asterisk().getInfo(""); - List channels = ari.channels().list(); - - System.out.println("There are " + channels.size() + " active channels now."); - System.out.println( "System up since " + info.getStatus().getStartup_time() ); - - } catch (Throwable t) { - t.printStackTrace(); - } - } -} - diff --git a/examples/settings.gradle b/examples/settings.gradle new file mode 100755 index 00000000..19692206 --- /dev/null +++ b/examples/settings.gradle @@ -0,0 +1,7 @@ +if (file("../.build-examples").exists()) { + includeBuild("../") { + dependencySubstitution { + substitute(module("io.github.ari4java:ari4java")).using(project(":")) + } + } +} diff --git a/examples/src/main/java/ch/loway/oss/ari4java/examples/Weasels.java b/examples/src/main/java/ch/loway/oss/ari4java/examples/Weasels.java new file mode 100755 index 00000000..8a19e75f --- /dev/null +++ b/examples/src/main/java/ch/loway/oss/ari4java/examples/Weasels.java @@ -0,0 +1,149 @@ +package ch.loway.oss.ari4java.examples; + +import ch.loway.oss.ari4java.ARI; +import ch.loway.oss.ari4java.AriVersion; +import ch.loway.oss.ari4java.generated.AriWSHelper; +import ch.loway.oss.ari4java.generated.models.*; +import ch.loway.oss.ari4java.tools.ARIException; +import ch.loway.oss.ari4java.tools.AriCallback; +import ch.loway.oss.ari4java.tools.RestException; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.concurrent.TimeUnit; + +public class Weasels { + + private static final String ARI_APP = "weasels-app"; + + private ARI ari; + private final Logger logger = LoggerFactory.getLogger(Weasels.class); + + public static void main(String[] args) throws Exception { + if (args.length < 3) { + System.err.println("** Expecting at least 3 arguments:\n url user pass [ariversion]"); + System.exit(1); + } + AriVersion ver = AriVersion.IM_FEELING_LUCKY; + if (args.length == 4) { + ver = AriVersion.fromVersionString(args[3]); + } + new Weasels().start(args[0], args[1], args[2], ver); + } + + private void start(String url, String user, String pass, AriVersion ver) { + logger.info("THE START"); + boolean connected = connect(url, user, pass, ver); + if (connected) { + try { + weasels(); + } catch (Throwable t) { + logger.error("Error: {}", t.getMessage(), t); + } finally { + logger.info("ARI cleanup"); + ari.cleanup(); + } + } + logger.info("THE END"); + } + + private boolean connect(String url, String user, String pass, AriVersion ver) { + try { + ari = ARI.build(url, ARI_APP, user, pass, ver); + logger.info("ARI Version: {}", ari.getVersion().version()); + AsteriskInfo info = ari.asterisk().getInfo().execute(); + logger.info("AsteriskInfo up since {}", info.getStatus().getStartup_time()); + return true; + } catch (Throwable t) { + logger.error("Error: {}", t.getMessage(), t); + } + return false; + } + + private void weasels() throws InterruptedException, ARIException { + final ExecutorService threadPool = Executors.newFixedThreadPool(10); + ari.eventsCallback(new AriWSHelper() { + @Override + public void onSuccess(Message message) { + threadPool.execute(() -> super.onSuccess(message)); + } + + @Override + public void onFailure(RestException e) { + logger.error("Error: {}", e.getMessage(), e); + threadPool.shutdown(); + } + + @Override + protected void onStasisStart(StasisStart message) { + handleStart(message, threadPool); + } + + @Override + protected void onPlaybackFinished(PlaybackFinished message) { + handlePlaybackFinished(message, threadPool); + } + + }); + // usually we would not terminate and run indefinitely + // waiting for 5 minutes before shutting down... + threadPool.awaitTermination(5, TimeUnit.MINUTES); + ari.cleanup(); + System.exit(0); + } + + private void handleStart(StasisStart start, final ExecutorService threadPool) { + logger.info("Stasis Start Channel: {}", start.getChannel().getId()); + ARI.sleep(300); // a slight pause before we start the playback ... + try { + ari.channels().play(start.getChannel().getId(), "sound:weasels-eaten-phonesys") + .execute(new AriCallback() { + @Override + public void onSuccess(Playback playback) { + logger.debug("Playback success: {}", playback.getId()); + } + + @Override + public void onFailure(RestException e) { + logger.error("Playback Error: {}", e.getMessage(), e); + threadPool.shutdown(); + } + }); + } catch (Throwable e) { + logger.error("Error: {}", e.getMessage(), e); + threadPool.shutdown(); + } + } + + private void handlePlaybackFinished(PlaybackFinished playback, final ExecutorService threadPool) { + logger.info("PlaybackFinished - {} {}", playback.getPlayback().getId(), playback.getPlayback().getTarget_uri()); + if (playback.getPlayback().getTarget_uri().indexOf("channel:") == 0) { + try { + String chanId = playback.getPlayback().getTarget_uri().split(":")[1]; + logger.info("Hangup Channel: {}", chanId); + ARI.sleep(300); // a slight pause before we hangup ... + ari.channels().hangup(chanId).execute(new AriCallback() { + @Override + public void onSuccess(Void a) { + logger.debug("Hangup success"); + threadPool.shutdown(); + } + + @Override + public void onFailure(RestException e) { + logger.error("Hangup Error: {}", e.getMessage(), e); + threadPool.shutdown(); + } + }); + } catch (Throwable e) { + logger.error("Error: {}", e.getMessage(), e); + } + } else { + logger.error("Cannot handle URI - {}", playback.getPlayback().getTarget_uri()); + } + } + +} + diff --git a/examples/src/main/java/ch/loway/oss/ari4java/examples/comprehensive/Asterisk.java b/examples/src/main/java/ch/loway/oss/ari4java/examples/comprehensive/Asterisk.java new file mode 100644 index 00000000..c33e6c1d --- /dev/null +++ b/examples/src/main/java/ch/loway/oss/ari4java/examples/comprehensive/Asterisk.java @@ -0,0 +1,441 @@ +package ch.loway.oss.ari4java.examples.comprehensive; + +import ch.loway.oss.ari4java.ARI; +import ch.loway.oss.ari4java.AriVersion; +import ch.loway.oss.ari4java.generated.AriWSHelper; +import ch.loway.oss.ari4java.generated.models.*; +import ch.loway.oss.ari4java.tools.AriCallback; +import ch.loway.oss.ari4java.tools.RestException; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; + +public class Asterisk { + + private static final String ARI_APP_NAME = "comprehensive-app"; + private static final Logger logger = LoggerFactory.getLogger(Asterisk.class); + private static final Map lookups = new HashMap<>(); + private static final Map states = new HashMap<>(); + private final String address; + private final String user; + private final String pass; + private final AriVersion version; + private ARI ari; + private ExecutorService threadPool; + + public Asterisk(String address, String user, String pass, AriVersion version) { + this.address = address; + this.user = user; + this.pass = pass; + this.version = version; + } + + /** + * Starts the ARI Event Websocket to Asterisk using the Handler class + * @see Asterisk.Handler + * @return true if connected successfully + */ + public boolean start() { + logger.info("Starting ARI..."); + try { + ari = ARI.build(address, ARI_APP_NAME, user, pass, version); + // execute syncronously to validate ARI before starting the event websocket + AsteriskInfo info = ari.asterisk().getInfo().execute(); + logger.info("Asterisk {}", info.getSystem().getVersion()); + threadPool = Executors.newFixedThreadPool(5); + ari.events().eventWebsocket(ARI_APP_NAME).execute(new Handler()); + return true; + } catch (Throwable t) { + logger.error("Error: {}", t.getMessage(), t); + } + return false; + } + + private void getAsteriskInfo() { + try { + ari.asterisk().getInfo().execute(new AriCallback() { + @Override + public void onSuccess(AsteriskInfo info) { + logger.info("Asterisk {}", info.getSystem().getVersion()); + } + + @Override + public void onFailure(RestException e) { + logger.error("Error getting Asterisk version: {}", e.getMessage(), e); + } + }); + } catch (Throwable t) { + logger.error("Error: {}", t.getMessage(), t); + } + } + + /** + * Stops the ARI Event Websocket + */ + public void stop() { + if (ari != null) ari.cleanup(); + if (threadPool != null) threadPool.shutdown(); + } + + /** + * Start a call by creating a channel to the provided from number, + * the events will then create a channel to the to number and add them to a bridge + * @param from the 1st number to call + * @param to the 2nd number to call + * @return an id used for the call state, can be used to end the call + * @throws RestException raised by ARI interactions + */ + public String startCall(String from, String to) throws RestException { + State state = new State(); + state.from = from; + state.to = to; + state.channel1 = createChannel(state.from, "Outbound: " + state.to); + synchronized (states) { + states.put(state.id, state); + } + synchronized (lookups) { + lookups.put(state.channel1, state.id); + } + return state.id; + } + + /** + * Create channel, when to is 123 then use type Local, else PJSIP + * @param to the destination + * @param from the source the destination will see in the CLI + * @return the id of the created channel + * @throws RestException raised by ARI interactions + */ + private String createChannel(String to, String from) throws RestException { + String endpoint = "PJSIP/" + to; + if ("123".equals(to)) { + // 123 is the Echo App in the dialplan, setting the type to Local executes the dialplan + endpoint = "Local/123@from-internal"; + } + // AppArgs is set to "me" so we know when the StasisStart event occurs we can ignore it as we started the process + // Context from-internal is what was setup in the vagrant box + Channel channel = ari.channels().originate(endpoint).setApp(ARI_APP_NAME).setCallerId(from).setAppArgs("me") + .setContext("from-internal").execute(); + logger.debug("Channel created to {}, Id: {}", channel.getConnected().getNumber(), channel.getId()); + return channel.getId(); + } + + /** + * End a call by hanging up channel1 from the State object, this will in turn hangup channel2 + * @param stateId the id of the State object + */ + public void endCall(String stateId) { + if (states.containsKey(stateId)) { + hangupChannel(states.get(stateId).channel1); + } + } + + /** + * Hangs up the channel if in the lookups + * @param channelId the channel id + */ + private void hangupChannel(String channelId) { + if (channelId != null) { + if (lookups.containsKey(channelId)) { + try { + ari.channels().hangup(channelId).execute(new AriCallback() { + @Override + public void onSuccess(Void result) { + logger.debug("hanging up channel"); + } + + @Override + public void onFailure(RestException e) { + logger.error("Error hanging up channel", e); + } + }); + } catch (RestException e) { + logger.error("Error hanging up channel", e); + } + } else { + logger.warn("Channel not found in lookup {}", channelId); + } + } + } + + /** + * Creates a bridge adds its id to the State object and adds channel1 to the bridge + * @param state the state for the call + * @throws RestException raised by ARI interactions + */ + private void createBridgeAndAddChannel1(State state) throws RestException { + ari.bridges().create().execute(new AriCallback() { + @Override + public void onSuccess(Bridge bridge) { + logger.debug("Bridge created id: {}", bridge.getId()); + state.bridge = bridge.getId(); + try { + addChannelToBridge(state.bridge, state.channel1); + } catch (RestException e) { + logger.error("Error adding channel to bridge: {}", e.getMessage(), e); + } + } + + @Override + public void onFailure(RestException e) { + logger.error("Error creating bridge: {}", e.getMessage(), e); + } + }); + } + + /** + * @param bridgeId id of the bridge + * @param channelId id of the channel + * @throws RestException raised by ARI interactions + */ + private void addChannelToBridge(String bridgeId, String channelId) throws RestException { + ari.bridges().addChannel(bridgeId, channelId).execute(new AriCallback() { + @Override + public void onSuccess(Void result) { + logger.debug("Channel {}, added to Bridge {}", channelId, bridgeId); + } + + @Override + public void onFailure(RestException e) { + logger.debug("Error adding Channel {} to Bridge {}: {}", channelId, bridgeId, e.getMessage(), e); + } + }); + } + + /** + * @param id channel or bridge id + * @return the State object + */ + private State lookupState(String id) { + if (id != null && !id.isEmpty()) { + synchronized (lookups) { + if (lookups.containsKey(id)) { + return states.get(lookups.get(id)); + } + } + } + return null; + } + + /** + * Remove the provided id from the lookups and the State object, if all ids cleared in the State object remove from the states + * @param id the channel or bridge id + */ + private void clear(String id) { + if (id == null || id.trim().isEmpty()) { + return; + } + String stateId = null; + synchronized (lookups) { + if (lookups.containsKey(id)) { + stateId = lookups.remove(id); + } + } + if (stateId != null) { + synchronized (states) { + State state = states.get(stateId); + if (state != null) { + // state was found clear the relevant id... + if (id.equals(state.channel1)) { + state.channel1 = null; + } else if (id.equals(state.channel2)) { + state.channel2 = null; + } else if (id.equals(state.bridge)) { + state.bridge = null; + } + // all ids are cleared, remove from states... + if (state.channel1 == null && state.channel2 == null && state.bridge == null) { + states.remove(stateId); + } + } + } + } + } + + /** + * An object to contain some ids to aid with processing the events. + */ + static class State { + private final String id = UUID.randomUUID().toString(); + private String from; + private String to; + private String channel1; + private String channel2; + private String bridge; + } + + /** + * Extension of the AriWSHelper to handle the events from Asterisk. + */ + class Handler extends AriWSHelper { + + @Override + public void onSuccess(Message message) { + // execute message handling in a thead pool to offload the websocket event worker, + // so we can get the next event and avoid a potential netty worker group starvation + threadPool.execute(() -> super.onSuccess(message)); + } + + @Override + protected void onStasisStart(StasisStart message) { + // StasisStart is created by both the Stasis dialplan app and a call to the channels API in ARI, + // so we check an argument set in the createChannel code and ignore + logger.debug("onStasisStart, chan id: {}, name: {}", message.getChannel().getId(), message.getChannel().getName()); + if (message.getArgs() != null && !message.getArgs().isEmpty() && "me".equals(message.getArgs().get(0))) { + logger.debug("started by me, not processing..."); + return; + } + // was not created by "me" so we assume it's from the Stasis dialplan app + // create a State object and extract the info... + State state = new State(); + state.from = message.getChannel().getCaller().getNumber(); + state.to = message.getChannel().getDialplan().getExten(); + // 902 & 903 are "virtual" dialplan extensions that should call endpoint 100 or 200 + if ("902".equals(state.to) || "903".equals(state.to)) { + state.to = "902".equals(state.to) ? "100" : "200"; + logger.debug("Call received on virtual extension changed to {}", state.to); + } + state.channel1 = message.getChannel().getId(); + synchronized (states) { + states.put(state.id, state); + } + synchronized (lookups) { + lookups.put(state.channel1, state.id); + } + // add the inbound call channel to a bridge + try { + createBridgeAndAddChannel1(state); + } catch (RestException e) { + logger.error("Error creating bridge", e); + hangupChannel(state.channel1); + } + } + + @Override + protected void onChannelStateChange(ChannelStateChange message) { + logger.debug("onChannelStateChange {} {}", message.getChannel().getId(), message.getChannel().getState()); + // find the State object for the channel + State state = lookupState(message.getChannel().getId()); + if (state != null) { + // some debug logging... + if (logger.isDebugEnabled()) { + String chan = "?"; + if (message.getChannel().getId().equals(state.channel1)) { + chan = "channel1"; + } else if (message.getChannel().getId().equals(state.channel2)) { + chan = "channel2"; + } + logger.debug("state id: {}, chan: {}", state.id, chan); + } + if ("Up".equals(message.getChannel().getState()) && message.getChannel().getId().equals(state.channel1)) { + // the channel state has changed to Up and is channel1 in the State object ... + // this occurs in the startCall flow, when the phone answers we want to create a bridge and add the channel + // then create a channel for the to number stored in the State object + logger.debug("Channel 1 answered, create bridge and add channel..."); + try { + createBridgeAndAddChannel1(state); + } catch (RestException e) { + logger.error("Error creating bridge", e); + hangupChannel(state.channel1); + } + } else if ("Ringing".equals(message.getChannel().getState()) && message.getChannel().getId().equals(state.channel2)) { + // the channel state has changed to Ringing and is channel2 in the State object ... + // execute ring on channel1 so the person knows its ringing on the other end... + logger.debug("Channel 2 is ringing, ring channel 1..."); + try { + ari.channels().ring(state.channel1).execute(); + } catch (RestException e) { + logger.error("Error ringing channel", e); + } + } else if ("Up".equals(message.getChannel().getState()) && message.getChannel().getId().equals(state.channel2)) { + // the channel state has changed to Up and is channel2 in the State object ... + // add it to the bridge now both parties are connected and can communicate + logger.debug("Channel 2 answered, add to bridge..."); + try { + addChannelToBridge(state.bridge, state.channel2); + } catch (RestException e) { + logger.error("Error adding channel to bridge", e); + hangupChannel(state.channel2); + } + } else { + logger.debug("Not handling this channel state change"); + } + } else { + logger.error("Could not find state for channel {}", message.getChannel().getId()); + } + } + + @Override + protected void onChannelEnteredBridge(ChannelEnteredBridge message) { + logger.debug("onChannelEnteredBridge {} {}", message.getBridge().getId(), message.getChannel().getId()); + State state = lookupState(message.getChannel().getId()); + if (message.getChannel().getId().equals(state.channel1)) { + try { + state.channel2 = createChannel(state.to, state.from); + synchronized (lookups) { + lookups.put(state.channel2, state.id); + } + logger.debug("channel2: {}", state.channel2); + } catch (RestException e) { + logger.error("Error creating channel2", e); + hangupChannel(state.channel1); + } + } + } + + @Override + protected void onChannelLeftBridge(ChannelLeftBridge message) { + logger.debug("onChannelLeftBridge {} {}", message.getBridge().getId(), message.getChannel().getId()); + if (message.getBridge().getChannels().isEmpty()) { + // the bridge is no longer needed - it's empty, so destroy it + logger.debug("No more channels in bridge, destroying..."); + try { + ari.bridges().destroy(message.getBridge().getId()).execute(); + } catch (RestException e) { + logger.error("Error destroying bridge", e); + } + } else { + // a channel left the bridge and there's another channel - so hangup the 1st channel as it's lonely here now... + String chan = message.getBridge().getChannels().get(0); + logger.debug("Hangup the other channel {}", chan); + hangupChannel(chan); + } + } + + @Override + protected void onChannelDestroyed(ChannelDestroyed message) { + logger.debug("onChannelDestroyed {}", message.getChannel().getId()); + // ChannelDestroyed is usually when the endpoint doesn't answer + // ChannelDestroyed & StasisEnd sometimes both occur, so we need to check the State is not null + State state = lookupState(message.getChannel().getId()); + if (state != null) { + // remove the channel from the lookups and State + clear(message.getChannel().getId()); + if (message.getChannel().getId().equals(state.channel2) && state.channel1 != null) { + // this is channel2, so hangup the 1st channel as it's lonely here now... + hangupChannel(state.channel1); + } + } + } + + @Override + protected void onBridgeDestroyed(BridgeDestroyed message) { + logger.debug("onBridgeDestroyed {}", message.getBridge().getId()); + // remove the bridge from the lookups and State + clear(message.getBridge().getId()); + } + + @Override + protected void onStasisEnd(StasisEnd message) { + logger.debug("onStasisEnd {}", message.getChannel().getId()); + // remove the channel from the lookups and State + clear(message.getChannel().getId()); + } + } + +} diff --git a/examples/src/main/java/ch/loway/oss/ari4java/examples/comprehensive/Boot.java b/examples/src/main/java/ch/loway/oss/ari4java/examples/comprehensive/Boot.java new file mode 100644 index 00000000..341ded52 --- /dev/null +++ b/examples/src/main/java/ch/loway/oss/ari4java/examples/comprehensive/Boot.java @@ -0,0 +1,29 @@ +package ch.loway.oss.ari4java.examples.comprehensive; + +import ch.loway.oss.ari4java.AriVersion; + +public class Boot { + + public static void main(String[] args) throws Exception { + if (args.length < 4) { + System.err.println("** Expecting at least 4 arguments:\n port url user pass [ariversion]"); + System.exit(1); + } + int port = Integer.parseInt(args[0]); + AriVersion ver = AriVersion.IM_FEELING_LUCKY; + if (args.length == 5) { + ver = AriVersion.fromVersionString(args[4]); + } + Asterisk asterisk = new Asterisk(args[1], args[2], args[3], ver); + WebServer webserver = new WebServer(port, asterisk); + Runtime.getRuntime().addShutdownHook(new Thread(() -> { + asterisk.stop(); + webserver.stop(); + })); + if (!asterisk.start()) { + System.exit(1); + } + webserver.start(); + } + +} diff --git a/examples/src/main/java/ch/loway/oss/ari4java/examples/comprehensive/WebServer.java b/examples/src/main/java/ch/loway/oss/ari4java/examples/comprehensive/WebServer.java new file mode 100644 index 00000000..21c77b4f --- /dev/null +++ b/examples/src/main/java/ch/loway/oss/ari4java/examples/comprehensive/WebServer.java @@ -0,0 +1,119 @@ +package ch.loway.oss.ari4java.examples.comprehensive; + +import ch.loway.oss.ari4java.tools.RestException; +import io.netty.bootstrap.ServerBootstrap; +import io.netty.buffer.ByteBuf; +import io.netty.buffer.Unpooled; +import io.netty.channel.*; +import io.netty.channel.nio.NioIoHandler; +import io.netty.channel.socket.SocketChannel; +import io.netty.channel.socket.nio.NioServerSocketChannel; +import io.netty.handler.codec.http.*; +import io.netty.handler.logging.LogLevel; +import io.netty.handler.logging.LoggingHandler; +import io.netty.util.CharsetUtil; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class WebServer { + + private static final Logger logger = LoggerFactory.getLogger(WebServer.class); + private final Asterisk asterisk; + private final int port; + private EventLoopGroup parentGroup; + private EventLoopGroup workerGroup; + + public WebServer(int port, Asterisk asterisk) { + this.port = port; + this.asterisk = asterisk; + } + + public void start() { + logger.info("Starting HTTP Server on port {}", port); + parentGroup = new MultiThreadIoEventLoopGroup(1, NioIoHandler.newFactory()); + workerGroup = new MultiThreadIoEventLoopGroup(5, NioIoHandler.newFactory()); + try { + ServerBootstrap b = new ServerBootstrap(); + b.group(parentGroup, workerGroup) + .channel(NioServerSocketChannel.class) + .handler(new LoggingHandler(LogLevel.INFO)) + .childHandler(new ChannelInitializer() { + @Override + protected void initChannel(SocketChannel ch) throws Exception { + ChannelPipeline p = ch.pipeline(); + p.addLast(new HttpRequestDecoder()); + p.addLast(new HttpResponseEncoder()); + p.addLast(new ServerHandler()); + } + }); + + ChannelFuture f = b.bind(port).sync(); + f.channel().closeFuture().sync(); + } catch (Exception e) { + logger.error(e.getMessage(), e); + } finally { + stop(); + } + } + + public void stop() { + if (parentGroup != null) parentGroup.shutdownGracefully(); + if (workerGroup != null) workerGroup.shutdownGracefully(); + } + + class ServerHandler extends SimpleChannelInboundHandler { + + private String uri; + private HttpMethod method; + + @Override + public void channelReadComplete(ChannelHandlerContext ctx) { + ctx.flush(); + } + + @Override + protected void channelRead0(ChannelHandlerContext ctx, Object msg) throws Exception { + if (msg instanceof HttpRequest request) { + uri = request.uri(); + method = request.method(); + logger.debug("HttpRequest method: {}, uri: {}", method, uri); + } + if (msg instanceof LastHttpContent) { + HttpResponseStatus status = HttpResponseStatus.NOT_FOUND; + ByteBuf content = Unpooled.copiedBuffer("{\"message\": \"not found\"}", CharsetUtil.UTF_8); + try { + if (HttpMethod.GET.equals(method)) { + String[] parts = uri.split("/"); + logger.debug("action = {}", parts[1]); + if ("start".equals(parts[1]) && parts.length == 4) { + String id = asterisk.startCall(parts[2], parts[3]); + status = HttpResponseStatus.OK; + content = Unpooled.copiedBuffer("{\"message\": \"success\", \"id\": \"" + id + "\"}", CharsetUtil.UTF_8); + } else if ("end".equals(parts[1]) && parts.length == 3) { + asterisk.endCall(parts[2]); + status = HttpResponseStatus.OK; + content = Unpooled.copiedBuffer("{\"message\": \"success\"}", CharsetUtil.UTF_8); + } else { + logger.debug("invalid action"); + } + } + } catch (RestException e) { + status = HttpResponseStatus.INTERNAL_SERVER_ERROR; + content = Unpooled.copiedBuffer("{\"message\": \"" + e.getMessage() + "\"}", CharsetUtil.UTF_8); + } + FullHttpResponse httpResponse = new DefaultFullHttpResponse(HttpVersion.HTTP_1_1, status, content); + httpResponse.headers().set(HttpHeaderNames.ACCESS_CONTROL_ALLOW_ORIGIN, "*"); + httpResponse.headers().set(HttpHeaderNames.CONTENT_TYPE, "application/json; charset=UTF-8"); + httpResponse.headers().setInt(HttpHeaderNames.CONTENT_LENGTH, httpResponse.content().readableBytes()); + ctx.writeAndFlush(httpResponse).addListener(ChannelFutureListener.CLOSE); + } + } + + @Override + public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) { + logger.warn("exceptionCaught", cause); + ctx.close(); + } + } + +} diff --git a/examples/src/main/resources/logback.xml b/examples/src/main/resources/logback.xml new file mode 100644 index 00000000..b997c8f5 --- /dev/null +++ b/examples/src/main/resources/logback.xml @@ -0,0 +1,16 @@ + + + + + + %cyan(%d{ISO8601}) %highlight(%-5level) [%blue(%t)] %green(%c{1}): %msg%n%throwable + + + + + + + + + + \ No newline at end of file diff --git a/examples/vagrant/asterisk/acl.conf b/examples/vagrant/asterisk/acl.conf new file mode 100644 index 00000000..b052606c --- /dev/null +++ b/examples/vagrant/asterisk/acl.conf @@ -0,0 +1,80 @@ +; +; Named Access Control Lists (ACLs) +; +; A convenient way to share acl definitions +; +; This configuration file is read on startup +; +; CLI Commands +; ----------------------------------------------------------- +; acl show Show all named ACLs configured +; acl show Show contents of a particular named ACL +; reload acl Reload configuration file +; +; Any configuration that uses ACLs which has been made to be able to use named +; ACLs will specify a named ACL with the 'acl' option in its configuration in +; a similar fashion to the usual 'permit' and 'deny' options. Example: +; acl=my_named_acl +; +; Multiple named ACLs can be applied by either comma separating the arguments or +; just by adding additional ACL lines. Example: +; acl=my_named_acl +; acl=my_named_acl2 +; +; or +; +; acl=my_named_acl,my_named_acl2 +; +; ACLs specified by name are evaluated independently from the ACL specified via +; permit/deny. In order for an address to pass a given ACL, it must pass both +; the ACL specified by permit/deny for a given item as well as any named ACLs +; that were specified. +; +;[example_named_acl1] +;deny=0.0.0.0/0.0.0.0 +;permit=209.16.236.0 +;permit=209.16.236.1 +; +;[example_named_acl2] +;permit=0.0.0.0/0.0.0.0 +;deny=10.24.20.171 +;deny=10.24.20.103 +;deny=209.16.236.1 +; +; example_named_acl1 above shows an example of whitelisting. When whitelisting, the +; named ACLs should follow a deny that blocks everything (like deny=0.0.0.0/0.0.0.0) +; The following example explains how combining the ACLs works: +; +; [example_item_with_acl] +; acl=example_named_acl1 +; acl=example_named_acl2 +; +; Suppose 209.16.236.0 tries to communicate and the ACL for that example is applied to it... +; First, example_named_acl1 is evaluated. The address is allowed by that ACL. +; Next, example_named_acl2 is evaluated. The address isn't blocked by example_named_acl2 +; either, so it passes. +; +; Suppose instead 209.16.236.1 tries to communicate and the same ACL is applied. +; First, example_named_acl1 is evaluated and the address is allowed. +; However, it is blocked by example_named_acl2, so the address is blocked from the combined +; ACL. +; +; Similarly, the permits/denies in specific configurations that make up an ACL definition +; are also treated as a separate ACL for evaluation. So if we change the example above to: +; +; [example_item_with_acl] +; acl=example_named_acl1 +; acl=example_named_acl2 +; deny=209.16.236.0 +; +; Then 209.16.236.0 will be rejected by the non-named component of the combined ACL even +; though it passes the two named components. +; +; +; Named ACLs can use ipv6 addresses just like normal ACLs. +;[ipv6_example_1] +;deny = :: +;permit = ::1/128 +; +;[ipv6_example_2] +;permit = fe80::21d:bad:fad:2323 diff --git a/examples/vagrant/asterisk/ari.conf b/examples/vagrant/asterisk/ari.conf new file mode 100644 index 00000000..66c5adb2 --- /dev/null +++ b/examples/vagrant/asterisk/ari.conf @@ -0,0 +1,9 @@ +[general] +enabled = yes +pretty = no + +[ari4java] +type = user +read_only = no +password = yothere +password_format = plain diff --git a/examples/vagrant/asterisk/asterisk.conf b/examples/vagrant/asterisk/asterisk.conf new file mode 100644 index 00000000..ccefff84 --- /dev/null +++ b/examples/vagrant/asterisk/asterisk.conf @@ -0,0 +1,13 @@ +[options] +; If we want to start Asterisk with a default verbosity for the verbose +; or debug logger channel types, then we use these settings (by default +; they are disabled). +;verbose = 5 +;debug = 2 + +; User and group to run asterisk as. NOTE: This will require changes to +; directory and device permissions. +;runuser = asterisk ; The user to run as. The default is root. +;rungroup = asterisk ; The group to run as. The default is root + +;defaultlanguage = es diff --git a/examples/vagrant/asterisk/cdr.conf b/examples/vagrant/asterisk/cdr.conf new file mode 100644 index 00000000..10fb9fc6 --- /dev/null +++ b/examples/vagrant/asterisk/cdr.conf @@ -0,0 +1,10 @@ +[general] +enable=no +unanswered=no +congestion=no + +[csv] +usegmtime=yes +loguniqueid=yes +loguserfield=yes +accountlogs=no diff --git a/examples/vagrant/asterisk/cel.conf b/examples/vagrant/asterisk/cel.conf new file mode 100644 index 00000000..755fcd3e --- /dev/null +++ b/examples/vagrant/asterisk/cel.conf @@ -0,0 +1,116 @@ +; +; Asterisk Channel Event Logging (CEL) +; + +; Channel Event Logging is a mechanism to provide fine-grained event information +; that can be used to generate billing information. Such event information can +; be recorded to various backend modules. +; + +[general] + +; CEL Activation +; +; Use the 'enable' keyword to turn CEL on or off. +; +; Accepted values: yes and no +; Default value: no + +;enable=yes + +; Application Tracking +; +; Use the 'apps' keyword to specify the list of applications for which you want +; to receive CEL events. This is a comma separated list of Asterisk dialplan +; applications, such as Dial, Queue, and Park. +; +; Accepted values: A comma separated list of Asterisk dialplan applications +; Default value: none +; +; Note: You may also use 'all' which will result in CEL events being reported +; for all Asterisk applications. This may affect Asterisk's performance +; significantly. + +apps=dial,park + +; Event Tracking +; +; Use the 'events' keyword to specify the list of events which you want to be +; raised when they occur. This is a comma separated list of the values in the +; table below. +; +; Accepted values: A comma separated list of one or more of the following: +; ALL -- Generate entries on all events +; CHAN_START -- The time a channel was created +; CHAN_END -- The time a channel was terminated +; ANSWER -- The time a channel was answered (ie, phone taken off-hook) +; HANGUP -- The time at which a hangup occurred +; BRIDGE_ENTER -- The time a channel was connected into a conference room +; BRIDGE_EXIT -- The time a channel was removed from a conference room +; APP_START -- The time a tracked application was started +; APP_END -- the time a tracked application ended +; PARK_START -- The time a call was parked +; PARK_END -- Unpark event +; BLINDTRANSFER -- When a blind transfer is initiated +; ATTENDEDTRANSFER -- When an attended transfer is initiated +; PICKUP -- This channel picked up the specified channel +; FORWARD -- This channel is being forwarded somewhere else +; LINKEDID_END -- The last channel with the given linkedid is retired +; USER_DEFINED -- Triggered from the dialplan, and has a name given by the +; user +; LOCAL_OPTIMIZE -- A local channel pair is optimizing away. +; +; Default value: none +; (Track no events) + +events=APP_START,CHAN_START,CHAN_END,ANSWER,HANGUP,BRIDGE_ENTER,BRIDGE_EXIT + +; Date Format +; +; Use the 'dateformat' keyword to specify the date format used when CEL events +; are raised. +; +; Accepted values: A strftime format string (see man strftime) +; +; Example: "%F %T" +; -> This gives the date and time in the format "2009-06-23 17:02:35" +; +; If this option is not specified, the default format is "." +; since epoch. The microseconds field will always be 6 digits in length, meaning it +; may have leading zeros. +; +;dateformat = %F %T + +; +; Asterisk Manager Interface (AMI) CEL Backend +; +[manager] + +; AMI Backend Activation +; +; Use the 'enable' keyword to turn CEL logging to the Asterisk Manager Interface +; on or off. +; +; Accepted values: yes and no +; Default value: no +;enabled=yes + +; Use 'show_user_defined' to put "USER_DEFINED" in the EventName header, +; instead of (by default) just putting the user defined event name there. +; When enabled the UserDefType header is added for user defined events to +; provide the user defined event name. +; +;show_user_defined=yes + +; +; RADIUS CEL Backend +; +[radius] +; +; Log date/time in GMT +;usegmtime=yes +; +; Set this to the location of the radiusclient-ng configuration file +; The default is /etc/radiusclient-ng/radiusclient.conf +;radiuscfg => /usr/local/etc/radiusclient-ng/radiusclient.conf +; diff --git a/examples/vagrant/asterisk/codecs.conf b/examples/vagrant/asterisk/codecs.conf new file mode 100644 index 00000000..ef5a2f8c --- /dev/null +++ b/examples/vagrant/asterisk/codecs.conf @@ -0,0 +1,214 @@ +[speex] +; CBR encoding quality [0..10] +; used only when vbr = false +quality => 3 + +; codec complexity [0..10] +; tradeoff between cpu/quality +complexity => 2 + +; perceptual enhancement [true / false] +; improves clarity of decoded speech +enhancement => true + +; voice activity detection [true / false] +; reduces bitrate when no voice detected, used only for CBR +; (implicit in VBR/ABR) +vad => true + +; variable bit rate [true / false] +; uses bit rate proportionate to voice complexity +vbr => true + +; available bit rate [bps, 0 = off] +; encoding quality modulated to match this target bit rate +; not recommended with dtx or pp_vad - may cause bandwidth spikes +abr => 0 + +; VBR encoding quality [0-10] +; floating-point values allowed +vbr_quality => 4 + +; discontinuous transmission [true / false] +; stops transmitting completely when silence is detected +; pp_vad is far more effective but more CPU intensive +dtx => false + +; preprocessor configuration +; these options only affect Speex v1.1.8 or newer + +; enable preprocessor [true / false] +; allows dsp functionality below but incurs CPU overhead +preprocess => false + +; preproc voice activity detection [true / false] +; more advanced equivalent of DTX, based on voice frequencies +pp_vad => false + +; preproc automatic gain control [true / false] +pp_agc => false +pp_agc_level => 8000 + +; preproc denoiser [true / false] +pp_denoise => false + +; preproc dereverb [true / false] +pp_dereverb => false +pp_dereverb_decay => 0.4 +pp_dereverb_level => 0.3 + +; experimental bitrate changes depending on RTCP feedback [true / false] +experimental_rtcp_feedback => false + + +[plc] +; for all codecs which do not support native PLC +; this determines whether to perform generic PLC +; there is a minor performance penalty for this. +; By default plc is applied only when the 2 codecs +; in a channel are different. +genericplc => true +; Apply generic plc to channels even if the 2 codecs +; are the same. This forces transcoding via slin so +; the performance impact should be considered. +; Ignored if genericplc is not also enabled. +genericplc_on_equal_codecs => false + +; Generate custom formats for formats requiring attributes. +; After defining the custom format, the name used in defining +; the format can be used throughout Asterisk in the format 'allow' +; and 'disallow' options. +; +; Example: silk8 is a predefined custom format in this config file. +; Once this config file is loaded, silk8 can be used anywhere a +; peer's codec capabilities are defined. +; +; In sip.conf 'silk8' can be defined as a capability for a peer. +; [peer1] +; type=peer +; host=dynamic +; disallow=all +; allow=silk8 ;custom codec defined in codecs.conf +; +; LIMITATIONS +; Custom formats can only be defined at startup. Any changes to this +; file made after startup will not take into effect until after Asterisk +; is restarted. +; + +; Default Custom SILK format definitions, only one custom SILK format per +; sample rate is allowed. +[silk8] +type=silk +samprate=8000 +fec=true ; turn on or off encoding with forward error correction. + ; On recommended, off by default. +packetloss_percentage=10 ; Estimated packet loss percentage in uplink direction. This + ; affects how much redundancy is built in when using fec. + ; The higher the percentage, the larger amount of bandwidth is + ; used. Default is 0%, 10% is recommended when fec is in use. + +maxbitrate=10000 ; Use the table below to make sure a useful bitrate is choosen + ; for maxbitrate. If not set or value is not within the bounds + ; of the encoder, a default value is chosen. + ; + ; sample rate | bitrate range + ; 8khz | 5000 - 20000 bps + ; 12khz | 7000 - 25000 bps + ; 16khz | 8000 - 30000 bps + ; 24khz | 20000- 40000 bps + ; +;dtx=true ; Encode using discontinuous transmission mode or not. Turning this + ; on will save bandwidth during periods of silence at the cost of + ; increased computational complexity. Off by default. + +[silk12] +type=silk +samprate=12000 +maxbitrate=12000 +fec=true +packetloss_percentage=10; + +[silk16] +type=silk +samprate=16000 +maxbitrate=20000 +fec=true +packetloss_percentage=10; + +[silk24] +type=silk +samprate=24000 +maxbitrate=30000 +fec=true +packetloss_percentage=10; + + +; Default custom CELT codec definitions. Only one custom CELT definition is allowed +; per a sample rate. +;[celt44] +;type=celt +;samprate=44100 ; The samplerate in hz. This option is required. +;framesize=480 ; The framesize option represents the duration of each frame in samples. + ; This must be a factor of 2. This option is only advertised in an SDP + ; when it is set. Otherwise a default of framesize of 480 is assumed + ; internally + +;[celt48] +;type=celt +;samprate=48000 + +;[celt32] +;type=celt +;samprate=32000 + +;============================ OPUS Section Options ============================ +; +; NOTE: Accurate documentation corresponding to your downloaded version of +; codec_opus is available from Asterisk's CLI: +; +; *CLI> config show help codec_opus opus +; +;[opus] +;type= ; Must be of type "opus" (default: "") +;packet_loss= ; Encoder's packet loss percentage. Can be any number between 0 + ; and 100, inclusive. A higher value results in more loss + ; resistance. (default: 0) +;complexity= ; Encoder's computational complexity. Can be any number between 0 + ; and 10, inclusive. Note, 10 equals the highest complexity. + ; (default: 10) +;max_bandwidth= ; Encoder's maximum bandwidth allowed. Sets an upper bandwidth + ; bound on the encoder. Can be any of the following: narrow, + ; medium, wide, super_wide, full. (default: full) +;signal= ; Encoder's signal type. Aids in mode selection on the encoder: Can + ; be any of the following: auto, voice, music. (default: auto) +;application= ; Encoder's application type. Can be any of the following: voip, + ; audio, low_delay. (default: voip) +;max_playback_rate= ; Override the maximum playback rate in the offer's SDP. + ; Any value between 8000 and 48000 (inclusive) is valid, + ; however typically it should match one of the usual opus + ; bandwidths. (default: 48000) +;bitrate= ; Override the maximum average bitrate in the offer's SDP. Any value + ; between 500 and 512000 is valid. The following values are also + ; allowed: auto, max. (default: auto) +;cbr= ; Override the constant bit rate parameter in the offer's SDP. A value of + ; 0/false/no represents a variable bit rate whereas 1/true/yes represents + ; a constant bit rate. (default: no) +;fec= ; Override the use inband fec parameter in the offer's SDP. A value of + ; 0/false/no represents disabled whereas 1/true/yes represents enabled. + ; (default: yes) +;dtx= ; Override the use dtx parameter in the offer's SDP. A value of 0/false/no + ; represents disabled whereas 1/true/yes represents enabled. (default: no) + +;=============================== OPUS Examples ================================ +; +;[opus] +;type=opus +;max_playback_rate=8000 ; Limit the maximum playback rate on the encoder +;fec=no ; No inband fec + +;[myopus] +;type=opus +;max_bandwidth=wide ; Maximum encoded bandwidth set to wide band (0-8000 Hz +; ; audio bandwidth at 16Khz sample rate) +;cbr=yes ; Negotiate a constant bit rate diff --git a/examples/vagrant/asterisk/extensions.conf b/examples/vagrant/asterisk/extensions.conf new file mode 100644 index 00000000..68d94d8c --- /dev/null +++ b/examples/vagrant/asterisk/extensions.conf @@ -0,0 +1,38 @@ +[general] +static=yes +writeprotect=yes + +[default] +; empty - we dont use the default context + +[from-internal] +; Extensions 100, 200 & 300 +exten => _[1-3]00,1,NoOp(Dial Extension ${EXTEN}) +same => n,Dial(PJSIP/${EXTEN},10) + +; An echo test +exten => 123,1,NoOp(Echo Test) +same => n,Progress() +same => n,Wait(3) +same => n,Answer() +same => n,Playback(echo-test) +same => n,Echo() ; Do the echo test +same => n,Playback(goodbye) +same => n,Hangup() + +; Weasels Example +exten => 901,1,NoOp(Weasels Example) +same => n,Answer() +same => n,Stasis(weasels-app) +same => n,Goto(ari-${STASISSTATUS},1) + +; Comprehensive Example +exten => _90[2-3],1,NoOp(Comprehensive Example) +same => n,Answer() +same => n,Stasis(comprehensive-app) +same => n,Goto(ari-${STASISSTATUS},1) + +; ARI Success / Failure +exten => ari-SUCCESS,1,Hangup() +exten => ari-FAILED,1,Playback(sorrydave) +exten => ari-FAILED,2,Hangup() diff --git a/examples/vagrant/asterisk/features.conf b/examples/vagrant/asterisk/features.conf new file mode 100644 index 00000000..223d6935 --- /dev/null +++ b/examples/vagrant/asterisk/features.conf @@ -0,0 +1,122 @@ +; +; Sample Call Features (transfer, monitor/mixmonitor, etc) configuration +; + +; Note: From Asterisk 12 - All parking lot configuration is now done in res_parking.conf + +[general] +;transferdigittimeout => 3 ; Number of seconds to wait between digits when transferring a call + ; (default is 3 seconds) +;xfersound = beep ; to indicate an attended transfer is complete +;xferfailsound = beeperr ; to indicate a failed transfer +;pickupexten = *8 ; Configure the pickup extension. (default is *8) +;pickupsound = beep ; to indicate a successful pickup (default: no sound) +;pickupfailsound = beeperr ; to indicate that the pickup failed (default: no sound) +;featuredigittimeout = 1000 ; Max time (ms) between digits for + ; feature activation (default is 1000 ms) +;recordingfailsound = beeperr ; indicates that a one-touch monitor or one-touch mixmonitor feature failed + ; to be applied to the call. (default: no sound) +;atxfernoanswertimeout = 15 ; Timeout for answer on attended transfer default is 15 seconds. +;atxferdropcall = no ; If someone does an attended transfer, then hangs up before the transfer + ; target answers, then by default, the system will try to call back the + ; person that did the transfer. If this is set to "yes", the ringing + ; transfer target is immediately transferred to the transferee. +;atxferloopdelay = 10 ; Number of seconds to sleep between retries (if atxferdropcall = no) +;atxfercallbackretries = 2 ; Number of times to attempt to send the call back to the transferer. + ; By default, this is 2. +;transferdialattempts = 3 ; Number of times that a transferer may attempt to dial an extension before + ; being kicked back to the original call. +;transferretrysound = "beep" ; Sound to play when a transferer fails to dial a valid extension. +;transferinvalidsound = "beeperr" ; Sound to play when a transferer fails to dial a valid extension and is out of retries. +;atxferabort = *1 ; cancel the attended transfer +;atxfercomplete = *2 ; complete the attended transfer, dropping out of the call +;atxferthreeway = *3 ; complete the attended transfer, but stay in the call. This will turn the call into a multi-party bridge +;atxferswap = *4 ; swap to the other party. Once an attended transfer has begun, this options may be used multiple times + +; Note that the DTMF features listed below only work when two channels have answered and are bridged together. +; They can not be used while the remote party is ringing or in progress. If you require this feature you can use +; chan_local in combination with Answer to accomplish it. + +[featuremap] +;blindxfer => #1 ; Blind transfer (default is #) -- Make sure to set the T and/or t option in the Dial() or Queue() app call! +;disconnect => *0 ; Disconnect (default is *) -- Make sure to set the H and/or h option in the Dial() or Queue() app call! +;automon => *1 ; One Touch Record a.k.a. Touch Monitor -- Make sure to set the W and/or w option in the Dial() or Queue() app call! +;atxfer => *2 ; Attended transfer -- Make sure to set the T and/or t option in the Dial() or Queue() app call! +;parkcall => #72 ; Park call (one step parking) -- Make sure to set the K and/or k option in the Dial() app call! +;automixmon => *3 ; One Touch Record a.k.a. Touch MixMonitor -- Make sure to set the X and/or x option in the Dial() or Queue() app call! + +[applicationmap] +; Note that the DYNAMIC_FEATURES channel variable must be set to use the features +; defined here. The value of DYNAMIC_FEATURES should be the names of the features +; to allow the channel to use separated by '#'. For example: +; +; Set(__DYNAMIC_FEATURES=myfeature1#myfeature2#myfeature3) +; +; (Note: The two leading underscores allow these feature settings to be set +; on the outbound channels, as well. Otherwise, only the original channel +; will have access to these features.) +; +; The syntax for declaring a dynamic feature is any of the following: +; +; => ,[/],[,[,MOH_Class]] +; => ,[/],[,""[,MOH_Class]] +; => ,[/],([])[,MOH_Class] + +; +; FeatureName -> This is the name of the feature used when setting the +; DYNAMIC_FEATURES variable to enable usage of this feature. +; DTMF_sequence -> This is the key sequence used to activate this feature. +; ActivateOn -> This is the channel of the call that the application will be executed +; on. Valid values are "self" and "peer". "self" means run the +; application on the same channel that activated the feature. "peer" +; means run the application on the opposite channel from the one that +; has activated the feature. +; ActivatedBy -> ActivatedBy is no longer honored. The feature is activated by which +; channel DYNAMIC_FEATURES includes the feature is on. Use predial +; to set different values of DYNAMIC_FEATURES on the channels. +; Historic values are: "caller", "callee", and "both". +; Application -> This is the application to execute. +; AppArguments -> These are the arguments to be passed into the application. If you need +; commas in your arguments, you should use either the second or third +; syntax, above. +; MOH_Class -> This is the music on hold class to play while the idle +; channel waits for the feature to complete. If left blank, +; no music will be played. +; + +; +; IMPORTANT NOTE: The applicationmap is not intended to be used for all Asterisk +; applications. When applications are used in extensions.conf, they are executed +; by the PBX core. In this case, these applications are executed outside of the +; PBX core, so it does *not* make sense to use any application which has any +; concept of dialplan flow. Examples of this would be things like Goto, +; Background, WaitExten, and many more. The exceptions to this are Gosub and +; Macro routines which must complete for the call to continue. +; +; Enabling these features means that the PBX needs to stay in the media flow and +; media will not be re-directed if DTMF is sent in the media stream. +; +; Example Usage: +; +;testfeature => #9,peer,Playback,tt-monkeys ;Allow both the caller and callee to play +; ;tt-monkeys to the opposite channel +; +; Set arbitrary channel variables, based upon CALLERID number (Note that the application +; argument contains commas) +;retrieveinfo => #8,peer,Set(ARRAY(CDR(mark),CDR(name))=${ODBC_FOO(${CALLERID(num)})}) +; +;pauseMonitor => #1,self/callee,Pausemonitor ;Allow the callee to pause monitoring +; ;on their channel +;unpauseMonitor => #3,self/callee,UnPauseMonitor ;Allow the callee to unpause monitoring +; ;on their channel + +; Dynamic Feature Groups: +; Dynamic feature groups are groupings of features defined in [applicationmap] +; that can have their own custom key mappings. To give a channel access to a dynamic +; feature group, add the group name to the value of the DYNAMIC_FEATURES variable. +; +; example: +; [myGroupName] ; defines the group named myGroupName +; testfeature => #9 ; associates testfeature with the group and the keycode '#9'. +; pauseMonitor => ; associates pauseMonitor with the group and uses the keycode specified +; ; in the [applicationmap]. diff --git a/examples/vagrant/asterisk/http.conf b/examples/vagrant/asterisk/http.conf new file mode 100644 index 00000000..87e2d8af --- /dev/null +++ b/examples/vagrant/asterisk/http.conf @@ -0,0 +1,10 @@ +[general] +enabled = yes +bindaddr = 0.0.0.0 +bindport = 8088 +enablestatic = yes +tlsenable = yes +;tlsbindaddr=0.0.0.0:8089 +tlscertfile = /etc/asterisk/keys/asterisk.crt +tlsprivatekey = /etc/asterisk/keys/asterisk.key +redirect = / /static/ari4java-phone.html diff --git a/examples/vagrant/asterisk/iax.conf b/examples/vagrant/asterisk/iax.conf new file mode 100644 index 00000000..e8209889 --- /dev/null +++ b/examples/vagrant/asterisk/iax.conf @@ -0,0 +1,6 @@ +[general] +disallow=all +allow=g729 +allow=g722 +jitterbuffer=no +autokill=yes diff --git a/examples/vagrant/asterisk/keys/ca-req.cnf b/examples/vagrant/asterisk/keys/ca-req.cnf new file mode 100644 index 00000000..b23f7977 --- /dev/null +++ b/examples/vagrant/asterisk/keys/ca-req.cnf @@ -0,0 +1,10 @@ +[req] +distinguished_name = req_distinguished_name +prompt = no + +[req_distinguished_name] +O = ARI4JavaCA +CN = ari4java.localhost + +[ext] +basicConstraints=CA:TRUE diff --git a/examples/vagrant/asterisk/keys/cert-req.cnf b/examples/vagrant/asterisk/keys/cert-req.cnf new file mode 100644 index 00000000..c54ada2e --- /dev/null +++ b/examples/vagrant/asterisk/keys/cert-req.cnf @@ -0,0 +1,17 @@ +[req] +default_bits = 2048 +distinguished_name = req_distinguished_name +req_extensions = v3_req +prompt = no + +[req_distinguished_name] +O = ARI4Java +CN = ari4java.localhost + +[v3_req] +subjectAltName = @alt_names + +[alt_names] +DNS.1 = localhost +IP.1 = 127.0.0.1 +IP.2 = 192.168.56.44 diff --git a/examples/vagrant/asterisk/logger.conf b/examples/vagrant/asterisk/logger.conf new file mode 100644 index 00000000..b0492238 --- /dev/null +++ b/examples/vagrant/asterisk/logger.conf @@ -0,0 +1,10 @@ +[general] +dateformat = %F %T.%3q +use_callids = yes +appendhostname = no + +[logfiles] +console = verbose,notice,warning,error +full = verbose,notice,warning,error,debug +;messages = notice,warning,error +;security = security \ No newline at end of file diff --git a/examples/vagrant/asterisk/manager.conf b/examples/vagrant/asterisk/manager.conf new file mode 100644 index 00000000..39e9373d --- /dev/null +++ b/examples/vagrant/asterisk/manager.conf @@ -0,0 +1,14 @@ +[general] +enabled = yes +port = 5038 +bindaddr = 0.0.0.0 +webenabled = no + +[dialer] +secret = asterisk +deny=0.0.0.0/0.0.0.0 +permit=127.0.0.1/255.255.255.0 +;system,call,log,verbose,command,agent,user,config,dtmf,reporting,cdr,dialplan,originate +read = command,originate +write = command,originate +writetimeout = 100 diff --git a/examples/vagrant/asterisk/modules.conf b/examples/vagrant/asterisk/modules.conf new file mode 100644 index 00000000..da3c74e5 --- /dev/null +++ b/examples/vagrant/asterisk/modules.conf @@ -0,0 +1,171 @@ +[modules] +autoload = no + +; This is a minimal module load. We are loading only the modules required for +; the Asterisk features used in the Super Awesome Company configuration. + +; Applications + +load = app_bridgewait.so +load = app_dial.so +load = app_record.so +load = app_playback.so +load = app_playtones.so +load = app_stack.so +load = app_verbose.so +load = app_exec.so +load = app_echo.so +load = app_mp3.so + +; Bridging + +load = bridge_builtin_features.so +load = bridge_builtin_interval_features.so +load = bridge_holding.so +load = bridge_native_rtp.so +load = bridge_simple.so +load = bridge_softmix.so + +; Call Detail Records + +load = cdr_csv.so + +; Channel Drivers + +load = chan_bridge_media.so +load = chan_pjsip.so +load = chan_iax2.so +load = chan_rtp.so + +; Codecs + +load = codec_gsm.so +load = codec_resample.so +load = codec_ulaw.so +load = codec_alaw.so +load = codec_g722.so +load = codec_opus.so + +; Formats + +load = format_gsm.so +load = format_pcm.so +load = format_wav_gsm.so +load = format_wav.so +load = format_ogg_opus.so +load = res_format_attr_opus.so +load = format_ogg_vorbis.so +load = format_mp3.so +load = format_vp8.so +load = format_h264.so + +; Functions + +load = func_callerid.so +load = func_cdr.so +load = func_pjsip_aor.so +load = func_pjsip_contact.so +load = func_pjsip_endpoint.so +load = func_sorcery.so +load = func_devstate.so +load = func_strings.so +load = func_base64.so +load = func_aes.so +load = func_md5.so +load = func_sha1.so +load = func_channel.so +load = func_timeout.so +load = func_hangupcause.so + +; Core/PBX + +load = pbx_config.so +load = pbx_spool.so +load = pbx_loopback.so + +; Resources + +load = res_curl.so +load = res_musiconhold.so +load = res_pjproject.so +load = res_pjsip.so +load = res_pjsip_acl.so +load = res_pjsip_authenticator_digest.so +load = res_pjsip_caller_id.so +load = res_pjsip_config_wizard.so +load = res_pjsip_dialog_info_body_generator.so +load = res_pjsip_diversion.so +load = res_pjsip_dlg_options.so +load = res_pjsip_dtmf_info.so +load = res_pjsip_empty_info.so +load = res_pjsip_endpoint_identifier_anonymous.so +load = res_pjsip_endpoint_identifier_ip.so +load = res_pjsip_endpoint_identifier_user.so +load = res_pjsip_exten_state.so +load = res_pjsip_header_funcs.so +load = res_pjsip_history.so +load = res_pjsip_logger.so +load = res_pjsip_messaging.so +load = res_pjsip_mwi.so +load = res_pjsip_mwi_body_generator.so +load = res_pjsip_nat.so +load = res_pjsip_notify.so +load = res_pjsip_one_touch_record_info.so +load = res_pjsip_outbound_authenticator_digest.so +load = res_pjsip_outbound_publish.so +load = res_pjsip_outbound_registration.so +load = res_pjsip_path.so +load = res_pjsip_pidf_body_generator.so +load = res_pjsip_pidf_digium_body_supplement.so +load = res_pjsip_pidf_eyebeam_body_supplement.so +load = res_pjsip_publish_asterisk.so +load = res_pjsip_pubsub.so +load = res_pjsip_refer.so +load = res_pjsip_registrar.so +load = res_pjsip_rfc3326.so +;load = res_pjsip_rfc3329.so +load = res_pjsip_sdp_rtp.so +load = res_pjsip_send_to_voicemail.so +load = res_pjsip_session.so +load = res_pjsip_sips_contact.so +load = res_pjsip_t38.so +load = res_pjsip_transport_websocket.so +load = res_pjsip_xpidf_body_generator.so +load = res_rtp_asterisk.so +load = res_rtp_multicast.so +load = res_sorcery_astdb.so +load = res_sorcery_config.so +load = res_sorcery_memory.so +load = res_sorcery_realtime.so +load = res_timing_timerfd.so +load = res_timing_pthread.so +load = res_http_media_cache.so +load = res_http_post.so +load = res_http_websocket.so +load = res_crypto.so +load = res_srtp.so +load = res_timing_pthread.so +load = res_timing_timerfd.so +load = res_websocket_client.so + +; Stasis (ARI) + +load = app_stasis.so +load = res_stasis.so +load = res_stasis_answer.so +load = res_stasis_device_state.so +load = res_stasis_playback.so +load = res_stasis_recording.so +load = res_stasis_snoop.so +load = res_ari.so +load = res_ari_applications.so +load = res_ari_asterisk.so +load = res_ari_bridges.so +load = res_ari_channels.so +load = res_ari_device_states.so +load = res_ari_endpoints.so +load = res_ari_events.so +load = res_ari_model.so +load = res_ari_playbacks.so +load = res_ari_recordings.so +load = res_ari_sounds.so diff --git a/examples/vagrant/asterisk/musiconhold.conf b/examples/vagrant/asterisk/musiconhold.conf new file mode 100644 index 00000000..bc3ba212 --- /dev/null +++ b/examples/vagrant/asterisk/musiconhold.conf @@ -0,0 +1,5 @@ +[general] + +[default] +mode = files +directory = moh diff --git a/examples/vagrant/asterisk/pjproject.conf b/examples/vagrant/asterisk/pjproject.conf new file mode 100644 index 00000000..97af7345 --- /dev/null +++ b/examples/vagrant/asterisk/pjproject.conf @@ -0,0 +1,28 @@ +; Common pjproject options +; + +;========================LOG_MAPPINGS SECTION OPTIONS=============================== +;[log_mappings] +; SYNOPSIS: Provides pjproject to Asterisk log level mappings. +; NOTES: The name of this section in the pjproject.conf configuration file must +; remain log_mappings or the configuration will not be applied. +; The defaults mentioned below only apply if this file or the 'log_mappings' +; object can'tbe found. If the object is found, there are no defaults. If +; you don't specify an entry, nothing will be logged for that level. +; +;asterisk_error = ; A comma separated list of pjproject log levels to map to + ; Asterisk errors. + ; (default: "0,1") +;asterisk_warning = ; A comma separated list of pjproject log levels to map to + ; Asterisk warnings. + ; (default: "2") +;asterisk_notice = ; A comma separated list of pjproject log levels to map to + ; Asterisk notices. + ; (default: "") +;asterisk_verbose = ; A comma separated list of pjproject log levels to map to + ; Asterisk verbose. + ; (default: "") +;asterisk_debug = ; A comma separated list of pjproject log levels to map to + ; Asterisk debug + ; (default: "3,4,5") +;type= ; Must be of type log_mappings (default: "") diff --git a/examples/vagrant/asterisk/pjsip.conf b/examples/vagrant/asterisk/pjsip.conf new file mode 100644 index 00000000..e610ad06 --- /dev/null +++ b/examples/vagrant/asterisk/pjsip.conf @@ -0,0 +1,23 @@ +;========== TRANSPORTS ========== + +; Our primary transport definition for UDP +[transport-udp] +type = transport +protocol = udp +bind = 0.0.0.0 +domain = ari4java.localhost + +[transport-wss] +type=transport +protocol=wss +bind=0.0.0.0 +domain = ari4java.localhost +websocket_write_timeout = 5000 + +[192.168.44.56] +type = domain-alias +domain = ari4java.localhost + +[localhost] +type = domain-alias +domain = ari4java.localhost diff --git a/examples/vagrant/asterisk/pjsip_notify.conf b/examples/vagrant/asterisk/pjsip_notify.conf new file mode 100644 index 00000000..8224ee1f --- /dev/null +++ b/examples/vagrant/asterisk/pjsip_notify.conf @@ -0,0 +1,57 @@ +; rfc3842 +; put empty "Content=>" at the end to have CRLF after last body line + +[clear-mwi] +Event=>message-summary +Content-type=>application/simple-message-summary +Content=>Messages-Waiting: no +Content=>Message-Account: sip:asterisk@127.0.0.1 +Content=>Voice-Message: 0/0 (0/0) +Content=> + +; Aastra + +[aastra-check-cfg] +Event=>check-sync + +[aastra-xml] +Event=>aastra-xml + +; Digium + +[digium-check-cfg] +Event=>check-sync + +; Linksys + +[linksys-cold-restart] +Event=>reboot_now + +[linksys-warm-restart] +Event=>restart_now + +; Polycom + +[polycom-check-cfg] +Event=>check-sync + +; Sipura + +[sipura-check-cfg] +Event=>resync + +[sipura-get-report] +Event=>report + +; snom + +[snom-check-cfg] +Event=>check-sync\;reboot=false + +[snom-reboot] +Event=>check-sync\;reboot=true + +; Cisco + +[cisco-check-cfg] +Event=>check-sync diff --git a/examples/vagrant/asterisk/pjsip_wizard.conf b/examples/vagrant/asterisk/pjsip_wizard.conf new file mode 100644 index 00000000..7cbbb7ac --- /dev/null +++ b/examples/vagrant/asterisk/pjsip_wizard.conf @@ -0,0 +1,65 @@ +; Default Template for hard phones +[phone-defaults](!) +type = wizard +transport = transport-udp +accepts_registrations = yes +sends_registrations = no +accepts_auth = yes +sends_auth = no +endpoint/allow_subscribe = yes +endpoint/disallow = all +endpoint/allow = g722,ulaw +endpoint/direct_media = no +endpoint/force_rport = yes +endpoint/disable_direct_media_on_nat = yes +endpoint/direct_media_method = invite +endpoint/rtp_symmetric = yes +endpoint/moh_suggest = default +endpoint/send_rpid = yes +endpoint/rewrite_contact = yes +endpoint/send_pai = yes +endpoint/allow_transfer = yes +endpoint/device_state_busy_at = 1 +endpoint/from_domain = ari4java.localhost +aor/qualify_frequency = 30 +aor/authenticate_qualify = no +aor/max_contacts = 1 +aor/remove_existing = yes +aor/minimum_expiration = 30 +aor/support_path = yes + +; Default Template for web phones +[web-phone-defaults](!,phone-defaults) +transport = transport-wss +endpoint/disallow=all +endpoint/allow = opus,ulaw +endpoint/webrtc = yes +endpoint/media_encryption = dtls +endpoint/use_avpf = yes +endpoint/force_avp = yes +endpoint/dtls_ca_file = /etc/asterisk/keys/ca.crt +endpoint/dtls_cert_file = /etc/asterisk/keys/asterisk.crt +endpoint/dtls_private_key = /etc/asterisk/keys/asterisk.key +endpoint/dtls_verify = fingerprint +endpoint/dtls_setup = actpass +endpoint/media_use_received_transport = yes +endpoint/rtcp_mux = yes + +; User Extensions using the templates defined above +[100](web-phone-defaults) +inbound_auth/username = 100 +inbound_auth/password = abc123 +endpoint/context = from-internal +endpoint/callerid = Extn 100 <100> + +[200](web-phone-defaults) +inbound_auth/username = 200 +inbound_auth/password = abc123 +endpoint/context = from-internal +endpoint/callerid = Extn 200 <200> + +[300](phone-defaults) +inbound_auth/username = 300 +inbound_auth/password = abc123 +endpoint/context = from-internal +endpoint/callerid = Extn 300 <300> diff --git a/examples/vagrant/asterisk/rtp.conf b/examples/vagrant/asterisk/rtp.conf new file mode 100644 index 00000000..c136ff36 --- /dev/null +++ b/examples/vagrant/asterisk/rtp.conf @@ -0,0 +1,162 @@ +; +; RTP Configuration +; +[general] +; +; RTP start and RTP end configure start and end addresses +; +; Defaults are rtpstart=5000 and rtpend=31000 +; +rtpstart=10000 +rtpend=10010 +; +; Whether to enable or disable UDP checksums on RTP traffic +; +;rtpchecksums=no +; +; The amount of time a DTMF digit with no 'end' marker should be +; allowed to continue (in 'samples', 1/8000 of a second) +; +;dtmftimeout=3000 +; rtcpinterval = 5000 ; Milliseconds between rtcp reports + ;(min 500, max 60000, default 5000) +; +; Enable strict RTP protection. This will drop RTP packets that do not come +; from the recognized source of the RTP stream. Strict RTP qualifies RTP +; packet stream sources before accepting them upon initial connection and +; when the connection is renegotiated (e.g., transfers and direct media). +; Initial connection and renegotiation starts a learning mode to qualify +; stream source addresses. Once Asterisk has recognized a stream it will +; allow other streams to qualify and replace the current stream for 5 +; seconds after starting learning mode. Once learning mode completes the +; current stream is locked in and cannot change until the next +; renegotiation. +; Valid options are "no" to disable strictrtp, "yes" to enable strictrtp, +; and "seqno", which does the same thing as strictrtp=yes, but only checks +; to make sure the sequence number is correct rather than checking the time +; interval as well. +; This option is enabled by default. +; strictrtp=yes +; +; Number of packets containing consecutive sequence values needed +; to change the RTP source socket address. This option only comes +; into play while using strictrtp=yes. Consider changing this value +; if rtp packets are dropped from one or both ends after a call is +; connected. This option is set to 4 by default. +; probation=8 +; +; Enable sRTP replay protection. Buggy SIP user agents (UAs) reset the +; sequence number (RTP-SEQ) on a re-INVITE, for example, with Session Timers +; or on Call Hold/Resume, but keep the synchronization source (RTP-SSRC). If +; the new RTP-SEQ is higher than the previous one, the call continues if the +; roll-over counter (sRTP-ROC) is zero (the call lasted less than 22 minutes). +; In all other cases, the call faces one-way audio or even no audio at all. +; "replay check failed (index too old)" gets printed continuously. This is a +; software bug. You have to report this to the creator of that UA. Until it is +; fixed, you could disable sRTP replay protection (see RFC 3711 section 3.3.2). +; This option is enabled by default. +; srtpreplayprotection=yes +; +; Whether to enable or disable ICE support. This option is enabled by default. +; icesupport=false +; +; Hostname or address for the STUN server used when determining the external +; IP address and port an RTP session can be reached at. The port number is +; optional. If omitted the default value of 3478 will be used. This option is +; disabled by default. Name resolution will occur at load time, and if DNS is +; used, name resolution will occur repeatedly after the TTL expires. +; +; e.g. stundaddr=mystun.server.com:3478 +; +; stunaddr= +; +; Some multihomed servers have IP interfaces that cannot reach the STUN +; server specified by stunaddr. Blacklist those interface subnets from +; trying to send a STUN packet to find the external IP address. +; Attempting to send the STUN packet needlessly delays processing incoming +; and outgoing SIP INVITEs because we will wait for a response that can +; never come until we give up on the response. +; * Multiple subnets may be listed. +; * Blacklisting applies to IPv4 only. STUN isn't needed for IPv6. +; * Blacklisting applies when binding RTP to specific IP addresses and not +; the wildcard 0.0.0.0 address. e.g., A PJSIP endpoint binding RTP to a +; specific address using the bind_rtp_to_media_address and media_address +; options. Or the PJSIP endpoint specifies an explicit transport that binds +; to a specific IP address. Blacklisting is done via ACL infrastructure +; so it's possible to whitelist as well. +; +; stun_acl = named_acl +; stun_deny = 0.0.0.0/0 +; stun_permit = 1.2.3.4/32 +; +; For historic reasons stun_blacklist is an alias for stun_deny. +; +; Whether to report the PJSIP version in a SOFTWARE attribute for all +; outgoing STUN packets. This option is enabled by default. +; +; stun_software_attribute=yes +; +; Hostname or address for the TURN server to be used as a relay. The port +; number is optional. If omitted the default value of 3478 will be used. +; This option is disabled by default. +; +; e.g. turnaddr=myturn.server.com:34780 +; +; turnaddr= +; +; Username used to authenticate with TURN relay server. +; turnusername= +; +; Password used to authenticate with TURN relay server. +; turnpassword= +; +; An ACL can be used to determine which discovered addresses to include for +; ICE, srflx and relay discovery. This is useful to optimize the ICE process +; where a system has multiple host address ranges and/or physical interfaces +; and certain of them are not expected to be used for RTP. For example, VPNs +; and local interconnections may not be suitable or necessary for ICE. Multiple +; subnets may be listed. If left unconfigured, all discovered host addresses +; are used. +; +; ice_acl = named_acl +; ice_deny = 0.0.0.0/0 +; ice_permit = 1.2.3.4/32 +; +; For historic reasons ice_blacklist is an alias for ice_deny. +; +; The MTU to use for DTLS packet fragmentation. This option is set to 1200 +; by default. The minimum MTU is 256. +; dtls_mtu = 1200 +; +[ice_host_candidates] +; +; When Asterisk is behind a static one-to-one NAT and ICE is in use, ICE will +; expose the server's internal IP address as one of the host candidates. +; Although using STUN (see the 'stunaddr' configuration option) will provide a +; publicly accessible IP, the internal IP will still be sent to the remote +; peer. To help hide the topology of your internal network, you can override +; the host candidates that Asterisk will send to the remote peer. +; +; IMPORTANT: Only use this functionality when your Asterisk server is behind a +; one-to-one NAT and you know what you're doing. If you do define anything +; here, you almost certainly will NOT want to specify 'stunaddr' or 'turnaddr' +; above. +; +; The format for these overrides is: +; +; => ,[include_local_address] +; +; The following will replace 192.168.1.10 with 1.2.3.4 during ICE +; negotiation: +; +;192.168.1.10 => 1.2.3.4 +; +; The following will include BOTH 192.168.1.10 and 1.2.3.4 during ICE +; negotiation instead of replacing 192.168.1.10. This can make it easier +; to serve both local and remote clients. +; +;192.168.1.10 => 1.2.3.4,include_local_address +; +; You can define an override for more than 1 interface if you have a multihomed +; server. Any local interface that is not matched will be passed through +; unaltered. Both IPv4 and IPv6 addresses are supported. diff --git a/examples/vagrant/asterisk/udptl.conf b/examples/vagrant/asterisk/udptl.conf new file mode 100644 index 00000000..1d635da5 --- /dev/null +++ b/examples/vagrant/asterisk/udptl.conf @@ -0,0 +1,26 @@ +; +; UDPTL Configuration (UDPTL is one of the transports for T.38) +; +[general] +; +; UDPTL start and UDPTL end configure start and end addresses +; +udptlstart=4000 +udptlend=4999 +; +; Whether to enable or disable UDP checksums on UDPTL traffic +; +;udptlchecksums=no +; +; The number of error correction entries in a UDPTL packet +; +udptlfecentries = 3 +; +; The span over which parity is calculated for FEC in a UDPTL packet +; +udptlfecspan = 3 +; +; Some VoIP providers will only accept an offer with an even-numbered +; UDPTL port. Set this option so that Asterisk will only attempt to use +; even-numbered ports when negotiating T.38. Default is no. +use_even_ports = no diff --git a/examples/vagrant/asterisk/websocket_client.conf b/examples/vagrant/asterisk/websocket_client.conf new file mode 100644 index 00000000..ccc8a102 --- /dev/null +++ b/examples/vagrant/asterisk/websocket_client.conf @@ -0,0 +1,2 @@ +; Empty WebSocket Client Configuration +[general] diff --git a/examples/vagrant/scripts/asterisk.service b/examples/vagrant/scripts/asterisk.service new file mode 100644 index 00000000..ff2546f3 --- /dev/null +++ b/examples/vagrant/scripts/asterisk.service @@ -0,0 +1,20 @@ +[Unit] +Description=Asterisk PBX And Telephony Daemon +After=network.target + +[Service] +User=asterisk +Group=asterisk +PermissionsStartOnly=true +ExecStartPre=-/bin/mkdir -p /var/run/asterisk +ExecStartPre=/bin/chown -R asterisk:asterisk /var/run/asterisk/ +Environment=HOME=/var/lib/asterisk +WorkingDirectory=/var/lib/asterisk +ExecStart=/usr/sbin/asterisk -vvvd -f -C /etc/asterisk/asterisk.conf +ExecStop=/usr/sbin/asterisk -rx 'core stop now' +ExecReload=/usr/sbin/asterisk -rx 'core reload' +PIDFile=/var/run/asterisk/asterisk.pid +Restart=always + +[Install] +WantedBy=multi-user.target diff --git a/examples/vagrant/scripts/provision.sh b/examples/vagrant/scripts/provision.sh new file mode 100755 index 00000000..7f59296f --- /dev/null +++ b/examples/vagrant/scripts/provision.sh @@ -0,0 +1,128 @@ +#!/usr/bin/env bash + +DOCKER=false +if [ "$1" == "docker" ]; then + DOCKER=true +fi + +if [ "$DOCKER" == "false" ]; then + # Hostname + echo "Updating Hostname ..." + sed -i 's/^ubuntu-focal$/localpbx/g' /etc/hostname + sed -i 's/ubuntu-focal$/localpbx/g' /etc/hosts + systemctl restart systemd-logind.service + hostnamectl set-hostname localpbx +else + sed -i 's/localhost$/localhost ari4java.localhost/g' /etc/hosts +fi + +# get the latest packages and upgrade them +echo "Updating System ..." +export DEBIAN_FRONTEND=noninteractive +apt update +apt -y upgrade + +# install some pre-requisites +echo "Installing some pre-requisites ..." +apt -y install \ + sox \ + lame \ + mpg123 \ + libopusfile-dev \ + autoconf \ + ca-certificates + +# update CAs +update-ca-certificates + +# set the timezone +ln -snf /usr/share/zoneinfo/$(curl https://ipapi.co/timezone) /etc/localtime + +# create user & folders for Asterisk +echo "Creating asterisk user and required folders ..." +adduser --system --group --no-create-home asterisk +mkdir -p /var/{lib,log,spool}/asterisk + +# goto home folder, download and build Asterisk using the version specified in AST_VER +AST_VER=16.27.0 # works but old Jun-2022 +#AST_VER=18.26.4 # Aug-2025 +#AST_VER=20.0.3 # what different use... May-2023 +AST_VER=20.18.0 # LTS Jan-2026 +#AST_VER=22.8.0 # latest LTS Jan-2026, but JsSIP doesn't work on this version +echo "Download, compile & setup Asterisk $AST_VER ..." +cd ~ +wget http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-$AST_VER.tar.gz +tar xvfz asterisk-$AST_VER.tar.gz +rm asterisk-$AST_VER.tar.gz +cd asterisk-$AST_VER/ +echo "Installing Asterisk pre-requisites ..." +contrib/scripts/install_prereq install +contrib/scripts/get_mp3_source.sh +if [ "$DOCKER" == "true" ]; then + echo "Getting Open Source OPUS Codec" + # although we're using a later Asterisk this is the latest opus but seems to work (from my limited testing) + wget github.com/traud/asterisk-opus/archive/asterisk-13.7.tar.gz + tar zvxf asterisk-13.7.tar.gz + rm asterisk-13.7.tar.gz + cp --verbose ./asterisk-opus*/include/asterisk/* ./include/asterisk + cp --verbose ./asterisk-opus*/codecs/* ./codecs + cp --verbose ./asterisk-opus*/res/* ./res + cp --verbose ./asterisk-opus*/formats/* ./formats + patch -p1 <./asterisk-opus*/asterisk.patch + ./bootstrap.sh +fi +./configure --with-pjproject-bundled --with-jansson-bundled +make menuselect.makeopts +if [ "$DOCKER" == "true" ]; then + menuselect/menuselect \ + --enable CORE-SOUNDS-EN-WAV \ + --enable EXTRA-SOUNDS-EN-WAV \ + --enable format_mp3 \ + --disable chan_sip \ + --disable BUILD_NATIVE \ + menuselect.makeopts +else + menuselect/menuselect \ + --enable CORE-SOUNDS-EN-WAV \ + --enable EXTRA-SOUNDS-EN-WAV \ + --enable codec_opus \ + --enable format_mp3 \ + --disable chan_sip \ + --disable BUILD_NATIVE \ + menuselect.makeopts +fi +make +make install +#make sure the asterisk user owns its folders +chown -R asterisk:asterisk /var/{lib,log,spool}/asterisk +# copy config & http content +cp -f /vagrant/asterisk/* /etc/asterisk/ +cp -f /vagrant/static-http/* /var/lib/asterisk/static-http/ +if [ "$DOCKER" == "true" ]; then + sed -i 's/codec_opus/codec_opus_open_source/g' /etc/asterisk/modules.conf + sed -i 's/format_ogg_opus/format_ogg_opus_open_source/g' /etc/asterisk/modules.conf +fi +# create keys for TLS +echo "TLS keys ..." +if [ ! -f /vagrant/asterisk/keys/asterisk.crt ]; then + openssl genrsa -des3 -out /vagrant/asterisk/keys/ca.key -passout pass:asterisk 4096 > /dev/null + openssl req -batch -new -x509 -days 3650 -config /vagrant/scripts/ca-req.cnf extensions v3_ca -key /vagrant/asterisk/keys/ca.key -passin pass:asterisk -out /vagrant/asterisk/keys/ca.crt > /dev/null + openssl genrsa -noenc -out /vagrant/asterisk/keys/asterisk.key 2048 > /dev/null + openssl req -batch -new -config /vagrant/scripts/cert-req.cnf -key /vagrant/asterisk/keys/asterisk.key -out /vagrant/asterisk/keys/asterisk.csr > /dev/null + openssl x509 -req -days 3650 -in /vagrant/asterisk/keys/asterisk.csr -CA /vagrant/asterisk/keys/ca.crt -CAkey /vagrant/asterisk/keys/ca.key -passin pass:asterisk -set_serial 01 -out /vagrant/asterisk/keys/asterisk.crt -extensions v3_req -extfile /vagrant/scripts/cert-req.cnf > /dev/null +fi +mkdir -p /etc/asterisk/keys +cp /vagrant/asterisk/keys/ca.crt /etc/asterisk/keys/ +cp /vagrant/asterisk/keys/asterisk.{key,crt} /etc/asterisk/keys/ +chown -R asterisk:asterisk /etc/asterisk/keys +chmod 400 /etc/asterisk/keys/*.key +chmod 444 /etc/asterisk/keys/*.crt + +# add to systemd & start +echo "Setup & Start Asterisk Service" +cp /vagrant/scripts/asterisk.service /etc/systemd/system/ +systemctl daemon-reload +systemctl enable asterisk.service +systemctl start asterisk.service + +echo "Provisioning Complete!" diff --git a/examples/vagrant/static-http/ari4java-phone.html b/examples/vagrant/static-http/ari4java-phone.html new file mode 100644 index 00000000..c5e0ed72 --- /dev/null +++ b/examples/vagrant/static-http/ari4java-phone.html @@ -0,0 +1,428 @@ + + + + ARI4Java Phone + + + + + + + + +
+
+
+

ARI4Java Phone

+
+
+
+
+
+
+ Web Phone  +
+
+ + +
+ +
+
+ + +
+
+ +
+
+
+ +
+ + + \ No newline at end of file diff --git a/examples/vagrant/static-http/bootstrap-nightfall.min.css b/examples/vagrant/static-http/bootstrap-nightfall.min.css new file mode 100644 index 00000000..2a41c634 --- /dev/null +++ b/examples/vagrant/static-http/bootstrap-nightfall.min.css @@ -0,0 +1,11 @@ +/*! + * Bootstrap v5.1.3 (https://getbootstrap.com/) + * Copyright 2011-2021 The Bootstrap Authors + * Copyright 2011-2021 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) + * + * Bootstrap-Nightfall v1.1.3 (https://vinorodrigues.github.io/bootstrap-dark-5/) + * Copyright 2020-2021 Vino Rodrigues + * This version is an extraction with only the dark elements, or deltas, of the + * dark theme. Used as a bootstrap plugin. + */:root{color-scheme:dark}:root{--bs-blue:#375a7f;--bs-indigo:#673ab7;--bs-purple:#654ea3;--bs-pink:#e83e8c;--bs-red:#e74c3c;--bs-orange:#fd7e14;--bs-yellow:#f39c12;--bs-green:#00bc8c;--bs-teal:#45b5aa;--bs-cyan:#17a2b8;--bs-white:#fafafa;--bs-black:#111;--bs-gray:#7e7e7e;--bs-gray-dark:#121212;--bs-gray-100:#e1e1e1;--bs-gray-200:#cfcfcf;--bs-gray-300:#b1b1b1;--bs-gray-400:#9e9e9e;--bs-gray-500:#7e7e7e;--bs-gray-600:#626262;--bs-gray-700:#515151;--bs-gray-800:#3b3b3b;--bs-gray-900:#222;--bs-primary:#375a7f;--bs-secondary:#626262;--bs-success:#00bc8c;--bs-info:#17a2b8;--bs-warning:#f39c12;--bs-danger:#e74c3c;--bs-light:#9e9e9e;--bs-dark:#3b3b3b;--bs-primary-rgb:55,90,127;--bs-secondary-rgb:98,98,98;--bs-success-rgb:0,188,140;--bs-info-rgb:23,162,184;--bs-warning-rgb:243,156,18;--bs-danger-rgb:231,76,60;--bs-light-rgb:158,158,158;--bs-dark-rgb:59,59,59;--bs-white-rgb:250,250,250;--bs-black-rgb:17,17,17;--bs-body-color-rgb:225,225,225;--bs-body-bg-rgb:34,34,34;--bs-body-color:#e1e1e1;--bs-body-bg:#222;--bs-gradient:linear-gradient(180deg, rgba(17, 17, 17, 0.15), rgba(17, 17, 17, 0))}hr{color:#fafafa;background-color:currentColor;opacity:.1}mark{background-color:rgba(243,156,18,.5)}a{color:#557392}a:hover{color:#778fa8}a:not([href]):not([class]),a:not([href]):not([class]):hover{color:inherit}pre{color:#e1e1e1}pre code{color:inherit}code{color:#45b5aa}a>code{color:inherit}kbd{color:#e1e1e1;background-color:#3b3b3b}caption{color:#9e9e9e}.blockquote-footer{color:#626262}.img-thumbnail{background-color:#222;border:1px solid #515151}.figure-caption{color:#9e9e9e}.table{--bs-table-bg:transparent;--bs-table-accent-bg:transparent;--bs-table-striped-color:#e1e1e1;--bs-table-striped-bg:rgba(250, 250, 250, 0.05);--bs-table-active-color:#e1e1e1;--bs-table-active-bg:rgba(250, 250, 250, 0.1);--bs-table-hover-color:#e1e1e1;--bs-table-hover-bg:rgba(250, 250, 250, 0.075);color:#e1e1e1;border-color:#515151}.table>:not(:first-child){border-top:2px solid currentColor}.table-primary{--bs-table-bg:#1c2d40;--bs-table-striped-bg:#27384a;--bs-table-striped-color:#fff;--bs-table-active-bg:#334253;--bs-table-active-color:#fff;--bs-table-hover-bg:#2d3d4e;--bs-table-hover-color:#fff;color:#fff;border-color:#334253}.table-secondary{--bs-table-bg:#313131;--bs-table-striped-bg:#3b3b3b;--bs-table-striped-color:#fff;--bs-table-active-bg:#464646;--bs-table-active-color:#fff;--bs-table-hover-bg:#404040;--bs-table-hover-color:#fff;color:#fff;border-color:#464646}.table-success{--bs-table-bg:#005e46;--bs-table-striped-bg:#0d664f;--bs-table-striped-color:#fff;--bs-table-active-bg:#1a6e59;--bs-table-active-color:#fff;--bs-table-hover-bg:#136a54;--bs-table-hover-color:#fff;color:#fff;border-color:#1a6e59}.table-info{--bs-table-bg:#0c515c;--bs-table-striped-bg:#185a64;--bs-table-striped-color:#fff;--bs-table-active-bg:#24626c;--bs-table-active-color:#fff;--bs-table-hover-bg:#1e5e68;--bs-table-hover-color:#fff;color:#fff;border-color:#24626c}.table-warning{--bs-table-bg:#7a4e09;--bs-table-striped-bg:#815715;--bs-table-striped-color:#fff;--bs-table-active-bg:#876022;--bs-table-active-color:#fff;--bs-table-hover-bg:#845b1b;--bs-table-hover-color:#fff;color:#fff;border-color:#876022}.table-danger{--bs-table-bg:#74261e;--bs-table-striped-bg:#7b3129;--bs-table-striped-color:#fff;--bs-table-active-bg:#823c35;--bs-table-active-color:#fff;--bs-table-hover-bg:#7e362f;--bs-table-hover-color:#fff;color:#fff;border-color:#823c35}.table-light{--bs-table-bg:#9e9e9e;--bs-table-striped-bg:#969696;--bs-table-striped-color:#000;--bs-table-active-bg:#8e8e8e;--bs-table-active-color:#000;--bs-table-hover-bg:#929292;--bs-table-hover-color:#000;color:#000;border-color:#8e8e8e}.table-dark{--bs-table-bg:#3b3b3b;--bs-table-striped-bg:#454545;--bs-table-striped-color:#fff;--bs-table-active-bg:#4f4f4f;--bs-table-active-color:#fff;--bs-table-hover-bg:#4a4a4a;--bs-table-hover-color:#fff;color:#fff;border-color:#4f4f4f}.form-text{color:#9e9e9e}.form-control{color:#b1b1b1;background-color:#222;border:1px solid #515151}.form-control:focus{color:#b1b1b1;background-color:#222;border-color:#9badbf;box-shadow:0 0 0 .25rem rgba(55,90,127,.25)}.form-control::-moz-placeholder{color:#5a5a5a}.form-control:-ms-input-placeholder{color:#5a5a5a}.form-control::placeholder{color:#5a5a5a}.form-control:disabled,.form-control[readonly]{background-color:#222}.form-control::-webkit-file-upload-button{color:#b1b1b1;background-color:#3b3b3b;border-color:inherit}.form-control::file-selector-button{color:#b1b1b1;background-color:#3b3b3b;border-color:inherit}.form-control:hover:not(:disabled):not([readonly])::-webkit-file-upload-button{background-color:#383838}.form-control:hover:not(:disabled):not([readonly])::file-selector-button{background-color:#383838}.form-control::-webkit-file-upload-button{color:#b1b1b1;background-color:#3b3b3b;border-color:inherit}.form-control:hover:not(:disabled):not([readonly])::-webkit-file-upload-button{background-color:#383838}.form-control-plaintext{color:#e1e1e1;background-color:transparent;border:solid transparent}.form-select{color:#b1b1b1;background-color:#222;background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23cfcfcf' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");border:1px solid #515151}.form-select:focus{border-color:#9badbf;box-shadow:0 0 0 .25rem rgba(55,90,127,.25)}.form-select[multiple],.form-select[size]:not([size="1"]){background-image:none}.form-select:disabled{background-color:#3b3b3b}.form-select:-moz-focusring{color:transparent;text-shadow:0 0 0 #b1b1b1}.form-check-input{background-color:#222;border:1px solid rgba(255,255,255,.25)}.form-check-input:active{filter:brightness(90%)}.form-check-input:focus{border-color:#9badbf;box-shadow:0 0 0 .25rem rgba(55,90,127,.25)}.form-check-input:checked{background-color:#375a7f;border-color:#375a7f}.form-check-input:checked[type=checkbox]{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fafafa' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e")}.form-check-input:checked[type=radio]{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23fafafa'/%3e%3c/svg%3e")}.form-check-input[type=checkbox]:indeterminate{background-color:#375a7f;border-color:#375a7f;background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fafafa' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10h8'/%3e%3c/svg%3e")}.form-check-input:disabled{opacity:.5}.form-check-input:disabled~.form-check-label,.form-check-input[disabled]~.form-check-label{opacity:.5}.form-switch .form-check-input{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%28250, 250, 250, 0.25%29'/%3e%3c/svg%3e")}.form-switch .form-check-input:focus{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%239badbf'/%3e%3c/svg%3e")}.form-switch .form-check-input:checked{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fafafa'/%3e%3c/svg%3e")}.btn-check:disabled+.btn,.btn-check[disabled]+.btn{opacity:.65}.form-range:focus::-webkit-slider-thumb{box-shadow:0 0 0 1px #222,0 0 0 .25rem rgba(55,90,127,.25)}.form-range:focus::-moz-range-thumb{box-shadow:0 0 0 1px #222,0 0 0 .25rem rgba(55,90,127,.25)}.form-range::-webkit-slider-thumb{background-color:#375a7f;border:0}.form-range::-webkit-slider-thumb:active{background-color:#c3ced9}.form-range::-webkit-slider-runnable-track{background-color:#515151}.form-range::-moz-range-thumb{background-color:#375a7f;border:0}.form-range::-moz-range-thumb:active{background-color:#c3ced9}.form-range::-moz-range-track{background-color:#515151}.form-range:disabled{pointer-events:none}.form-range:disabled::-webkit-slider-thumb{background-color:#7e7e7e}.form-range:disabled::-moz-range-thumb{background-color:#7e7e7e}.form-floating>.form-control::-moz-placeholder{color:transparent}.form-floating>.form-control:-ms-input-placeholder{color:transparent}.form-floating>.form-control::placeholder{color:transparent}.form-floating>.form-control:not(:-moz-placeholder-shown)~label{opacity:.65}.form-floating>.form-control:not(:-ms-input-placeholder)~label{opacity:.65}.form-floating>.form-control:focus~label,.form-floating>.form-control:not(:placeholder-shown)~label,.form-floating>.form-select~label{opacity:.65}.form-floating>.form-control:-webkit-autofill~label{opacity:.65}.input-group-text{color:#b1b1b1;background-color:#3b3b3b;border:1px solid #515151}.valid-feedback{color:#00bc8c}.valid-tooltip{color:#111;background-color:rgba(0,188,140,.9)}.form-control.is-valid,.was-validated .form-control:valid{border-color:#00bc8c;background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2300bc8c' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e")}.form-control.is-valid:focus,.was-validated .form-control:valid:focus{border-color:#00bc8c;box-shadow:0 0 0 .25rem rgba(0,188,140,.25)}.form-select.is-valid,.was-validated .form-select:valid{border-color:#00bc8c}.form-select.is-valid:not([multiple]):not([size]),.form-select.is-valid:not([multiple])[size="1"],.was-validated .form-select:valid:not([multiple]):not([size]),.was-validated .form-select:valid:not([multiple])[size="1"]{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23cfcfcf' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e"),url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2300bc8c' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e")}.form-select.is-valid[multiple],.form-select.is-valid[size]:not([size="1"]),.was-validated .form-select:valid[multiple],.was-validated .form-select:valid[size]:not([size="1"]){background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2300bc8c' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e")}.form-select.is-valid:focus,.was-validated .form-select:valid:focus{border-color:#00bc8c;box-shadow:0 0 0 .25rem rgba(0,188,140,.25)}.form-check-input.is-valid,.was-validated .form-check-input:valid{border-color:#00bc8c}.form-check-input.is-valid:checked,.was-validated .form-check-input:valid:checked{background-color:#00bc8c}.form-check-input.is-valid:focus,.was-validated .form-check-input:valid:focus{box-shadow:0 0 0 .25rem rgba(0,188,140,.25)}.form-check-input.is-valid~.form-check-label,.was-validated .form-check-input:valid~.form-check-label{color:#00bc8c}.invalid-feedback{color:#e74c3c}.invalid-tooltip{color:#fafafa;background-color:rgba(231,76,60,.9)}.form-control.is-invalid,.was-validated .form-control:invalid{border-color:#e74c3c;background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23e74c3c'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e")}.form-control.is-invalid:focus,.was-validated .form-control:invalid:focus{border-color:#e74c3c;box-shadow:0 0 0 .25rem rgba(231,76,60,.25)}.form-select.is-invalid,.was-validated .form-select:invalid{border-color:#e74c3c}.form-select.is-invalid:not([multiple]):not([size]),.form-select.is-invalid:not([multiple])[size="1"],.was-validated .form-select:invalid:not([multiple]):not([size]),.was-validated .form-select:invalid:not([multiple])[size="1"]{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23cfcfcf' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e"),url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23e74c3c'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e")}.form-select.is-invalid[multiple],.form-select.is-invalid[size]:not([size="1"]),.was-validated .form-select:invalid[multiple],.was-validated .form-select:invalid[size]:not([size="1"]){background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23e74c3c'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e")}.form-select.is-invalid:focus,.was-validated .form-select:invalid:focus{border-color:#e74c3c;box-shadow:0 0 0 .25rem rgba(231,76,60,.25)}.form-check-input.is-invalid,.was-validated .form-check-input:invalid{border-color:#e74c3c}.form-check-input.is-invalid:checked,.was-validated .form-check-input:invalid:checked{background-color:#e74c3c}.form-check-input.is-invalid:focus,.was-validated .form-check-input:invalid:focus{box-shadow:0 0 0 .25rem rgba(231,76,60,.25)}.form-check-input.is-invalid~.form-check-label,.was-validated .form-check-input:invalid~.form-check-label{color:#e74c3c}.btn{color:#e1e1e1;background-color:transparent;border:1px solid transparent}.btn:hover{color:#e1e1e1}.btn-check:focus+.btn,.btn:focus{box-shadow:0 0 0 .25rem rgba(55,90,127,.25)}.btn.disabled,.btn:disabled,fieldset:disabled .btn{opacity:.65}.btn-primary{color:#fafafa;background-color:#375a7f;border-color:#375a7f}.btn-primary:hover{color:#fafafa;background-color:#2f4d6c;border-color:#2c4866}.btn-check:focus+.btn-primary,.btn-primary:focus{color:#fafafa;background-color:#2f4d6c;border-color:#2c4866;box-shadow:0 0 0 .25rem rgba(84,114,145,.5)}.btn-check:active+.btn-primary,.btn-check:checked+.btn-primary,.btn-primary.active,.btn-primary:active,.show>.btn-primary.dropdown-toggle{color:#fafafa;background-color:#2c4866;border-color:#29445f}.btn-check:active+.btn-primary:focus,.btn-check:checked+.btn-primary:focus,.btn-primary.active:focus,.btn-primary:active:focus,.show>.btn-primary.dropdown-toggle:focus{box-shadow:0 0 0 .25rem rgba(84,114,145,.5)}.btn-primary.disabled,.btn-primary:disabled{color:#fafafa;background-color:#375a7f;border-color:#375a7f}.btn-secondary{color:#fafafa;background-color:#626262;border-color:#626262}.btn-secondary:hover{color:#fafafa;background-color:#535353;border-color:#4e4e4e}.btn-check:focus+.btn-secondary,.btn-secondary:focus{color:#fafafa;background-color:#535353;border-color:#4e4e4e;box-shadow:0 0 0 .25rem rgba(121,121,121,.5)}.btn-check:active+.btn-secondary,.btn-check:checked+.btn-secondary,.btn-secondary.active,.btn-secondary:active,.show>.btn-secondary.dropdown-toggle{color:#fafafa;background-color:#4e4e4e;border-color:#4a4a4a}.btn-check:active+.btn-secondary:focus,.btn-check:checked+.btn-secondary:focus,.btn-secondary.active:focus,.btn-secondary:active:focus,.show>.btn-secondary.dropdown-toggle:focus{box-shadow:0 0 0 .25rem rgba(121,121,121,.5)}.btn-secondary.disabled,.btn-secondary:disabled{color:#fafafa;background-color:#626262;border-color:#626262}.btn-success{color:#111;background-color:#00bc8c;border-color:#00bc8c}.btn-success:hover{color:#111;background-color:#26c69d;border-color:#1ac398}.btn-check:focus+.btn-success,.btn-success:focus{color:#111;background-color:#26c69d;border-color:#1ac398;box-shadow:0 0 0 .25rem rgba(3,162,122,.5)}.btn-check:active+.btn-success,.btn-check:checked+.btn-success,.btn-success.active,.btn-success:active,.show>.btn-success.dropdown-toggle{color:#111;background-color:#33c9a3;border-color:#1ac398}.btn-check:active+.btn-success:focus,.btn-check:checked+.btn-success:focus,.btn-success.active:focus,.btn-success:active:focus,.show>.btn-success.dropdown-toggle:focus{box-shadow:0 0 0 .25rem rgba(3,162,122,.5)}.btn-success.disabled,.btn-success:disabled{color:#111;background-color:#00bc8c;border-color:#00bc8c}.btn-info{color:#fafafa;background-color:#17a2b8;border-color:#17a2b8}.btn-info:hover{color:#fafafa;background-color:#148a9c;border-color:#128293}.btn-check:focus+.btn-info,.btn-info:focus{color:#fafafa;background-color:#148a9c;border-color:#128293;box-shadow:0 0 0 .25rem rgba(57,175,194,.5)}.btn-check:active+.btn-info,.btn-check:checked+.btn-info,.btn-info.active,.btn-info:active,.show>.btn-info.dropdown-toggle{color:#fafafa;background-color:#128293;border-color:#117a8a}.btn-check:active+.btn-info:focus,.btn-check:checked+.btn-info:focus,.btn-info.active:focus,.btn-info:active:focus,.show>.btn-info.dropdown-toggle:focus{box-shadow:0 0 0 .25rem rgba(57,175,194,.5)}.btn-info.disabled,.btn-info:disabled{color:#fafafa;background-color:#17a2b8;border-color:#17a2b8}.btn-warning{color:#111;background-color:#f39c12;border-color:#f39c12}.btn-warning:hover{color:#111;background-color:#f5ab36;border-color:#f4a62a}.btn-check:focus+.btn-warning,.btn-warning:focus{color:#111;background-color:#f5ab36;border-color:#f4a62a;box-shadow:0 0 0 .25rem rgba(209,135,18,.5)}.btn-check:active+.btn-warning,.btn-check:checked+.btn-warning,.btn-warning.active,.btn-warning:active,.show>.btn-warning.dropdown-toggle{color:#111;background-color:#f5b041;border-color:#f4a62a}.btn-check:active+.btn-warning:focus,.btn-check:checked+.btn-warning:focus,.btn-warning.active:focus,.btn-warning:active:focus,.show>.btn-warning.dropdown-toggle:focus{box-shadow:0 0 0 .25rem rgba(209,135,18,.5)}.btn-warning.disabled,.btn-warning:disabled{color:#111;background-color:#f39c12;border-color:#f39c12}.btn-danger{color:#fafafa;background-color:#e74c3c;border-color:#e74c3c}.btn-danger:hover{color:#fafafa;background-color:#c44133;border-color:#b93d30}.btn-check:focus+.btn-danger,.btn-danger:focus{color:#fafafa;background-color:#c44133;border-color:#b93d30;box-shadow:0 0 0 .25rem rgba(234,102,89,.5)}.btn-check:active+.btn-danger,.btn-check:checked+.btn-danger,.btn-danger.active,.btn-danger:active,.show>.btn-danger.dropdown-toggle{color:#fafafa;background-color:#b93d30;border-color:#ad392d}.btn-check:active+.btn-danger:focus,.btn-check:checked+.btn-danger:focus,.btn-danger.active:focus,.btn-danger:active:focus,.show>.btn-danger.dropdown-toggle:focus{box-shadow:0 0 0 .25rem rgba(234,102,89,.5)}.btn-danger.disabled,.btn-danger:disabled{color:#fafafa;background-color:#e74c3c;border-color:#e74c3c}.btn-light{color:#fafafa;background-color:#9e9e9e;border-color:#9e9e9e}.btn-light:hover{color:#fafafa;background-color:#868686;border-color:#7e7e7e}.btn-check:focus+.btn-light,.btn-light:focus{color:#fafafa;background-color:#868686;border-color:#7e7e7e;box-shadow:0 0 0 .25rem rgba(172,172,172,.5)}.btn-check:active+.btn-light,.btn-check:checked+.btn-light,.btn-light.active,.btn-light:active,.show>.btn-light.dropdown-toggle{color:#fafafa;background-color:#7e7e7e;border-color:#777}.btn-check:active+.btn-light:focus,.btn-check:checked+.btn-light:focus,.btn-light.active:focus,.btn-light:active:focus,.show>.btn-light.dropdown-toggle:focus{box-shadow:0 0 0 .25rem rgba(172,172,172,.5)}.btn-light.disabled,.btn-light:disabled{color:#fafafa;background-color:#9e9e9e;border-color:#9e9e9e}.btn-dark{color:#fafafa;background-color:#3b3b3b;border-color:#3b3b3b}.btn-dark:hover{color:#fafafa;background-color:#323232;border-color:#2f2f2f}.btn-check:focus+.btn-dark,.btn-dark:focus{color:#fafafa;background-color:#323232;border-color:#2f2f2f;box-shadow:0 0 0 .25rem rgba(88,88,88,.5)}.btn-check:active+.btn-dark,.btn-check:checked+.btn-dark,.btn-dark.active,.btn-dark:active,.show>.btn-dark.dropdown-toggle{color:#fafafa;background-color:#2f2f2f;border-color:#2c2c2c}.btn-check:active+.btn-dark:focus,.btn-check:checked+.btn-dark:focus,.btn-dark.active:focus,.btn-dark:active:focus,.show>.btn-dark.dropdown-toggle:focus{box-shadow:0 0 0 .25rem rgba(88,88,88,.5)}.btn-dark.disabled,.btn-dark:disabled{color:#fafafa;background-color:#3b3b3b;border-color:#3b3b3b}.btn-outline-primary{color:#375a7f;border-color:#375a7f}.btn-outline-primary:hover{color:#fff;background-color:#375a7f;border-color:#375a7f}.btn-check:focus+.btn-outline-primary,.btn-outline-primary:focus{box-shadow:0 0 0 .25rem rgba(55,90,127,.5)}.btn-check:active+.btn-outline-primary,.btn-check:checked+.btn-outline-primary,.btn-outline-primary.active,.btn-outline-primary.dropdown-toggle.show,.btn-outline-primary:active{color:#fff;background-color:#375a7f;border-color:#375a7f}.btn-check:active+.btn-outline-primary:focus,.btn-check:checked+.btn-outline-primary:focus,.btn-outline-primary.active:focus,.btn-outline-primary.dropdown-toggle.show:focus,.btn-outline-primary:active:focus{box-shadow:0 0 0 .25rem rgba(55,90,127,.5)}.btn-outline-primary.disabled,.btn-outline-primary:disabled{color:#375a7f;background-color:transparent}.btn-outline-secondary{color:#626262;border-color:#626262}.btn-outline-secondary:hover{color:#fff;background-color:#626262;border-color:#626262}.btn-check:focus+.btn-outline-secondary,.btn-outline-secondary:focus{box-shadow:0 0 0 .25rem rgba(98,98,98,.5)}.btn-check:active+.btn-outline-secondary,.btn-check:checked+.btn-outline-secondary,.btn-outline-secondary.active,.btn-outline-secondary.dropdown-toggle.show,.btn-outline-secondary:active{color:#fff;background-color:#626262;border-color:#626262}.btn-check:active+.btn-outline-secondary:focus,.btn-check:checked+.btn-outline-secondary:focus,.btn-outline-secondary.active:focus,.btn-outline-secondary.dropdown-toggle.show:focus,.btn-outline-secondary:active:focus{box-shadow:0 0 0 .25rem rgba(98,98,98,.5)}.btn-outline-secondary.disabled,.btn-outline-secondary:disabled{color:#626262;background-color:transparent}.btn-outline-success{color:#00bc8c;border-color:#00bc8c}.btn-outline-success:hover{color:#000;background-color:#00bc8c;border-color:#00bc8c}.btn-check:focus+.btn-outline-success,.btn-outline-success:focus{box-shadow:0 0 0 .25rem rgba(0,188,140,.5)}.btn-check:active+.btn-outline-success,.btn-check:checked+.btn-outline-success,.btn-outline-success.active,.btn-outline-success.dropdown-toggle.show,.btn-outline-success:active{color:#000;background-color:#00bc8c;border-color:#00bc8c}.btn-check:active+.btn-outline-success:focus,.btn-check:checked+.btn-outline-success:focus,.btn-outline-success.active:focus,.btn-outline-success.dropdown-toggle.show:focus,.btn-outline-success:active:focus{box-shadow:0 0 0 .25rem rgba(0,188,140,.5)}.btn-outline-success.disabled,.btn-outline-success:disabled{color:#00bc8c;background-color:transparent}.btn-outline-info{color:#17a2b8;border-color:#17a2b8}.btn-outline-info:hover{color:#000;background-color:#17a2b8;border-color:#17a2b8}.btn-check:focus+.btn-outline-info,.btn-outline-info:focus{box-shadow:0 0 0 .25rem rgba(23,162,184,.5)}.btn-check:active+.btn-outline-info,.btn-check:checked+.btn-outline-info,.btn-outline-info.active,.btn-outline-info.dropdown-toggle.show,.btn-outline-info:active{color:#000;background-color:#17a2b8;border-color:#17a2b8}.btn-check:active+.btn-outline-info:focus,.btn-check:checked+.btn-outline-info:focus,.btn-outline-info.active:focus,.btn-outline-info.dropdown-toggle.show:focus,.btn-outline-info:active:focus{box-shadow:0 0 0 .25rem rgba(23,162,184,.5)}.btn-outline-info.disabled,.btn-outline-info:disabled{color:#17a2b8;background-color:transparent}.btn-outline-warning{color:#f39c12;border-color:#f39c12}.btn-outline-warning:hover{color:#000;background-color:#f39c12;border-color:#f39c12}.btn-check:focus+.btn-outline-warning,.btn-outline-warning:focus{box-shadow:0 0 0 .25rem rgba(243,156,18,.5)}.btn-check:active+.btn-outline-warning,.btn-check:checked+.btn-outline-warning,.btn-outline-warning.active,.btn-outline-warning.dropdown-toggle.show,.btn-outline-warning:active{color:#000;background-color:#f39c12;border-color:#f39c12}.btn-check:active+.btn-outline-warning:focus,.btn-check:checked+.btn-outline-warning:focus,.btn-outline-warning.active:focus,.btn-outline-warning.dropdown-toggle.show:focus,.btn-outline-warning:active:focus{box-shadow:0 0 0 .25rem rgba(243,156,18,.5)}.btn-outline-warning.disabled,.btn-outline-warning:disabled{color:#f39c12;background-color:transparent}.btn-outline-danger{color:#e74c3c;border-color:#e74c3c}.btn-outline-danger:hover{color:#000;background-color:#e74c3c;border-color:#e74c3c}.btn-check:focus+.btn-outline-danger,.btn-outline-danger:focus{box-shadow:0 0 0 .25rem rgba(231,76,60,.5)}.btn-check:active+.btn-outline-danger,.btn-check:checked+.btn-outline-danger,.btn-outline-danger.active,.btn-outline-danger.dropdown-toggle.show,.btn-outline-danger:active{color:#000;background-color:#e74c3c;border-color:#e74c3c}.btn-check:active+.btn-outline-danger:focus,.btn-check:checked+.btn-outline-danger:focus,.btn-outline-danger.active:focus,.btn-outline-danger.dropdown-toggle.show:focus,.btn-outline-danger:active:focus{box-shadow:0 0 0 .25rem rgba(231,76,60,.5)}.btn-outline-danger.disabled,.btn-outline-danger:disabled{color:#e74c3c;background-color:transparent}.btn-outline-light{color:#9e9e9e;border-color:#9e9e9e}.btn-outline-light:hover{color:#000;background-color:#9e9e9e;border-color:#9e9e9e}.btn-check:focus+.btn-outline-light,.btn-outline-light:focus{box-shadow:0 0 0 .25rem rgba(158,158,158,.5)}.btn-check:active+.btn-outline-light,.btn-check:checked+.btn-outline-light,.btn-outline-light.active,.btn-outline-light.dropdown-toggle.show,.btn-outline-light:active{color:#000;background-color:#9e9e9e;border-color:#9e9e9e}.btn-check:active+.btn-outline-light:focus,.btn-check:checked+.btn-outline-light:focus,.btn-outline-light.active:focus,.btn-outline-light.dropdown-toggle.show:focus,.btn-outline-light:active:focus{box-shadow:0 0 0 .25rem rgba(158,158,158,.5)}.btn-outline-light.disabled,.btn-outline-light:disabled{color:#9e9e9e;background-color:transparent}.btn-outline-dark{color:#3b3b3b;border-color:#3b3b3b}.btn-outline-dark:hover{color:#fff;background-color:#3b3b3b;border-color:#3b3b3b}.btn-check:focus+.btn-outline-dark,.btn-outline-dark:focus{box-shadow:0 0 0 .25rem rgba(59,59,59,.5)}.btn-check:active+.btn-outline-dark,.btn-check:checked+.btn-outline-dark,.btn-outline-dark.active,.btn-outline-dark.dropdown-toggle.show,.btn-outline-dark:active{color:#fff;background-color:#3b3b3b;border-color:#3b3b3b}.btn-check:active+.btn-outline-dark:focus,.btn-check:checked+.btn-outline-dark:focus,.btn-outline-dark.active:focus,.btn-outline-dark.dropdown-toggle.show:focus,.btn-outline-dark:active:focus{box-shadow:0 0 0 .25rem rgba(59,59,59,.5)}.btn-outline-dark.disabled,.btn-outline-dark:disabled{color:#3b3b3b;background-color:transparent}.btn-link{color:#557392}.btn-link:hover{color:#778fa8}.btn-link.disabled,.btn-link:disabled{color:#626262}.dropdown-menu{color:#e1e1e1;background-color:#111;border:1px solid rgba(250,250,250,.15)}.dropdown-divider{border-top:1px solid rgba(250,250,250,.15)}.dropdown-item{color:#f8f9fa;background-color:transparent;border:0}.dropdown-item:focus,.dropdown-item:hover{color:#dfe0e1;background-color:#343a40}.dropdown-item.active,.dropdown-item:active{color:#fafafa;background-color:#375a7f}.dropdown-item.disabled,.dropdown-item:disabled{color:#7e7e7e;background-color:transparent}.dropdown-header{color:#9e9e9e}.dropdown-item-text{color:#f8f9fa}.dropdown-menu-dark{color:#515151;background-color:#cfcfcf;border-color:rgba(250,250,250,.15)}.dropdown-menu-dark .dropdown-item{color:#515151}.dropdown-menu-dark .dropdown-item:focus,.dropdown-menu-dark .dropdown-item:hover{color:#111;background-color:rgba(17,17,17,.15)}.dropdown-menu-dark .dropdown-item.active,.dropdown-menu-dark .dropdown-item:active{color:#fafafa;background-color:#375a7f}.dropdown-menu-dark .dropdown-item.disabled,.dropdown-menu-dark .dropdown-item:disabled{color:#7e7e7e}.dropdown-menu-dark .dropdown-divider{border-color:rgba(250,250,250,.15)}.dropdown-menu-dark .dropdown-item-text{color:#515151}.dropdown-menu-dark .dropdown-header{color:#7e7e7e}.nav-link{color:#557392}.nav-link:focus,.nav-link:hover{color:#778fa8}.nav-link.disabled{color:#9e9e9e}.nav-tabs{border-bottom:1px solid #515151}.nav-tabs .nav-link{border:1px solid transparent}.nav-tabs .nav-link:focus,.nav-tabs .nav-link:hover{border-color:#3b3b3b #3b3b3b #515151}.nav-tabs .nav-link.disabled{color:#9e9e9e;background-color:transparent;border-color:transparent}.nav-tabs .nav-item.show .nav-link,.nav-tabs .nav-link.active{color:#b1b1b1;background-color:#222;border-color:#515151 #515151 #222}.nav-pills .nav-link.active,.nav-pills .show>.nav-link{color:#fafafa;background-color:#375a7f}.navbar-toggler{background-color:transparent;border:1px solid transparent}.navbar-light .navbar-brand{color:rgba(250,250,250,.9)}.navbar-light .navbar-brand:focus,.navbar-light .navbar-brand:hover{color:rgba(250,250,250,.9)}.navbar-light .navbar-nav .nav-link{color:rgba(250,250,250,.55)}.navbar-light .navbar-nav .nav-link:focus,.navbar-light .navbar-nav .nav-link:hover{color:rgba(250,250,250,.7)}.navbar-light .navbar-nav .nav-link.disabled{color:rgba(250,250,250,.3)}.navbar-light .navbar-nav .nav-link.active,.navbar-light .navbar-nav .show>.nav-link{color:rgba(250,250,250,.9)}.navbar-light .navbar-toggler{color:rgba(250,250,250,.55);border-color:rgba(250,250,250,.1)}.navbar-light .navbar-toggler-icon{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28250, 250, 250, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e")}.navbar-light .navbar-text{color:rgba(250,250,250,.55)}.navbar-light .navbar-text a,.navbar-light .navbar-text a:focus,.navbar-light .navbar-text a:hover{color:rgba(250,250,250,.9)}.navbar-dark .navbar-brand{color:#fafafa}.navbar-dark .navbar-brand:focus,.navbar-dark .navbar-brand:hover{color:#fafafa}.navbar-dark .navbar-nav .nav-link{color:rgba(250,250,250,.55)}.navbar-dark .navbar-nav .nav-link:focus,.navbar-dark .navbar-nav .nav-link:hover{color:rgba(250,250,250,.75)}.navbar-dark .navbar-nav .nav-link.disabled{color:rgba(250,250,250,.25)}.navbar-dark .navbar-nav .nav-link.active,.navbar-dark .navbar-nav .show>.nav-link{color:#fafafa}.navbar-dark .navbar-toggler{color:rgba(250,250,250,.55);border-color:rgba(250,250,250,.1)}.navbar-dark .navbar-toggler-icon{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28250, 250, 250, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e")}.navbar-dark .navbar-text{color:rgba(250,250,250,.55)}.navbar-dark .navbar-text a,.navbar-dark .navbar-text a:focus,.navbar-dark .navbar-text a:hover{color:#fafafa}.card{background-color:#222;border:1px solid rgba(250,250,250,.125)}.card-header{background-color:rgba(250,250,250,.03);border-bottom:1px solid rgba(250,250,250,.125)}.card-footer{background-color:rgba(250,250,250,.03);border-top:1px solid rgba(250,250,250,.125)}.accordion-button{color:#e1e1e1;background-color:#222}.accordion-button:not(.collapsed){color:#879cb2;background-color:#1c2d40;box-shadow:inset 0 -1px 0 rgba(250,250,250,.125)}.accordion-button:not(.collapsed)::after{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23879cb2'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e")}.accordion-button::after{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23e1e1e1'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e")}.accordion-button:hover{z-index:2}.accordion-button:focus{border-color:#9badbf;box-shadow:0 0 0 .25rem rgba(55,90,127,.25)}.accordion-item{background-color:#222;border:1px solid rgba(250,250,250,.125)}.accordion-flush .accordion-collapse{border-width:0}.accordion-flush .accordion-item{border-right:0;border-left:0}.accordion-flush .accordion-item:first-child{border-top:0}.accordion-flush .accordion-item:last-child{border-bottom:0}.breadcrumb-item+.breadcrumb-item::before{color:#9e9e9e}.breadcrumb-item.active{color:#9e9e9e}.page-link{color:#557392;background-color:#3b3b3b;border:1px solid #515151}.page-link:hover{color:#778fa8;background-color:#515151;border-color:#515151}.page-link:focus{color:#778fa8;background-color:#3b3b3b;outline:0;box-shadow:0 0 0 .25rem rgba(55,90,127,.25)}.page-item.active .page-link{color:#fafafa;background-color:#375a7f;border-color:#375a7f}.page-item.disabled .page-link{color:#5a5a5a;background-color:#222;border-color:#515151}.badge{color:#fafafa}.alert-heading{color:inherit}.alert-primary{color:#738ca5;background-color:#1c2d40;border-color:#21364c}.alert-primary .alert-link{color:#5c7084}.alert-secondary{color:#919191;background-color:#313131;border-color:#3b3b3b}.alert-secondary .alert-link{color:#747474}.alert-success{color:#4dd0af;background-color:#005e46;border-color:#007154}.alert-success .alert-link{color:#3ea68c}.alert-info{color:#5dbecd;background-color:#0c515c;border-color:#0e616e}.alert-info .alert-link{color:#4a98a4}.alert-warning{color:#f7ba59;background-color:#7a4e09;border-color:#925e0b}.alert-warning .alert-link{color:#c69547}.alert-danger{color:#ee8277;background-color:#74261e;border-color:#8b2e24}.alert-danger .alert-link{color:#be685f}.alert-light{color:#bbb;background-color:#4f4f4f;border-color:#5f5f5f}.alert-light .alert-link{color:#969696}.alert-dark{color:#767676;background-color:#1e1e1e;border-color:#232323}.alert-dark .alert-link{color:#5e5e5e}.progress{background-color:#3b3b3b}.progress-bar{color:#111;background-color:#375a7f}.list-group-item-action{color:#b1b1b1}.list-group-item-action:focus,.list-group-item-action:hover{color:#b1b1b1;background-color:#2f2f2f}.list-group-item-action:active{color:#e1e1e1;background-color:#3b3b3b}.list-group-item{color:#e1e1e1;background-color:#222;border:1px solid rgba(250,250,250,.125)}.list-group-item.disabled,.list-group-item:disabled{color:#9e9e9e;background-color:#222}.list-group-item.active{color:#fafafa;background-color:#375a7f;border-color:#375a7f}.list-group-flush>.list-group-item{border-width:0 0 1px}.list-group-flush>.list-group-item:last-child{border-bottom-width:0}.list-group-item-primary{color:#738ca5;background-color:#1c2d40}.list-group-item-primary.list-group-item-action:focus,.list-group-item-primary.list-group-item-action:hover{color:#738ca5;background-color:#19293a}.list-group-item-primary.list-group-item-action.active{color:#fff;background-color:#738ca5;border-color:#738ca5}.list-group-item-secondary{color:#919191;background-color:#313131}.list-group-item-secondary.list-group-item-action:focus,.list-group-item-secondary.list-group-item-action:hover{color:#919191;background-color:#2c2c2c}.list-group-item-secondary.list-group-item-action.active{color:#fff;background-color:#919191;border-color:#919191}.list-group-item-success{color:#4dd0af;background-color:#005e46}.list-group-item-success.list-group-item-action:focus,.list-group-item-success.list-group-item-action:hover{color:#4dd0af;background-color:#00553f}.list-group-item-success.list-group-item-action.active{color:#fff;background-color:#4dd0af;border-color:#4dd0af}.list-group-item-info{color:#5dbecd;background-color:#0c515c}.list-group-item-info.list-group-item-action:focus,.list-group-item-info.list-group-item-action:hover{color:#5dbecd;background-color:#0b4953}.list-group-item-info.list-group-item-action.active{color:#fff;background-color:#5dbecd;border-color:#5dbecd}.list-group-item-warning{color:#f7ba59;background-color:#7a4e09}.list-group-item-warning.list-group-item-action:focus,.list-group-item-warning.list-group-item-action:hover{color:#f7ba59;background-color:#6e4608}.list-group-item-warning.list-group-item-action.active{color:#fff;background-color:#f7ba59;border-color:#f7ba59}.list-group-item-danger{color:#ee8277;background-color:#74261e}.list-group-item-danger.list-group-item-action:focus,.list-group-item-danger.list-group-item-action:hover{color:#ee8277;background-color:#68221b}.list-group-item-danger.list-group-item-action.active{color:#fff;background-color:#ee8277;border-color:#ee8277}.list-group-item-light{color:#bbb;background-color:#4f4f4f}.list-group-item-light.list-group-item-action:focus,.list-group-item-light.list-group-item-action:hover{color:#bbb;background-color:#474747}.list-group-item-light.list-group-item-action.active{color:#fff;background-color:#bbb;border-color:#bbb}.list-group-item-dark{color:#767676;background-color:#1e1e1e}.list-group-item-dark.list-group-item-action:focus,.list-group-item-dark.list-group-item-action:hover{color:#767676;background-color:#1b1b1b}.list-group-item-dark.list-group-item-action.active{color:#fff;background-color:#767676;border-color:#767676}.btn-close{color:#fafafa;background:transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fafafa'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat;opacity:.5}.btn-close:hover{color:#fafafa;opacity:.75}.btn-close:focus{box-shadow:0 0 0 .25rem rgba(55,90,127,.25);opacity:1}.btn-close.disabled,.btn-close:disabled{opacity:.25}.btn-close-white{filter:invert(1) grayscale(100%) brightness(200%)}.toast{background-color:rgba(17,17,17,.85);border:1px solid rgba(250,250,250,.1);box-shadow:0 .5rem 1rem rgba(17,17,17,.15)}.toast-header{color:#9e9e9e;background-color:rgba(17,17,17,.85);border-bottom:1px solid rgba(250,250,250,.05)}.modal-content{background-color:#2f2f2f;border:1px solid rgba(250,250,250,.2)}.modal-backdrop{background-color:#111}.modal-backdrop.fade{opacity:0}.modal-backdrop.show{opacity:.85}.modal-header{border-bottom:1px solid #515151}.modal-footer{border-top:1px solid #515151}.tooltip{opacity:0}.tooltip.show{opacity:.9}.bs-tooltip-auto[data-popper-placement^=top] .tooltip-arrow::before,.bs-tooltip-top .tooltip-arrow::before{border-top-color:#fafafa}.bs-tooltip-auto[data-popper-placement^=right] .tooltip-arrow::before,.bs-tooltip-end .tooltip-arrow::before{border-right-color:#fafafa}.bs-tooltip-auto[data-popper-placement^=bottom] .tooltip-arrow::before,.bs-tooltip-bottom .tooltip-arrow::before{border-bottom-color:#fafafa}.bs-tooltip-auto[data-popper-placement^=left] .tooltip-arrow::before,.bs-tooltip-start .tooltip-arrow::before{border-left-color:#fafafa}.tooltip-inner{color:#111;background-color:#fafafa}.popover{background-color:#111;border:1px solid rgba(250,250,250,.2)}.popover .popover-arrow::after,.popover .popover-arrow::before{border-color:transparent;border-style:solid}.bs-popover-auto[data-popper-placement^=top]>.popover-arrow::before,.bs-popover-top>.popover-arrow::before{border-top-color:rgba(250,250,250,.25)}.bs-popover-auto[data-popper-placement^=top]>.popover-arrow::after,.bs-popover-top>.popover-arrow::after{border-top-color:#111}.bs-popover-auto[data-popper-placement^=right]>.popover-arrow::before,.bs-popover-end>.popover-arrow::before{border-right-color:rgba(250,250,250,.25)}.bs-popover-auto[data-popper-placement^=right]>.popover-arrow::after,.bs-popover-end>.popover-arrow::after{border-right-color:#111}.bs-popover-auto[data-popper-placement^=bottom]>.popover-arrow::before,.bs-popover-bottom>.popover-arrow::before{border-bottom-color:rgba(250,250,250,.25)}.bs-popover-auto[data-popper-placement^=bottom]>.popover-arrow::after,.bs-popover-bottom>.popover-arrow::after{border-bottom-color:#111}.bs-popover-auto[data-popper-placement^=bottom] .popover-header::before,.bs-popover-bottom .popover-header::before{border-bottom:1px solid #1f1f1f}.bs-popover-auto[data-popper-placement^=left]>.popover-arrow::before,.bs-popover-start>.popover-arrow::before{border-left-color:rgba(250,250,250,.25)}.bs-popover-auto[data-popper-placement^=left]>.popover-arrow::after,.bs-popover-start>.popover-arrow::after{border-left-color:#111}.popover-header{background-color:#1f1f1f;border-bottom:1px solid rgba(250,250,250,.2)}.popover-body{color:#e1e1e1}.carousel-control-next,.carousel-control-prev{color:#fafafa;opacity:.5}.carousel-control-next:focus,.carousel-control-next:hover,.carousel-control-prev:focus,.carousel-control-prev:hover{color:#fafafa;opacity:.9}.carousel-control-prev-icon{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fafafa'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e")}.carousel-control-next-icon{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fafafa'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e")}.carousel-indicators [data-bs-target]{background-color:#111;opacity:.5}.carousel-indicators .active{opacity:1}.carousel-caption{color:#111}.carousel-dark .carousel-control-next-icon,.carousel-dark .carousel-control-prev-icon{filter:invert(1) grayscale(100)}.carousel-dark .carousel-indicators [data-bs-target]{background-color:#fafafa}.carousel-dark .carousel-caption{color:#fafafa}.offcanvas{background-color:#2f2f2f}.offcanvas-backdrop{background-color:#111}.offcanvas-backdrop.fade{opacity:0}.offcanvas-backdrop.show{opacity:.85}.offcanvas-start{border-right:1px solid rgba(250,250,250,.2)}.offcanvas-end{border-left:1px solid rgba(250,250,250,.2)}.offcanvas-top{border-bottom:1px solid rgba(250,250,250,.2)}.offcanvas-bottom{border-top:1px solid rgba(250,250,250,.2)}.placeholder{background-color:currentColor;opacity:.5}@-webkit-keyframes placeholder-glow{50%{opacity:.2}}@keyframes placeholder-glow{50%{opacity:.2}}.placeholder-wave{-webkit-mask-image:linear-gradient(130deg,#fafafa 55%,rgba(255,255,255,0.8) 75%,#fafafa 95%);mask-image:linear-gradient(130deg,#fafafa 55%,rgba(255,255,255,0.8) 75%,#fafafa 95%)}.link-primary{color:#375a7f}.link-primary:focus,.link-primary:hover{color:#2c4866}.link-secondary{color:#626262}.link-secondary:focus,.link-secondary:hover{color:#4e4e4e}.link-success{color:#00bc8c}.link-success:focus,.link-success:hover{color:#33c9a3}.link-info{color:#17a2b8}.link-info:focus,.link-info:hover{color:#128293}.link-warning{color:#f39c12}.link-warning:focus,.link-warning:hover{color:#f5b041}.link-danger{color:#e74c3c}.link-danger:focus,.link-danger:hover{color:#b93d30}.link-light{color:#9e9e9e}.link-light:focus,.link-light:hover{color:#7e7e7e}.link-dark{color:#3b3b3b}.link-dark:focus,.link-dark:hover{color:#2f2f2f}.vr{background-color:currentColor;opacity:.1}.shadow{box-shadow:0 .5rem 1rem rgba(17,17,17,.15)!important}.shadow-sm{box-shadow:0 .125rem .25rem rgba(17,17,17,.075)!important}.shadow-lg{box-shadow:0 1rem 3rem rgba(17,17,17,.175)!important}.border{border:1px solid #515151!important}.border-top{border-top:1px solid #515151!important}.border-end{border-right:1px solid #515151!important}.border-bottom{border-bottom:1px solid #515151!important}.border-start{border-left:1px solid #515151!important}.border-primary{border-color:#375a7f!important}.border-secondary{border-color:#626262!important}.border-success{border-color:#00bc8c!important}.border-info{border-color:#17a2b8!important}.border-warning{border-color:#f39c12!important}.border-danger{border-color:#e74c3c!important}.border-light{border-color:#9e9e9e!important}.border-dark{border-color:#3b3b3b!important}.border-white{border-color:#fafafa!important}.border-black{border-color:#111!important}.text-muted{color:#9e9e9e!important}.text-white-50{color:rgba(250,250,250,.5)!important}.text-black-50{color:rgba(17,17,17,.5)!important}.bg-black{background-color:#111!important}body::-moz-selection{color:#cfcfcf;background:rgba(23,162,184,.5)}body::selection{color:#cfcfcf;background:rgba(23,162,184,.5)} \ No newline at end of file diff --git a/examples/vagrant/static-http/bootstrap.bundle.min.js b/examples/vagrant/static-http/bootstrap.bundle.min.js new file mode 100644 index 00000000..dbfe7129 --- /dev/null +++ b/examples/vagrant/static-http/bootstrap.bundle.min.js @@ -0,0 +1,6 @@ +/*! + * Bootstrap v5.1.3 (https://getbootstrap.com/) + * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) + */ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).bootstrap=e()}(this,(function(){"use strict";const t="transitionend",e=t=>{let e=t.getAttribute("data-bs-target");if(!e||"#"===e){let i=t.getAttribute("href");if(!i||!i.includes("#")&&!i.startsWith("."))return null;i.includes("#")&&!i.startsWith("#")&&(i=`#${i.split("#")[1]}`),e=i&&"#"!==i?i.trim():null}return e},i=t=>{const i=e(t);return i&&document.querySelector(i)?i:null},n=t=>{const i=e(t);return i?document.querySelector(i):null},s=e=>{e.dispatchEvent(new Event(t))},o=t=>!(!t||"object"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),r=t=>o(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?document.querySelector(t):null,a=(t,e,i)=>{Object.keys(i).forEach((n=>{const s=i[n],r=e[n],a=r&&o(r)?"element":null==(l=r)?`${l}`:{}.toString.call(l).match(/\s([a-z]+)/i)[1].toLowerCase();var l;if(!new RegExp(s).test(a))throw new TypeError(`${t.toUpperCase()}: Option "${n}" provided type "${a}" but expected type "${s}".`)}))},l=t=>!(!o(t)||0===t.getClientRects().length)&&"visible"===getComputedStyle(t).getPropertyValue("visibility"),c=t=>!t||t.nodeType!==Node.ELEMENT_NODE||!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled")),h=t=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?h(t.parentNode):null},d=()=>{},u=t=>{t.offsetHeight},f=()=>{const{jQuery:t}=window;return t&&!document.body.hasAttribute("data-bs-no-jquery")?t:null},p=[],m=()=>"rtl"===document.documentElement.dir,g=t=>{var e;e=()=>{const e=f();if(e){const i=t.NAME,n=e.fn[i];e.fn[i]=t.jQueryInterface,e.fn[i].Constructor=t,e.fn[i].noConflict=()=>(e.fn[i]=n,t.jQueryInterface)}},"loading"===document.readyState?(p.length||document.addEventListener("DOMContentLoaded",(()=>{p.forEach((t=>t()))})),p.push(e)):e()},_=t=>{"function"==typeof t&&t()},b=(e,i,n=!0)=>{if(!n)return void _(e);const o=(t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:i}=window.getComputedStyle(t);const n=Number.parseFloat(e),s=Number.parseFloat(i);return n||s?(e=e.split(",")[0],i=i.split(",")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(i))):0})(i)+5;let r=!1;const a=({target:n})=>{n===i&&(r=!0,i.removeEventListener(t,a),_(e))};i.addEventListener(t,a),setTimeout((()=>{r||s(i)}),o)},v=(t,e,i,n)=>{let s=t.indexOf(e);if(-1===s)return t[!i&&n?t.length-1:0];const o=t.length;return s+=i?1:-1,n&&(s=(s+o)%o),t[Math.max(0,Math.min(s,o-1))]},y=/[^.]*(?=\..*)\.|.*/,w=/\..*/,E=/::\d+$/,A={};let T=1;const O={mouseenter:"mouseover",mouseleave:"mouseout"},C=/^(mouseenter|mouseleave)/i,k=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function L(t,e){return e&&`${e}::${T++}`||t.uidEvent||T++}function x(t){const e=L(t);return t.uidEvent=e,A[e]=A[e]||{},A[e]}function D(t,e,i=null){const n=Object.keys(t);for(let s=0,o=n.length;sfunction(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)};n?n=t(n):i=t(i)}const[o,r,a]=S(e,i,n),l=x(t),c=l[a]||(l[a]={}),h=D(c,r,o?i:null);if(h)return void(h.oneOff=h.oneOff&&s);const d=L(r,e.replace(y,"")),u=o?function(t,e,i){return function n(s){const o=t.querySelectorAll(e);for(let{target:r}=s;r&&r!==this;r=r.parentNode)for(let a=o.length;a--;)if(o[a]===r)return s.delegateTarget=r,n.oneOff&&j.off(t,s.type,e,i),i.apply(r,[s]);return null}}(t,i,n):function(t,e){return function i(n){return n.delegateTarget=t,i.oneOff&&j.off(t,n.type,e),e.apply(t,[n])}}(t,i);u.delegationSelector=o?i:null,u.originalHandler=r,u.oneOff=s,u.uidEvent=d,c[d]=u,t.addEventListener(a,u,o)}function I(t,e,i,n,s){const o=D(e[i],n,s);o&&(t.removeEventListener(i,o,Boolean(s)),delete e[i][o.uidEvent])}function P(t){return t=t.replace(w,""),O[t]||t}const j={on(t,e,i,n){N(t,e,i,n,!1)},one(t,e,i,n){N(t,e,i,n,!0)},off(t,e,i,n){if("string"!=typeof e||!t)return;const[s,o,r]=S(e,i,n),a=r!==e,l=x(t),c=e.startsWith(".");if(void 0!==o){if(!l||!l[r])return;return void I(t,l,r,o,s?i:null)}c&&Object.keys(l).forEach((i=>{!function(t,e,i,n){const s=e[i]||{};Object.keys(s).forEach((o=>{if(o.includes(n)){const n=s[o];I(t,e,i,n.originalHandler,n.delegationSelector)}}))}(t,l,i,e.slice(1))}));const h=l[r]||{};Object.keys(h).forEach((i=>{const n=i.replace(E,"");if(!a||e.includes(n)){const e=h[i];I(t,l,r,e.originalHandler,e.delegationSelector)}}))},trigger(t,e,i){if("string"!=typeof e||!t)return null;const n=f(),s=P(e),o=e!==s,r=k.has(s);let a,l=!0,c=!0,h=!1,d=null;return o&&n&&(a=n.Event(e,i),n(t).trigger(a),l=!a.isPropagationStopped(),c=!a.isImmediatePropagationStopped(),h=a.isDefaultPrevented()),r?(d=document.createEvent("HTMLEvents"),d.initEvent(s,l,!0)):d=new CustomEvent(e,{bubbles:l,cancelable:!0}),void 0!==i&&Object.keys(i).forEach((t=>{Object.defineProperty(d,t,{get:()=>i[t]})})),h&&d.preventDefault(),c&&t.dispatchEvent(d),d.defaultPrevented&&void 0!==a&&a.preventDefault(),d}},M=new Map,H={set(t,e,i){M.has(t)||M.set(t,new Map);const n=M.get(t);n.has(e)||0===n.size?n.set(e,i):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(n.keys())[0]}.`)},get:(t,e)=>M.has(t)&&M.get(t).get(e)||null,remove(t,e){if(!M.has(t))return;const i=M.get(t);i.delete(e),0===i.size&&M.delete(t)}};class B{constructor(t){(t=r(t))&&(this._element=t,H.set(this._element,this.constructor.DATA_KEY,this))}dispose(){H.remove(this._element,this.constructor.DATA_KEY),j.off(this._element,this.constructor.EVENT_KEY),Object.getOwnPropertyNames(this).forEach((t=>{this[t]=null}))}_queueCallback(t,e,i=!0){b(t,e,i)}static getInstance(t){return H.get(r(t),this.DATA_KEY)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,"object"==typeof e?e:null)}static get VERSION(){return"5.1.3"}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}}const R=(t,e="hide")=>{const i=`click.dismiss${t.EVENT_KEY}`,s=t.NAME;j.on(document,i,`[data-bs-dismiss="${s}"]`,(function(i){if(["A","AREA"].includes(this.tagName)&&i.preventDefault(),c(this))return;const o=n(this)||this.closest(`.${s}`);t.getOrCreateInstance(o)[e]()}))};class W extends B{static get NAME(){return"alert"}close(){if(j.trigger(this._element,"close.bs.alert").defaultPrevented)return;this._element.classList.remove("show");const t=this._element.classList.contains("fade");this._queueCallback((()=>this._destroyElement()),this._element,t)}_destroyElement(){this._element.remove(),j.trigger(this._element,"closed.bs.alert"),this.dispose()}static jQueryInterface(t){return this.each((function(){const e=W.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}R(W,"close"),g(W);const $='[data-bs-toggle="button"]';class z extends B{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(t){return this.each((function(){const e=z.getOrCreateInstance(this);"toggle"===t&&e[t]()}))}}function q(t){return"true"===t||"false"!==t&&(t===Number(t).toString()?Number(t):""===t||"null"===t?null:t)}function F(t){return t.replace(/[A-Z]/g,(t=>`-${t.toLowerCase()}`))}j.on(document,"click.bs.button.data-api",$,(t=>{t.preventDefault();const e=t.target.closest($);z.getOrCreateInstance(e).toggle()})),g(z);const U={setDataAttribute(t,e,i){t.setAttribute(`data-bs-${F(e)}`,i)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${F(e)}`)},getDataAttributes(t){if(!t)return{};const e={};return Object.keys(t.dataset).filter((t=>t.startsWith("bs"))).forEach((i=>{let n=i.replace(/^bs/,"");n=n.charAt(0).toLowerCase()+n.slice(1,n.length),e[n]=q(t.dataset[i])})),e},getDataAttribute:(t,e)=>q(t.getAttribute(`data-bs-${F(e)}`)),offset(t){const e=t.getBoundingClientRect();return{top:e.top+window.pageYOffset,left:e.left+window.pageXOffset}},position:t=>({top:t.offsetTop,left:t.offsetLeft})},V={find:(t,e=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(e,t)),findOne:(t,e=document.documentElement)=>Element.prototype.querySelector.call(e,t),children:(t,e)=>[].concat(...t.children).filter((t=>t.matches(e))),parents(t,e){const i=[];let n=t.parentNode;for(;n&&n.nodeType===Node.ELEMENT_NODE&&3!==n.nodeType;)n.matches(e)&&i.push(n),n=n.parentNode;return i},prev(t,e){let i=t.previousElementSibling;for(;i;){if(i.matches(e))return[i];i=i.previousElementSibling}return[]},next(t,e){let i=t.nextElementSibling;for(;i;){if(i.matches(e))return[i];i=i.nextElementSibling}return[]},focusableChildren(t){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((t=>`${t}:not([tabindex^="-"])`)).join(", ");return this.find(e,t).filter((t=>!c(t)&&l(t)))}},K="carousel",X={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0,touch:!0},Y={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean",touch:"boolean"},Q="next",G="prev",Z="left",J="right",tt={ArrowLeft:J,ArrowRight:Z},et="slid.bs.carousel",it="active",nt=".active.carousel-item";class st extends B{constructor(t,e){super(t),this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this.touchStartX=0,this.touchDeltaX=0,this._config=this._getConfig(e),this._indicatorsElement=V.findOne(".carousel-indicators",this._element),this._touchSupported="ontouchstart"in document.documentElement||navigator.maxTouchPoints>0,this._pointerEvent=Boolean(window.PointerEvent),this._addEventListeners()}static get Default(){return X}static get NAME(){return K}next(){this._slide(Q)}nextWhenVisible(){!document.hidden&&l(this._element)&&this.next()}prev(){this._slide(G)}pause(t){t||(this._isPaused=!0),V.findOne(".carousel-item-next, .carousel-item-prev",this._element)&&(s(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null}cycle(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config&&this._config.interval&&!this._isPaused&&(this._updateInterval(),this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))}to(t){this._activeElement=V.findOne(nt,this._element);const e=this._getItemIndex(this._activeElement);if(t>this._items.length-1||t<0)return;if(this._isSliding)return void j.one(this._element,et,(()=>this.to(t)));if(e===t)return this.pause(),void this.cycle();const i=t>e?Q:G;this._slide(i,this._items[t])}_getConfig(t){return t={...X,...U.getDataAttributes(this._element),..."object"==typeof t?t:{}},a(K,t,Y),t}_handleSwipe(){const t=Math.abs(this.touchDeltaX);if(t<=40)return;const e=t/this.touchDeltaX;this.touchDeltaX=0,e&&this._slide(e>0?J:Z)}_addEventListeners(){this._config.keyboard&&j.on(this._element,"keydown.bs.carousel",(t=>this._keydown(t))),"hover"===this._config.pause&&(j.on(this._element,"mouseenter.bs.carousel",(t=>this.pause(t))),j.on(this._element,"mouseleave.bs.carousel",(t=>this.cycle(t)))),this._config.touch&&this._touchSupported&&this._addTouchEventListeners()}_addTouchEventListeners(){const t=t=>this._pointerEvent&&("pen"===t.pointerType||"touch"===t.pointerType),e=e=>{t(e)?this.touchStartX=e.clientX:this._pointerEvent||(this.touchStartX=e.touches[0].clientX)},i=t=>{this.touchDeltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-this.touchStartX},n=e=>{t(e)&&(this.touchDeltaX=e.clientX-this.touchStartX),this._handleSwipe(),"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout((t=>this.cycle(t)),500+this._config.interval))};V.find(".carousel-item img",this._element).forEach((t=>{j.on(t,"dragstart.bs.carousel",(t=>t.preventDefault()))})),this._pointerEvent?(j.on(this._element,"pointerdown.bs.carousel",(t=>e(t))),j.on(this._element,"pointerup.bs.carousel",(t=>n(t))),this._element.classList.add("pointer-event")):(j.on(this._element,"touchstart.bs.carousel",(t=>e(t))),j.on(this._element,"touchmove.bs.carousel",(t=>i(t))),j.on(this._element,"touchend.bs.carousel",(t=>n(t))))}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const e=tt[t.key];e&&(t.preventDefault(),this._slide(e))}_getItemIndex(t){return this._items=t&&t.parentNode?V.find(".carousel-item",t.parentNode):[],this._items.indexOf(t)}_getItemByOrder(t,e){const i=t===Q;return v(this._items,e,i,this._config.wrap)}_triggerSlideEvent(t,e){const i=this._getItemIndex(t),n=this._getItemIndex(V.findOne(nt,this._element));return j.trigger(this._element,"slide.bs.carousel",{relatedTarget:t,direction:e,from:n,to:i})}_setActiveIndicatorElement(t){if(this._indicatorsElement){const e=V.findOne(".active",this._indicatorsElement);e.classList.remove(it),e.removeAttribute("aria-current");const i=V.find("[data-bs-target]",this._indicatorsElement);for(let e=0;e{j.trigger(this._element,et,{relatedTarget:o,direction:d,from:s,to:r})};if(this._element.classList.contains("slide")){o.classList.add(h),u(o),n.classList.add(c),o.classList.add(c);const t=()=>{o.classList.remove(c,h),o.classList.add(it),n.classList.remove(it,h,c),this._isSliding=!1,setTimeout(f,0)};this._queueCallback(t,n,!0)}else n.classList.remove(it),o.classList.add(it),this._isSliding=!1,f();a&&this.cycle()}_directionToOrder(t){return[J,Z].includes(t)?m()?t===Z?G:Q:t===Z?Q:G:t}_orderToDirection(t){return[Q,G].includes(t)?m()?t===G?Z:J:t===G?J:Z:t}static carouselInterface(t,e){const i=st.getOrCreateInstance(t,e);let{_config:n}=i;"object"==typeof e&&(n={...n,...e});const s="string"==typeof e?e:n.slide;if("number"==typeof e)i.to(e);else if("string"==typeof s){if(void 0===i[s])throw new TypeError(`No method named "${s}"`);i[s]()}else n.interval&&n.ride&&(i.pause(),i.cycle())}static jQueryInterface(t){return this.each((function(){st.carouselInterface(this,t)}))}static dataApiClickHandler(t){const e=n(this);if(!e||!e.classList.contains("carousel"))return;const i={...U.getDataAttributes(e),...U.getDataAttributes(this)},s=this.getAttribute("data-bs-slide-to");s&&(i.interval=!1),st.carouselInterface(e,i),s&&st.getInstance(e).to(s),t.preventDefault()}}j.on(document,"click.bs.carousel.data-api","[data-bs-slide], [data-bs-slide-to]",st.dataApiClickHandler),j.on(window,"load.bs.carousel.data-api",(()=>{const t=V.find('[data-bs-ride="carousel"]');for(let e=0,i=t.length;et===this._element));null!==s&&o.length&&(this._selector=s,this._triggerArray.push(e))}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return rt}static get NAME(){return ot}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t,e=[];if(this._config.parent){const t=V.find(ut,this._config.parent);e=V.find(".collapse.show, .collapse.collapsing",this._config.parent).filter((e=>!t.includes(e)))}const i=V.findOne(this._selector);if(e.length){const n=e.find((t=>i!==t));if(t=n?pt.getInstance(n):null,t&&t._isTransitioning)return}if(j.trigger(this._element,"show.bs.collapse").defaultPrevented)return;e.forEach((e=>{i!==e&&pt.getOrCreateInstance(e,{toggle:!1}).hide(),t||H.set(e,"bs.collapse",null)}));const n=this._getDimension();this._element.classList.remove(ct),this._element.classList.add(ht),this._element.style[n]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const s=`scroll${n[0].toUpperCase()+n.slice(1)}`;this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(ht),this._element.classList.add(ct,lt),this._element.style[n]="",j.trigger(this._element,"shown.bs.collapse")}),this._element,!0),this._element.style[n]=`${this._element[s]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(j.trigger(this._element,"hide.bs.collapse").defaultPrevented)return;const t=this._getDimension();this._element.style[t]=`${this._element.getBoundingClientRect()[t]}px`,u(this._element),this._element.classList.add(ht),this._element.classList.remove(ct,lt);const e=this._triggerArray.length;for(let t=0;t{this._isTransitioning=!1,this._element.classList.remove(ht),this._element.classList.add(ct),j.trigger(this._element,"hidden.bs.collapse")}),this._element,!0)}_isShown(t=this._element){return t.classList.contains(lt)}_getConfig(t){return(t={...rt,...U.getDataAttributes(this._element),...t}).toggle=Boolean(t.toggle),t.parent=r(t.parent),a(ot,t,at),t}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const t=V.find(ut,this._config.parent);V.find(ft,this._config.parent).filter((e=>!t.includes(e))).forEach((t=>{const e=n(t);e&&this._addAriaAndCollapsedClass([t],this._isShown(e))}))}_addAriaAndCollapsedClass(t,e){t.length&&t.forEach((t=>{e?t.classList.remove(dt):t.classList.add(dt),t.setAttribute("aria-expanded",e)}))}static jQueryInterface(t){return this.each((function(){const e={};"string"==typeof t&&/show|hide/.test(t)&&(e.toggle=!1);const i=pt.getOrCreateInstance(this,e);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t]()}}))}}j.on(document,"click.bs.collapse.data-api",ft,(function(t){("A"===t.target.tagName||t.delegateTarget&&"A"===t.delegateTarget.tagName)&&t.preventDefault();const e=i(this);V.find(e).forEach((t=>{pt.getOrCreateInstance(t,{toggle:!1}).toggle()}))})),g(pt);var mt="top",gt="bottom",_t="right",bt="left",vt="auto",yt=[mt,gt,_t,bt],wt="start",Et="end",At="clippingParents",Tt="viewport",Ot="popper",Ct="reference",kt=yt.reduce((function(t,e){return t.concat([e+"-"+wt,e+"-"+Et])}),[]),Lt=[].concat(yt,[vt]).reduce((function(t,e){return t.concat([e,e+"-"+wt,e+"-"+Et])}),[]),xt="beforeRead",Dt="read",St="afterRead",Nt="beforeMain",It="main",Pt="afterMain",jt="beforeWrite",Mt="write",Ht="afterWrite",Bt=[xt,Dt,St,Nt,It,Pt,jt,Mt,Ht];function Rt(t){return t?(t.nodeName||"").toLowerCase():null}function Wt(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function $t(t){return t instanceof Wt(t).Element||t instanceof Element}function zt(t){return t instanceof Wt(t).HTMLElement||t instanceof HTMLElement}function qt(t){return"undefined"!=typeof ShadowRoot&&(t instanceof Wt(t).ShadowRoot||t instanceof ShadowRoot)}const Ft={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var i=e.styles[t]||{},n=e.attributes[t]||{},s=e.elements[t];zt(s)&&Rt(s)&&(Object.assign(s.style,i),Object.keys(n).forEach((function(t){var e=n[t];!1===e?s.removeAttribute(t):s.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow),function(){Object.keys(e.elements).forEach((function(t){var n=e.elements[t],s=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:i[t]).reduce((function(t,e){return t[e]="",t}),{});zt(n)&&Rt(n)&&(Object.assign(n.style,o),Object.keys(s).forEach((function(t){n.removeAttribute(t)})))}))}},requires:["computeStyles"]};function Ut(t){return t.split("-")[0]}function Vt(t,e){var i=t.getBoundingClientRect();return{width:i.width/1,height:i.height/1,top:i.top/1,right:i.right/1,bottom:i.bottom/1,left:i.left/1,x:i.left/1,y:i.top/1}}function Kt(t){var e=Vt(t),i=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-i)<=1&&(i=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:i,height:n}}function Xt(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(i&&qt(i)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Yt(t){return Wt(t).getComputedStyle(t)}function Qt(t){return["table","td","th"].indexOf(Rt(t))>=0}function Gt(t){return(($t(t)?t.ownerDocument:t.document)||window.document).documentElement}function Zt(t){return"html"===Rt(t)?t:t.assignedSlot||t.parentNode||(qt(t)?t.host:null)||Gt(t)}function Jt(t){return zt(t)&&"fixed"!==Yt(t).position?t.offsetParent:null}function te(t){for(var e=Wt(t),i=Jt(t);i&&Qt(i)&&"static"===Yt(i).position;)i=Jt(i);return i&&("html"===Rt(i)||"body"===Rt(i)&&"static"===Yt(i).position)?e:i||function(t){var e=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&zt(t)&&"fixed"===Yt(t).position)return null;for(var i=Zt(t);zt(i)&&["html","body"].indexOf(Rt(i))<0;){var n=Yt(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||e&&"filter"===n.willChange||e&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}(t)||e}function ee(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}var ie=Math.max,ne=Math.min,se=Math.round;function oe(t,e,i){return ie(t,ne(e,i))}function re(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function ae(t,e){return e.reduce((function(e,i){return e[i]=t,e}),{})}const le={name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,i=t.state,n=t.name,s=t.options,o=i.elements.arrow,r=i.modifiersData.popperOffsets,a=Ut(i.placement),l=ee(a),c=[bt,_t].indexOf(a)>=0?"height":"width";if(o&&r){var h=function(t,e){return re("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:ae(t,yt))}(s.padding,i),d=Kt(o),u="y"===l?mt:bt,f="y"===l?gt:_t,p=i.rects.reference[c]+i.rects.reference[l]-r[l]-i.rects.popper[c],m=r[l]-i.rects.reference[l],g=te(o),_=g?"y"===l?g.clientHeight||0:g.clientWidth||0:0,b=p/2-m/2,v=h[u],y=_-d[c]-h[f],w=_/2-d[c]/2+b,E=oe(v,w,y),A=l;i.modifiersData[n]=((e={})[A]=E,e.centerOffset=E-w,e)}},effect:function(t){var e=t.state,i=t.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=e.elements.popper.querySelector(n)))&&Xt(e.elements.popper,n)&&(e.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ce(t){return t.split("-")[1]}var he={top:"auto",right:"auto",bottom:"auto",left:"auto"};function de(t){var e,i=t.popper,n=t.popperRect,s=t.placement,o=t.variation,r=t.offsets,a=t.position,l=t.gpuAcceleration,c=t.adaptive,h=t.roundOffsets,d=!0===h?function(t){var e=t.x,i=t.y,n=window.devicePixelRatio||1;return{x:se(se(e*n)/n)||0,y:se(se(i*n)/n)||0}}(r):"function"==typeof h?h(r):r,u=d.x,f=void 0===u?0:u,p=d.y,m=void 0===p?0:p,g=r.hasOwnProperty("x"),_=r.hasOwnProperty("y"),b=bt,v=mt,y=window;if(c){var w=te(i),E="clientHeight",A="clientWidth";w===Wt(i)&&"static"!==Yt(w=Gt(i)).position&&"absolute"===a&&(E="scrollHeight",A="scrollWidth"),w=w,s!==mt&&(s!==bt&&s!==_t||o!==Et)||(v=gt,m-=w[E]-n.height,m*=l?1:-1),s!==bt&&(s!==mt&&s!==gt||o!==Et)||(b=_t,f-=w[A]-n.width,f*=l?1:-1)}var T,O=Object.assign({position:a},c&&he);return l?Object.assign({},O,((T={})[v]=_?"0":"",T[b]=g?"0":"",T.transform=(y.devicePixelRatio||1)<=1?"translate("+f+"px, "+m+"px)":"translate3d("+f+"px, "+m+"px, 0)",T)):Object.assign({},O,((e={})[v]=_?m+"px":"",e[b]=g?f+"px":"",e.transform="",e))}const ue={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,i=t.options,n=i.gpuAcceleration,s=void 0===n||n,o=i.adaptive,r=void 0===o||o,a=i.roundOffsets,l=void 0===a||a,c={placement:Ut(e.placement),variation:ce(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:s};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,de(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:r,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,de(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}};var fe={passive:!0};const pe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,i=t.instance,n=t.options,s=n.scroll,o=void 0===s||s,r=n.resize,a=void 0===r||r,l=Wt(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach((function(t){t.addEventListener("scroll",i.update,fe)})),a&&l.addEventListener("resize",i.update,fe),function(){o&&c.forEach((function(t){t.removeEventListener("scroll",i.update,fe)})),a&&l.removeEventListener("resize",i.update,fe)}},data:{}};var me={left:"right",right:"left",bottom:"top",top:"bottom"};function ge(t){return t.replace(/left|right|bottom|top/g,(function(t){return me[t]}))}var _e={start:"end",end:"start"};function be(t){return t.replace(/start|end/g,(function(t){return _e[t]}))}function ve(t){var e=Wt(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function ye(t){return Vt(Gt(t)).left+ve(t).scrollLeft}function we(t){var e=Yt(t),i=e.overflow,n=e.overflowX,s=e.overflowY;return/auto|scroll|overlay|hidden/.test(i+s+n)}function Ee(t){return["html","body","#document"].indexOf(Rt(t))>=0?t.ownerDocument.body:zt(t)&&we(t)?t:Ee(Zt(t))}function Ae(t,e){var i;void 0===e&&(e=[]);var n=Ee(t),s=n===(null==(i=t.ownerDocument)?void 0:i.body),o=Wt(n),r=s?[o].concat(o.visualViewport||[],we(n)?n:[]):n,a=e.concat(r);return s?a:a.concat(Ae(Zt(r)))}function Te(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Oe(t,e){return e===Tt?Te(function(t){var e=Wt(t),i=Gt(t),n=e.visualViewport,s=i.clientWidth,o=i.clientHeight,r=0,a=0;return n&&(s=n.width,o=n.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(r=n.offsetLeft,a=n.offsetTop)),{width:s,height:o,x:r+ye(t),y:a}}(t)):zt(e)?function(t){var e=Vt(t);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}(e):Te(function(t){var e,i=Gt(t),n=ve(t),s=null==(e=t.ownerDocument)?void 0:e.body,o=ie(i.scrollWidth,i.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),r=ie(i.scrollHeight,i.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),a=-n.scrollLeft+ye(t),l=-n.scrollTop;return"rtl"===Yt(s||i).direction&&(a+=ie(i.clientWidth,s?s.clientWidth:0)-o),{width:o,height:r,x:a,y:l}}(Gt(t)))}function Ce(t){var e,i=t.reference,n=t.element,s=t.placement,o=s?Ut(s):null,r=s?ce(s):null,a=i.x+i.width/2-n.width/2,l=i.y+i.height/2-n.height/2;switch(o){case mt:e={x:a,y:i.y-n.height};break;case gt:e={x:a,y:i.y+i.height};break;case _t:e={x:i.x+i.width,y:l};break;case bt:e={x:i.x-n.width,y:l};break;default:e={x:i.x,y:i.y}}var c=o?ee(o):null;if(null!=c){var h="y"===c?"height":"width";switch(r){case wt:e[c]=e[c]-(i[h]/2-n[h]/2);break;case Et:e[c]=e[c]+(i[h]/2-n[h]/2)}}return e}function ke(t,e){void 0===e&&(e={});var i=e,n=i.placement,s=void 0===n?t.placement:n,o=i.boundary,r=void 0===o?At:o,a=i.rootBoundary,l=void 0===a?Tt:a,c=i.elementContext,h=void 0===c?Ot:c,d=i.altBoundary,u=void 0!==d&&d,f=i.padding,p=void 0===f?0:f,m=re("number"!=typeof p?p:ae(p,yt)),g=h===Ot?Ct:Ot,_=t.rects.popper,b=t.elements[u?g:h],v=function(t,e,i){var n="clippingParents"===e?function(t){var e=Ae(Zt(t)),i=["absolute","fixed"].indexOf(Yt(t).position)>=0&&zt(t)?te(t):t;return $t(i)?e.filter((function(t){return $t(t)&&Xt(t,i)&&"body"!==Rt(t)})):[]}(t):[].concat(e),s=[].concat(n,[i]),o=s[0],r=s.reduce((function(e,i){var n=Oe(t,i);return e.top=ie(n.top,e.top),e.right=ne(n.right,e.right),e.bottom=ne(n.bottom,e.bottom),e.left=ie(n.left,e.left),e}),Oe(t,o));return r.width=r.right-r.left,r.height=r.bottom-r.top,r.x=r.left,r.y=r.top,r}($t(b)?b:b.contextElement||Gt(t.elements.popper),r,l),y=Vt(t.elements.reference),w=Ce({reference:y,element:_,strategy:"absolute",placement:s}),E=Te(Object.assign({},_,w)),A=h===Ot?E:y,T={top:v.top-A.top+m.top,bottom:A.bottom-v.bottom+m.bottom,left:v.left-A.left+m.left,right:A.right-v.right+m.right},O=t.modifiersData.offset;if(h===Ot&&O){var C=O[s];Object.keys(T).forEach((function(t){var e=[_t,gt].indexOf(t)>=0?1:-1,i=[mt,gt].indexOf(t)>=0?"y":"x";T[t]+=C[i]*e}))}return T}function Le(t,e){void 0===e&&(e={});var i=e,n=i.placement,s=i.boundary,o=i.rootBoundary,r=i.padding,a=i.flipVariations,l=i.allowedAutoPlacements,c=void 0===l?Lt:l,h=ce(n),d=h?a?kt:kt.filter((function(t){return ce(t)===h})):yt,u=d.filter((function(t){return c.indexOf(t)>=0}));0===u.length&&(u=d);var f=u.reduce((function(e,i){return e[i]=ke(t,{placement:i,boundary:s,rootBoundary:o,padding:r})[Ut(i)],e}),{});return Object.keys(f).sort((function(t,e){return f[t]-f[e]}))}const xe={name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,n=t.name;if(!e.modifiersData[n]._skip){for(var s=i.mainAxis,o=void 0===s||s,r=i.altAxis,a=void 0===r||r,l=i.fallbackPlacements,c=i.padding,h=i.boundary,d=i.rootBoundary,u=i.altBoundary,f=i.flipVariations,p=void 0===f||f,m=i.allowedAutoPlacements,g=e.options.placement,_=Ut(g),b=l||(_!==g&&p?function(t){if(Ut(t)===vt)return[];var e=ge(t);return[be(t),e,be(e)]}(g):[ge(g)]),v=[g].concat(b).reduce((function(t,i){return t.concat(Ut(i)===vt?Le(e,{placement:i,boundary:h,rootBoundary:d,padding:c,flipVariations:p,allowedAutoPlacements:m}):i)}),[]),y=e.rects.reference,w=e.rects.popper,E=new Map,A=!0,T=v[0],O=0;O=0,D=x?"width":"height",S=ke(e,{placement:C,boundary:h,rootBoundary:d,altBoundary:u,padding:c}),N=x?L?_t:bt:L?gt:mt;y[D]>w[D]&&(N=ge(N));var I=ge(N),P=[];if(o&&P.push(S[k]<=0),a&&P.push(S[N]<=0,S[I]<=0),P.every((function(t){return t}))){T=C,A=!1;break}E.set(C,P)}if(A)for(var j=function(t){var e=v.find((function(e){var i=E.get(e);if(i)return i.slice(0,t).every((function(t){return t}))}));if(e)return T=e,"break"},M=p?3:1;M>0&&"break"!==j(M);M--);e.placement!==T&&(e.modifiersData[n]._skip=!0,e.placement=T,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function De(t,e,i){return void 0===i&&(i={x:0,y:0}),{top:t.top-e.height-i.y,right:t.right-e.width+i.x,bottom:t.bottom-e.height+i.y,left:t.left-e.width-i.x}}function Se(t){return[mt,_t,gt,bt].some((function(e){return t[e]>=0}))}const Ne={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,i=t.name,n=e.rects.reference,s=e.rects.popper,o=e.modifiersData.preventOverflow,r=ke(e,{elementContext:"reference"}),a=ke(e,{altBoundary:!0}),l=De(r,n),c=De(a,s,o),h=Se(l),d=Se(c);e.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:h,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":d})}},Ie={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,i=t.options,n=t.name,s=i.offset,o=void 0===s?[0,0]:s,r=Lt.reduce((function(t,i){return t[i]=function(t,e,i){var n=Ut(t),s=[bt,mt].indexOf(n)>=0?-1:1,o="function"==typeof i?i(Object.assign({},e,{placement:t})):i,r=o[0],a=o[1];return r=r||0,a=(a||0)*s,[bt,_t].indexOf(n)>=0?{x:a,y:r}:{x:r,y:a}}(i,e.rects,o),t}),{}),a=r[e.placement],l=a.x,c=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[n]=r}},Pe={name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,i=t.name;e.modifiersData[i]=Ce({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}},je={name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,n=t.name,s=i.mainAxis,o=void 0===s||s,r=i.altAxis,a=void 0!==r&&r,l=i.boundary,c=i.rootBoundary,h=i.altBoundary,d=i.padding,u=i.tether,f=void 0===u||u,p=i.tetherOffset,m=void 0===p?0:p,g=ke(e,{boundary:l,rootBoundary:c,padding:d,altBoundary:h}),_=Ut(e.placement),b=ce(e.placement),v=!b,y=ee(_),w="x"===y?"y":"x",E=e.modifiersData.popperOffsets,A=e.rects.reference,T=e.rects.popper,O="function"==typeof m?m(Object.assign({},e.rects,{placement:e.placement})):m,C={x:0,y:0};if(E){if(o||a){var k="y"===y?mt:bt,L="y"===y?gt:_t,x="y"===y?"height":"width",D=E[y],S=E[y]+g[k],N=E[y]-g[L],I=f?-T[x]/2:0,P=b===wt?A[x]:T[x],j=b===wt?-T[x]:-A[x],M=e.elements.arrow,H=f&&M?Kt(M):{width:0,height:0},B=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},R=B[k],W=B[L],$=oe(0,A[x],H[x]),z=v?A[x]/2-I-$-R-O:P-$-R-O,q=v?-A[x]/2+I+$+W+O:j+$+W+O,F=e.elements.arrow&&te(e.elements.arrow),U=F?"y"===y?F.clientTop||0:F.clientLeft||0:0,V=e.modifiersData.offset?e.modifiersData.offset[e.placement][y]:0,K=E[y]+z-V-U,X=E[y]+q-V;if(o){var Y=oe(f?ne(S,K):S,D,f?ie(N,X):N);E[y]=Y,C[y]=Y-D}if(a){var Q="x"===y?mt:bt,G="x"===y?gt:_t,Z=E[w],J=Z+g[Q],tt=Z-g[G],et=oe(f?ne(J,K):J,Z,f?ie(tt,X):tt);E[w]=et,C[w]=et-Z}}e.modifiersData[n]=C}},requiresIfExists:["offset"]};function Me(t,e,i){void 0===i&&(i=!1);var n=zt(e);zt(e)&&function(t){var e=t.getBoundingClientRect();e.width,t.offsetWidth,e.height,t.offsetHeight}(e);var s,o,r=Gt(e),a=Vt(t),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(n||!n&&!i)&&(("body"!==Rt(e)||we(r))&&(l=(s=e)!==Wt(s)&&zt(s)?{scrollLeft:(o=s).scrollLeft,scrollTop:o.scrollTop}:ve(s)),zt(e)?((c=Vt(e)).x+=e.clientLeft,c.y+=e.clientTop):r&&(c.x=ye(r))),{x:a.left+l.scrollLeft-c.x,y:a.top+l.scrollTop-c.y,width:a.width,height:a.height}}function He(t){var e=new Map,i=new Set,n=[];function s(t){i.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!i.has(t)){var n=e.get(t);n&&s(n)}})),n.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){i.has(t.name)||s(t)})),n}var Be={placement:"bottom",modifiers:[],strategy:"absolute"};function Re(){for(var t=arguments.length,e=new Array(t),i=0;ij.on(t,"mouseover",d))),this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(Je),this._element.classList.add(Je),j.trigger(this._element,"shown.bs.dropdown",t)}hide(){if(c(this._element)||!this._isShown(this._menu))return;const t={relatedTarget:this._element};this._completeHide(t)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(t){j.trigger(this._element,"hide.bs.dropdown",t).defaultPrevented||("ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach((t=>j.off(t,"mouseover",d))),this._popper&&this._popper.destroy(),this._menu.classList.remove(Je),this._element.classList.remove(Je),this._element.setAttribute("aria-expanded","false"),U.removeDataAttribute(this._menu,"popper"),j.trigger(this._element,"hidden.bs.dropdown",t))}_getConfig(t){if(t={...this.constructor.Default,...U.getDataAttributes(this._element),...t},a(Ue,t,this.constructor.DefaultType),"object"==typeof t.reference&&!o(t.reference)&&"function"!=typeof t.reference.getBoundingClientRect)throw new TypeError(`${Ue.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return t}_createPopper(t){if(void 0===Fe)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let e=this._element;"parent"===this._config.reference?e=t:o(this._config.reference)?e=r(this._config.reference):"object"==typeof this._config.reference&&(e=this._config.reference);const i=this._getPopperConfig(),n=i.modifiers.find((t=>"applyStyles"===t.name&&!1===t.enabled));this._popper=qe(e,this._menu,i),n&&U.setDataAttribute(this._menu,"popper","static")}_isShown(t=this._element){return t.classList.contains(Je)}_getMenuElement(){return V.next(this._element,ei)[0]}_getPlacement(){const t=this._element.parentNode;if(t.classList.contains("dropend"))return ri;if(t.classList.contains("dropstart"))return ai;const e="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return t.classList.contains("dropup")?e?ni:ii:e?oi:si}_detectNavbar(){return null!==this._element.closest(".navbar")}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_getPopperConfig(){const t={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return"static"===this._config.display&&(t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,..."function"==typeof this._config.popperConfig?this._config.popperConfig(t):this._config.popperConfig}}_selectMenuItem({key:t,target:e}){const i=V.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter(l);i.length&&v(i,e,t===Ye,!i.includes(e)).focus()}static jQueryInterface(t){return this.each((function(){const e=hi.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}static clearMenus(t){if(t&&(2===t.button||"keyup"===t.type&&"Tab"!==t.key))return;const e=V.find(ti);for(let i=0,n=e.length;ie+t)),this._setElementAttributes(di,"paddingRight",(e=>e+t)),this._setElementAttributes(ui,"marginRight",(e=>e-t))}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,e,i){const n=this.getWidth();this._applyManipulationCallback(t,(t=>{if(t!==this._element&&window.innerWidth>t.clientWidth+n)return;this._saveInitialAttribute(t,e);const s=window.getComputedStyle(t)[e];t.style[e]=`${i(Number.parseFloat(s))}px`}))}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,"paddingRight"),this._resetElementAttributes(di,"paddingRight"),this._resetElementAttributes(ui,"marginRight")}_saveInitialAttribute(t,e){const i=t.style[e];i&&U.setDataAttribute(t,e,i)}_resetElementAttributes(t,e){this._applyManipulationCallback(t,(t=>{const i=U.getDataAttribute(t,e);void 0===i?t.style.removeProperty(e):(U.removeDataAttribute(t,e),t.style[e]=i)}))}_applyManipulationCallback(t,e){o(t)?e(t):V.find(t,this._element).forEach(e)}isOverflowing(){return this.getWidth()>0}}const pi={className:"modal-backdrop",isVisible:!0,isAnimated:!1,rootElement:"body",clickCallback:null},mi={className:"string",isVisible:"boolean",isAnimated:"boolean",rootElement:"(element|string)",clickCallback:"(function|null)"},gi="show",_i="mousedown.bs.backdrop";class bi{constructor(t){this._config=this._getConfig(t),this._isAppended=!1,this._element=null}show(t){this._config.isVisible?(this._append(),this._config.isAnimated&&u(this._getElement()),this._getElement().classList.add(gi),this._emulateAnimation((()=>{_(t)}))):_(t)}hide(t){this._config.isVisible?(this._getElement().classList.remove(gi),this._emulateAnimation((()=>{this.dispose(),_(t)}))):_(t)}_getElement(){if(!this._element){const t=document.createElement("div");t.className=this._config.className,this._config.isAnimated&&t.classList.add("fade"),this._element=t}return this._element}_getConfig(t){return(t={...pi,..."object"==typeof t?t:{}}).rootElement=r(t.rootElement),a("backdrop",t,mi),t}_append(){this._isAppended||(this._config.rootElement.append(this._getElement()),j.on(this._getElement(),_i,(()=>{_(this._config.clickCallback)})),this._isAppended=!0)}dispose(){this._isAppended&&(j.off(this._element,_i),this._element.remove(),this._isAppended=!1)}_emulateAnimation(t){b(t,this._getElement(),this._config.isAnimated)}}const vi={trapElement:null,autofocus:!0},yi={trapElement:"element",autofocus:"boolean"},wi=".bs.focustrap",Ei="backward";class Ai{constructor(t){this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}activate(){const{trapElement:t,autofocus:e}=this._config;this._isActive||(e&&t.focus(),j.off(document,wi),j.on(document,"focusin.bs.focustrap",(t=>this._handleFocusin(t))),j.on(document,"keydown.tab.bs.focustrap",(t=>this._handleKeydown(t))),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,j.off(document,wi))}_handleFocusin(t){const{target:e}=t,{trapElement:i}=this._config;if(e===document||e===i||i.contains(e))return;const n=V.focusableChildren(i);0===n.length?i.focus():this._lastTabNavDirection===Ei?n[n.length-1].focus():n[0].focus()}_handleKeydown(t){"Tab"===t.key&&(this._lastTabNavDirection=t.shiftKey?Ei:"forward")}_getConfig(t){return t={...vi,..."object"==typeof t?t:{}},a("focustrap",t,yi),t}}const Ti="modal",Oi="Escape",Ci={backdrop:!0,keyboard:!0,focus:!0},ki={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean"},Li="hidden.bs.modal",xi="show.bs.modal",Di="resize.bs.modal",Si="click.dismiss.bs.modal",Ni="keydown.dismiss.bs.modal",Ii="mousedown.dismiss.bs.modal",Pi="modal-open",ji="show",Mi="modal-static";class Hi extends B{constructor(t,e){super(t),this._config=this._getConfig(e),this._dialog=V.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._ignoreBackdropClick=!1,this._isTransitioning=!1,this._scrollBar=new fi}static get Default(){return Ci}static get NAME(){return Ti}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||this._isTransitioning||j.trigger(this._element,xi,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isAnimated()&&(this._isTransitioning=!0),this._scrollBar.hide(),document.body.classList.add(Pi),this._adjustDialog(),this._setEscapeEvent(),this._setResizeEvent(),j.on(this._dialog,Ii,(()=>{j.one(this._element,"mouseup.dismiss.bs.modal",(t=>{t.target===this._element&&(this._ignoreBackdropClick=!0)}))})),this._showBackdrop((()=>this._showElement(t))))}hide(){if(!this._isShown||this._isTransitioning)return;if(j.trigger(this._element,"hide.bs.modal").defaultPrevented)return;this._isShown=!1;const t=this._isAnimated();t&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),this._focustrap.deactivate(),this._element.classList.remove(ji),j.off(this._element,Si),j.off(this._dialog,Ii),this._queueCallback((()=>this._hideModal()),this._element,t)}dispose(){[window,this._dialog].forEach((t=>j.off(t,".bs.modal"))),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new bi({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new Ai({trapElement:this._element})}_getConfig(t){return t={...Ci,...U.getDataAttributes(this._element),..."object"==typeof t?t:{}},a(Ti,t,ki),t}_showElement(t){const e=this._isAnimated(),i=V.findOne(".modal-body",this._dialog);this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0,i&&(i.scrollTop=0),e&&u(this._element),this._element.classList.add(ji),this._queueCallback((()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,j.trigger(this._element,"shown.bs.modal",{relatedTarget:t})}),this._dialog,e)}_setEscapeEvent(){this._isShown?j.on(this._element,Ni,(t=>{this._config.keyboard&&t.key===Oi?(t.preventDefault(),this.hide()):this._config.keyboard||t.key!==Oi||this._triggerBackdropTransition()})):j.off(this._element,Ni)}_setResizeEvent(){this._isShown?j.on(window,Di,(()=>this._adjustDialog())):j.off(window,Di)}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide((()=>{document.body.classList.remove(Pi),this._resetAdjustments(),this._scrollBar.reset(),j.trigger(this._element,Li)}))}_showBackdrop(t){j.on(this._element,Si,(t=>{this._ignoreBackdropClick?this._ignoreBackdropClick=!1:t.target===t.currentTarget&&(!0===this._config.backdrop?this.hide():"static"===this._config.backdrop&&this._triggerBackdropTransition())})),this._backdrop.show(t)}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(j.trigger(this._element,"hidePrevented.bs.modal").defaultPrevented)return;const{classList:t,scrollHeight:e,style:i}=this._element,n=e>document.documentElement.clientHeight;!n&&"hidden"===i.overflowY||t.contains(Mi)||(n||(i.overflowY="hidden"),t.add(Mi),this._queueCallback((()=>{t.remove(Mi),n||this._queueCallback((()=>{i.overflowY=""}),this._dialog)}),this._dialog),this._element.focus())}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._scrollBar.getWidth(),i=e>0;(!i&&t&&!m()||i&&!t&&m())&&(this._element.style.paddingLeft=`${e}px`),(i&&!t&&!m()||!i&&t&&m())&&(this._element.style.paddingRight=`${e}px`)}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(t,e){return this.each((function(){const i=Hi.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t](e)}}))}}j.on(document,"click.bs.modal.data-api",'[data-bs-toggle="modal"]',(function(t){const e=n(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),j.one(e,xi,(t=>{t.defaultPrevented||j.one(e,Li,(()=>{l(this)&&this.focus()}))}));const i=V.findOne(".modal.show");i&&Hi.getInstance(i).hide(),Hi.getOrCreateInstance(e).toggle(this)})),R(Hi),g(Hi);const Bi="offcanvas",Ri={backdrop:!0,keyboard:!0,scroll:!1},Wi={backdrop:"boolean",keyboard:"boolean",scroll:"boolean"},$i="show",zi=".offcanvas.show",qi="hidden.bs.offcanvas";class Fi extends B{constructor(t,e){super(t),this._config=this._getConfig(e),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get NAME(){return Bi}static get Default(){return Ri}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||j.trigger(this._element,"show.bs.offcanvas",{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._element.style.visibility="visible",this._backdrop.show(),this._config.scroll||(new fi).hide(),this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add($i),this._queueCallback((()=>{this._config.scroll||this._focustrap.activate(),j.trigger(this._element,"shown.bs.offcanvas",{relatedTarget:t})}),this._element,!0))}hide(){this._isShown&&(j.trigger(this._element,"hide.bs.offcanvas").defaultPrevented||(this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.remove($i),this._backdrop.hide(),this._queueCallback((()=>{this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._element.style.visibility="hidden",this._config.scroll||(new fi).reset(),j.trigger(this._element,qi)}),this._element,!0)))}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_getConfig(t){return t={...Ri,...U.getDataAttributes(this._element),..."object"==typeof t?t:{}},a(Bi,t,Wi),t}_initializeBackDrop(){return new bi({className:"offcanvas-backdrop",isVisible:this._config.backdrop,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:()=>this.hide()})}_initializeFocusTrap(){return new Ai({trapElement:this._element})}_addEventListeners(){j.on(this._element,"keydown.dismiss.bs.offcanvas",(t=>{this._config.keyboard&&"Escape"===t.key&&this.hide()}))}static jQueryInterface(t){return this.each((function(){const e=Fi.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}j.on(document,"click.bs.offcanvas.data-api",'[data-bs-toggle="offcanvas"]',(function(t){const e=n(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),c(this))return;j.one(e,qi,(()=>{l(this)&&this.focus()}));const i=V.findOne(zi);i&&i!==e&&Fi.getInstance(i).hide(),Fi.getOrCreateInstance(e).toggle(this)})),j.on(window,"load.bs.offcanvas.data-api",(()=>V.find(zi).forEach((t=>Fi.getOrCreateInstance(t).show())))),R(Fi),g(Fi);const Ui=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Vi=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i,Ki=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i,Xi=(t,e)=>{const i=t.nodeName.toLowerCase();if(e.includes(i))return!Ui.has(i)||Boolean(Vi.test(t.nodeValue)||Ki.test(t.nodeValue));const n=e.filter((t=>t instanceof RegExp));for(let t=0,e=n.length;t{Xi(t,r)||i.removeAttribute(t.nodeName)}))}return n.body.innerHTML}const Qi="tooltip",Gi=new Set(["sanitize","allowList","sanitizeFn"]),Zi={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(array|string|function)",container:"(string|element|boolean)",fallbackPlacements:"array",boundary:"(string|element)",customClass:"(string|function)",sanitize:"boolean",sanitizeFn:"(null|function)",allowList:"object",popperConfig:"(null|object|function)"},Ji={AUTO:"auto",TOP:"top",RIGHT:m()?"left":"right",BOTTOM:"bottom",LEFT:m()?"right":"left"},tn={animation:!0,template:'',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:[0,0],container:!1,fallbackPlacements:["top","right","bottom","left"],boundary:"clippingParents",customClass:"",sanitize:!0,sanitizeFn:null,allowList:{"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},popperConfig:null},en={HIDE:"hide.bs.tooltip",HIDDEN:"hidden.bs.tooltip",SHOW:"show.bs.tooltip",SHOWN:"shown.bs.tooltip",INSERTED:"inserted.bs.tooltip",CLICK:"click.bs.tooltip",FOCUSIN:"focusin.bs.tooltip",FOCUSOUT:"focusout.bs.tooltip",MOUSEENTER:"mouseenter.bs.tooltip",MOUSELEAVE:"mouseleave.bs.tooltip"},nn="fade",sn="show",on="show",rn="out",an=".tooltip-inner",ln=".modal",cn="hide.bs.modal",hn="hover",dn="focus";class un extends B{constructor(t,e){if(void 0===Fe)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(t),this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this._config=this._getConfig(e),this.tip=null,this._setListeners()}static get Default(){return tn}static get NAME(){return Qi}static get Event(){return en}static get DefaultType(){return Zi}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(t){if(this._isEnabled)if(t){const e=this._initializeOnDelegatedTarget(t);e._activeTrigger.click=!e._activeTrigger.click,e._isWithActiveTrigger()?e._enter(null,e):e._leave(null,e)}else{if(this.getTipElement().classList.contains(sn))return void this._leave(null,this);this._enter(null,this)}}dispose(){clearTimeout(this._timeout),j.off(this._element.closest(ln),cn,this._hideModalHandler),this.tip&&this.tip.remove(),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this.isWithContent()||!this._isEnabled)return;const t=j.trigger(this._element,this.constructor.Event.SHOW),e=h(this._element),i=null===e?this._element.ownerDocument.documentElement.contains(this._element):e.contains(this._element);if(t.defaultPrevented||!i)return;"tooltip"===this.constructor.NAME&&this.tip&&this.getTitle()!==this.tip.querySelector(an).innerHTML&&(this._disposePopper(),this.tip.remove(),this.tip=null);const n=this.getTipElement(),s=(t=>{do{t+=Math.floor(1e6*Math.random())}while(document.getElementById(t));return t})(this.constructor.NAME);n.setAttribute("id",s),this._element.setAttribute("aria-describedby",s),this._config.animation&&n.classList.add(nn);const o="function"==typeof this._config.placement?this._config.placement.call(this,n,this._element):this._config.placement,r=this._getAttachment(o);this._addAttachmentClass(r);const{container:a}=this._config;H.set(n,this.constructor.DATA_KEY,this),this._element.ownerDocument.documentElement.contains(this.tip)||(a.append(n),j.trigger(this._element,this.constructor.Event.INSERTED)),this._popper?this._popper.update():this._popper=qe(this._element,n,this._getPopperConfig(r)),n.classList.add(sn);const l=this._resolvePossibleFunction(this._config.customClass);l&&n.classList.add(...l.split(" ")),"ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach((t=>{j.on(t,"mouseover",d)}));const c=this.tip.classList.contains(nn);this._queueCallback((()=>{const t=this._hoverState;this._hoverState=null,j.trigger(this._element,this.constructor.Event.SHOWN),t===rn&&this._leave(null,this)}),this.tip,c)}hide(){if(!this._popper)return;const t=this.getTipElement();if(j.trigger(this._element,this.constructor.Event.HIDE).defaultPrevented)return;t.classList.remove(sn),"ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach((t=>j.off(t,"mouseover",d))),this._activeTrigger.click=!1,this._activeTrigger.focus=!1,this._activeTrigger.hover=!1;const e=this.tip.classList.contains(nn);this._queueCallback((()=>{this._isWithActiveTrigger()||(this._hoverState!==on&&t.remove(),this._cleanTipClass(),this._element.removeAttribute("aria-describedby"),j.trigger(this._element,this.constructor.Event.HIDDEN),this._disposePopper())}),this.tip,e),this._hoverState=""}update(){null!==this._popper&&this._popper.update()}isWithContent(){return Boolean(this.getTitle())}getTipElement(){if(this.tip)return this.tip;const t=document.createElement("div");t.innerHTML=this._config.template;const e=t.children[0];return this.setContent(e),e.classList.remove(nn,sn),this.tip=e,this.tip}setContent(t){this._sanitizeAndSetContent(t,this.getTitle(),an)}_sanitizeAndSetContent(t,e,i){const n=V.findOne(i,t);e||!n?this.setElementContent(n,e):n.remove()}setElementContent(t,e){if(null!==t)return o(e)?(e=r(e),void(this._config.html?e.parentNode!==t&&(t.innerHTML="",t.append(e)):t.textContent=e.textContent)):void(this._config.html?(this._config.sanitize&&(e=Yi(e,this._config.allowList,this._config.sanitizeFn)),t.innerHTML=e):t.textContent=e)}getTitle(){const t=this._element.getAttribute("data-bs-original-title")||this._config.title;return this._resolvePossibleFunction(t)}updateAttachment(t){return"right"===t?"end":"left"===t?"start":t}_initializeOnDelegatedTarget(t,e){return e||this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_resolvePossibleFunction(t){return"function"==typeof t?t.call(this._element):t}_getPopperConfig(t){const e={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"onChange",enabled:!0,phase:"afterWrite",fn:t=>this._handlePopperPlacementChange(t)}],onFirstUpdate:t=>{t.options.placement!==t.placement&&this._handlePopperPlacementChange(t)}};return{...e,..."function"==typeof this._config.popperConfig?this._config.popperConfig(e):this._config.popperConfig}}_addAttachmentClass(t){this.getTipElement().classList.add(`${this._getBasicClassPrefix()}-${this.updateAttachment(t)}`)}_getAttachment(t){return Ji[t.toUpperCase()]}_setListeners(){this._config.trigger.split(" ").forEach((t=>{if("click"===t)j.on(this._element,this.constructor.Event.CLICK,this._config.selector,(t=>this.toggle(t)));else if("manual"!==t){const e=t===hn?this.constructor.Event.MOUSEENTER:this.constructor.Event.FOCUSIN,i=t===hn?this.constructor.Event.MOUSELEAVE:this.constructor.Event.FOCUSOUT;j.on(this._element,e,this._config.selector,(t=>this._enter(t))),j.on(this._element,i,this._config.selector,(t=>this._leave(t)))}})),this._hideModalHandler=()=>{this._element&&this.hide()},j.on(this._element.closest(ln),cn,this._hideModalHandler),this._config.selector?this._config={...this._config,trigger:"manual",selector:""}:this._fixTitle()}_fixTitle(){const t=this._element.getAttribute("title"),e=typeof this._element.getAttribute("data-bs-original-title");(t||"string"!==e)&&(this._element.setAttribute("data-bs-original-title",t||""),!t||this._element.getAttribute("aria-label")||this._element.textContent||this._element.setAttribute("aria-label",t),this._element.setAttribute("title",""))}_enter(t,e){e=this._initializeOnDelegatedTarget(t,e),t&&(e._activeTrigger["focusin"===t.type?dn:hn]=!0),e.getTipElement().classList.contains(sn)||e._hoverState===on?e._hoverState=on:(clearTimeout(e._timeout),e._hoverState=on,e._config.delay&&e._config.delay.show?e._timeout=setTimeout((()=>{e._hoverState===on&&e.show()}),e._config.delay.show):e.show())}_leave(t,e){e=this._initializeOnDelegatedTarget(t,e),t&&(e._activeTrigger["focusout"===t.type?dn:hn]=e._element.contains(t.relatedTarget)),e._isWithActiveTrigger()||(clearTimeout(e._timeout),e._hoverState=rn,e._config.delay&&e._config.delay.hide?e._timeout=setTimeout((()=>{e._hoverState===rn&&e.hide()}),e._config.delay.hide):e.hide())}_isWithActiveTrigger(){for(const t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1}_getConfig(t){const e=U.getDataAttributes(this._element);return Object.keys(e).forEach((t=>{Gi.has(t)&&delete e[t]})),(t={...this.constructor.Default,...e,..."object"==typeof t&&t?t:{}}).container=!1===t.container?document.body:r(t.container),"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),a(Qi,t,this.constructor.DefaultType),t.sanitize&&(t.template=Yi(t.template,t.allowList,t.sanitizeFn)),t}_getDelegateConfig(){const t={};for(const e in this._config)this.constructor.Default[e]!==this._config[e]&&(t[e]=this._config[e]);return t}_cleanTipClass(){const t=this.getTipElement(),e=new RegExp(`(^|\\s)${this._getBasicClassPrefix()}\\S+`,"g"),i=t.getAttribute("class").match(e);null!==i&&i.length>0&&i.map((t=>t.trim())).forEach((e=>t.classList.remove(e)))}_getBasicClassPrefix(){return"bs-tooltip"}_handlePopperPlacementChange(t){const{state:e}=t;e&&(this.tip=e.elements.popper,this._cleanTipClass(),this._addAttachmentClass(this._getAttachment(e.placement)))}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null)}static jQueryInterface(t){return this.each((function(){const e=un.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}g(un);const fn={...un.Default,placement:"right",offset:[0,8],trigger:"click",content:"",template:''},pn={...un.DefaultType,content:"(string|element|function)"},mn={HIDE:"hide.bs.popover",HIDDEN:"hidden.bs.popover",SHOW:"show.bs.popover",SHOWN:"shown.bs.popover",INSERTED:"inserted.bs.popover",CLICK:"click.bs.popover",FOCUSIN:"focusin.bs.popover",FOCUSOUT:"focusout.bs.popover",MOUSEENTER:"mouseenter.bs.popover",MOUSELEAVE:"mouseleave.bs.popover"};class gn extends un{static get Default(){return fn}static get NAME(){return"popover"}static get Event(){return mn}static get DefaultType(){return pn}isWithContent(){return this.getTitle()||this._getContent()}setContent(t){this._sanitizeAndSetContent(t,this.getTitle(),".popover-header"),this._sanitizeAndSetContent(t,this._getContent(),".popover-body")}_getContent(){return this._resolvePossibleFunction(this._config.content)}_getBasicClassPrefix(){return"bs-popover"}static jQueryInterface(t){return this.each((function(){const e=gn.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}g(gn);const _n="scrollspy",bn={offset:10,method:"auto",target:""},vn={offset:"number",method:"string",target:"(string|element)"},yn="active",wn=".nav-link, .list-group-item, .dropdown-item",En="position";class An extends B{constructor(t,e){super(t),this._scrollElement="BODY"===this._element.tagName?window:this._element,this._config=this._getConfig(e),this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,j.on(this._scrollElement,"scroll.bs.scrollspy",(()=>this._process())),this.refresh(),this._process()}static get Default(){return bn}static get NAME(){return _n}refresh(){const t=this._scrollElement===this._scrollElement.window?"offset":En,e="auto"===this._config.method?t:this._config.method,n=e===En?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),V.find(wn,this._config.target).map((t=>{const s=i(t),o=s?V.findOne(s):null;if(o){const t=o.getBoundingClientRect();if(t.width||t.height)return[U[e](o).top+n,s]}return null})).filter((t=>t)).sort(((t,e)=>t[0]-e[0])).forEach((t=>{this._offsets.push(t[0]),this._targets.push(t[1])}))}dispose(){j.off(this._scrollElement,".bs.scrollspy"),super.dispose()}_getConfig(t){return(t={...bn,...U.getDataAttributes(this._element),..."object"==typeof t&&t?t:{}}).target=r(t.target)||document.documentElement,a(_n,t,vn),t}_getScrollTop(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop}_getScrollHeight(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)}_getOffsetHeight(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height}_process(){const t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),i=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=i){const t=this._targets[this._targets.length-1];this._activeTarget!==t&&this._activate(t)}else{if(this._activeTarget&&t0)return this._activeTarget=null,void this._clear();for(let e=this._offsets.length;e--;)this._activeTarget!==this._targets[e]&&t>=this._offsets[e]&&(void 0===this._offsets[e+1]||t`${e}[data-bs-target="${t}"],${e}[href="${t}"]`)),i=V.findOne(e.join(","),this._config.target);i.classList.add(yn),i.classList.contains("dropdown-item")?V.findOne(".dropdown-toggle",i.closest(".dropdown")).classList.add(yn):V.parents(i,".nav, .list-group").forEach((t=>{V.prev(t,".nav-link, .list-group-item").forEach((t=>t.classList.add(yn))),V.prev(t,".nav-item").forEach((t=>{V.children(t,".nav-link").forEach((t=>t.classList.add(yn)))}))})),j.trigger(this._scrollElement,"activate.bs.scrollspy",{relatedTarget:t})}_clear(){V.find(wn,this._config.target).filter((t=>t.classList.contains(yn))).forEach((t=>t.classList.remove(yn)))}static jQueryInterface(t){return this.each((function(){const e=An.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}j.on(window,"load.bs.scrollspy.data-api",(()=>{V.find('[data-bs-spy="scroll"]').forEach((t=>new An(t)))})),g(An);const Tn="active",On="fade",Cn="show",kn=".active",Ln=":scope > li > .active";class xn extends B{static get NAME(){return"tab"}show(){if(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&this._element.classList.contains(Tn))return;let t;const e=n(this._element),i=this._element.closest(".nav, .list-group");if(i){const e="UL"===i.nodeName||"OL"===i.nodeName?Ln:kn;t=V.find(e,i),t=t[t.length-1]}const s=t?j.trigger(t,"hide.bs.tab",{relatedTarget:this._element}):null;if(j.trigger(this._element,"show.bs.tab",{relatedTarget:t}).defaultPrevented||null!==s&&s.defaultPrevented)return;this._activate(this._element,i);const o=()=>{j.trigger(t,"hidden.bs.tab",{relatedTarget:this._element}),j.trigger(this._element,"shown.bs.tab",{relatedTarget:t})};e?this._activate(e,e.parentNode,o):o()}_activate(t,e,i){const n=(!e||"UL"!==e.nodeName&&"OL"!==e.nodeName?V.children(e,kn):V.find(Ln,e))[0],s=i&&n&&n.classList.contains(On),o=()=>this._transitionComplete(t,n,i);n&&s?(n.classList.remove(Cn),this._queueCallback(o,t,!0)):o()}_transitionComplete(t,e,i){if(e){e.classList.remove(Tn);const t=V.findOne(":scope > .dropdown-menu .active",e.parentNode);t&&t.classList.remove(Tn),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!1)}t.classList.add(Tn),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!0),u(t),t.classList.contains(On)&&t.classList.add(Cn);let n=t.parentNode;if(n&&"LI"===n.nodeName&&(n=n.parentNode),n&&n.classList.contains("dropdown-menu")){const e=t.closest(".dropdown");e&&V.find(".dropdown-toggle",e).forEach((t=>t.classList.add(Tn))),t.setAttribute("aria-expanded",!0)}i&&i()}static jQueryInterface(t){return this.each((function(){const e=xn.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}j.on(document,"click.bs.tab.data-api",'[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',(function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),c(this)||xn.getOrCreateInstance(this).show()})),g(xn);const Dn="toast",Sn="hide",Nn="show",In="showing",Pn={animation:"boolean",autohide:"boolean",delay:"number"},jn={animation:!0,autohide:!0,delay:5e3};class Mn extends B{constructor(t,e){super(t),this._config=this._getConfig(e),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get DefaultType(){return Pn}static get Default(){return jn}static get NAME(){return Dn}show(){j.trigger(this._element,"show.bs.toast").defaultPrevented||(this._clearTimeout(),this._config.animation&&this._element.classList.add("fade"),this._element.classList.remove(Sn),u(this._element),this._element.classList.add(Nn),this._element.classList.add(In),this._queueCallback((()=>{this._element.classList.remove(In),j.trigger(this._element,"shown.bs.toast"),this._maybeScheduleHide()}),this._element,this._config.animation))}hide(){this._element.classList.contains(Nn)&&(j.trigger(this._element,"hide.bs.toast").defaultPrevented||(this._element.classList.add(In),this._queueCallback((()=>{this._element.classList.add(Sn),this._element.classList.remove(In),this._element.classList.remove(Nn),j.trigger(this._element,"hidden.bs.toast")}),this._element,this._config.animation)))}dispose(){this._clearTimeout(),this._element.classList.contains(Nn)&&this._element.classList.remove(Nn),super.dispose()}_getConfig(t){return t={...jn,...U.getDataAttributes(this._element),..."object"==typeof t&&t?t:{}},a(Dn,t,this.constructor.DefaultType),t}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout((()=>{this.hide()}),this._config.delay)))}_onInteraction(t,e){switch(t.type){case"mouseover":case"mouseout":this._hasMouseInteraction=e;break;case"focusin":case"focusout":this._hasKeyboardInteraction=e}if(e)return void this._clearTimeout();const i=t.relatedTarget;this._element===i||this._element.contains(i)||this._maybeScheduleHide()}_setListeners(){j.on(this._element,"mouseover.bs.toast",(t=>this._onInteraction(t,!0))),j.on(this._element,"mouseout.bs.toast",(t=>this._onInteraction(t,!1))),j.on(this._element,"focusin.bs.toast",(t=>this._onInteraction(t,!0))),j.on(this._element,"focusout.bs.toast",(t=>this._onInteraction(t,!1)))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(t){return this.each((function(){const e=Mn.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}return R(Mn),g(Mn),{Alert:W,Button:z,Carousel:st,Collapse:pt,Dropdown:hi,Modal:Hi,Offcanvas:Fi,Popover:gn,ScrollSpy:An,Tab:xn,Toast:Mn,Tooltip:un}})); diff --git a/examples/vagrant/static-http/bootstrap.min.css b/examples/vagrant/static-http/bootstrap.min.css new file mode 100644 index 00000000..b4597d49 --- /dev/null +++ b/examples/vagrant/static-http/bootstrap.min.css @@ -0,0 +1,6 @@ +@charset "UTF-8";/*! + * Bootstrap v5.1.3 (https://getbootstrap.com/) + * Copyright 2011-2021 The Bootstrap Authors + * Copyright 2011-2021 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) + */:root{--bs-blue:#0d6efd;--bs-indigo:#6610f2;--bs-purple:#6f42c1;--bs-pink:#d63384;--bs-red:#dc3545;--bs-orange:#fd7e14;--bs-yellow:#ffc107;--bs-green:#198754;--bs-teal:#20c997;--bs-cyan:#0dcaf0;--bs-white:#fff;--bs-gray:#6c757d;--bs-gray-dark:#343a40;--bs-gray-100:#f8f9fa;--bs-gray-200:#e9ecef;--bs-gray-300:#dee2e6;--bs-gray-400:#ced4da;--bs-gray-500:#adb5bd;--bs-gray-600:#6c757d;--bs-gray-700:#495057;--bs-gray-800:#343a40;--bs-gray-900:#212529;--bs-primary:#0d6efd;--bs-secondary:#6c757d;--bs-success:#198754;--bs-info:#0dcaf0;--bs-warning:#ffc107;--bs-danger:#dc3545;--bs-light:#f8f9fa;--bs-dark:#212529;--bs-primary-rgb:13,110,253;--bs-secondary-rgb:108,117,125;--bs-success-rgb:25,135,84;--bs-info-rgb:13,202,240;--bs-warning-rgb:255,193,7;--bs-danger-rgb:220,53,69;--bs-light-rgb:248,249,250;--bs-dark-rgb:33,37,41;--bs-white-rgb:255,255,255;--bs-black-rgb:0,0,0;--bs-body-color-rgb:33,37,41;--bs-body-bg-rgb:255,255,255;--bs-font-sans-serif:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--bs-font-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--bs-gradient:linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));--bs-body-font-family:var(--bs-font-sans-serif);--bs-body-font-size:1rem;--bs-body-font-weight:400;--bs-body-line-height:1.5;--bs-body-color:#212529;--bs-body-bg:#fff}*,::after,::before{box-sizing:border-box}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}body{margin:0;font-family:var(--bs-body-font-family);font-size:var(--bs-body-font-size);font-weight:var(--bs-body-font-weight);line-height:var(--bs-body-line-height);color:var(--bs-body-color);text-align:var(--bs-body-text-align);background-color:var(--bs-body-bg);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}hr{margin:1rem 0;color:inherit;background-color:currentColor;border:0;opacity:.25}hr:not([size]){height:1px}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem;font-weight:500;line-height:1.2}.h1,h1{font-size:calc(1.375rem + 1.5vw)}@media (min-width:1200px){.h1,h1{font-size:2.5rem}}.h2,h2{font-size:calc(1.325rem + .9vw)}@media (min-width:1200px){.h2,h2{font-size:2rem}}.h3,h3{font-size:calc(1.3rem + .6vw)}@media (min-width:1200px){.h3,h3{font-size:1.75rem}}.h4,h4{font-size:calc(1.275rem + .3vw)}@media (min-width:1200px){.h4,h4{font-size:1.5rem}}.h5,h5{font-size:1.25rem}.h6,h6{font-size:1rem}p{margin-top:0;margin-bottom:1rem}abbr[data-bs-original-title],abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}ol,ul{padding-left:2rem}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}.small,small{font-size:.875em}.mark,mark{padding:.2em;background-color:#fcf8e3}sub,sup{position:relative;font-size:.75em;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#0d6efd;text-decoration:underline}a:hover{color:#0a58ca}a:not([href]):not([class]),a:not([href]):not([class]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:var(--bs-font-monospace);font-size:1em;direction:ltr;unicode-bidi:bidi-override}pre{display:block;margin-top:0;margin-bottom:1rem;overflow:auto;font-size:.875em}pre code{font-size:inherit;color:inherit;word-break:normal}code{font-size:.875em;color:#d63384;word-wrap:break-word}a>code{color:inherit}kbd{padding:.2rem .4rem;font-size:.875em;color:#fff;background-color:#212529;border-radius:.2rem}kbd kbd{padding:0;font-size:1em;font-weight:700}figure{margin:0 0 1rem}img,svg{vertical-align:middle}table{caption-side:bottom;border-collapse:collapse}caption{padding-top:.5rem;padding-bottom:.5rem;color:#6c757d;text-align:left}th{text-align:inherit;text-align:-webkit-match-parent}tbody,td,tfoot,th,thead,tr{border-color:inherit;border-style:solid;border-width:0}label{display:inline-block}button{border-radius:0}button:focus:not(:focus-visible){outline:0}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}select:disabled{opacity:1}[list]::-webkit-calendar-picker-indicator{display:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}::-moz-focus-inner{padding:0;border-style:none}textarea{resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{float:left;width:100%;padding:0;margin-bottom:.5rem;font-size:calc(1.275rem + .3vw);line-height:inherit}@media (min-width:1200px){legend{font-size:1.5rem}}legend+*{clear:left}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-fields-wrapper,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-text,::-webkit-datetime-edit-year-field{padding:0}::-webkit-inner-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:textfield}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-color-swatch-wrapper{padding:0}::-webkit-file-upload-button{font:inherit}::file-selector-button{font:inherit}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}iframe{border:0}summary{display:list-item;cursor:pointer}progress{vertical-align:baseline}[hidden]{display:none!important}.lead{font-size:1.25rem;font-weight:300}.display-1{font-size:calc(1.625rem + 4.5vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-1{font-size:5rem}}.display-2{font-size:calc(1.575rem + 3.9vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-2{font-size:4.5rem}}.display-3{font-size:calc(1.525rem + 3.3vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-3{font-size:4rem}}.display-4{font-size:calc(1.475rem + 2.7vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-4{font-size:3.5rem}}.display-5{font-size:calc(1.425rem + 2.1vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-5{font-size:3rem}}.display-6{font-size:calc(1.375rem + 1.5vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-6{font-size:2.5rem}}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;list-style:none}.list-inline-item{display:inline-block}.list-inline-item:not(:last-child){margin-right:.5rem}.initialism{font-size:.875em;text-transform:uppercase}.blockquote{margin-bottom:1rem;font-size:1.25rem}.blockquote>:last-child{margin-bottom:0}.blockquote-footer{margin-top:-1rem;margin-bottom:1rem;font-size:.875em;color:#6c757d}.blockquote-footer::before{content:"— "}.img-fluid{max-width:100%;height:auto}.img-thumbnail{padding:.25rem;background-color:#fff;border:1px solid #dee2e6;border-radius:.25rem;max-width:100%;height:auto}.figure{display:inline-block}.figure-img{margin-bottom:.5rem;line-height:1}.figure-caption{font-size:.875em;color:#6c757d}.container,.container-fluid,.container-lg,.container-md,.container-sm,.container-xl,.container-xxl{width:100%;padding-right:var(--bs-gutter-x,.75rem);padding-left:var(--bs-gutter-x,.75rem);margin-right:auto;margin-left:auto}@media (min-width:576px){.container,.container-sm{max-width:540px}}@media (min-width:768px){.container,.container-md,.container-sm{max-width:720px}}@media (min-width:992px){.container,.container-lg,.container-md,.container-sm{max-width:960px}}@media (min-width:1200px){.container,.container-lg,.container-md,.container-sm,.container-xl{max-width:1140px}}@media (min-width:1400px){.container,.container-lg,.container-md,.container-sm,.container-xl,.container-xxl{max-width:1320px}}.row{--bs-gutter-x:1.5rem;--bs-gutter-y:0;display:flex;flex-wrap:wrap;margin-top:calc(-1 * var(--bs-gutter-y));margin-right:calc(-.5 * var(--bs-gutter-x));margin-left:calc(-.5 * var(--bs-gutter-x))}.row>*{flex-shrink:0;width:100%;max-width:100%;padding-right:calc(var(--bs-gutter-x) * .5);padding-left:calc(var(--bs-gutter-x) * .5);margin-top:var(--bs-gutter-y)}.col{flex:1 0 0%}.row-cols-auto>*{flex:0 0 auto;width:auto}.row-cols-1>*{flex:0 0 auto;width:100%}.row-cols-2>*{flex:0 0 auto;width:50%}.row-cols-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-4>*{flex:0 0 auto;width:25%}.row-cols-5>*{flex:0 0 auto;width:20%}.row-cols-6>*{flex:0 0 auto;width:16.6666666667%}.col-auto{flex:0 0 auto;width:auto}.col-1{flex:0 0 auto;width:8.33333333%}.col-2{flex:0 0 auto;width:16.66666667%}.col-3{flex:0 0 auto;width:25%}.col-4{flex:0 0 auto;width:33.33333333%}.col-5{flex:0 0 auto;width:41.66666667%}.col-6{flex:0 0 auto;width:50%}.col-7{flex:0 0 auto;width:58.33333333%}.col-8{flex:0 0 auto;width:66.66666667%}.col-9{flex:0 0 auto;width:75%}.col-10{flex:0 0 auto;width:83.33333333%}.col-11{flex:0 0 auto;width:91.66666667%}.col-12{flex:0 0 auto;width:100%}.offset-1{margin-left:8.33333333%}.offset-2{margin-left:16.66666667%}.offset-3{margin-left:25%}.offset-4{margin-left:33.33333333%}.offset-5{margin-left:41.66666667%}.offset-6{margin-left:50%}.offset-7{margin-left:58.33333333%}.offset-8{margin-left:66.66666667%}.offset-9{margin-left:75%}.offset-10{margin-left:83.33333333%}.offset-11{margin-left:91.66666667%}.g-0,.gx-0{--bs-gutter-x:0}.g-0,.gy-0{--bs-gutter-y:0}.g-1,.gx-1{--bs-gutter-x:0.25rem}.g-1,.gy-1{--bs-gutter-y:0.25rem}.g-2,.gx-2{--bs-gutter-x:0.5rem}.g-2,.gy-2{--bs-gutter-y:0.5rem}.g-3,.gx-3{--bs-gutter-x:1rem}.g-3,.gy-3{--bs-gutter-y:1rem}.g-4,.gx-4{--bs-gutter-x:1.5rem}.g-4,.gy-4{--bs-gutter-y:1.5rem}.g-5,.gx-5{--bs-gutter-x:3rem}.g-5,.gy-5{--bs-gutter-y:3rem}@media (min-width:576px){.col-sm{flex:1 0 0%}.row-cols-sm-auto>*{flex:0 0 auto;width:auto}.row-cols-sm-1>*{flex:0 0 auto;width:100%}.row-cols-sm-2>*{flex:0 0 auto;width:50%}.row-cols-sm-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-sm-4>*{flex:0 0 auto;width:25%}.row-cols-sm-5>*{flex:0 0 auto;width:20%}.row-cols-sm-6>*{flex:0 0 auto;width:16.6666666667%}.col-sm-auto{flex:0 0 auto;width:auto}.col-sm-1{flex:0 0 auto;width:8.33333333%}.col-sm-2{flex:0 0 auto;width:16.66666667%}.col-sm-3{flex:0 0 auto;width:25%}.col-sm-4{flex:0 0 auto;width:33.33333333%}.col-sm-5{flex:0 0 auto;width:41.66666667%}.col-sm-6{flex:0 0 auto;width:50%}.col-sm-7{flex:0 0 auto;width:58.33333333%}.col-sm-8{flex:0 0 auto;width:66.66666667%}.col-sm-9{flex:0 0 auto;width:75%}.col-sm-10{flex:0 0 auto;width:83.33333333%}.col-sm-11{flex:0 0 auto;width:91.66666667%}.col-sm-12{flex:0 0 auto;width:100%}.offset-sm-0{margin-left:0}.offset-sm-1{margin-left:8.33333333%}.offset-sm-2{margin-left:16.66666667%}.offset-sm-3{margin-left:25%}.offset-sm-4{margin-left:33.33333333%}.offset-sm-5{margin-left:41.66666667%}.offset-sm-6{margin-left:50%}.offset-sm-7{margin-left:58.33333333%}.offset-sm-8{margin-left:66.66666667%}.offset-sm-9{margin-left:75%}.offset-sm-10{margin-left:83.33333333%}.offset-sm-11{margin-left:91.66666667%}.g-sm-0,.gx-sm-0{--bs-gutter-x:0}.g-sm-0,.gy-sm-0{--bs-gutter-y:0}.g-sm-1,.gx-sm-1{--bs-gutter-x:0.25rem}.g-sm-1,.gy-sm-1{--bs-gutter-y:0.25rem}.g-sm-2,.gx-sm-2{--bs-gutter-x:0.5rem}.g-sm-2,.gy-sm-2{--bs-gutter-y:0.5rem}.g-sm-3,.gx-sm-3{--bs-gutter-x:1rem}.g-sm-3,.gy-sm-3{--bs-gutter-y:1rem}.g-sm-4,.gx-sm-4{--bs-gutter-x:1.5rem}.g-sm-4,.gy-sm-4{--bs-gutter-y:1.5rem}.g-sm-5,.gx-sm-5{--bs-gutter-x:3rem}.g-sm-5,.gy-sm-5{--bs-gutter-y:3rem}}@media (min-width:768px){.col-md{flex:1 0 0%}.row-cols-md-auto>*{flex:0 0 auto;width:auto}.row-cols-md-1>*{flex:0 0 auto;width:100%}.row-cols-md-2>*{flex:0 0 auto;width:50%}.row-cols-md-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-md-4>*{flex:0 0 auto;width:25%}.row-cols-md-5>*{flex:0 0 auto;width:20%}.row-cols-md-6>*{flex:0 0 auto;width:16.6666666667%}.col-md-auto{flex:0 0 auto;width:auto}.col-md-1{flex:0 0 auto;width:8.33333333%}.col-md-2{flex:0 0 auto;width:16.66666667%}.col-md-3{flex:0 0 auto;width:25%}.col-md-4{flex:0 0 auto;width:33.33333333%}.col-md-5{flex:0 0 auto;width:41.66666667%}.col-md-6{flex:0 0 auto;width:50%}.col-md-7{flex:0 0 auto;width:58.33333333%}.col-md-8{flex:0 0 auto;width:66.66666667%}.col-md-9{flex:0 0 auto;width:75%}.col-md-10{flex:0 0 auto;width:83.33333333%}.col-md-11{flex:0 0 auto;width:91.66666667%}.col-md-12{flex:0 0 auto;width:100%}.offset-md-0{margin-left:0}.offset-md-1{margin-left:8.33333333%}.offset-md-2{margin-left:16.66666667%}.offset-md-3{margin-left:25%}.offset-md-4{margin-left:33.33333333%}.offset-md-5{margin-left:41.66666667%}.offset-md-6{margin-left:50%}.offset-md-7{margin-left:58.33333333%}.offset-md-8{margin-left:66.66666667%}.offset-md-9{margin-left:75%}.offset-md-10{margin-left:83.33333333%}.offset-md-11{margin-left:91.66666667%}.g-md-0,.gx-md-0{--bs-gutter-x:0}.g-md-0,.gy-md-0{--bs-gutter-y:0}.g-md-1,.gx-md-1{--bs-gutter-x:0.25rem}.g-md-1,.gy-md-1{--bs-gutter-y:0.25rem}.g-md-2,.gx-md-2{--bs-gutter-x:0.5rem}.g-md-2,.gy-md-2{--bs-gutter-y:0.5rem}.g-md-3,.gx-md-3{--bs-gutter-x:1rem}.g-md-3,.gy-md-3{--bs-gutter-y:1rem}.g-md-4,.gx-md-4{--bs-gutter-x:1.5rem}.g-md-4,.gy-md-4{--bs-gutter-y:1.5rem}.g-md-5,.gx-md-5{--bs-gutter-x:3rem}.g-md-5,.gy-md-5{--bs-gutter-y:3rem}}@media (min-width:992px){.col-lg{flex:1 0 0%}.row-cols-lg-auto>*{flex:0 0 auto;width:auto}.row-cols-lg-1>*{flex:0 0 auto;width:100%}.row-cols-lg-2>*{flex:0 0 auto;width:50%}.row-cols-lg-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-lg-4>*{flex:0 0 auto;width:25%}.row-cols-lg-5>*{flex:0 0 auto;width:20%}.row-cols-lg-6>*{flex:0 0 auto;width:16.6666666667%}.col-lg-auto{flex:0 0 auto;width:auto}.col-lg-1{flex:0 0 auto;width:8.33333333%}.col-lg-2{flex:0 0 auto;width:16.66666667%}.col-lg-3{flex:0 0 auto;width:25%}.col-lg-4{flex:0 0 auto;width:33.33333333%}.col-lg-5{flex:0 0 auto;width:41.66666667%}.col-lg-6{flex:0 0 auto;width:50%}.col-lg-7{flex:0 0 auto;width:58.33333333%}.col-lg-8{flex:0 0 auto;width:66.66666667%}.col-lg-9{flex:0 0 auto;width:75%}.col-lg-10{flex:0 0 auto;width:83.33333333%}.col-lg-11{flex:0 0 auto;width:91.66666667%}.col-lg-12{flex:0 0 auto;width:100%}.offset-lg-0{margin-left:0}.offset-lg-1{margin-left:8.33333333%}.offset-lg-2{margin-left:16.66666667%}.offset-lg-3{margin-left:25%}.offset-lg-4{margin-left:33.33333333%}.offset-lg-5{margin-left:41.66666667%}.offset-lg-6{margin-left:50%}.offset-lg-7{margin-left:58.33333333%}.offset-lg-8{margin-left:66.66666667%}.offset-lg-9{margin-left:75%}.offset-lg-10{margin-left:83.33333333%}.offset-lg-11{margin-left:91.66666667%}.g-lg-0,.gx-lg-0{--bs-gutter-x:0}.g-lg-0,.gy-lg-0{--bs-gutter-y:0}.g-lg-1,.gx-lg-1{--bs-gutter-x:0.25rem}.g-lg-1,.gy-lg-1{--bs-gutter-y:0.25rem}.g-lg-2,.gx-lg-2{--bs-gutter-x:0.5rem}.g-lg-2,.gy-lg-2{--bs-gutter-y:0.5rem}.g-lg-3,.gx-lg-3{--bs-gutter-x:1rem}.g-lg-3,.gy-lg-3{--bs-gutter-y:1rem}.g-lg-4,.gx-lg-4{--bs-gutter-x:1.5rem}.g-lg-4,.gy-lg-4{--bs-gutter-y:1.5rem}.g-lg-5,.gx-lg-5{--bs-gutter-x:3rem}.g-lg-5,.gy-lg-5{--bs-gutter-y:3rem}}@media (min-width:1200px){.col-xl{flex:1 0 0%}.row-cols-xl-auto>*{flex:0 0 auto;width:auto}.row-cols-xl-1>*{flex:0 0 auto;width:100%}.row-cols-xl-2>*{flex:0 0 auto;width:50%}.row-cols-xl-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-xl-4>*{flex:0 0 auto;width:25%}.row-cols-xl-5>*{flex:0 0 auto;width:20%}.row-cols-xl-6>*{flex:0 0 auto;width:16.6666666667%}.col-xl-auto{flex:0 0 auto;width:auto}.col-xl-1{flex:0 0 auto;width:8.33333333%}.col-xl-2{flex:0 0 auto;width:16.66666667%}.col-xl-3{flex:0 0 auto;width:25%}.col-xl-4{flex:0 0 auto;width:33.33333333%}.col-xl-5{flex:0 0 auto;width:41.66666667%}.col-xl-6{flex:0 0 auto;width:50%}.col-xl-7{flex:0 0 auto;width:58.33333333%}.col-xl-8{flex:0 0 auto;width:66.66666667%}.col-xl-9{flex:0 0 auto;width:75%}.col-xl-10{flex:0 0 auto;width:83.33333333%}.col-xl-11{flex:0 0 auto;width:91.66666667%}.col-xl-12{flex:0 0 auto;width:100%}.offset-xl-0{margin-left:0}.offset-xl-1{margin-left:8.33333333%}.offset-xl-2{margin-left:16.66666667%}.offset-xl-3{margin-left:25%}.offset-xl-4{margin-left:33.33333333%}.offset-xl-5{margin-left:41.66666667%}.offset-xl-6{margin-left:50%}.offset-xl-7{margin-left:58.33333333%}.offset-xl-8{margin-left:66.66666667%}.offset-xl-9{margin-left:75%}.offset-xl-10{margin-left:83.33333333%}.offset-xl-11{margin-left:91.66666667%}.g-xl-0,.gx-xl-0{--bs-gutter-x:0}.g-xl-0,.gy-xl-0{--bs-gutter-y:0}.g-xl-1,.gx-xl-1{--bs-gutter-x:0.25rem}.g-xl-1,.gy-xl-1{--bs-gutter-y:0.25rem}.g-xl-2,.gx-xl-2{--bs-gutter-x:0.5rem}.g-xl-2,.gy-xl-2{--bs-gutter-y:0.5rem}.g-xl-3,.gx-xl-3{--bs-gutter-x:1rem}.g-xl-3,.gy-xl-3{--bs-gutter-y:1rem}.g-xl-4,.gx-xl-4{--bs-gutter-x:1.5rem}.g-xl-4,.gy-xl-4{--bs-gutter-y:1.5rem}.g-xl-5,.gx-xl-5{--bs-gutter-x:3rem}.g-xl-5,.gy-xl-5{--bs-gutter-y:3rem}}@media (min-width:1400px){.col-xxl{flex:1 0 0%}.row-cols-xxl-auto>*{flex:0 0 auto;width:auto}.row-cols-xxl-1>*{flex:0 0 auto;width:100%}.row-cols-xxl-2>*{flex:0 0 auto;width:50%}.row-cols-xxl-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-xxl-4>*{flex:0 0 auto;width:25%}.row-cols-xxl-5>*{flex:0 0 auto;width:20%}.row-cols-xxl-6>*{flex:0 0 auto;width:16.6666666667%}.col-xxl-auto{flex:0 0 auto;width:auto}.col-xxl-1{flex:0 0 auto;width:8.33333333%}.col-xxl-2{flex:0 0 auto;width:16.66666667%}.col-xxl-3{flex:0 0 auto;width:25%}.col-xxl-4{flex:0 0 auto;width:33.33333333%}.col-xxl-5{flex:0 0 auto;width:41.66666667%}.col-xxl-6{flex:0 0 auto;width:50%}.col-xxl-7{flex:0 0 auto;width:58.33333333%}.col-xxl-8{flex:0 0 auto;width:66.66666667%}.col-xxl-9{flex:0 0 auto;width:75%}.col-xxl-10{flex:0 0 auto;width:83.33333333%}.col-xxl-11{flex:0 0 auto;width:91.66666667%}.col-xxl-12{flex:0 0 auto;width:100%}.offset-xxl-0{margin-left:0}.offset-xxl-1{margin-left:8.33333333%}.offset-xxl-2{margin-left:16.66666667%}.offset-xxl-3{margin-left:25%}.offset-xxl-4{margin-left:33.33333333%}.offset-xxl-5{margin-left:41.66666667%}.offset-xxl-6{margin-left:50%}.offset-xxl-7{margin-left:58.33333333%}.offset-xxl-8{margin-left:66.66666667%}.offset-xxl-9{margin-left:75%}.offset-xxl-10{margin-left:83.33333333%}.offset-xxl-11{margin-left:91.66666667%}.g-xxl-0,.gx-xxl-0{--bs-gutter-x:0}.g-xxl-0,.gy-xxl-0{--bs-gutter-y:0}.g-xxl-1,.gx-xxl-1{--bs-gutter-x:0.25rem}.g-xxl-1,.gy-xxl-1{--bs-gutter-y:0.25rem}.g-xxl-2,.gx-xxl-2{--bs-gutter-x:0.5rem}.g-xxl-2,.gy-xxl-2{--bs-gutter-y:0.5rem}.g-xxl-3,.gx-xxl-3{--bs-gutter-x:1rem}.g-xxl-3,.gy-xxl-3{--bs-gutter-y:1rem}.g-xxl-4,.gx-xxl-4{--bs-gutter-x:1.5rem}.g-xxl-4,.gy-xxl-4{--bs-gutter-y:1.5rem}.g-xxl-5,.gx-xxl-5{--bs-gutter-x:3rem}.g-xxl-5,.gy-xxl-5{--bs-gutter-y:3rem}}.table{--bs-table-bg:transparent;--bs-table-accent-bg:transparent;--bs-table-striped-color:#212529;--bs-table-striped-bg:rgba(0, 0, 0, 0.05);--bs-table-active-color:#212529;--bs-table-active-bg:rgba(0, 0, 0, 0.1);--bs-table-hover-color:#212529;--bs-table-hover-bg:rgba(0, 0, 0, 0.075);width:100%;margin-bottom:1rem;color:#212529;vertical-align:top;border-color:#dee2e6}.table>:not(caption)>*>*{padding:.5rem .5rem;background-color:var(--bs-table-bg);border-bottom-width:1px;box-shadow:inset 0 0 0 9999px var(--bs-table-accent-bg)}.table>tbody{vertical-align:inherit}.table>thead{vertical-align:bottom}.table>:not(:first-child){border-top:2px solid currentColor}.caption-top{caption-side:top}.table-sm>:not(caption)>*>*{padding:.25rem .25rem}.table-bordered>:not(caption)>*{border-width:1px 0}.table-bordered>:not(caption)>*>*{border-width:0 1px}.table-borderless>:not(caption)>*>*{border-bottom-width:0}.table-borderless>:not(:first-child){border-top-width:0}.table-striped>tbody>tr:nth-of-type(odd)>*{--bs-table-accent-bg:var(--bs-table-striped-bg);color:var(--bs-table-striped-color)}.table-active{--bs-table-accent-bg:var(--bs-table-active-bg);color:var(--bs-table-active-color)}.table-hover>tbody>tr:hover>*{--bs-table-accent-bg:var(--bs-table-hover-bg);color:var(--bs-table-hover-color)}.table-primary{--bs-table-bg:#cfe2ff;--bs-table-striped-bg:#c5d7f2;--bs-table-striped-color:#000;--bs-table-active-bg:#bacbe6;--bs-table-active-color:#000;--bs-table-hover-bg:#bfd1ec;--bs-table-hover-color:#000;color:#000;border-color:#bacbe6}.table-secondary{--bs-table-bg:#e2e3e5;--bs-table-striped-bg:#d7d8da;--bs-table-striped-color:#000;--bs-table-active-bg:#cbccce;--bs-table-active-color:#000;--bs-table-hover-bg:#d1d2d4;--bs-table-hover-color:#000;color:#000;border-color:#cbccce}.table-success{--bs-table-bg:#d1e7dd;--bs-table-striped-bg:#c7dbd2;--bs-table-striped-color:#000;--bs-table-active-bg:#bcd0c7;--bs-table-active-color:#000;--bs-table-hover-bg:#c1d6cc;--bs-table-hover-color:#000;color:#000;border-color:#bcd0c7}.table-info{--bs-table-bg:#cff4fc;--bs-table-striped-bg:#c5e8ef;--bs-table-striped-color:#000;--bs-table-active-bg:#badce3;--bs-table-active-color:#000;--bs-table-hover-bg:#bfe2e9;--bs-table-hover-color:#000;color:#000;border-color:#badce3}.table-warning{--bs-table-bg:#fff3cd;--bs-table-striped-bg:#f2e7c3;--bs-table-striped-color:#000;--bs-table-active-bg:#e6dbb9;--bs-table-active-color:#000;--bs-table-hover-bg:#ece1be;--bs-table-hover-color:#000;color:#000;border-color:#e6dbb9}.table-danger{--bs-table-bg:#f8d7da;--bs-table-striped-bg:#eccccf;--bs-table-striped-color:#000;--bs-table-active-bg:#dfc2c4;--bs-table-active-color:#000;--bs-table-hover-bg:#e5c7ca;--bs-table-hover-color:#000;color:#000;border-color:#dfc2c4}.table-light{--bs-table-bg:#f8f9fa;--bs-table-striped-bg:#ecedee;--bs-table-striped-color:#000;--bs-table-active-bg:#dfe0e1;--bs-table-active-color:#000;--bs-table-hover-bg:#e5e6e7;--bs-table-hover-color:#000;color:#000;border-color:#dfe0e1}.table-dark{--bs-table-bg:#212529;--bs-table-striped-bg:#2c3034;--bs-table-striped-color:#fff;--bs-table-active-bg:#373b3e;--bs-table-active-color:#fff;--bs-table-hover-bg:#323539;--bs-table-hover-color:#fff;color:#fff;border-color:#373b3e}.table-responsive{overflow-x:auto;-webkit-overflow-scrolling:touch}@media (max-width:575.98px){.table-responsive-sm{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media (max-width:767.98px){.table-responsive-md{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media (max-width:991.98px){.table-responsive-lg{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media (max-width:1199.98px){.table-responsive-xl{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media (max-width:1399.98px){.table-responsive-xxl{overflow-x:auto;-webkit-overflow-scrolling:touch}}.form-label{margin-bottom:.5rem}.col-form-label{padding-top:calc(.375rem + 1px);padding-bottom:calc(.375rem + 1px);margin-bottom:0;font-size:inherit;line-height:1.5}.col-form-label-lg{padding-top:calc(.5rem + 1px);padding-bottom:calc(.5rem + 1px);font-size:1.25rem}.col-form-label-sm{padding-top:calc(.25rem + 1px);padding-bottom:calc(.25rem + 1px);font-size:.875rem}.form-text{margin-top:.25rem;font-size:.875em;color:#6c757d}.form-control{display:block;width:100%;padding:.375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#212529;background-color:#fff;background-clip:padding-box;border:1px solid #ced4da;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:.25rem;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-control{transition:none}}.form-control[type=file]{overflow:hidden}.form-control[type=file]:not(:disabled):not([readonly]){cursor:pointer}.form-control:focus{color:#212529;background-color:#fff;border-color:#86b7fe;outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}.form-control::-webkit-date-and-time-value{height:1.5em}.form-control::-moz-placeholder{color:#6c757d;opacity:1}.form-control::placeholder{color:#6c757d;opacity:1}.form-control:disabled,.form-control[readonly]{background-color:#e9ecef;opacity:1}.form-control::-webkit-file-upload-button{padding:.375rem .75rem;margin:-.375rem -.75rem;-webkit-margin-end:.75rem;margin-inline-end:.75rem;color:#212529;background-color:#e9ecef;pointer-events:none;border-color:inherit;border-style:solid;border-width:0;border-inline-end-width:1px;border-radius:0;-webkit-transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}.form-control::file-selector-button{padding:.375rem .75rem;margin:-.375rem -.75rem;-webkit-margin-end:.75rem;margin-inline-end:.75rem;color:#212529;background-color:#e9ecef;pointer-events:none;border-color:inherit;border-style:solid;border-width:0;border-inline-end-width:1px;border-radius:0;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-control::-webkit-file-upload-button{-webkit-transition:none;transition:none}.form-control::file-selector-button{transition:none}}.form-control:hover:not(:disabled):not([readonly])::-webkit-file-upload-button{background-color:#dde0e3}.form-control:hover:not(:disabled):not([readonly])::file-selector-button{background-color:#dde0e3}.form-control::-webkit-file-upload-button{padding:.375rem .75rem;margin:-.375rem -.75rem;-webkit-margin-end:.75rem;margin-inline-end:.75rem;color:#212529;background-color:#e9ecef;pointer-events:none;border-color:inherit;border-style:solid;border-width:0;border-inline-end-width:1px;border-radius:0;-webkit-transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-control::-webkit-file-upload-button{-webkit-transition:none;transition:none}}.form-control:hover:not(:disabled):not([readonly])::-webkit-file-upload-button{background-color:#dde0e3}.form-control-plaintext{display:block;width:100%;padding:.375rem 0;margin-bottom:0;line-height:1.5;color:#212529;background-color:transparent;border:solid transparent;border-width:1px 0}.form-control-plaintext.form-control-lg,.form-control-plaintext.form-control-sm{padding-right:0;padding-left:0}.form-control-sm{min-height:calc(1.5em + .5rem + 2px);padding:.25rem .5rem;font-size:.875rem;border-radius:.2rem}.form-control-sm::-webkit-file-upload-button{padding:.25rem .5rem;margin:-.25rem -.5rem;-webkit-margin-end:.5rem;margin-inline-end:.5rem}.form-control-sm::file-selector-button{padding:.25rem .5rem;margin:-.25rem -.5rem;-webkit-margin-end:.5rem;margin-inline-end:.5rem}.form-control-sm::-webkit-file-upload-button{padding:.25rem .5rem;margin:-.25rem -.5rem;-webkit-margin-end:.5rem;margin-inline-end:.5rem}.form-control-lg{min-height:calc(1.5em + 1rem + 2px);padding:.5rem 1rem;font-size:1.25rem;border-radius:.3rem}.form-control-lg::-webkit-file-upload-button{padding:.5rem 1rem;margin:-.5rem -1rem;-webkit-margin-end:1rem;margin-inline-end:1rem}.form-control-lg::file-selector-button{padding:.5rem 1rem;margin:-.5rem -1rem;-webkit-margin-end:1rem;margin-inline-end:1rem}.form-control-lg::-webkit-file-upload-button{padding:.5rem 1rem;margin:-.5rem -1rem;-webkit-margin-end:1rem;margin-inline-end:1rem}textarea.form-control{min-height:calc(1.5em + .75rem + 2px)}textarea.form-control-sm{min-height:calc(1.5em + .5rem + 2px)}textarea.form-control-lg{min-height:calc(1.5em + 1rem + 2px)}.form-control-color{width:3rem;height:auto;padding:.375rem}.form-control-color:not(:disabled):not([readonly]){cursor:pointer}.form-control-color::-moz-color-swatch{height:1.5em;border-radius:.25rem}.form-control-color::-webkit-color-swatch{height:1.5em;border-radius:.25rem}.form-select{display:block;width:100%;padding:.375rem 2.25rem .375rem .75rem;-moz-padding-start:calc(0.75rem - 3px);font-size:1rem;font-weight:400;line-height:1.5;color:#212529;background-color:#fff;background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");background-repeat:no-repeat;background-position:right .75rem center;background-size:16px 12px;border:1px solid #ced4da;border-radius:.25rem;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out;-webkit-appearance:none;-moz-appearance:none;appearance:none}@media (prefers-reduced-motion:reduce){.form-select{transition:none}}.form-select:focus{border-color:#86b7fe;outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}.form-select[multiple],.form-select[size]:not([size="1"]){padding-right:.75rem;background-image:none}.form-select:disabled{background-color:#e9ecef}.form-select:-moz-focusring{color:transparent;text-shadow:0 0 0 #212529}.form-select-sm{padding-top:.25rem;padding-bottom:.25rem;padding-left:.5rem;font-size:.875rem;border-radius:.2rem}.form-select-lg{padding-top:.5rem;padding-bottom:.5rem;padding-left:1rem;font-size:1.25rem;border-radius:.3rem}.form-check{display:block;min-height:1.5rem;padding-left:1.5em;margin-bottom:.125rem}.form-check .form-check-input{float:left;margin-left:-1.5em}.form-check-input{width:1em;height:1em;margin-top:.25em;vertical-align:top;background-color:#fff;background-repeat:no-repeat;background-position:center;background-size:contain;border:1px solid rgba(0,0,0,.25);-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-print-color-adjust:exact;color-adjust:exact}.form-check-input[type=checkbox]{border-radius:.25em}.form-check-input[type=radio]{border-radius:50%}.form-check-input:active{filter:brightness(90%)}.form-check-input:focus{border-color:#86b7fe;outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}.form-check-input:checked{background-color:#0d6efd;border-color:#0d6efd}.form-check-input:checked[type=checkbox]{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e")}.form-check-input:checked[type=radio]{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23fff'/%3e%3c/svg%3e")}.form-check-input[type=checkbox]:indeterminate{background-color:#0d6efd;border-color:#0d6efd;background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10h8'/%3e%3c/svg%3e")}.form-check-input:disabled{pointer-events:none;filter:none;opacity:.5}.form-check-input:disabled~.form-check-label,.form-check-input[disabled]~.form-check-label{opacity:.5}.form-switch{padding-left:2.5em}.form-switch .form-check-input{width:2em;margin-left:-2.5em;background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%280, 0, 0, 0.25%29'/%3e%3c/svg%3e");background-position:left center;border-radius:2em;transition:background-position .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-switch .form-check-input{transition:none}}.form-switch .form-check-input:focus{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%2386b7fe'/%3e%3c/svg%3e")}.form-switch .form-check-input:checked{background-position:right center;background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e")}.form-check-inline{display:inline-block;margin-right:1rem}.btn-check{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.btn-check:disabled+.btn,.btn-check[disabled]+.btn{pointer-events:none;filter:none;opacity:.65}.form-range{width:100%;height:1.5rem;padding:0;background-color:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none}.form-range:focus{outline:0}.form-range:focus::-webkit-slider-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .25rem rgba(13,110,253,.25)}.form-range:focus::-moz-range-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .25rem rgba(13,110,253,.25)}.form-range::-moz-focus-outer{border:0}.form-range::-webkit-slider-thumb{width:1rem;height:1rem;margin-top:-.25rem;background-color:#0d6efd;border:0;border-radius:1rem;-webkit-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;-webkit-appearance:none;appearance:none}@media (prefers-reduced-motion:reduce){.form-range::-webkit-slider-thumb{-webkit-transition:none;transition:none}}.form-range::-webkit-slider-thumb:active{background-color:#b6d4fe}.form-range::-webkit-slider-runnable-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:#dee2e6;border-color:transparent;border-radius:1rem}.form-range::-moz-range-thumb{width:1rem;height:1rem;background-color:#0d6efd;border:0;border-radius:1rem;-moz-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;-moz-appearance:none;appearance:none}@media (prefers-reduced-motion:reduce){.form-range::-moz-range-thumb{-moz-transition:none;transition:none}}.form-range::-moz-range-thumb:active{background-color:#b6d4fe}.form-range::-moz-range-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:#dee2e6;border-color:transparent;border-radius:1rem}.form-range:disabled{pointer-events:none}.form-range:disabled::-webkit-slider-thumb{background-color:#adb5bd}.form-range:disabled::-moz-range-thumb{background-color:#adb5bd}.form-floating{position:relative}.form-floating>.form-control,.form-floating>.form-select{height:calc(3.5rem + 2px);line-height:1.25}.form-floating>label{position:absolute;top:0;left:0;height:100%;padding:1rem .75rem;pointer-events:none;border:1px solid transparent;transform-origin:0 0;transition:opacity .1s ease-in-out,transform .1s ease-in-out}@media (prefers-reduced-motion:reduce){.form-floating>label{transition:none}}.form-floating>.form-control{padding:1rem .75rem}.form-floating>.form-control::-moz-placeholder{color:transparent}.form-floating>.form-control::placeholder{color:transparent}.form-floating>.form-control:not(:-moz-placeholder-shown){padding-top:1.625rem;padding-bottom:.625rem}.form-floating>.form-control:focus,.form-floating>.form-control:not(:placeholder-shown){padding-top:1.625rem;padding-bottom:.625rem}.form-floating>.form-control:-webkit-autofill{padding-top:1.625rem;padding-bottom:.625rem}.form-floating>.form-select{padding-top:1.625rem;padding-bottom:.625rem}.form-floating>.form-control:not(:-moz-placeholder-shown)~label{opacity:.65;transform:scale(.85) translateY(-.5rem) translateX(.15rem)}.form-floating>.form-control:focus~label,.form-floating>.form-control:not(:placeholder-shown)~label,.form-floating>.form-select~label{opacity:.65;transform:scale(.85) translateY(-.5rem) translateX(.15rem)}.form-floating>.form-control:-webkit-autofill~label{opacity:.65;transform:scale(.85) translateY(-.5rem) translateX(.15rem)}.input-group{position:relative;display:flex;flex-wrap:wrap;align-items:stretch;width:100%}.input-group>.form-control,.input-group>.form-select{position:relative;flex:1 1 auto;width:1%;min-width:0}.input-group>.form-control:focus,.input-group>.form-select:focus{z-index:3}.input-group .btn{position:relative;z-index:2}.input-group .btn:focus{z-index:3}.input-group-text{display:flex;align-items:center;padding:.375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:center;white-space:nowrap;background-color:#e9ecef;border:1px solid #ced4da;border-radius:.25rem}.input-group-lg>.btn,.input-group-lg>.form-control,.input-group-lg>.form-select,.input-group-lg>.input-group-text{padding:.5rem 1rem;font-size:1.25rem;border-radius:.3rem}.input-group-sm>.btn,.input-group-sm>.form-control,.input-group-sm>.form-select,.input-group-sm>.input-group-text{padding:.25rem .5rem;font-size:.875rem;border-radius:.2rem}.input-group-lg>.form-select,.input-group-sm>.form-select{padding-right:3rem}.input-group:not(.has-validation)>.dropdown-toggle:nth-last-child(n+3),.input-group:not(.has-validation)>:not(:last-child):not(.dropdown-toggle):not(.dropdown-menu){border-top-right-radius:0;border-bottom-right-radius:0}.input-group.has-validation>.dropdown-toggle:nth-last-child(n+4),.input-group.has-validation>:nth-last-child(n+3):not(.dropdown-toggle):not(.dropdown-menu){border-top-right-radius:0;border-bottom-right-radius:0}.input-group>:not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback){margin-left:-1px;border-top-left-radius:0;border-bottom-left-radius:0}.valid-feedback{display:none;width:100%;margin-top:.25rem;font-size:.875em;color:#198754}.valid-tooltip{position:absolute;top:100%;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:.875rem;color:#fff;background-color:rgba(25,135,84,.9);border-radius:.25rem}.is-valid~.valid-feedback,.is-valid~.valid-tooltip,.was-validated :valid~.valid-feedback,.was-validated :valid~.valid-tooltip{display:block}.form-control.is-valid,.was-validated .form-control:valid{border-color:#198754;padding-right:calc(1.5em + .75rem);background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");background-repeat:no-repeat;background-position:right calc(.375em + .1875rem) center;background-size:calc(.75em + .375rem) calc(.75em + .375rem)}.form-control.is-valid:focus,.was-validated .form-control:valid:focus{border-color:#198754;box-shadow:0 0 0 .25rem rgba(25,135,84,.25)}.was-validated textarea.form-control:valid,textarea.form-control.is-valid{padding-right:calc(1.5em + .75rem);background-position:top calc(.375em + .1875rem) right calc(.375em + .1875rem)}.form-select.is-valid,.was-validated .form-select:valid{border-color:#198754}.form-select.is-valid:not([multiple]):not([size]),.form-select.is-valid:not([multiple])[size="1"],.was-validated .form-select:valid:not([multiple]):not([size]),.was-validated .form-select:valid:not([multiple])[size="1"]{padding-right:4.125rem;background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e"),url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");background-position:right .75rem center,center right 2.25rem;background-size:16px 12px,calc(.75em + .375rem) calc(.75em + .375rem)}.form-select.is-valid:focus,.was-validated .form-select:valid:focus{border-color:#198754;box-shadow:0 0 0 .25rem rgba(25,135,84,.25)}.form-check-input.is-valid,.was-validated .form-check-input:valid{border-color:#198754}.form-check-input.is-valid:checked,.was-validated .form-check-input:valid:checked{background-color:#198754}.form-check-input.is-valid:focus,.was-validated .form-check-input:valid:focus{box-shadow:0 0 0 .25rem rgba(25,135,84,.25)}.form-check-input.is-valid~.form-check-label,.was-validated .form-check-input:valid~.form-check-label{color:#198754}.form-check-inline .form-check-input~.valid-feedback{margin-left:.5em}.input-group .form-control.is-valid,.input-group .form-select.is-valid,.was-validated .input-group .form-control:valid,.was-validated .input-group .form-select:valid{z-index:1}.input-group .form-control.is-valid:focus,.input-group .form-select.is-valid:focus,.was-validated .input-group .form-control:valid:focus,.was-validated .input-group .form-select:valid:focus{z-index:3}.invalid-feedback{display:none;width:100%;margin-top:.25rem;font-size:.875em;color:#dc3545}.invalid-tooltip{position:absolute;top:100%;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:.875rem;color:#fff;background-color:rgba(220,53,69,.9);border-radius:.25rem}.is-invalid~.invalid-feedback,.is-invalid~.invalid-tooltip,.was-validated :invalid~.invalid-feedback,.was-validated :invalid~.invalid-tooltip{display:block}.form-control.is-invalid,.was-validated .form-control:invalid{border-color:#dc3545;padding-right:calc(1.5em + .75rem);background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");background-repeat:no-repeat;background-position:right calc(.375em + .1875rem) center;background-size:calc(.75em + .375rem) calc(.75em + .375rem)}.form-control.is-invalid:focus,.was-validated .form-control:invalid:focus{border-color:#dc3545;box-shadow:0 0 0 .25rem rgba(220,53,69,.25)}.was-validated textarea.form-control:invalid,textarea.form-control.is-invalid{padding-right:calc(1.5em + .75rem);background-position:top calc(.375em + .1875rem) right calc(.375em + .1875rem)}.form-select.is-invalid,.was-validated .form-select:invalid{border-color:#dc3545}.form-select.is-invalid:not([multiple]):not([size]),.form-select.is-invalid:not([multiple])[size="1"],.was-validated .form-select:invalid:not([multiple]):not([size]),.was-validated .form-select:invalid:not([multiple])[size="1"]{padding-right:4.125rem;background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e"),url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");background-position:right .75rem center,center right 2.25rem;background-size:16px 12px,calc(.75em + .375rem) calc(.75em + .375rem)}.form-select.is-invalid:focus,.was-validated .form-select:invalid:focus{border-color:#dc3545;box-shadow:0 0 0 .25rem rgba(220,53,69,.25)}.form-check-input.is-invalid,.was-validated .form-check-input:invalid{border-color:#dc3545}.form-check-input.is-invalid:checked,.was-validated .form-check-input:invalid:checked{background-color:#dc3545}.form-check-input.is-invalid:focus,.was-validated .form-check-input:invalid:focus{box-shadow:0 0 0 .25rem rgba(220,53,69,.25)}.form-check-input.is-invalid~.form-check-label,.was-validated .form-check-input:invalid~.form-check-label{color:#dc3545}.form-check-inline .form-check-input~.invalid-feedback{margin-left:.5em}.input-group .form-control.is-invalid,.input-group .form-select.is-invalid,.was-validated .input-group .form-control:invalid,.was-validated .input-group .form-select:invalid{z-index:2}.input-group .form-control.is-invalid:focus,.input-group .form-select.is-invalid:focus,.was-validated .input-group .form-control:invalid:focus,.was-validated .input-group .form-select:invalid:focus{z-index:3}.btn{display:inline-block;font-weight:400;line-height:1.5;color:#212529;text-align:center;text-decoration:none;vertical-align:middle;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;background-color:transparent;border:1px solid transparent;padding:.375rem .75rem;font-size:1rem;border-radius:.25rem;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.btn{transition:none}}.btn:hover{color:#212529}.btn-check:focus+.btn,.btn:focus{outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}.btn.disabled,.btn:disabled,fieldset:disabled .btn{pointer-events:none;opacity:.65}.btn-primary{color:#fff;background-color:#0d6efd;border-color:#0d6efd}.btn-primary:hover{color:#fff;background-color:#0b5ed7;border-color:#0a58ca}.btn-check:focus+.btn-primary,.btn-primary:focus{color:#fff;background-color:#0b5ed7;border-color:#0a58ca;box-shadow:0 0 0 .25rem rgba(49,132,253,.5)}.btn-check:active+.btn-primary,.btn-check:checked+.btn-primary,.btn-primary.active,.btn-primary:active,.show>.btn-primary.dropdown-toggle{color:#fff;background-color:#0a58ca;border-color:#0a53be}.btn-check:active+.btn-primary:focus,.btn-check:checked+.btn-primary:focus,.btn-primary.active:focus,.btn-primary:active:focus,.show>.btn-primary.dropdown-toggle:focus{box-shadow:0 0 0 .25rem rgba(49,132,253,.5)}.btn-primary.disabled,.btn-primary:disabled{color:#fff;background-color:#0d6efd;border-color:#0d6efd}.btn-secondary{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-secondary:hover{color:#fff;background-color:#5c636a;border-color:#565e64}.btn-check:focus+.btn-secondary,.btn-secondary:focus{color:#fff;background-color:#5c636a;border-color:#565e64;box-shadow:0 0 0 .25rem rgba(130,138,145,.5)}.btn-check:active+.btn-secondary,.btn-check:checked+.btn-secondary,.btn-secondary.active,.btn-secondary:active,.show>.btn-secondary.dropdown-toggle{color:#fff;background-color:#565e64;border-color:#51585e}.btn-check:active+.btn-secondary:focus,.btn-check:checked+.btn-secondary:focus,.btn-secondary.active:focus,.btn-secondary:active:focus,.show>.btn-secondary.dropdown-toggle:focus{box-shadow:0 0 0 .25rem rgba(130,138,145,.5)}.btn-secondary.disabled,.btn-secondary:disabled{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-success{color:#fff;background-color:#198754;border-color:#198754}.btn-success:hover{color:#fff;background-color:#157347;border-color:#146c43}.btn-check:focus+.btn-success,.btn-success:focus{color:#fff;background-color:#157347;border-color:#146c43;box-shadow:0 0 0 .25rem rgba(60,153,110,.5)}.btn-check:active+.btn-success,.btn-check:checked+.btn-success,.btn-success.active,.btn-success:active,.show>.btn-success.dropdown-toggle{color:#fff;background-color:#146c43;border-color:#13653f}.btn-check:active+.btn-success:focus,.btn-check:checked+.btn-success:focus,.btn-success.active:focus,.btn-success:active:focus,.show>.btn-success.dropdown-toggle:focus{box-shadow:0 0 0 .25rem rgba(60,153,110,.5)}.btn-success.disabled,.btn-success:disabled{color:#fff;background-color:#198754;border-color:#198754}.btn-info{color:#000;background-color:#0dcaf0;border-color:#0dcaf0}.btn-info:hover{color:#000;background-color:#31d2f2;border-color:#25cff2}.btn-check:focus+.btn-info,.btn-info:focus{color:#000;background-color:#31d2f2;border-color:#25cff2;box-shadow:0 0 0 .25rem rgba(11,172,204,.5)}.btn-check:active+.btn-info,.btn-check:checked+.btn-info,.btn-info.active,.btn-info:active,.show>.btn-info.dropdown-toggle{color:#000;background-color:#3dd5f3;border-color:#25cff2}.btn-check:active+.btn-info:focus,.btn-check:checked+.btn-info:focus,.btn-info.active:focus,.btn-info:active:focus,.show>.btn-info.dropdown-toggle:focus{box-shadow:0 0 0 .25rem rgba(11,172,204,.5)}.btn-info.disabled,.btn-info:disabled{color:#000;background-color:#0dcaf0;border-color:#0dcaf0}.btn-warning{color:#000;background-color:#ffc107;border-color:#ffc107}.btn-warning:hover{color:#000;background-color:#ffca2c;border-color:#ffc720}.btn-check:focus+.btn-warning,.btn-warning:focus{color:#000;background-color:#ffca2c;border-color:#ffc720;box-shadow:0 0 0 .25rem rgba(217,164,6,.5)}.btn-check:active+.btn-warning,.btn-check:checked+.btn-warning,.btn-warning.active,.btn-warning:active,.show>.btn-warning.dropdown-toggle{color:#000;background-color:#ffcd39;border-color:#ffc720}.btn-check:active+.btn-warning:focus,.btn-check:checked+.btn-warning:focus,.btn-warning.active:focus,.btn-warning:active:focus,.show>.btn-warning.dropdown-toggle:focus{box-shadow:0 0 0 .25rem rgba(217,164,6,.5)}.btn-warning.disabled,.btn-warning:disabled{color:#000;background-color:#ffc107;border-color:#ffc107}.btn-danger{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-danger:hover{color:#fff;background-color:#bb2d3b;border-color:#b02a37}.btn-check:focus+.btn-danger,.btn-danger:focus{color:#fff;background-color:#bb2d3b;border-color:#b02a37;box-shadow:0 0 0 .25rem rgba(225,83,97,.5)}.btn-check:active+.btn-danger,.btn-check:checked+.btn-danger,.btn-danger.active,.btn-danger:active,.show>.btn-danger.dropdown-toggle{color:#fff;background-color:#b02a37;border-color:#a52834}.btn-check:active+.btn-danger:focus,.btn-check:checked+.btn-danger:focus,.btn-danger.active:focus,.btn-danger:active:focus,.show>.btn-danger.dropdown-toggle:focus{box-shadow:0 0 0 .25rem rgba(225,83,97,.5)}.btn-danger.disabled,.btn-danger:disabled{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-light{color:#000;background-color:#f8f9fa;border-color:#f8f9fa}.btn-light:hover{color:#000;background-color:#f9fafb;border-color:#f9fafb}.btn-check:focus+.btn-light,.btn-light:focus{color:#000;background-color:#f9fafb;border-color:#f9fafb;box-shadow:0 0 0 .25rem rgba(211,212,213,.5)}.btn-check:active+.btn-light,.btn-check:checked+.btn-light,.btn-light.active,.btn-light:active,.show>.btn-light.dropdown-toggle{color:#000;background-color:#f9fafb;border-color:#f9fafb}.btn-check:active+.btn-light:focus,.btn-check:checked+.btn-light:focus,.btn-light.active:focus,.btn-light:active:focus,.show>.btn-light.dropdown-toggle:focus{box-shadow:0 0 0 .25rem rgba(211,212,213,.5)}.btn-light.disabled,.btn-light:disabled{color:#000;background-color:#f8f9fa;border-color:#f8f9fa}.btn-dark{color:#fff;background-color:#212529;border-color:#212529}.btn-dark:hover{color:#fff;background-color:#1c1f23;border-color:#1a1e21}.btn-check:focus+.btn-dark,.btn-dark:focus{color:#fff;background-color:#1c1f23;border-color:#1a1e21;box-shadow:0 0 0 .25rem rgba(66,70,73,.5)}.btn-check:active+.btn-dark,.btn-check:checked+.btn-dark,.btn-dark.active,.btn-dark:active,.show>.btn-dark.dropdown-toggle{color:#fff;background-color:#1a1e21;border-color:#191c1f}.btn-check:active+.btn-dark:focus,.btn-check:checked+.btn-dark:focus,.btn-dark.active:focus,.btn-dark:active:focus,.show>.btn-dark.dropdown-toggle:focus{box-shadow:0 0 0 .25rem rgba(66,70,73,.5)}.btn-dark.disabled,.btn-dark:disabled{color:#fff;background-color:#212529;border-color:#212529}.btn-outline-primary{color:#0d6efd;border-color:#0d6efd}.btn-outline-primary:hover{color:#fff;background-color:#0d6efd;border-color:#0d6efd}.btn-check:focus+.btn-outline-primary,.btn-outline-primary:focus{box-shadow:0 0 0 .25rem rgba(13,110,253,.5)}.btn-check:active+.btn-outline-primary,.btn-check:checked+.btn-outline-primary,.btn-outline-primary.active,.btn-outline-primary.dropdown-toggle.show,.btn-outline-primary:active{color:#fff;background-color:#0d6efd;border-color:#0d6efd}.btn-check:active+.btn-outline-primary:focus,.btn-check:checked+.btn-outline-primary:focus,.btn-outline-primary.active:focus,.btn-outline-primary.dropdown-toggle.show:focus,.btn-outline-primary:active:focus{box-shadow:0 0 0 .25rem rgba(13,110,253,.5)}.btn-outline-primary.disabled,.btn-outline-primary:disabled{color:#0d6efd;background-color:transparent}.btn-outline-secondary{color:#6c757d;border-color:#6c757d}.btn-outline-secondary:hover{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-check:focus+.btn-outline-secondary,.btn-outline-secondary:focus{box-shadow:0 0 0 .25rem rgba(108,117,125,.5)}.btn-check:active+.btn-outline-secondary,.btn-check:checked+.btn-outline-secondary,.btn-outline-secondary.active,.btn-outline-secondary.dropdown-toggle.show,.btn-outline-secondary:active{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-check:active+.btn-outline-secondary:focus,.btn-check:checked+.btn-outline-secondary:focus,.btn-outline-secondary.active:focus,.btn-outline-secondary.dropdown-toggle.show:focus,.btn-outline-secondary:active:focus{box-shadow:0 0 0 .25rem rgba(108,117,125,.5)}.btn-outline-secondary.disabled,.btn-outline-secondary:disabled{color:#6c757d;background-color:transparent}.btn-outline-success{color:#198754;border-color:#198754}.btn-outline-success:hover{color:#fff;background-color:#198754;border-color:#198754}.btn-check:focus+.btn-outline-success,.btn-outline-success:focus{box-shadow:0 0 0 .25rem rgba(25,135,84,.5)}.btn-check:active+.btn-outline-success,.btn-check:checked+.btn-outline-success,.btn-outline-success.active,.btn-outline-success.dropdown-toggle.show,.btn-outline-success:active{color:#fff;background-color:#198754;border-color:#198754}.btn-check:active+.btn-outline-success:focus,.btn-check:checked+.btn-outline-success:focus,.btn-outline-success.active:focus,.btn-outline-success.dropdown-toggle.show:focus,.btn-outline-success:active:focus{box-shadow:0 0 0 .25rem rgba(25,135,84,.5)}.btn-outline-success.disabled,.btn-outline-success:disabled{color:#198754;background-color:transparent}.btn-outline-info{color:#0dcaf0;border-color:#0dcaf0}.btn-outline-info:hover{color:#000;background-color:#0dcaf0;border-color:#0dcaf0}.btn-check:focus+.btn-outline-info,.btn-outline-info:focus{box-shadow:0 0 0 .25rem rgba(13,202,240,.5)}.btn-check:active+.btn-outline-info,.btn-check:checked+.btn-outline-info,.btn-outline-info.active,.btn-outline-info.dropdown-toggle.show,.btn-outline-info:active{color:#000;background-color:#0dcaf0;border-color:#0dcaf0}.btn-check:active+.btn-outline-info:focus,.btn-check:checked+.btn-outline-info:focus,.btn-outline-info.active:focus,.btn-outline-info.dropdown-toggle.show:focus,.btn-outline-info:active:focus{box-shadow:0 0 0 .25rem rgba(13,202,240,.5)}.btn-outline-info.disabled,.btn-outline-info:disabled{color:#0dcaf0;background-color:transparent}.btn-outline-warning{color:#ffc107;border-color:#ffc107}.btn-outline-warning:hover{color:#000;background-color:#ffc107;border-color:#ffc107}.btn-check:focus+.btn-outline-warning,.btn-outline-warning:focus{box-shadow:0 0 0 .25rem rgba(255,193,7,.5)}.btn-check:active+.btn-outline-warning,.btn-check:checked+.btn-outline-warning,.btn-outline-warning.active,.btn-outline-warning.dropdown-toggle.show,.btn-outline-warning:active{color:#000;background-color:#ffc107;border-color:#ffc107}.btn-check:active+.btn-outline-warning:focus,.btn-check:checked+.btn-outline-warning:focus,.btn-outline-warning.active:focus,.btn-outline-warning.dropdown-toggle.show:focus,.btn-outline-warning:active:focus{box-shadow:0 0 0 .25rem rgba(255,193,7,.5)}.btn-outline-warning.disabled,.btn-outline-warning:disabled{color:#ffc107;background-color:transparent}.btn-outline-danger{color:#dc3545;border-color:#dc3545}.btn-outline-danger:hover{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-check:focus+.btn-outline-danger,.btn-outline-danger:focus{box-shadow:0 0 0 .25rem rgba(220,53,69,.5)}.btn-check:active+.btn-outline-danger,.btn-check:checked+.btn-outline-danger,.btn-outline-danger.active,.btn-outline-danger.dropdown-toggle.show,.btn-outline-danger:active{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-check:active+.btn-outline-danger:focus,.btn-check:checked+.btn-outline-danger:focus,.btn-outline-danger.active:focus,.btn-outline-danger.dropdown-toggle.show:focus,.btn-outline-danger:active:focus{box-shadow:0 0 0 .25rem rgba(220,53,69,.5)}.btn-outline-danger.disabled,.btn-outline-danger:disabled{color:#dc3545;background-color:transparent}.btn-outline-light{color:#f8f9fa;border-color:#f8f9fa}.btn-outline-light:hover{color:#000;background-color:#f8f9fa;border-color:#f8f9fa}.btn-check:focus+.btn-outline-light,.btn-outline-light:focus{box-shadow:0 0 0 .25rem rgba(248,249,250,.5)}.btn-check:active+.btn-outline-light,.btn-check:checked+.btn-outline-light,.btn-outline-light.active,.btn-outline-light.dropdown-toggle.show,.btn-outline-light:active{color:#000;background-color:#f8f9fa;border-color:#f8f9fa}.btn-check:active+.btn-outline-light:focus,.btn-check:checked+.btn-outline-light:focus,.btn-outline-light.active:focus,.btn-outline-light.dropdown-toggle.show:focus,.btn-outline-light:active:focus{box-shadow:0 0 0 .25rem rgba(248,249,250,.5)}.btn-outline-light.disabled,.btn-outline-light:disabled{color:#f8f9fa;background-color:transparent}.btn-outline-dark{color:#212529;border-color:#212529}.btn-outline-dark:hover{color:#fff;background-color:#212529;border-color:#212529}.btn-check:focus+.btn-outline-dark,.btn-outline-dark:focus{box-shadow:0 0 0 .25rem rgba(33,37,41,.5)}.btn-check:active+.btn-outline-dark,.btn-check:checked+.btn-outline-dark,.btn-outline-dark.active,.btn-outline-dark.dropdown-toggle.show,.btn-outline-dark:active{color:#fff;background-color:#212529;border-color:#212529}.btn-check:active+.btn-outline-dark:focus,.btn-check:checked+.btn-outline-dark:focus,.btn-outline-dark.active:focus,.btn-outline-dark.dropdown-toggle.show:focus,.btn-outline-dark:active:focus{box-shadow:0 0 0 .25rem rgba(33,37,41,.5)}.btn-outline-dark.disabled,.btn-outline-dark:disabled{color:#212529;background-color:transparent}.btn-link{font-weight:400;color:#0d6efd;text-decoration:underline}.btn-link:hover{color:#0a58ca}.btn-link.disabled,.btn-link:disabled{color:#6c757d}.btn-group-lg>.btn,.btn-lg{padding:.5rem 1rem;font-size:1.25rem;border-radius:.3rem}.btn-group-sm>.btn,.btn-sm{padding:.25rem .5rem;font-size:.875rem;border-radius:.2rem}.fade{transition:opacity .15s linear}@media (prefers-reduced-motion:reduce){.fade{transition:none}}.fade:not(.show){opacity:0}.collapse:not(.show){display:none}.collapsing{height:0;overflow:hidden;transition:height .35s ease}@media (prefers-reduced-motion:reduce){.collapsing{transition:none}}.collapsing.collapse-horizontal{width:0;height:auto;transition:width .35s ease}@media (prefers-reduced-motion:reduce){.collapsing.collapse-horizontal{transition:none}}.dropdown,.dropend,.dropstart,.dropup{position:relative}.dropdown-toggle{white-space:nowrap}.dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent}.dropdown-toggle:empty::after{margin-left:0}.dropdown-menu{position:absolute;z-index:1000;display:none;min-width:10rem;padding:.5rem 0;margin:0;font-size:1rem;color:#212529;text-align:left;list-style:none;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.15);border-radius:.25rem}.dropdown-menu[data-bs-popper]{top:100%;left:0;margin-top:.125rem}.dropdown-menu-start{--bs-position:start}.dropdown-menu-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-end{--bs-position:end}.dropdown-menu-end[data-bs-popper]{right:0;left:auto}@media (min-width:576px){.dropdown-menu-sm-start{--bs-position:start}.dropdown-menu-sm-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-sm-end{--bs-position:end}.dropdown-menu-sm-end[data-bs-popper]{right:0;left:auto}}@media (min-width:768px){.dropdown-menu-md-start{--bs-position:start}.dropdown-menu-md-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-md-end{--bs-position:end}.dropdown-menu-md-end[data-bs-popper]{right:0;left:auto}}@media (min-width:992px){.dropdown-menu-lg-start{--bs-position:start}.dropdown-menu-lg-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-lg-end{--bs-position:end}.dropdown-menu-lg-end[data-bs-popper]{right:0;left:auto}}@media (min-width:1200px){.dropdown-menu-xl-start{--bs-position:start}.dropdown-menu-xl-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-xl-end{--bs-position:end}.dropdown-menu-xl-end[data-bs-popper]{right:0;left:auto}}@media (min-width:1400px){.dropdown-menu-xxl-start{--bs-position:start}.dropdown-menu-xxl-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-xxl-end{--bs-position:end}.dropdown-menu-xxl-end[data-bs-popper]{right:0;left:auto}}.dropup .dropdown-menu[data-bs-popper]{top:auto;bottom:100%;margin-top:0;margin-bottom:.125rem}.dropup .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:0;border-right:.3em solid transparent;border-bottom:.3em solid;border-left:.3em solid transparent}.dropup .dropdown-toggle:empty::after{margin-left:0}.dropend .dropdown-menu[data-bs-popper]{top:0;right:auto;left:100%;margin-top:0;margin-left:.125rem}.dropend .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid transparent;border-right:0;border-bottom:.3em solid transparent;border-left:.3em solid}.dropend .dropdown-toggle:empty::after{margin-left:0}.dropend .dropdown-toggle::after{vertical-align:0}.dropstart .dropdown-menu[data-bs-popper]{top:0;right:100%;left:auto;margin-top:0;margin-right:.125rem}.dropstart .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:""}.dropstart .dropdown-toggle::after{display:none}.dropstart .dropdown-toggle::before{display:inline-block;margin-right:.255em;vertical-align:.255em;content:"";border-top:.3em solid transparent;border-right:.3em solid;border-bottom:.3em solid transparent}.dropstart .dropdown-toggle:empty::after{margin-left:0}.dropstart .dropdown-toggle::before{vertical-align:0}.dropdown-divider{height:0;margin:.5rem 0;overflow:hidden;border-top:1px solid rgba(0,0,0,.15)}.dropdown-item{display:block;width:100%;padding:.25rem 1rem;clear:both;font-weight:400;color:#212529;text-align:inherit;text-decoration:none;white-space:nowrap;background-color:transparent;border:0}.dropdown-item:focus,.dropdown-item:hover{color:#1e2125;background-color:#e9ecef}.dropdown-item.active,.dropdown-item:active{color:#fff;text-decoration:none;background-color:#0d6efd}.dropdown-item.disabled,.dropdown-item:disabled{color:#adb5bd;pointer-events:none;background-color:transparent}.dropdown-menu.show{display:block}.dropdown-header{display:block;padding:.5rem 1rem;margin-bottom:0;font-size:.875rem;color:#6c757d;white-space:nowrap}.dropdown-item-text{display:block;padding:.25rem 1rem;color:#212529}.dropdown-menu-dark{color:#dee2e6;background-color:#343a40;border-color:rgba(0,0,0,.15)}.dropdown-menu-dark .dropdown-item{color:#dee2e6}.dropdown-menu-dark .dropdown-item:focus,.dropdown-menu-dark .dropdown-item:hover{color:#fff;background-color:rgba(255,255,255,.15)}.dropdown-menu-dark .dropdown-item.active,.dropdown-menu-dark .dropdown-item:active{color:#fff;background-color:#0d6efd}.dropdown-menu-dark .dropdown-item.disabled,.dropdown-menu-dark .dropdown-item:disabled{color:#adb5bd}.dropdown-menu-dark .dropdown-divider{border-color:rgba(0,0,0,.15)}.dropdown-menu-dark .dropdown-item-text{color:#dee2e6}.dropdown-menu-dark .dropdown-header{color:#adb5bd}.btn-group,.btn-group-vertical{position:relative;display:inline-flex;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;flex:1 1 auto}.btn-group-vertical>.btn-check:checked+.btn,.btn-group-vertical>.btn-check:focus+.btn,.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn-check:checked+.btn,.btn-group>.btn-check:focus+.btn,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:1}.btn-toolbar{display:flex;flex-wrap:wrap;justify-content:flex-start}.btn-toolbar .input-group{width:auto}.btn-group>.btn-group:not(:first-child),.btn-group>.btn:not(:first-child){margin-left:-1px}.btn-group>.btn-group:not(:last-child)>.btn,.btn-group>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:not(:first-child)>.btn,.btn-group>.btn:nth-child(n+3),.btn-group>:not(.btn-check)+.btn{border-top-left-radius:0;border-bottom-left-radius:0}.dropdown-toggle-split{padding-right:.5625rem;padding-left:.5625rem}.dropdown-toggle-split::after,.dropend .dropdown-toggle-split::after,.dropup .dropdown-toggle-split::after{margin-left:0}.dropstart .dropdown-toggle-split::before{margin-right:0}.btn-group-sm>.btn+.dropdown-toggle-split,.btn-sm+.dropdown-toggle-split{padding-right:.375rem;padding-left:.375rem}.btn-group-lg>.btn+.dropdown-toggle-split,.btn-lg+.dropdown-toggle-split{padding-right:.75rem;padding-left:.75rem}.btn-group-vertical{flex-direction:column;align-items:flex-start;justify-content:center}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group{width:100%}.btn-group-vertical>.btn-group:not(:first-child),.btn-group-vertical>.btn:not(:first-child){margin-top:-1px}.btn-group-vertical>.btn-group:not(:last-child)>.btn,.btn-group-vertical>.btn:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:not(:first-child)>.btn,.btn-group-vertical>.btn~.btn{border-top-left-radius:0;border-top-right-radius:0}.nav{display:flex;flex-wrap:wrap;padding-left:0;margin-bottom:0;list-style:none}.nav-link{display:block;padding:.5rem 1rem;color:#0d6efd;text-decoration:none;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out}@media (prefers-reduced-motion:reduce){.nav-link{transition:none}}.nav-link:focus,.nav-link:hover{color:#0a58ca}.nav-link.disabled{color:#6c757d;pointer-events:none;cursor:default}.nav-tabs{border-bottom:1px solid #dee2e6}.nav-tabs .nav-link{margin-bottom:-1px;background:0 0;border:1px solid transparent;border-top-left-radius:.25rem;border-top-right-radius:.25rem}.nav-tabs .nav-link:focus,.nav-tabs .nav-link:hover{border-color:#e9ecef #e9ecef #dee2e6;isolation:isolate}.nav-tabs .nav-link.disabled{color:#6c757d;background-color:transparent;border-color:transparent}.nav-tabs .nav-item.show .nav-link,.nav-tabs .nav-link.active{color:#495057;background-color:#fff;border-color:#dee2e6 #dee2e6 #fff}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.nav-pills .nav-link{background:0 0;border:0;border-radius:.25rem}.nav-pills .nav-link.active,.nav-pills .show>.nav-link{color:#fff;background-color:#0d6efd}.nav-fill .nav-item,.nav-fill>.nav-link{flex:1 1 auto;text-align:center}.nav-justified .nav-item,.nav-justified>.nav-link{flex-basis:0;flex-grow:1;text-align:center}.nav-fill .nav-item .nav-link,.nav-justified .nav-item .nav-link{width:100%}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.navbar{position:relative;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;padding-top:.5rem;padding-bottom:.5rem}.navbar>.container,.navbar>.container-fluid,.navbar>.container-lg,.navbar>.container-md,.navbar>.container-sm,.navbar>.container-xl,.navbar>.container-xxl{display:flex;flex-wrap:inherit;align-items:center;justify-content:space-between}.navbar-brand{padding-top:.3125rem;padding-bottom:.3125rem;margin-right:1rem;font-size:1.25rem;text-decoration:none;white-space:nowrap}.navbar-nav{display:flex;flex-direction:column;padding-left:0;margin-bottom:0;list-style:none}.navbar-nav .nav-link{padding-right:0;padding-left:0}.navbar-nav .dropdown-menu{position:static}.navbar-text{padding-top:.5rem;padding-bottom:.5rem}.navbar-collapse{flex-basis:100%;flex-grow:1;align-items:center}.navbar-toggler{padding:.25rem .75rem;font-size:1.25rem;line-height:1;background-color:transparent;border:1px solid transparent;border-radius:.25rem;transition:box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.navbar-toggler{transition:none}}.navbar-toggler:hover{text-decoration:none}.navbar-toggler:focus{text-decoration:none;outline:0;box-shadow:0 0 0 .25rem}.navbar-toggler-icon{display:inline-block;width:1.5em;height:1.5em;vertical-align:middle;background-repeat:no-repeat;background-position:center;background-size:100%}.navbar-nav-scroll{max-height:var(--bs-scroll-height,75vh);overflow-y:auto}@media (min-width:576px){.navbar-expand-sm{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-sm .navbar-nav{flex-direction:row}.navbar-expand-sm .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-sm .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-sm .navbar-nav-scroll{overflow:visible}.navbar-expand-sm .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-sm .navbar-toggler{display:none}.navbar-expand-sm .offcanvas-header{display:none}.navbar-expand-sm .offcanvas{position:inherit;bottom:0;z-index:1000;flex-grow:1;visibility:visible!important;background-color:transparent;border-right:0;border-left:0;transition:none;transform:none}.navbar-expand-sm .offcanvas-bottom,.navbar-expand-sm .offcanvas-top{height:auto;border-top:0;border-bottom:0}.navbar-expand-sm .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}}@media (min-width:768px){.navbar-expand-md{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-md .navbar-nav{flex-direction:row}.navbar-expand-md .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-md .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-md .navbar-nav-scroll{overflow:visible}.navbar-expand-md .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-md .navbar-toggler{display:none}.navbar-expand-md .offcanvas-header{display:none}.navbar-expand-md .offcanvas{position:inherit;bottom:0;z-index:1000;flex-grow:1;visibility:visible!important;background-color:transparent;border-right:0;border-left:0;transition:none;transform:none}.navbar-expand-md .offcanvas-bottom,.navbar-expand-md .offcanvas-top{height:auto;border-top:0;border-bottom:0}.navbar-expand-md .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}}@media (min-width:992px){.navbar-expand-lg{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-lg .navbar-nav{flex-direction:row}.navbar-expand-lg .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-lg .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-lg .navbar-nav-scroll{overflow:visible}.navbar-expand-lg .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-lg .navbar-toggler{display:none}.navbar-expand-lg .offcanvas-header{display:none}.navbar-expand-lg .offcanvas{position:inherit;bottom:0;z-index:1000;flex-grow:1;visibility:visible!important;background-color:transparent;border-right:0;border-left:0;transition:none;transform:none}.navbar-expand-lg .offcanvas-bottom,.navbar-expand-lg .offcanvas-top{height:auto;border-top:0;border-bottom:0}.navbar-expand-lg .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}}@media (min-width:1200px){.navbar-expand-xl{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-xl .navbar-nav{flex-direction:row}.navbar-expand-xl .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-xl .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-xl .navbar-nav-scroll{overflow:visible}.navbar-expand-xl .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-xl .navbar-toggler{display:none}.navbar-expand-xl .offcanvas-header{display:none}.navbar-expand-xl .offcanvas{position:inherit;bottom:0;z-index:1000;flex-grow:1;visibility:visible!important;background-color:transparent;border-right:0;border-left:0;transition:none;transform:none}.navbar-expand-xl .offcanvas-bottom,.navbar-expand-xl .offcanvas-top{height:auto;border-top:0;border-bottom:0}.navbar-expand-xl .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}}@media (min-width:1400px){.navbar-expand-xxl{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-xxl .navbar-nav{flex-direction:row}.navbar-expand-xxl .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-xxl .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-xxl .navbar-nav-scroll{overflow:visible}.navbar-expand-xxl .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-xxl .navbar-toggler{display:none}.navbar-expand-xxl .offcanvas-header{display:none}.navbar-expand-xxl .offcanvas{position:inherit;bottom:0;z-index:1000;flex-grow:1;visibility:visible!important;background-color:transparent;border-right:0;border-left:0;transition:none;transform:none}.navbar-expand-xxl .offcanvas-bottom,.navbar-expand-xxl .offcanvas-top{height:auto;border-top:0;border-bottom:0}.navbar-expand-xxl .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}}.navbar-expand{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand .navbar-nav{flex-direction:row}.navbar-expand .navbar-nav .dropdown-menu{position:absolute}.navbar-expand .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand .navbar-nav-scroll{overflow:visible}.navbar-expand .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand .navbar-toggler{display:none}.navbar-expand .offcanvas-header{display:none}.navbar-expand .offcanvas{position:inherit;bottom:0;z-index:1000;flex-grow:1;visibility:visible!important;background-color:transparent;border-right:0;border-left:0;transition:none;transform:none}.navbar-expand .offcanvas-bottom,.navbar-expand .offcanvas-top{height:auto;border-top:0;border-bottom:0}.navbar-expand .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}.navbar-light .navbar-brand{color:rgba(0,0,0,.9)}.navbar-light .navbar-brand:focus,.navbar-light .navbar-brand:hover{color:rgba(0,0,0,.9)}.navbar-light .navbar-nav .nav-link{color:rgba(0,0,0,.55)}.navbar-light .navbar-nav .nav-link:focus,.navbar-light .navbar-nav .nav-link:hover{color:rgba(0,0,0,.7)}.navbar-light .navbar-nav .nav-link.disabled{color:rgba(0,0,0,.3)}.navbar-light .navbar-nav .nav-link.active,.navbar-light .navbar-nav .show>.nav-link{color:rgba(0,0,0,.9)}.navbar-light .navbar-toggler{color:rgba(0,0,0,.55);border-color:rgba(0,0,0,.1)}.navbar-light .navbar-toggler-icon{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 0, 0, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e")}.navbar-light .navbar-text{color:rgba(0,0,0,.55)}.navbar-light .navbar-text a,.navbar-light .navbar-text a:focus,.navbar-light .navbar-text a:hover{color:rgba(0,0,0,.9)}.navbar-dark .navbar-brand{color:#fff}.navbar-dark .navbar-brand:focus,.navbar-dark .navbar-brand:hover{color:#fff}.navbar-dark .navbar-nav .nav-link{color:rgba(255,255,255,.55)}.navbar-dark .navbar-nav .nav-link:focus,.navbar-dark .navbar-nav .nav-link:hover{color:rgba(255,255,255,.75)}.navbar-dark .navbar-nav .nav-link.disabled{color:rgba(255,255,255,.25)}.navbar-dark .navbar-nav .nav-link.active,.navbar-dark .navbar-nav .show>.nav-link{color:#fff}.navbar-dark .navbar-toggler{color:rgba(255,255,255,.55);border-color:rgba(255,255,255,.1)}.navbar-dark .navbar-toggler-icon{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e")}.navbar-dark .navbar-text{color:rgba(255,255,255,.55)}.navbar-dark .navbar-text a,.navbar-dark .navbar-text a:focus,.navbar-dark .navbar-text a:hover{color:#fff}.card{position:relative;display:flex;flex-direction:column;min-width:0;word-wrap:break-word;background-color:#fff;background-clip:border-box;border:1px solid rgba(0,0,0,.125);border-radius:.25rem}.card>hr{margin-right:0;margin-left:0}.card>.list-group{border-top:inherit;border-bottom:inherit}.card>.list-group:first-child{border-top-width:0;border-top-left-radius:calc(.25rem - 1px);border-top-right-radius:calc(.25rem - 1px)}.card>.list-group:last-child{border-bottom-width:0;border-bottom-right-radius:calc(.25rem - 1px);border-bottom-left-radius:calc(.25rem - 1px)}.card>.card-header+.list-group,.card>.list-group+.card-footer{border-top:0}.card-body{flex:1 1 auto;padding:1rem 1rem}.card-title{margin-bottom:.5rem}.card-subtitle{margin-top:-.25rem;margin-bottom:0}.card-text:last-child{margin-bottom:0}.card-link+.card-link{margin-left:1rem}.card-header{padding:.5rem 1rem;margin-bottom:0;background-color:rgba(0,0,0,.03);border-bottom:1px solid rgba(0,0,0,.125)}.card-header:first-child{border-radius:calc(.25rem - 1px) calc(.25rem - 1px) 0 0}.card-footer{padding:.5rem 1rem;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.125)}.card-footer:last-child{border-radius:0 0 calc(.25rem - 1px) calc(.25rem - 1px)}.card-header-tabs{margin-right:-.5rem;margin-bottom:-.5rem;margin-left:-.5rem;border-bottom:0}.card-header-pills{margin-right:-.5rem;margin-left:-.5rem}.card-img-overlay{position:absolute;top:0;right:0;bottom:0;left:0;padding:1rem;border-radius:calc(.25rem - 1px)}.card-img,.card-img-bottom,.card-img-top{width:100%}.card-img,.card-img-top{border-top-left-radius:calc(.25rem - 1px);border-top-right-radius:calc(.25rem - 1px)}.card-img,.card-img-bottom{border-bottom-right-radius:calc(.25rem - 1px);border-bottom-left-radius:calc(.25rem - 1px)}.card-group>.card{margin-bottom:.75rem}@media (min-width:576px){.card-group{display:flex;flex-flow:row wrap}.card-group>.card{flex:1 0 0%;margin-bottom:0}.card-group>.card+.card{margin-left:0;border-left:0}.card-group>.card:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.card-group>.card:not(:last-child) .card-header,.card-group>.card:not(:last-child) .card-img-top{border-top-right-radius:0}.card-group>.card:not(:last-child) .card-footer,.card-group>.card:not(:last-child) .card-img-bottom{border-bottom-right-radius:0}.card-group>.card:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.card-group>.card:not(:first-child) .card-header,.card-group>.card:not(:first-child) .card-img-top{border-top-left-radius:0}.card-group>.card:not(:first-child) .card-footer,.card-group>.card:not(:first-child) .card-img-bottom{border-bottom-left-radius:0}}.accordion-button{position:relative;display:flex;align-items:center;width:100%;padding:1rem 1.25rem;font-size:1rem;color:#212529;text-align:left;background-color:#fff;border:0;border-radius:0;overflow-anchor:none;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out,border-radius .15s ease}@media (prefers-reduced-motion:reduce){.accordion-button{transition:none}}.accordion-button:not(.collapsed){color:#0c63e4;background-color:#e7f1ff;box-shadow:inset 0 -1px 0 rgba(0,0,0,.125)}.accordion-button:not(.collapsed)::after{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%230c63e4'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");transform:rotate(-180deg)}.accordion-button::after{flex-shrink:0;width:1.25rem;height:1.25rem;margin-left:auto;content:"";background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23212529'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");background-repeat:no-repeat;background-size:1.25rem;transition:transform .2s ease-in-out}@media (prefers-reduced-motion:reduce){.accordion-button::after{transition:none}}.accordion-button:hover{z-index:2}.accordion-button:focus{z-index:3;border-color:#86b7fe;outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}.accordion-header{margin-bottom:0}.accordion-item{background-color:#fff;border:1px solid rgba(0,0,0,.125)}.accordion-item:first-of-type{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.accordion-item:first-of-type .accordion-button{border-top-left-radius:calc(.25rem - 1px);border-top-right-radius:calc(.25rem - 1px)}.accordion-item:not(:first-of-type){border-top:0}.accordion-item:last-of-type{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.accordion-item:last-of-type .accordion-button.collapsed{border-bottom-right-radius:calc(.25rem - 1px);border-bottom-left-radius:calc(.25rem - 1px)}.accordion-item:last-of-type .accordion-collapse{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.accordion-body{padding:1rem 1.25rem}.accordion-flush .accordion-collapse{border-width:0}.accordion-flush .accordion-item{border-right:0;border-left:0;border-radius:0}.accordion-flush .accordion-item:first-child{border-top:0}.accordion-flush .accordion-item:last-child{border-bottom:0}.accordion-flush .accordion-item .accordion-button{border-radius:0}.breadcrumb{display:flex;flex-wrap:wrap;padding:0 0;margin-bottom:1rem;list-style:none}.breadcrumb-item+.breadcrumb-item{padding-left:.5rem}.breadcrumb-item+.breadcrumb-item::before{float:left;padding-right:.5rem;color:#6c757d;content:var(--bs-breadcrumb-divider, "/")}.breadcrumb-item.active{color:#6c757d}.pagination{display:flex;padding-left:0;list-style:none}.page-link{position:relative;display:block;color:#0d6efd;text-decoration:none;background-color:#fff;border:1px solid #dee2e6;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.page-link{transition:none}}.page-link:hover{z-index:2;color:#0a58ca;background-color:#e9ecef;border-color:#dee2e6}.page-link:focus{z-index:3;color:#0a58ca;background-color:#e9ecef;outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}.page-item:not(:first-child) .page-link{margin-left:-1px}.page-item.active .page-link{z-index:3;color:#fff;background-color:#0d6efd;border-color:#0d6efd}.page-item.disabled .page-link{color:#6c757d;pointer-events:none;background-color:#fff;border-color:#dee2e6}.page-link{padding:.375rem .75rem}.page-item:first-child .page-link{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.page-item:last-child .page-link{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.pagination-lg .page-link{padding:.75rem 1.5rem;font-size:1.25rem}.pagination-lg .page-item:first-child .page-link{border-top-left-radius:.3rem;border-bottom-left-radius:.3rem}.pagination-lg .page-item:last-child .page-link{border-top-right-radius:.3rem;border-bottom-right-radius:.3rem}.pagination-sm .page-link{padding:.25rem .5rem;font-size:.875rem}.pagination-sm .page-item:first-child .page-link{border-top-left-radius:.2rem;border-bottom-left-radius:.2rem}.pagination-sm .page-item:last-child .page-link{border-top-right-radius:.2rem;border-bottom-right-radius:.2rem}.badge{display:inline-block;padding:.35em .65em;font-size:.75em;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25rem}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.alert{position:relative;padding:1rem 1rem;margin-bottom:1rem;border:1px solid transparent;border-radius:.25rem}.alert-heading{color:inherit}.alert-link{font-weight:700}.alert-dismissible{padding-right:3rem}.alert-dismissible .btn-close{position:absolute;top:0;right:0;z-index:2;padding:1.25rem 1rem}.alert-primary{color:#084298;background-color:#cfe2ff;border-color:#b6d4fe}.alert-primary .alert-link{color:#06357a}.alert-secondary{color:#41464b;background-color:#e2e3e5;border-color:#d3d6d8}.alert-secondary .alert-link{color:#34383c}.alert-success{color:#0f5132;background-color:#d1e7dd;border-color:#badbcc}.alert-success .alert-link{color:#0c4128}.alert-info{color:#055160;background-color:#cff4fc;border-color:#b6effb}.alert-info .alert-link{color:#04414d}.alert-warning{color:#664d03;background-color:#fff3cd;border-color:#ffecb5}.alert-warning .alert-link{color:#523e02}.alert-danger{color:#842029;background-color:#f8d7da;border-color:#f5c2c7}.alert-danger .alert-link{color:#6a1a21}.alert-light{color:#636464;background-color:#fefefe;border-color:#fdfdfe}.alert-light .alert-link{color:#4f5050}.alert-dark{color:#141619;background-color:#d3d3d4;border-color:#bcbebf}.alert-dark .alert-link{color:#101214}@-webkit-keyframes progress-bar-stripes{0%{background-position-x:1rem}}@keyframes progress-bar-stripes{0%{background-position-x:1rem}}.progress{display:flex;height:1rem;overflow:hidden;font-size:.75rem;background-color:#e9ecef;border-radius:.25rem}.progress-bar{display:flex;flex-direction:column;justify-content:center;overflow:hidden;color:#fff;text-align:center;white-space:nowrap;background-color:#0d6efd;transition:width .6s ease}@media (prefers-reduced-motion:reduce){.progress-bar{transition:none}}.progress-bar-striped{background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-size:1rem 1rem}.progress-bar-animated{-webkit-animation:1s linear infinite progress-bar-stripes;animation:1s linear infinite progress-bar-stripes}@media (prefers-reduced-motion:reduce){.progress-bar-animated{-webkit-animation:none;animation:none}}.list-group{display:flex;flex-direction:column;padding-left:0;margin-bottom:0;border-radius:.25rem}.list-group-numbered{list-style-type:none;counter-reset:section}.list-group-numbered>li::before{content:counters(section, ".") ". ";counter-increment:section}.list-group-item-action{width:100%;color:#495057;text-align:inherit}.list-group-item-action:focus,.list-group-item-action:hover{z-index:1;color:#495057;text-decoration:none;background-color:#f8f9fa}.list-group-item-action:active{color:#212529;background-color:#e9ecef}.list-group-item{position:relative;display:block;padding:.5rem 1rem;color:#212529;text-decoration:none;background-color:#fff;border:1px solid rgba(0,0,0,.125)}.list-group-item:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.list-group-item:last-child{border-bottom-right-radius:inherit;border-bottom-left-radius:inherit}.list-group-item.disabled,.list-group-item:disabled{color:#6c757d;pointer-events:none;background-color:#fff}.list-group-item.active{z-index:2;color:#fff;background-color:#0d6efd;border-color:#0d6efd}.list-group-item+.list-group-item{border-top-width:0}.list-group-item+.list-group-item.active{margin-top:-1px;border-top-width:1px}.list-group-horizontal{flex-direction:row}.list-group-horizontal>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal>.list-group-item.active{margin-top:0}.list-group-horizontal>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}@media (min-width:576px){.list-group-horizontal-sm{flex-direction:row}.list-group-horizontal-sm>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-sm>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-sm>.list-group-item.active{margin-top:0}.list-group-horizontal-sm>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-sm>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}@media (min-width:768px){.list-group-horizontal-md{flex-direction:row}.list-group-horizontal-md>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-md>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-md>.list-group-item.active{margin-top:0}.list-group-horizontal-md>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-md>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}@media (min-width:992px){.list-group-horizontal-lg{flex-direction:row}.list-group-horizontal-lg>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-lg>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-lg>.list-group-item.active{margin-top:0}.list-group-horizontal-lg>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-lg>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}@media (min-width:1200px){.list-group-horizontal-xl{flex-direction:row}.list-group-horizontal-xl>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-xl>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-xl>.list-group-item.active{margin-top:0}.list-group-horizontal-xl>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-xl>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}@media (min-width:1400px){.list-group-horizontal-xxl{flex-direction:row}.list-group-horizontal-xxl>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-xxl>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-xxl>.list-group-item.active{margin-top:0}.list-group-horizontal-xxl>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-xxl>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}.list-group-flush{border-radius:0}.list-group-flush>.list-group-item{border-width:0 0 1px}.list-group-flush>.list-group-item:last-child{border-bottom-width:0}.list-group-item-primary{color:#084298;background-color:#cfe2ff}.list-group-item-primary.list-group-item-action:focus,.list-group-item-primary.list-group-item-action:hover{color:#084298;background-color:#bacbe6}.list-group-item-primary.list-group-item-action.active{color:#fff;background-color:#084298;border-color:#084298}.list-group-item-secondary{color:#41464b;background-color:#e2e3e5}.list-group-item-secondary.list-group-item-action:focus,.list-group-item-secondary.list-group-item-action:hover{color:#41464b;background-color:#cbccce}.list-group-item-secondary.list-group-item-action.active{color:#fff;background-color:#41464b;border-color:#41464b}.list-group-item-success{color:#0f5132;background-color:#d1e7dd}.list-group-item-success.list-group-item-action:focus,.list-group-item-success.list-group-item-action:hover{color:#0f5132;background-color:#bcd0c7}.list-group-item-success.list-group-item-action.active{color:#fff;background-color:#0f5132;border-color:#0f5132}.list-group-item-info{color:#055160;background-color:#cff4fc}.list-group-item-info.list-group-item-action:focus,.list-group-item-info.list-group-item-action:hover{color:#055160;background-color:#badce3}.list-group-item-info.list-group-item-action.active{color:#fff;background-color:#055160;border-color:#055160}.list-group-item-warning{color:#664d03;background-color:#fff3cd}.list-group-item-warning.list-group-item-action:focus,.list-group-item-warning.list-group-item-action:hover{color:#664d03;background-color:#e6dbb9}.list-group-item-warning.list-group-item-action.active{color:#fff;background-color:#664d03;border-color:#664d03}.list-group-item-danger{color:#842029;background-color:#f8d7da}.list-group-item-danger.list-group-item-action:focus,.list-group-item-danger.list-group-item-action:hover{color:#842029;background-color:#dfc2c4}.list-group-item-danger.list-group-item-action.active{color:#fff;background-color:#842029;border-color:#842029}.list-group-item-light{color:#636464;background-color:#fefefe}.list-group-item-light.list-group-item-action:focus,.list-group-item-light.list-group-item-action:hover{color:#636464;background-color:#e5e5e5}.list-group-item-light.list-group-item-action.active{color:#fff;background-color:#636464;border-color:#636464}.list-group-item-dark{color:#141619;background-color:#d3d3d4}.list-group-item-dark.list-group-item-action:focus,.list-group-item-dark.list-group-item-action:hover{color:#141619;background-color:#bebebf}.list-group-item-dark.list-group-item-action.active{color:#fff;background-color:#141619;border-color:#141619}.btn-close{box-sizing:content-box;width:1em;height:1em;padding:.25em .25em;color:#000;background:transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat;border:0;border-radius:.25rem;opacity:.5}.btn-close:hover{color:#000;text-decoration:none;opacity:.75}.btn-close:focus{outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25);opacity:1}.btn-close.disabled,.btn-close:disabled{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:.25}.btn-close-white{filter:invert(1) grayscale(100%) brightness(200%)}.toast{width:350px;max-width:100%;font-size:.875rem;pointer-events:auto;background-color:rgba(255,255,255,.85);background-clip:padding-box;border:1px solid rgba(0,0,0,.1);box-shadow:0 .5rem 1rem rgba(0,0,0,.15);border-radius:.25rem}.toast.showing{opacity:0}.toast:not(.show){display:none}.toast-container{width:-webkit-max-content;width:-moz-max-content;width:max-content;max-width:100%;pointer-events:none}.toast-container>:not(:last-child){margin-bottom:.75rem}.toast-header{display:flex;align-items:center;padding:.5rem .75rem;color:#6c757d;background-color:rgba(255,255,255,.85);background-clip:padding-box;border-bottom:1px solid rgba(0,0,0,.05);border-top-left-radius:calc(.25rem - 1px);border-top-right-radius:calc(.25rem - 1px)}.toast-header .btn-close{margin-right:-.375rem;margin-left:.75rem}.toast-body{padding:.75rem;word-wrap:break-word}.modal{position:fixed;top:0;left:0;z-index:1055;display:none;width:100%;height:100%;overflow-x:hidden;overflow-y:auto;outline:0}.modal-dialog{position:relative;width:auto;margin:.5rem;pointer-events:none}.modal.fade .modal-dialog{transition:transform .3s ease-out;transform:translate(0,-50px)}@media (prefers-reduced-motion:reduce){.modal.fade .modal-dialog{transition:none}}.modal.show .modal-dialog{transform:none}.modal.modal-static .modal-dialog{transform:scale(1.02)}.modal-dialog-scrollable{height:calc(100% - 1rem)}.modal-dialog-scrollable .modal-content{max-height:100%;overflow:hidden}.modal-dialog-scrollable .modal-body{overflow-y:auto}.modal-dialog-centered{display:flex;align-items:center;min-height:calc(100% - 1rem)}.modal-content{position:relative;display:flex;flex-direction:column;width:100%;pointer-events:auto;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.2);border-radius:.3rem;outline:0}.modal-backdrop{position:fixed;top:0;left:0;z-index:1050;width:100vw;height:100vh;background-color:#000}.modal-backdrop.fade{opacity:0}.modal-backdrop.show{opacity:.5}.modal-header{display:flex;flex-shrink:0;align-items:center;justify-content:space-between;padding:1rem 1rem;border-bottom:1px solid #dee2e6;border-top-left-radius:calc(.3rem - 1px);border-top-right-radius:calc(.3rem - 1px)}.modal-header .btn-close{padding:.5rem .5rem;margin:-.5rem -.5rem -.5rem auto}.modal-title{margin-bottom:0;line-height:1.5}.modal-body{position:relative;flex:1 1 auto;padding:1rem}.modal-footer{display:flex;flex-wrap:wrap;flex-shrink:0;align-items:center;justify-content:flex-end;padding:.75rem;border-top:1px solid #dee2e6;border-bottom-right-radius:calc(.3rem - 1px);border-bottom-left-radius:calc(.3rem - 1px)}.modal-footer>*{margin:.25rem}@media (min-width:576px){.modal-dialog{max-width:500px;margin:1.75rem auto}.modal-dialog-scrollable{height:calc(100% - 3.5rem)}.modal-dialog-centered{min-height:calc(100% - 3.5rem)}.modal-sm{max-width:300px}}@media (min-width:992px){.modal-lg,.modal-xl{max-width:800px}}@media (min-width:1200px){.modal-xl{max-width:1140px}}.modal-fullscreen{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen .modal-header{border-radius:0}.modal-fullscreen .modal-body{overflow-y:auto}.modal-fullscreen .modal-footer{border-radius:0}@media (max-width:575.98px){.modal-fullscreen-sm-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-sm-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-sm-down .modal-header{border-radius:0}.modal-fullscreen-sm-down .modal-body{overflow-y:auto}.modal-fullscreen-sm-down .modal-footer{border-radius:0}}@media (max-width:767.98px){.modal-fullscreen-md-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-md-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-md-down .modal-header{border-radius:0}.modal-fullscreen-md-down .modal-body{overflow-y:auto}.modal-fullscreen-md-down .modal-footer{border-radius:0}}@media (max-width:991.98px){.modal-fullscreen-lg-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-lg-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-lg-down .modal-header{border-radius:0}.modal-fullscreen-lg-down .modal-body{overflow-y:auto}.modal-fullscreen-lg-down .modal-footer{border-radius:0}}@media (max-width:1199.98px){.modal-fullscreen-xl-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-xl-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-xl-down .modal-header{border-radius:0}.modal-fullscreen-xl-down .modal-body{overflow-y:auto}.modal-fullscreen-xl-down .modal-footer{border-radius:0}}@media (max-width:1399.98px){.modal-fullscreen-xxl-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-xxl-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-xxl-down .modal-header{border-radius:0}.modal-fullscreen-xxl-down .modal-body{overflow-y:auto}.modal-fullscreen-xxl-down .modal-footer{border-radius:0}}.tooltip{position:absolute;z-index:1080;display:block;margin:0;font-family:var(--bs-font-sans-serif);font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;white-space:normal;line-break:auto;font-size:.875rem;word-wrap:break-word;opacity:0}.tooltip.show{opacity:.9}.tooltip .tooltip-arrow{position:absolute;display:block;width:.8rem;height:.4rem}.tooltip .tooltip-arrow::before{position:absolute;content:"";border-color:transparent;border-style:solid}.bs-tooltip-auto[data-popper-placement^=top],.bs-tooltip-top{padding:.4rem 0}.bs-tooltip-auto[data-popper-placement^=top] .tooltip-arrow,.bs-tooltip-top .tooltip-arrow{bottom:0}.bs-tooltip-auto[data-popper-placement^=top] .tooltip-arrow::before,.bs-tooltip-top .tooltip-arrow::before{top:-1px;border-width:.4rem .4rem 0;border-top-color:#000}.bs-tooltip-auto[data-popper-placement^=right],.bs-tooltip-end{padding:0 .4rem}.bs-tooltip-auto[data-popper-placement^=right] .tooltip-arrow,.bs-tooltip-end .tooltip-arrow{left:0;width:.4rem;height:.8rem}.bs-tooltip-auto[data-popper-placement^=right] .tooltip-arrow::before,.bs-tooltip-end .tooltip-arrow::before{right:-1px;border-width:.4rem .4rem .4rem 0;border-right-color:#000}.bs-tooltip-auto[data-popper-placement^=bottom],.bs-tooltip-bottom{padding:.4rem 0}.bs-tooltip-auto[data-popper-placement^=bottom] .tooltip-arrow,.bs-tooltip-bottom .tooltip-arrow{top:0}.bs-tooltip-auto[data-popper-placement^=bottom] .tooltip-arrow::before,.bs-tooltip-bottom .tooltip-arrow::before{bottom:-1px;border-width:0 .4rem .4rem;border-bottom-color:#000}.bs-tooltip-auto[data-popper-placement^=left],.bs-tooltip-start{padding:0 .4rem}.bs-tooltip-auto[data-popper-placement^=left] .tooltip-arrow,.bs-tooltip-start .tooltip-arrow{right:0;width:.4rem;height:.8rem}.bs-tooltip-auto[data-popper-placement^=left] .tooltip-arrow::before,.bs-tooltip-start .tooltip-arrow::before{left:-1px;border-width:.4rem 0 .4rem .4rem;border-left-color:#000}.tooltip-inner{max-width:200px;padding:.25rem .5rem;color:#fff;text-align:center;background-color:#000;border-radius:.25rem}.popover{position:absolute;top:0;left:0;z-index:1070;display:block;max-width:276px;font-family:var(--bs-font-sans-serif);font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;white-space:normal;line-break:auto;font-size:.875rem;word-wrap:break-word;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.2);border-radius:.3rem}.popover .popover-arrow{position:absolute;display:block;width:1rem;height:.5rem}.popover .popover-arrow::after,.popover .popover-arrow::before{position:absolute;display:block;content:"";border-color:transparent;border-style:solid}.bs-popover-auto[data-popper-placement^=top]>.popover-arrow,.bs-popover-top>.popover-arrow{bottom:calc(-.5rem - 1px)}.bs-popover-auto[data-popper-placement^=top]>.popover-arrow::before,.bs-popover-top>.popover-arrow::before{bottom:0;border-width:.5rem .5rem 0;border-top-color:rgba(0,0,0,.25)}.bs-popover-auto[data-popper-placement^=top]>.popover-arrow::after,.bs-popover-top>.popover-arrow::after{bottom:1px;border-width:.5rem .5rem 0;border-top-color:#fff}.bs-popover-auto[data-popper-placement^=right]>.popover-arrow,.bs-popover-end>.popover-arrow{left:calc(-.5rem - 1px);width:.5rem;height:1rem}.bs-popover-auto[data-popper-placement^=right]>.popover-arrow::before,.bs-popover-end>.popover-arrow::before{left:0;border-width:.5rem .5rem .5rem 0;border-right-color:rgba(0,0,0,.25)}.bs-popover-auto[data-popper-placement^=right]>.popover-arrow::after,.bs-popover-end>.popover-arrow::after{left:1px;border-width:.5rem .5rem .5rem 0;border-right-color:#fff}.bs-popover-auto[data-popper-placement^=bottom]>.popover-arrow,.bs-popover-bottom>.popover-arrow{top:calc(-.5rem - 1px)}.bs-popover-auto[data-popper-placement^=bottom]>.popover-arrow::before,.bs-popover-bottom>.popover-arrow::before{top:0;border-width:0 .5rem .5rem .5rem;border-bottom-color:rgba(0,0,0,.25)}.bs-popover-auto[data-popper-placement^=bottom]>.popover-arrow::after,.bs-popover-bottom>.popover-arrow::after{top:1px;border-width:0 .5rem .5rem .5rem;border-bottom-color:#fff}.bs-popover-auto[data-popper-placement^=bottom] .popover-header::before,.bs-popover-bottom .popover-header::before{position:absolute;top:0;left:50%;display:block;width:1rem;margin-left:-.5rem;content:"";border-bottom:1px solid #f0f0f0}.bs-popover-auto[data-popper-placement^=left]>.popover-arrow,.bs-popover-start>.popover-arrow{right:calc(-.5rem - 1px);width:.5rem;height:1rem}.bs-popover-auto[data-popper-placement^=left]>.popover-arrow::before,.bs-popover-start>.popover-arrow::before{right:0;border-width:.5rem 0 .5rem .5rem;border-left-color:rgba(0,0,0,.25)}.bs-popover-auto[data-popper-placement^=left]>.popover-arrow::after,.bs-popover-start>.popover-arrow::after{right:1px;border-width:.5rem 0 .5rem .5rem;border-left-color:#fff}.popover-header{padding:.5rem 1rem;margin-bottom:0;font-size:1rem;background-color:#f0f0f0;border-bottom:1px solid rgba(0,0,0,.2);border-top-left-radius:calc(.3rem - 1px);border-top-right-radius:calc(.3rem - 1px)}.popover-header:empty{display:none}.popover-body{padding:1rem 1rem;color:#212529}.carousel{position:relative}.carousel.pointer-event{touch-action:pan-y}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner::after{display:block;clear:both;content:""}.carousel-item{position:relative;display:none;float:left;width:100%;margin-right:-100%;-webkit-backface-visibility:hidden;backface-visibility:hidden;transition:transform .6s ease-in-out}@media (prefers-reduced-motion:reduce){.carousel-item{transition:none}}.carousel-item-next,.carousel-item-prev,.carousel-item.active{display:block}.active.carousel-item-end,.carousel-item-next:not(.carousel-item-start){transform:translateX(100%)}.active.carousel-item-start,.carousel-item-prev:not(.carousel-item-end){transform:translateX(-100%)}.carousel-fade .carousel-item{opacity:0;transition-property:opacity;transform:none}.carousel-fade .carousel-item-next.carousel-item-start,.carousel-fade .carousel-item-prev.carousel-item-end,.carousel-fade .carousel-item.active{z-index:1;opacity:1}.carousel-fade .active.carousel-item-end,.carousel-fade .active.carousel-item-start{z-index:0;opacity:0;transition:opacity 0s .6s}@media (prefers-reduced-motion:reduce){.carousel-fade .active.carousel-item-end,.carousel-fade .active.carousel-item-start{transition:none}}.carousel-control-next,.carousel-control-prev{position:absolute;top:0;bottom:0;z-index:1;display:flex;align-items:center;justify-content:center;width:15%;padding:0;color:#fff;text-align:center;background:0 0;border:0;opacity:.5;transition:opacity .15s ease}@media (prefers-reduced-motion:reduce){.carousel-control-next,.carousel-control-prev{transition:none}}.carousel-control-next:focus,.carousel-control-next:hover,.carousel-control-prev:focus,.carousel-control-prev:hover{color:#fff;text-decoration:none;outline:0;opacity:.9}.carousel-control-prev{left:0}.carousel-control-next{right:0}.carousel-control-next-icon,.carousel-control-prev-icon{display:inline-block;width:2rem;height:2rem;background-repeat:no-repeat;background-position:50%;background-size:100% 100%}.carousel-control-prev-icon{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e")}.carousel-control-next-icon{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e")}.carousel-indicators{position:absolute;right:0;bottom:0;left:0;z-index:2;display:flex;justify-content:center;padding:0;margin-right:15%;margin-bottom:1rem;margin-left:15%;list-style:none}.carousel-indicators [data-bs-target]{box-sizing:content-box;flex:0 1 auto;width:30px;height:3px;padding:0;margin-right:3px;margin-left:3px;text-indent:-999px;cursor:pointer;background-color:#fff;background-clip:padding-box;border:0;border-top:10px solid transparent;border-bottom:10px solid transparent;opacity:.5;transition:opacity .6s ease}@media (prefers-reduced-motion:reduce){.carousel-indicators [data-bs-target]{transition:none}}.carousel-indicators .active{opacity:1}.carousel-caption{position:absolute;right:15%;bottom:1.25rem;left:15%;padding-top:1.25rem;padding-bottom:1.25rem;color:#fff;text-align:center}.carousel-dark .carousel-control-next-icon,.carousel-dark .carousel-control-prev-icon{filter:invert(1) grayscale(100)}.carousel-dark .carousel-indicators [data-bs-target]{background-color:#000}.carousel-dark .carousel-caption{color:#000}@-webkit-keyframes spinner-border{to{transform:rotate(360deg)}}@keyframes spinner-border{to{transform:rotate(360deg)}}.spinner-border{display:inline-block;width:2rem;height:2rem;vertical-align:-.125em;border:.25em solid currentColor;border-right-color:transparent;border-radius:50%;-webkit-animation:.75s linear infinite spinner-border;animation:.75s linear infinite spinner-border}.spinner-border-sm{width:1rem;height:1rem;border-width:.2em}@-webkit-keyframes spinner-grow{0%{transform:scale(0)}50%{opacity:1;transform:none}}@keyframes spinner-grow{0%{transform:scale(0)}50%{opacity:1;transform:none}}.spinner-grow{display:inline-block;width:2rem;height:2rem;vertical-align:-.125em;background-color:currentColor;border-radius:50%;opacity:0;-webkit-animation:.75s linear infinite spinner-grow;animation:.75s linear infinite spinner-grow}.spinner-grow-sm{width:1rem;height:1rem}@media (prefers-reduced-motion:reduce){.spinner-border,.spinner-grow{-webkit-animation-duration:1.5s;animation-duration:1.5s}}.offcanvas{position:fixed;bottom:0;z-index:1045;display:flex;flex-direction:column;max-width:100%;visibility:hidden;background-color:#fff;background-clip:padding-box;outline:0;transition:transform .3s ease-in-out}@media (prefers-reduced-motion:reduce){.offcanvas{transition:none}}.offcanvas-backdrop{position:fixed;top:0;left:0;z-index:1040;width:100vw;height:100vh;background-color:#000}.offcanvas-backdrop.fade{opacity:0}.offcanvas-backdrop.show{opacity:.5}.offcanvas-header{display:flex;align-items:center;justify-content:space-between;padding:1rem 1rem}.offcanvas-header .btn-close{padding:.5rem .5rem;margin-top:-.5rem;margin-right:-.5rem;margin-bottom:-.5rem}.offcanvas-title{margin-bottom:0;line-height:1.5}.offcanvas-body{flex-grow:1;padding:1rem 1rem;overflow-y:auto}.offcanvas-start{top:0;left:0;width:400px;border-right:1px solid rgba(0,0,0,.2);transform:translateX(-100%)}.offcanvas-end{top:0;right:0;width:400px;border-left:1px solid rgba(0,0,0,.2);transform:translateX(100%)}.offcanvas-top{top:0;right:0;left:0;height:30vh;max-height:100%;border-bottom:1px solid rgba(0,0,0,.2);transform:translateY(-100%)}.offcanvas-bottom{right:0;left:0;height:30vh;max-height:100%;border-top:1px solid rgba(0,0,0,.2);transform:translateY(100%)}.offcanvas.show{transform:none}.placeholder{display:inline-block;min-height:1em;vertical-align:middle;cursor:wait;background-color:currentColor;opacity:.5}.placeholder.btn::before{display:inline-block;content:""}.placeholder-xs{min-height:.6em}.placeholder-sm{min-height:.8em}.placeholder-lg{min-height:1.2em}.placeholder-glow .placeholder{-webkit-animation:placeholder-glow 2s ease-in-out infinite;animation:placeholder-glow 2s ease-in-out infinite}@-webkit-keyframes placeholder-glow{50%{opacity:.2}}@keyframes placeholder-glow{50%{opacity:.2}}.placeholder-wave{-webkit-mask-image:linear-gradient(130deg,#000 55%,rgba(0,0,0,0.8) 75%,#000 95%);mask-image:linear-gradient(130deg,#000 55%,rgba(0,0,0,0.8) 75%,#000 95%);-webkit-mask-size:200% 100%;mask-size:200% 100%;-webkit-animation:placeholder-wave 2s linear infinite;animation:placeholder-wave 2s linear infinite}@-webkit-keyframes placeholder-wave{100%{-webkit-mask-position:-200% 0%;mask-position:-200% 0%}}@keyframes placeholder-wave{100%{-webkit-mask-position:-200% 0%;mask-position:-200% 0%}}.clearfix::after{display:block;clear:both;content:""}.link-primary{color:#0d6efd}.link-primary:focus,.link-primary:hover{color:#0a58ca}.link-secondary{color:#6c757d}.link-secondary:focus,.link-secondary:hover{color:#565e64}.link-success{color:#198754}.link-success:focus,.link-success:hover{color:#146c43}.link-info{color:#0dcaf0}.link-info:focus,.link-info:hover{color:#3dd5f3}.link-warning{color:#ffc107}.link-warning:focus,.link-warning:hover{color:#ffcd39}.link-danger{color:#dc3545}.link-danger:focus,.link-danger:hover{color:#b02a37}.link-light{color:#f8f9fa}.link-light:focus,.link-light:hover{color:#f9fafb}.link-dark{color:#212529}.link-dark:focus,.link-dark:hover{color:#1a1e21}.ratio{position:relative;width:100%}.ratio::before{display:block;padding-top:var(--bs-aspect-ratio);content:""}.ratio>*{position:absolute;top:0;left:0;width:100%;height:100%}.ratio-1x1{--bs-aspect-ratio:100%}.ratio-4x3{--bs-aspect-ratio:75%}.ratio-16x9{--bs-aspect-ratio:56.25%}.ratio-21x9{--bs-aspect-ratio:42.8571428571%}.fixed-top{position:fixed;top:0;right:0;left:0;z-index:1030}.fixed-bottom{position:fixed;right:0;bottom:0;left:0;z-index:1030}.sticky-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}@media (min-width:576px){.sticky-sm-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}}@media (min-width:768px){.sticky-md-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}}@media (min-width:992px){.sticky-lg-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}}@media (min-width:1200px){.sticky-xl-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}}@media (min-width:1400px){.sticky-xxl-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}}.hstack{display:flex;flex-direction:row;align-items:center;align-self:stretch}.vstack{display:flex;flex:1 1 auto;flex-direction:column;align-self:stretch}.visually-hidden,.visually-hidden-focusable:not(:focus):not(:focus-within){position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}.stretched-link::after{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;content:""}.text-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vr{display:inline-block;align-self:stretch;width:1px;min-height:1em;background-color:currentColor;opacity:.25}.align-baseline{vertical-align:baseline!important}.align-top{vertical-align:top!important}.align-middle{vertical-align:middle!important}.align-bottom{vertical-align:bottom!important}.align-text-bottom{vertical-align:text-bottom!important}.align-text-top{vertical-align:text-top!important}.float-start{float:left!important}.float-end{float:right!important}.float-none{float:none!important}.opacity-0{opacity:0!important}.opacity-25{opacity:.25!important}.opacity-50{opacity:.5!important}.opacity-75{opacity:.75!important}.opacity-100{opacity:1!important}.overflow-auto{overflow:auto!important}.overflow-hidden{overflow:hidden!important}.overflow-visible{overflow:visible!important}.overflow-scroll{overflow:scroll!important}.d-inline{display:inline!important}.d-inline-block{display:inline-block!important}.d-block{display:block!important}.d-grid{display:grid!important}.d-table{display:table!important}.d-table-row{display:table-row!important}.d-table-cell{display:table-cell!important}.d-flex{display:flex!important}.d-inline-flex{display:inline-flex!important}.d-none{display:none!important}.shadow{box-shadow:0 .5rem 1rem rgba(0,0,0,.15)!important}.shadow-sm{box-shadow:0 .125rem .25rem rgba(0,0,0,.075)!important}.shadow-lg{box-shadow:0 1rem 3rem rgba(0,0,0,.175)!important}.shadow-none{box-shadow:none!important}.position-static{position:static!important}.position-relative{position:relative!important}.position-absolute{position:absolute!important}.position-fixed{position:fixed!important}.position-sticky{position:-webkit-sticky!important;position:sticky!important}.top-0{top:0!important}.top-50{top:50%!important}.top-100{top:100%!important}.bottom-0{bottom:0!important}.bottom-50{bottom:50%!important}.bottom-100{bottom:100%!important}.start-0{left:0!important}.start-50{left:50%!important}.start-100{left:100%!important}.end-0{right:0!important}.end-50{right:50%!important}.end-100{right:100%!important}.translate-middle{transform:translate(-50%,-50%)!important}.translate-middle-x{transform:translateX(-50%)!important}.translate-middle-y{transform:translateY(-50%)!important}.border{border:1px solid #dee2e6!important}.border-0{border:0!important}.border-top{border-top:1px solid #dee2e6!important}.border-top-0{border-top:0!important}.border-end{border-right:1px solid #dee2e6!important}.border-end-0{border-right:0!important}.border-bottom{border-bottom:1px solid #dee2e6!important}.border-bottom-0{border-bottom:0!important}.border-start{border-left:1px solid #dee2e6!important}.border-start-0{border-left:0!important}.border-primary{border-color:#0d6efd!important}.border-secondary{border-color:#6c757d!important}.border-success{border-color:#198754!important}.border-info{border-color:#0dcaf0!important}.border-warning{border-color:#ffc107!important}.border-danger{border-color:#dc3545!important}.border-light{border-color:#f8f9fa!important}.border-dark{border-color:#212529!important}.border-white{border-color:#fff!important}.border-1{border-width:1px!important}.border-2{border-width:2px!important}.border-3{border-width:3px!important}.border-4{border-width:4px!important}.border-5{border-width:5px!important}.w-25{width:25%!important}.w-50{width:50%!important}.w-75{width:75%!important}.w-100{width:100%!important}.w-auto{width:auto!important}.mw-100{max-width:100%!important}.vw-100{width:100vw!important}.min-vw-100{min-width:100vw!important}.h-25{height:25%!important}.h-50{height:50%!important}.h-75{height:75%!important}.h-100{height:100%!important}.h-auto{height:auto!important}.mh-100{max-height:100%!important}.vh-100{height:100vh!important}.min-vh-100{min-height:100vh!important}.flex-fill{flex:1 1 auto!important}.flex-row{flex-direction:row!important}.flex-column{flex-direction:column!important}.flex-row-reverse{flex-direction:row-reverse!important}.flex-column-reverse{flex-direction:column-reverse!important}.flex-grow-0{flex-grow:0!important}.flex-grow-1{flex-grow:1!important}.flex-shrink-0{flex-shrink:0!important}.flex-shrink-1{flex-shrink:1!important}.flex-wrap{flex-wrap:wrap!important}.flex-nowrap{flex-wrap:nowrap!important}.flex-wrap-reverse{flex-wrap:wrap-reverse!important}.gap-0{gap:0!important}.gap-1{gap:.25rem!important}.gap-2{gap:.5rem!important}.gap-3{gap:1rem!important}.gap-4{gap:1.5rem!important}.gap-5{gap:3rem!important}.justify-content-start{justify-content:flex-start!important}.justify-content-end{justify-content:flex-end!important}.justify-content-center{justify-content:center!important}.justify-content-between{justify-content:space-between!important}.justify-content-around{justify-content:space-around!important}.justify-content-evenly{justify-content:space-evenly!important}.align-items-start{align-items:flex-start!important}.align-items-end{align-items:flex-end!important}.align-items-center{align-items:center!important}.align-items-baseline{align-items:baseline!important}.align-items-stretch{align-items:stretch!important}.align-content-start{align-content:flex-start!important}.align-content-end{align-content:flex-end!important}.align-content-center{align-content:center!important}.align-content-between{align-content:space-between!important}.align-content-around{align-content:space-around!important}.align-content-stretch{align-content:stretch!important}.align-self-auto{align-self:auto!important}.align-self-start{align-self:flex-start!important}.align-self-end{align-self:flex-end!important}.align-self-center{align-self:center!important}.align-self-baseline{align-self:baseline!important}.align-self-stretch{align-self:stretch!important}.order-first{order:-1!important}.order-0{order:0!important}.order-1{order:1!important}.order-2{order:2!important}.order-3{order:3!important}.order-4{order:4!important}.order-5{order:5!important}.order-last{order:6!important}.m-0{margin:0!important}.m-1{margin:.25rem!important}.m-2{margin:.5rem!important}.m-3{margin:1rem!important}.m-4{margin:1.5rem!important}.m-5{margin:3rem!important}.m-auto{margin:auto!important}.mx-0{margin-right:0!important;margin-left:0!important}.mx-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-3{margin-right:1rem!important;margin-left:1rem!important}.mx-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-5{margin-right:3rem!important;margin-left:3rem!important}.mx-auto{margin-right:auto!important;margin-left:auto!important}.my-0{margin-top:0!important;margin-bottom:0!important}.my-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-0{margin-top:0!important}.mt-1{margin-top:.25rem!important}.mt-2{margin-top:.5rem!important}.mt-3{margin-top:1rem!important}.mt-4{margin-top:1.5rem!important}.mt-5{margin-top:3rem!important}.mt-auto{margin-top:auto!important}.me-0{margin-right:0!important}.me-1{margin-right:.25rem!important}.me-2{margin-right:.5rem!important}.me-3{margin-right:1rem!important}.me-4{margin-right:1.5rem!important}.me-5{margin-right:3rem!important}.me-auto{margin-right:auto!important}.mb-0{margin-bottom:0!important}.mb-1{margin-bottom:.25rem!important}.mb-2{margin-bottom:.5rem!important}.mb-3{margin-bottom:1rem!important}.mb-4{margin-bottom:1.5rem!important}.mb-5{margin-bottom:3rem!important}.mb-auto{margin-bottom:auto!important}.ms-0{margin-left:0!important}.ms-1{margin-left:.25rem!important}.ms-2{margin-left:.5rem!important}.ms-3{margin-left:1rem!important}.ms-4{margin-left:1.5rem!important}.ms-5{margin-left:3rem!important}.ms-auto{margin-left:auto!important}.p-0{padding:0!important}.p-1{padding:.25rem!important}.p-2{padding:.5rem!important}.p-3{padding:1rem!important}.p-4{padding:1.5rem!important}.p-5{padding:3rem!important}.px-0{padding-right:0!important;padding-left:0!important}.px-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-3{padding-right:1rem!important;padding-left:1rem!important}.px-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-5{padding-right:3rem!important;padding-left:3rem!important}.py-0{padding-top:0!important;padding-bottom:0!important}.py-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-0{padding-top:0!important}.pt-1{padding-top:.25rem!important}.pt-2{padding-top:.5rem!important}.pt-3{padding-top:1rem!important}.pt-4{padding-top:1.5rem!important}.pt-5{padding-top:3rem!important}.pe-0{padding-right:0!important}.pe-1{padding-right:.25rem!important}.pe-2{padding-right:.5rem!important}.pe-3{padding-right:1rem!important}.pe-4{padding-right:1.5rem!important}.pe-5{padding-right:3rem!important}.pb-0{padding-bottom:0!important}.pb-1{padding-bottom:.25rem!important}.pb-2{padding-bottom:.5rem!important}.pb-3{padding-bottom:1rem!important}.pb-4{padding-bottom:1.5rem!important}.pb-5{padding-bottom:3rem!important}.ps-0{padding-left:0!important}.ps-1{padding-left:.25rem!important}.ps-2{padding-left:.5rem!important}.ps-3{padding-left:1rem!important}.ps-4{padding-left:1.5rem!important}.ps-5{padding-left:3rem!important}.font-monospace{font-family:var(--bs-font-monospace)!important}.fs-1{font-size:calc(1.375rem + 1.5vw)!important}.fs-2{font-size:calc(1.325rem + .9vw)!important}.fs-3{font-size:calc(1.3rem + .6vw)!important}.fs-4{font-size:calc(1.275rem + .3vw)!important}.fs-5{font-size:1.25rem!important}.fs-6{font-size:1rem!important}.fst-italic{font-style:italic!important}.fst-normal{font-style:normal!important}.fw-light{font-weight:300!important}.fw-lighter{font-weight:lighter!important}.fw-normal{font-weight:400!important}.fw-bold{font-weight:700!important}.fw-bolder{font-weight:bolder!important}.lh-1{line-height:1!important}.lh-sm{line-height:1.25!important}.lh-base{line-height:1.5!important}.lh-lg{line-height:2!important}.text-start{text-align:left!important}.text-end{text-align:right!important}.text-center{text-align:center!important}.text-decoration-none{text-decoration:none!important}.text-decoration-underline{text-decoration:underline!important}.text-decoration-line-through{text-decoration:line-through!important}.text-lowercase{text-transform:lowercase!important}.text-uppercase{text-transform:uppercase!important}.text-capitalize{text-transform:capitalize!important}.text-wrap{white-space:normal!important}.text-nowrap{white-space:nowrap!important}.text-break{word-wrap:break-word!important;word-break:break-word!important}.text-primary{--bs-text-opacity:1;color:rgba(var(--bs-primary-rgb),var(--bs-text-opacity))!important}.text-secondary{--bs-text-opacity:1;color:rgba(var(--bs-secondary-rgb),var(--bs-text-opacity))!important}.text-success{--bs-text-opacity:1;color:rgba(var(--bs-success-rgb),var(--bs-text-opacity))!important}.text-info{--bs-text-opacity:1;color:rgba(var(--bs-info-rgb),var(--bs-text-opacity))!important}.text-warning{--bs-text-opacity:1;color:rgba(var(--bs-warning-rgb),var(--bs-text-opacity))!important}.text-danger{--bs-text-opacity:1;color:rgba(var(--bs-danger-rgb),var(--bs-text-opacity))!important}.text-light{--bs-text-opacity:1;color:rgba(var(--bs-light-rgb),var(--bs-text-opacity))!important}.text-dark{--bs-text-opacity:1;color:rgba(var(--bs-dark-rgb),var(--bs-text-opacity))!important}.text-black{--bs-text-opacity:1;color:rgba(var(--bs-black-rgb),var(--bs-text-opacity))!important}.text-white{--bs-text-opacity:1;color:rgba(var(--bs-white-rgb),var(--bs-text-opacity))!important}.text-body{--bs-text-opacity:1;color:rgba(var(--bs-body-color-rgb),var(--bs-text-opacity))!important}.text-muted{--bs-text-opacity:1;color:#6c757d!important}.text-black-50{--bs-text-opacity:1;color:rgba(0,0,0,.5)!important}.text-white-50{--bs-text-opacity:1;color:rgba(255,255,255,.5)!important}.text-reset{--bs-text-opacity:1;color:inherit!important}.text-opacity-25{--bs-text-opacity:0.25}.text-opacity-50{--bs-text-opacity:0.5}.text-opacity-75{--bs-text-opacity:0.75}.text-opacity-100{--bs-text-opacity:1}.bg-primary{--bs-bg-opacity:1;background-color:rgba(var(--bs-primary-rgb),var(--bs-bg-opacity))!important}.bg-secondary{--bs-bg-opacity:1;background-color:rgba(var(--bs-secondary-rgb),var(--bs-bg-opacity))!important}.bg-success{--bs-bg-opacity:1;background-color:rgba(var(--bs-success-rgb),var(--bs-bg-opacity))!important}.bg-info{--bs-bg-opacity:1;background-color:rgba(var(--bs-info-rgb),var(--bs-bg-opacity))!important}.bg-warning{--bs-bg-opacity:1;background-color:rgba(var(--bs-warning-rgb),var(--bs-bg-opacity))!important}.bg-danger{--bs-bg-opacity:1;background-color:rgba(var(--bs-danger-rgb),var(--bs-bg-opacity))!important}.bg-light{--bs-bg-opacity:1;background-color:rgba(var(--bs-light-rgb),var(--bs-bg-opacity))!important}.bg-dark{--bs-bg-opacity:1;background-color:rgba(var(--bs-dark-rgb),var(--bs-bg-opacity))!important}.bg-black{--bs-bg-opacity:1;background-color:rgba(var(--bs-black-rgb),var(--bs-bg-opacity))!important}.bg-white{--bs-bg-opacity:1;background-color:rgba(var(--bs-white-rgb),var(--bs-bg-opacity))!important}.bg-body{--bs-bg-opacity:1;background-color:rgba(var(--bs-body-bg-rgb),var(--bs-bg-opacity))!important}.bg-transparent{--bs-bg-opacity:1;background-color:transparent!important}.bg-opacity-10{--bs-bg-opacity:0.1}.bg-opacity-25{--bs-bg-opacity:0.25}.bg-opacity-50{--bs-bg-opacity:0.5}.bg-opacity-75{--bs-bg-opacity:0.75}.bg-opacity-100{--bs-bg-opacity:1}.bg-gradient{background-image:var(--bs-gradient)!important}.user-select-all{-webkit-user-select:all!important;-moz-user-select:all!important;user-select:all!important}.user-select-auto{-webkit-user-select:auto!important;-moz-user-select:auto!important;user-select:auto!important}.user-select-none{-webkit-user-select:none!important;-moz-user-select:none!important;user-select:none!important}.pe-none{pointer-events:none!important}.pe-auto{pointer-events:auto!important}.rounded{border-radius:.25rem!important}.rounded-0{border-radius:0!important}.rounded-1{border-radius:.2rem!important}.rounded-2{border-radius:.25rem!important}.rounded-3{border-radius:.3rem!important}.rounded-circle{border-radius:50%!important}.rounded-pill{border-radius:50rem!important}.rounded-top{border-top-left-radius:.25rem!important;border-top-right-radius:.25rem!important}.rounded-end{border-top-right-radius:.25rem!important;border-bottom-right-radius:.25rem!important}.rounded-bottom{border-bottom-right-radius:.25rem!important;border-bottom-left-radius:.25rem!important}.rounded-start{border-bottom-left-radius:.25rem!important;border-top-left-radius:.25rem!important}.visible{visibility:visible!important}.invisible{visibility:hidden!important}@media (min-width:576px){.float-sm-start{float:left!important}.float-sm-end{float:right!important}.float-sm-none{float:none!important}.d-sm-inline{display:inline!important}.d-sm-inline-block{display:inline-block!important}.d-sm-block{display:block!important}.d-sm-grid{display:grid!important}.d-sm-table{display:table!important}.d-sm-table-row{display:table-row!important}.d-sm-table-cell{display:table-cell!important}.d-sm-flex{display:flex!important}.d-sm-inline-flex{display:inline-flex!important}.d-sm-none{display:none!important}.flex-sm-fill{flex:1 1 auto!important}.flex-sm-row{flex-direction:row!important}.flex-sm-column{flex-direction:column!important}.flex-sm-row-reverse{flex-direction:row-reverse!important}.flex-sm-column-reverse{flex-direction:column-reverse!important}.flex-sm-grow-0{flex-grow:0!important}.flex-sm-grow-1{flex-grow:1!important}.flex-sm-shrink-0{flex-shrink:0!important}.flex-sm-shrink-1{flex-shrink:1!important}.flex-sm-wrap{flex-wrap:wrap!important}.flex-sm-nowrap{flex-wrap:nowrap!important}.flex-sm-wrap-reverse{flex-wrap:wrap-reverse!important}.gap-sm-0{gap:0!important}.gap-sm-1{gap:.25rem!important}.gap-sm-2{gap:.5rem!important}.gap-sm-3{gap:1rem!important}.gap-sm-4{gap:1.5rem!important}.gap-sm-5{gap:3rem!important}.justify-content-sm-start{justify-content:flex-start!important}.justify-content-sm-end{justify-content:flex-end!important}.justify-content-sm-center{justify-content:center!important}.justify-content-sm-between{justify-content:space-between!important}.justify-content-sm-around{justify-content:space-around!important}.justify-content-sm-evenly{justify-content:space-evenly!important}.align-items-sm-start{align-items:flex-start!important}.align-items-sm-end{align-items:flex-end!important}.align-items-sm-center{align-items:center!important}.align-items-sm-baseline{align-items:baseline!important}.align-items-sm-stretch{align-items:stretch!important}.align-content-sm-start{align-content:flex-start!important}.align-content-sm-end{align-content:flex-end!important}.align-content-sm-center{align-content:center!important}.align-content-sm-between{align-content:space-between!important}.align-content-sm-around{align-content:space-around!important}.align-content-sm-stretch{align-content:stretch!important}.align-self-sm-auto{align-self:auto!important}.align-self-sm-start{align-self:flex-start!important}.align-self-sm-end{align-self:flex-end!important}.align-self-sm-center{align-self:center!important}.align-self-sm-baseline{align-self:baseline!important}.align-self-sm-stretch{align-self:stretch!important}.order-sm-first{order:-1!important}.order-sm-0{order:0!important}.order-sm-1{order:1!important}.order-sm-2{order:2!important}.order-sm-3{order:3!important}.order-sm-4{order:4!important}.order-sm-5{order:5!important}.order-sm-last{order:6!important}.m-sm-0{margin:0!important}.m-sm-1{margin:.25rem!important}.m-sm-2{margin:.5rem!important}.m-sm-3{margin:1rem!important}.m-sm-4{margin:1.5rem!important}.m-sm-5{margin:3rem!important}.m-sm-auto{margin:auto!important}.mx-sm-0{margin-right:0!important;margin-left:0!important}.mx-sm-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-sm-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-sm-3{margin-right:1rem!important;margin-left:1rem!important}.mx-sm-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-sm-5{margin-right:3rem!important;margin-left:3rem!important}.mx-sm-auto{margin-right:auto!important;margin-left:auto!important}.my-sm-0{margin-top:0!important;margin-bottom:0!important}.my-sm-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-sm-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-sm-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-sm-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-sm-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-sm-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-sm-0{margin-top:0!important}.mt-sm-1{margin-top:.25rem!important}.mt-sm-2{margin-top:.5rem!important}.mt-sm-3{margin-top:1rem!important}.mt-sm-4{margin-top:1.5rem!important}.mt-sm-5{margin-top:3rem!important}.mt-sm-auto{margin-top:auto!important}.me-sm-0{margin-right:0!important}.me-sm-1{margin-right:.25rem!important}.me-sm-2{margin-right:.5rem!important}.me-sm-3{margin-right:1rem!important}.me-sm-4{margin-right:1.5rem!important}.me-sm-5{margin-right:3rem!important}.me-sm-auto{margin-right:auto!important}.mb-sm-0{margin-bottom:0!important}.mb-sm-1{margin-bottom:.25rem!important}.mb-sm-2{margin-bottom:.5rem!important}.mb-sm-3{margin-bottom:1rem!important}.mb-sm-4{margin-bottom:1.5rem!important}.mb-sm-5{margin-bottom:3rem!important}.mb-sm-auto{margin-bottom:auto!important}.ms-sm-0{margin-left:0!important}.ms-sm-1{margin-left:.25rem!important}.ms-sm-2{margin-left:.5rem!important}.ms-sm-3{margin-left:1rem!important}.ms-sm-4{margin-left:1.5rem!important}.ms-sm-5{margin-left:3rem!important}.ms-sm-auto{margin-left:auto!important}.p-sm-0{padding:0!important}.p-sm-1{padding:.25rem!important}.p-sm-2{padding:.5rem!important}.p-sm-3{padding:1rem!important}.p-sm-4{padding:1.5rem!important}.p-sm-5{padding:3rem!important}.px-sm-0{padding-right:0!important;padding-left:0!important}.px-sm-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-sm-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-sm-3{padding-right:1rem!important;padding-left:1rem!important}.px-sm-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-sm-5{padding-right:3rem!important;padding-left:3rem!important}.py-sm-0{padding-top:0!important;padding-bottom:0!important}.py-sm-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-sm-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-sm-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-sm-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-sm-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-sm-0{padding-top:0!important}.pt-sm-1{padding-top:.25rem!important}.pt-sm-2{padding-top:.5rem!important}.pt-sm-3{padding-top:1rem!important}.pt-sm-4{padding-top:1.5rem!important}.pt-sm-5{padding-top:3rem!important}.pe-sm-0{padding-right:0!important}.pe-sm-1{padding-right:.25rem!important}.pe-sm-2{padding-right:.5rem!important}.pe-sm-3{padding-right:1rem!important}.pe-sm-4{padding-right:1.5rem!important}.pe-sm-5{padding-right:3rem!important}.pb-sm-0{padding-bottom:0!important}.pb-sm-1{padding-bottom:.25rem!important}.pb-sm-2{padding-bottom:.5rem!important}.pb-sm-3{padding-bottom:1rem!important}.pb-sm-4{padding-bottom:1.5rem!important}.pb-sm-5{padding-bottom:3rem!important}.ps-sm-0{padding-left:0!important}.ps-sm-1{padding-left:.25rem!important}.ps-sm-2{padding-left:.5rem!important}.ps-sm-3{padding-left:1rem!important}.ps-sm-4{padding-left:1.5rem!important}.ps-sm-5{padding-left:3rem!important}.text-sm-start{text-align:left!important}.text-sm-end{text-align:right!important}.text-sm-center{text-align:center!important}}@media (min-width:768px){.float-md-start{float:left!important}.float-md-end{float:right!important}.float-md-none{float:none!important}.d-md-inline{display:inline!important}.d-md-inline-block{display:inline-block!important}.d-md-block{display:block!important}.d-md-grid{display:grid!important}.d-md-table{display:table!important}.d-md-table-row{display:table-row!important}.d-md-table-cell{display:table-cell!important}.d-md-flex{display:flex!important}.d-md-inline-flex{display:inline-flex!important}.d-md-none{display:none!important}.flex-md-fill{flex:1 1 auto!important}.flex-md-row{flex-direction:row!important}.flex-md-column{flex-direction:column!important}.flex-md-row-reverse{flex-direction:row-reverse!important}.flex-md-column-reverse{flex-direction:column-reverse!important}.flex-md-grow-0{flex-grow:0!important}.flex-md-grow-1{flex-grow:1!important}.flex-md-shrink-0{flex-shrink:0!important}.flex-md-shrink-1{flex-shrink:1!important}.flex-md-wrap{flex-wrap:wrap!important}.flex-md-nowrap{flex-wrap:nowrap!important}.flex-md-wrap-reverse{flex-wrap:wrap-reverse!important}.gap-md-0{gap:0!important}.gap-md-1{gap:.25rem!important}.gap-md-2{gap:.5rem!important}.gap-md-3{gap:1rem!important}.gap-md-4{gap:1.5rem!important}.gap-md-5{gap:3rem!important}.justify-content-md-start{justify-content:flex-start!important}.justify-content-md-end{justify-content:flex-end!important}.justify-content-md-center{justify-content:center!important}.justify-content-md-between{justify-content:space-between!important}.justify-content-md-around{justify-content:space-around!important}.justify-content-md-evenly{justify-content:space-evenly!important}.align-items-md-start{align-items:flex-start!important}.align-items-md-end{align-items:flex-end!important}.align-items-md-center{align-items:center!important}.align-items-md-baseline{align-items:baseline!important}.align-items-md-stretch{align-items:stretch!important}.align-content-md-start{align-content:flex-start!important}.align-content-md-end{align-content:flex-end!important}.align-content-md-center{align-content:center!important}.align-content-md-between{align-content:space-between!important}.align-content-md-around{align-content:space-around!important}.align-content-md-stretch{align-content:stretch!important}.align-self-md-auto{align-self:auto!important}.align-self-md-start{align-self:flex-start!important}.align-self-md-end{align-self:flex-end!important}.align-self-md-center{align-self:center!important}.align-self-md-baseline{align-self:baseline!important}.align-self-md-stretch{align-self:stretch!important}.order-md-first{order:-1!important}.order-md-0{order:0!important}.order-md-1{order:1!important}.order-md-2{order:2!important}.order-md-3{order:3!important}.order-md-4{order:4!important}.order-md-5{order:5!important}.order-md-last{order:6!important}.m-md-0{margin:0!important}.m-md-1{margin:.25rem!important}.m-md-2{margin:.5rem!important}.m-md-3{margin:1rem!important}.m-md-4{margin:1.5rem!important}.m-md-5{margin:3rem!important}.m-md-auto{margin:auto!important}.mx-md-0{margin-right:0!important;margin-left:0!important}.mx-md-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-md-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-md-3{margin-right:1rem!important;margin-left:1rem!important}.mx-md-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-md-5{margin-right:3rem!important;margin-left:3rem!important}.mx-md-auto{margin-right:auto!important;margin-left:auto!important}.my-md-0{margin-top:0!important;margin-bottom:0!important}.my-md-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-md-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-md-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-md-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-md-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-md-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-md-0{margin-top:0!important}.mt-md-1{margin-top:.25rem!important}.mt-md-2{margin-top:.5rem!important}.mt-md-3{margin-top:1rem!important}.mt-md-4{margin-top:1.5rem!important}.mt-md-5{margin-top:3rem!important}.mt-md-auto{margin-top:auto!important}.me-md-0{margin-right:0!important}.me-md-1{margin-right:.25rem!important}.me-md-2{margin-right:.5rem!important}.me-md-3{margin-right:1rem!important}.me-md-4{margin-right:1.5rem!important}.me-md-5{margin-right:3rem!important}.me-md-auto{margin-right:auto!important}.mb-md-0{margin-bottom:0!important}.mb-md-1{margin-bottom:.25rem!important}.mb-md-2{margin-bottom:.5rem!important}.mb-md-3{margin-bottom:1rem!important}.mb-md-4{margin-bottom:1.5rem!important}.mb-md-5{margin-bottom:3rem!important}.mb-md-auto{margin-bottom:auto!important}.ms-md-0{margin-left:0!important}.ms-md-1{margin-left:.25rem!important}.ms-md-2{margin-left:.5rem!important}.ms-md-3{margin-left:1rem!important}.ms-md-4{margin-left:1.5rem!important}.ms-md-5{margin-left:3rem!important}.ms-md-auto{margin-left:auto!important}.p-md-0{padding:0!important}.p-md-1{padding:.25rem!important}.p-md-2{padding:.5rem!important}.p-md-3{padding:1rem!important}.p-md-4{padding:1.5rem!important}.p-md-5{padding:3rem!important}.px-md-0{padding-right:0!important;padding-left:0!important}.px-md-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-md-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-md-3{padding-right:1rem!important;padding-left:1rem!important}.px-md-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-md-5{padding-right:3rem!important;padding-left:3rem!important}.py-md-0{padding-top:0!important;padding-bottom:0!important}.py-md-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-md-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-md-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-md-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-md-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-md-0{padding-top:0!important}.pt-md-1{padding-top:.25rem!important}.pt-md-2{padding-top:.5rem!important}.pt-md-3{padding-top:1rem!important}.pt-md-4{padding-top:1.5rem!important}.pt-md-5{padding-top:3rem!important}.pe-md-0{padding-right:0!important}.pe-md-1{padding-right:.25rem!important}.pe-md-2{padding-right:.5rem!important}.pe-md-3{padding-right:1rem!important}.pe-md-4{padding-right:1.5rem!important}.pe-md-5{padding-right:3rem!important}.pb-md-0{padding-bottom:0!important}.pb-md-1{padding-bottom:.25rem!important}.pb-md-2{padding-bottom:.5rem!important}.pb-md-3{padding-bottom:1rem!important}.pb-md-4{padding-bottom:1.5rem!important}.pb-md-5{padding-bottom:3rem!important}.ps-md-0{padding-left:0!important}.ps-md-1{padding-left:.25rem!important}.ps-md-2{padding-left:.5rem!important}.ps-md-3{padding-left:1rem!important}.ps-md-4{padding-left:1.5rem!important}.ps-md-5{padding-left:3rem!important}.text-md-start{text-align:left!important}.text-md-end{text-align:right!important}.text-md-center{text-align:center!important}}@media (min-width:992px){.float-lg-start{float:left!important}.float-lg-end{float:right!important}.float-lg-none{float:none!important}.d-lg-inline{display:inline!important}.d-lg-inline-block{display:inline-block!important}.d-lg-block{display:block!important}.d-lg-grid{display:grid!important}.d-lg-table{display:table!important}.d-lg-table-row{display:table-row!important}.d-lg-table-cell{display:table-cell!important}.d-lg-flex{display:flex!important}.d-lg-inline-flex{display:inline-flex!important}.d-lg-none{display:none!important}.flex-lg-fill{flex:1 1 auto!important}.flex-lg-row{flex-direction:row!important}.flex-lg-column{flex-direction:column!important}.flex-lg-row-reverse{flex-direction:row-reverse!important}.flex-lg-column-reverse{flex-direction:column-reverse!important}.flex-lg-grow-0{flex-grow:0!important}.flex-lg-grow-1{flex-grow:1!important}.flex-lg-shrink-0{flex-shrink:0!important}.flex-lg-shrink-1{flex-shrink:1!important}.flex-lg-wrap{flex-wrap:wrap!important}.flex-lg-nowrap{flex-wrap:nowrap!important}.flex-lg-wrap-reverse{flex-wrap:wrap-reverse!important}.gap-lg-0{gap:0!important}.gap-lg-1{gap:.25rem!important}.gap-lg-2{gap:.5rem!important}.gap-lg-3{gap:1rem!important}.gap-lg-4{gap:1.5rem!important}.gap-lg-5{gap:3rem!important}.justify-content-lg-start{justify-content:flex-start!important}.justify-content-lg-end{justify-content:flex-end!important}.justify-content-lg-center{justify-content:center!important}.justify-content-lg-between{justify-content:space-between!important}.justify-content-lg-around{justify-content:space-around!important}.justify-content-lg-evenly{justify-content:space-evenly!important}.align-items-lg-start{align-items:flex-start!important}.align-items-lg-end{align-items:flex-end!important}.align-items-lg-center{align-items:center!important}.align-items-lg-baseline{align-items:baseline!important}.align-items-lg-stretch{align-items:stretch!important}.align-content-lg-start{align-content:flex-start!important}.align-content-lg-end{align-content:flex-end!important}.align-content-lg-center{align-content:center!important}.align-content-lg-between{align-content:space-between!important}.align-content-lg-around{align-content:space-around!important}.align-content-lg-stretch{align-content:stretch!important}.align-self-lg-auto{align-self:auto!important}.align-self-lg-start{align-self:flex-start!important}.align-self-lg-end{align-self:flex-end!important}.align-self-lg-center{align-self:center!important}.align-self-lg-baseline{align-self:baseline!important}.align-self-lg-stretch{align-self:stretch!important}.order-lg-first{order:-1!important}.order-lg-0{order:0!important}.order-lg-1{order:1!important}.order-lg-2{order:2!important}.order-lg-3{order:3!important}.order-lg-4{order:4!important}.order-lg-5{order:5!important}.order-lg-last{order:6!important}.m-lg-0{margin:0!important}.m-lg-1{margin:.25rem!important}.m-lg-2{margin:.5rem!important}.m-lg-3{margin:1rem!important}.m-lg-4{margin:1.5rem!important}.m-lg-5{margin:3rem!important}.m-lg-auto{margin:auto!important}.mx-lg-0{margin-right:0!important;margin-left:0!important}.mx-lg-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-lg-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-lg-3{margin-right:1rem!important;margin-left:1rem!important}.mx-lg-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-lg-5{margin-right:3rem!important;margin-left:3rem!important}.mx-lg-auto{margin-right:auto!important;margin-left:auto!important}.my-lg-0{margin-top:0!important;margin-bottom:0!important}.my-lg-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-lg-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-lg-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-lg-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-lg-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-lg-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-lg-0{margin-top:0!important}.mt-lg-1{margin-top:.25rem!important}.mt-lg-2{margin-top:.5rem!important}.mt-lg-3{margin-top:1rem!important}.mt-lg-4{margin-top:1.5rem!important}.mt-lg-5{margin-top:3rem!important}.mt-lg-auto{margin-top:auto!important}.me-lg-0{margin-right:0!important}.me-lg-1{margin-right:.25rem!important}.me-lg-2{margin-right:.5rem!important}.me-lg-3{margin-right:1rem!important}.me-lg-4{margin-right:1.5rem!important}.me-lg-5{margin-right:3rem!important}.me-lg-auto{margin-right:auto!important}.mb-lg-0{margin-bottom:0!important}.mb-lg-1{margin-bottom:.25rem!important}.mb-lg-2{margin-bottom:.5rem!important}.mb-lg-3{margin-bottom:1rem!important}.mb-lg-4{margin-bottom:1.5rem!important}.mb-lg-5{margin-bottom:3rem!important}.mb-lg-auto{margin-bottom:auto!important}.ms-lg-0{margin-left:0!important}.ms-lg-1{margin-left:.25rem!important}.ms-lg-2{margin-left:.5rem!important}.ms-lg-3{margin-left:1rem!important}.ms-lg-4{margin-left:1.5rem!important}.ms-lg-5{margin-left:3rem!important}.ms-lg-auto{margin-left:auto!important}.p-lg-0{padding:0!important}.p-lg-1{padding:.25rem!important}.p-lg-2{padding:.5rem!important}.p-lg-3{padding:1rem!important}.p-lg-4{padding:1.5rem!important}.p-lg-5{padding:3rem!important}.px-lg-0{padding-right:0!important;padding-left:0!important}.px-lg-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-lg-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-lg-3{padding-right:1rem!important;padding-left:1rem!important}.px-lg-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-lg-5{padding-right:3rem!important;padding-left:3rem!important}.py-lg-0{padding-top:0!important;padding-bottom:0!important}.py-lg-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-lg-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-lg-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-lg-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-lg-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-lg-0{padding-top:0!important}.pt-lg-1{padding-top:.25rem!important}.pt-lg-2{padding-top:.5rem!important}.pt-lg-3{padding-top:1rem!important}.pt-lg-4{padding-top:1.5rem!important}.pt-lg-5{padding-top:3rem!important}.pe-lg-0{padding-right:0!important}.pe-lg-1{padding-right:.25rem!important}.pe-lg-2{padding-right:.5rem!important}.pe-lg-3{padding-right:1rem!important}.pe-lg-4{padding-right:1.5rem!important}.pe-lg-5{padding-right:3rem!important}.pb-lg-0{padding-bottom:0!important}.pb-lg-1{padding-bottom:.25rem!important}.pb-lg-2{padding-bottom:.5rem!important}.pb-lg-3{padding-bottom:1rem!important}.pb-lg-4{padding-bottom:1.5rem!important}.pb-lg-5{padding-bottom:3rem!important}.ps-lg-0{padding-left:0!important}.ps-lg-1{padding-left:.25rem!important}.ps-lg-2{padding-left:.5rem!important}.ps-lg-3{padding-left:1rem!important}.ps-lg-4{padding-left:1.5rem!important}.ps-lg-5{padding-left:3rem!important}.text-lg-start{text-align:left!important}.text-lg-end{text-align:right!important}.text-lg-center{text-align:center!important}}@media (min-width:1200px){.float-xl-start{float:left!important}.float-xl-end{float:right!important}.float-xl-none{float:none!important}.d-xl-inline{display:inline!important}.d-xl-inline-block{display:inline-block!important}.d-xl-block{display:block!important}.d-xl-grid{display:grid!important}.d-xl-table{display:table!important}.d-xl-table-row{display:table-row!important}.d-xl-table-cell{display:table-cell!important}.d-xl-flex{display:flex!important}.d-xl-inline-flex{display:inline-flex!important}.d-xl-none{display:none!important}.flex-xl-fill{flex:1 1 auto!important}.flex-xl-row{flex-direction:row!important}.flex-xl-column{flex-direction:column!important}.flex-xl-row-reverse{flex-direction:row-reverse!important}.flex-xl-column-reverse{flex-direction:column-reverse!important}.flex-xl-grow-0{flex-grow:0!important}.flex-xl-grow-1{flex-grow:1!important}.flex-xl-shrink-0{flex-shrink:0!important}.flex-xl-shrink-1{flex-shrink:1!important}.flex-xl-wrap{flex-wrap:wrap!important}.flex-xl-nowrap{flex-wrap:nowrap!important}.flex-xl-wrap-reverse{flex-wrap:wrap-reverse!important}.gap-xl-0{gap:0!important}.gap-xl-1{gap:.25rem!important}.gap-xl-2{gap:.5rem!important}.gap-xl-3{gap:1rem!important}.gap-xl-4{gap:1.5rem!important}.gap-xl-5{gap:3rem!important}.justify-content-xl-start{justify-content:flex-start!important}.justify-content-xl-end{justify-content:flex-end!important}.justify-content-xl-center{justify-content:center!important}.justify-content-xl-between{justify-content:space-between!important}.justify-content-xl-around{justify-content:space-around!important}.justify-content-xl-evenly{justify-content:space-evenly!important}.align-items-xl-start{align-items:flex-start!important}.align-items-xl-end{align-items:flex-end!important}.align-items-xl-center{align-items:center!important}.align-items-xl-baseline{align-items:baseline!important}.align-items-xl-stretch{align-items:stretch!important}.align-content-xl-start{align-content:flex-start!important}.align-content-xl-end{align-content:flex-end!important}.align-content-xl-center{align-content:center!important}.align-content-xl-between{align-content:space-between!important}.align-content-xl-around{align-content:space-around!important}.align-content-xl-stretch{align-content:stretch!important}.align-self-xl-auto{align-self:auto!important}.align-self-xl-start{align-self:flex-start!important}.align-self-xl-end{align-self:flex-end!important}.align-self-xl-center{align-self:center!important}.align-self-xl-baseline{align-self:baseline!important}.align-self-xl-stretch{align-self:stretch!important}.order-xl-first{order:-1!important}.order-xl-0{order:0!important}.order-xl-1{order:1!important}.order-xl-2{order:2!important}.order-xl-3{order:3!important}.order-xl-4{order:4!important}.order-xl-5{order:5!important}.order-xl-last{order:6!important}.m-xl-0{margin:0!important}.m-xl-1{margin:.25rem!important}.m-xl-2{margin:.5rem!important}.m-xl-3{margin:1rem!important}.m-xl-4{margin:1.5rem!important}.m-xl-5{margin:3rem!important}.m-xl-auto{margin:auto!important}.mx-xl-0{margin-right:0!important;margin-left:0!important}.mx-xl-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-xl-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-xl-3{margin-right:1rem!important;margin-left:1rem!important}.mx-xl-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-xl-5{margin-right:3rem!important;margin-left:3rem!important}.mx-xl-auto{margin-right:auto!important;margin-left:auto!important}.my-xl-0{margin-top:0!important;margin-bottom:0!important}.my-xl-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-xl-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-xl-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-xl-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-xl-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-xl-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-xl-0{margin-top:0!important}.mt-xl-1{margin-top:.25rem!important}.mt-xl-2{margin-top:.5rem!important}.mt-xl-3{margin-top:1rem!important}.mt-xl-4{margin-top:1.5rem!important}.mt-xl-5{margin-top:3rem!important}.mt-xl-auto{margin-top:auto!important}.me-xl-0{margin-right:0!important}.me-xl-1{margin-right:.25rem!important}.me-xl-2{margin-right:.5rem!important}.me-xl-3{margin-right:1rem!important}.me-xl-4{margin-right:1.5rem!important}.me-xl-5{margin-right:3rem!important}.me-xl-auto{margin-right:auto!important}.mb-xl-0{margin-bottom:0!important}.mb-xl-1{margin-bottom:.25rem!important}.mb-xl-2{margin-bottom:.5rem!important}.mb-xl-3{margin-bottom:1rem!important}.mb-xl-4{margin-bottom:1.5rem!important}.mb-xl-5{margin-bottom:3rem!important}.mb-xl-auto{margin-bottom:auto!important}.ms-xl-0{margin-left:0!important}.ms-xl-1{margin-left:.25rem!important}.ms-xl-2{margin-left:.5rem!important}.ms-xl-3{margin-left:1rem!important}.ms-xl-4{margin-left:1.5rem!important}.ms-xl-5{margin-left:3rem!important}.ms-xl-auto{margin-left:auto!important}.p-xl-0{padding:0!important}.p-xl-1{padding:.25rem!important}.p-xl-2{padding:.5rem!important}.p-xl-3{padding:1rem!important}.p-xl-4{padding:1.5rem!important}.p-xl-5{padding:3rem!important}.px-xl-0{padding-right:0!important;padding-left:0!important}.px-xl-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-xl-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-xl-3{padding-right:1rem!important;padding-left:1rem!important}.px-xl-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-xl-5{padding-right:3rem!important;padding-left:3rem!important}.py-xl-0{padding-top:0!important;padding-bottom:0!important}.py-xl-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-xl-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-xl-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-xl-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-xl-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-xl-0{padding-top:0!important}.pt-xl-1{padding-top:.25rem!important}.pt-xl-2{padding-top:.5rem!important}.pt-xl-3{padding-top:1rem!important}.pt-xl-4{padding-top:1.5rem!important}.pt-xl-5{padding-top:3rem!important}.pe-xl-0{padding-right:0!important}.pe-xl-1{padding-right:.25rem!important}.pe-xl-2{padding-right:.5rem!important}.pe-xl-3{padding-right:1rem!important}.pe-xl-4{padding-right:1.5rem!important}.pe-xl-5{padding-right:3rem!important}.pb-xl-0{padding-bottom:0!important}.pb-xl-1{padding-bottom:.25rem!important}.pb-xl-2{padding-bottom:.5rem!important}.pb-xl-3{padding-bottom:1rem!important}.pb-xl-4{padding-bottom:1.5rem!important}.pb-xl-5{padding-bottom:3rem!important}.ps-xl-0{padding-left:0!important}.ps-xl-1{padding-left:.25rem!important}.ps-xl-2{padding-left:.5rem!important}.ps-xl-3{padding-left:1rem!important}.ps-xl-4{padding-left:1.5rem!important}.ps-xl-5{padding-left:3rem!important}.text-xl-start{text-align:left!important}.text-xl-end{text-align:right!important}.text-xl-center{text-align:center!important}}@media (min-width:1400px){.float-xxl-start{float:left!important}.float-xxl-end{float:right!important}.float-xxl-none{float:none!important}.d-xxl-inline{display:inline!important}.d-xxl-inline-block{display:inline-block!important}.d-xxl-block{display:block!important}.d-xxl-grid{display:grid!important}.d-xxl-table{display:table!important}.d-xxl-table-row{display:table-row!important}.d-xxl-table-cell{display:table-cell!important}.d-xxl-flex{display:flex!important}.d-xxl-inline-flex{display:inline-flex!important}.d-xxl-none{display:none!important}.flex-xxl-fill{flex:1 1 auto!important}.flex-xxl-row{flex-direction:row!important}.flex-xxl-column{flex-direction:column!important}.flex-xxl-row-reverse{flex-direction:row-reverse!important}.flex-xxl-column-reverse{flex-direction:column-reverse!important}.flex-xxl-grow-0{flex-grow:0!important}.flex-xxl-grow-1{flex-grow:1!important}.flex-xxl-shrink-0{flex-shrink:0!important}.flex-xxl-shrink-1{flex-shrink:1!important}.flex-xxl-wrap{flex-wrap:wrap!important}.flex-xxl-nowrap{flex-wrap:nowrap!important}.flex-xxl-wrap-reverse{flex-wrap:wrap-reverse!important}.gap-xxl-0{gap:0!important}.gap-xxl-1{gap:.25rem!important}.gap-xxl-2{gap:.5rem!important}.gap-xxl-3{gap:1rem!important}.gap-xxl-4{gap:1.5rem!important}.gap-xxl-5{gap:3rem!important}.justify-content-xxl-start{justify-content:flex-start!important}.justify-content-xxl-end{justify-content:flex-end!important}.justify-content-xxl-center{justify-content:center!important}.justify-content-xxl-between{justify-content:space-between!important}.justify-content-xxl-around{justify-content:space-around!important}.justify-content-xxl-evenly{justify-content:space-evenly!important}.align-items-xxl-start{align-items:flex-start!important}.align-items-xxl-end{align-items:flex-end!important}.align-items-xxl-center{align-items:center!important}.align-items-xxl-baseline{align-items:baseline!important}.align-items-xxl-stretch{align-items:stretch!important}.align-content-xxl-start{align-content:flex-start!important}.align-content-xxl-end{align-content:flex-end!important}.align-content-xxl-center{align-content:center!important}.align-content-xxl-between{align-content:space-between!important}.align-content-xxl-around{align-content:space-around!important}.align-content-xxl-stretch{align-content:stretch!important}.align-self-xxl-auto{align-self:auto!important}.align-self-xxl-start{align-self:flex-start!important}.align-self-xxl-end{align-self:flex-end!important}.align-self-xxl-center{align-self:center!important}.align-self-xxl-baseline{align-self:baseline!important}.align-self-xxl-stretch{align-self:stretch!important}.order-xxl-first{order:-1!important}.order-xxl-0{order:0!important}.order-xxl-1{order:1!important}.order-xxl-2{order:2!important}.order-xxl-3{order:3!important}.order-xxl-4{order:4!important}.order-xxl-5{order:5!important}.order-xxl-last{order:6!important}.m-xxl-0{margin:0!important}.m-xxl-1{margin:.25rem!important}.m-xxl-2{margin:.5rem!important}.m-xxl-3{margin:1rem!important}.m-xxl-4{margin:1.5rem!important}.m-xxl-5{margin:3rem!important}.m-xxl-auto{margin:auto!important}.mx-xxl-0{margin-right:0!important;margin-left:0!important}.mx-xxl-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-xxl-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-xxl-3{margin-right:1rem!important;margin-left:1rem!important}.mx-xxl-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-xxl-5{margin-right:3rem!important;margin-left:3rem!important}.mx-xxl-auto{margin-right:auto!important;margin-left:auto!important}.my-xxl-0{margin-top:0!important;margin-bottom:0!important}.my-xxl-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-xxl-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-xxl-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-xxl-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-xxl-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-xxl-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-xxl-0{margin-top:0!important}.mt-xxl-1{margin-top:.25rem!important}.mt-xxl-2{margin-top:.5rem!important}.mt-xxl-3{margin-top:1rem!important}.mt-xxl-4{margin-top:1.5rem!important}.mt-xxl-5{margin-top:3rem!important}.mt-xxl-auto{margin-top:auto!important}.me-xxl-0{margin-right:0!important}.me-xxl-1{margin-right:.25rem!important}.me-xxl-2{margin-right:.5rem!important}.me-xxl-3{margin-right:1rem!important}.me-xxl-4{margin-right:1.5rem!important}.me-xxl-5{margin-right:3rem!important}.me-xxl-auto{margin-right:auto!important}.mb-xxl-0{margin-bottom:0!important}.mb-xxl-1{margin-bottom:.25rem!important}.mb-xxl-2{margin-bottom:.5rem!important}.mb-xxl-3{margin-bottom:1rem!important}.mb-xxl-4{margin-bottom:1.5rem!important}.mb-xxl-5{margin-bottom:3rem!important}.mb-xxl-auto{margin-bottom:auto!important}.ms-xxl-0{margin-left:0!important}.ms-xxl-1{margin-left:.25rem!important}.ms-xxl-2{margin-left:.5rem!important}.ms-xxl-3{margin-left:1rem!important}.ms-xxl-4{margin-left:1.5rem!important}.ms-xxl-5{margin-left:3rem!important}.ms-xxl-auto{margin-left:auto!important}.p-xxl-0{padding:0!important}.p-xxl-1{padding:.25rem!important}.p-xxl-2{padding:.5rem!important}.p-xxl-3{padding:1rem!important}.p-xxl-4{padding:1.5rem!important}.p-xxl-5{padding:3rem!important}.px-xxl-0{padding-right:0!important;padding-left:0!important}.px-xxl-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-xxl-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-xxl-3{padding-right:1rem!important;padding-left:1rem!important}.px-xxl-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-xxl-5{padding-right:3rem!important;padding-left:3rem!important}.py-xxl-0{padding-top:0!important;padding-bottom:0!important}.py-xxl-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-xxl-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-xxl-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-xxl-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-xxl-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-xxl-0{padding-top:0!important}.pt-xxl-1{padding-top:.25rem!important}.pt-xxl-2{padding-top:.5rem!important}.pt-xxl-3{padding-top:1rem!important}.pt-xxl-4{padding-top:1.5rem!important}.pt-xxl-5{padding-top:3rem!important}.pe-xxl-0{padding-right:0!important}.pe-xxl-1{padding-right:.25rem!important}.pe-xxl-2{padding-right:.5rem!important}.pe-xxl-3{padding-right:1rem!important}.pe-xxl-4{padding-right:1.5rem!important}.pe-xxl-5{padding-right:3rem!important}.pb-xxl-0{padding-bottom:0!important}.pb-xxl-1{padding-bottom:.25rem!important}.pb-xxl-2{padding-bottom:.5rem!important}.pb-xxl-3{padding-bottom:1rem!important}.pb-xxl-4{padding-bottom:1.5rem!important}.pb-xxl-5{padding-bottom:3rem!important}.ps-xxl-0{padding-left:0!important}.ps-xxl-1{padding-left:.25rem!important}.ps-xxl-2{padding-left:.5rem!important}.ps-xxl-3{padding-left:1rem!important}.ps-xxl-4{padding-left:1.5rem!important}.ps-xxl-5{padding-left:3rem!important}.text-xxl-start{text-align:left!important}.text-xxl-end{text-align:right!important}.text-xxl-center{text-align:center!important}}@media (min-width:1200px){.fs-1{font-size:2.5rem!important}.fs-2{font-size:2rem!important}.fs-3{font-size:1.75rem!important}.fs-4{font-size:1.5rem!important}}@media print{.d-print-inline{display:inline!important}.d-print-inline-block{display:inline-block!important}.d-print-block{display:block!important}.d-print-grid{display:grid!important}.d-print-table{display:table!important}.d-print-table-row{display:table-row!important}.d-print-table-cell{display:table-cell!important}.d-print-flex{display:flex!important}.d-print-inline-flex{display:inline-flex!important}.d-print-none{display:none!important}} diff --git a/examples/vagrant/static-http/jssip-3.10.1.min.js b/examples/vagrant/static-http/jssip-3.10.1.min.js new file mode 100644 index 00000000..9ccbe302 --- /dev/null +++ b/examples/vagrant/static-http/jssip-3.10.1.min.js @@ -0,0 +1,9 @@ +/* + * JsSIP v3.10.1 + * the Javascript SIP library + * Copyright: 2012-2023 + * Homepage: https://jssip.net + * License: MIT + */ + +!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).JsSIP=e()}}(function(){return function(){return function e(t,n,r){function s(o,l){if(!n[o]){if(!t[o]){var u="function"==typeof require&&require;if(!l&&u)return u(o,!0);if(i)return i(o,!0);var a=new Error("Cannot find module '"+o+"'");throw a.code="MODULE_NOT_FOUND",a}var c=n[o]={exports:{}};t[o][0].call(c.exports,function(e){return s(t[o][1][e]||e)},c,c.exports,e,t,n,r)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;o=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,l=!0,u=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return l=e.done,e},e:function(e){u=!0,o=e},f:function(){try{l||null==n.return||n.return()}finally{if(u)throw o}}}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0)return t}},connection_recovery_min_interval:function(e){if(i.isDecimal(e)){var t=Number(e);if(t>0)return t}},contact_uri:function(e){if("string"==typeof e){var t=l.parse(e,"SIP_URI");if(-1!==t)return t}},display_name:function(e){return e},instance_id:function(e){return/^uuid:/i.test(e)&&(e=e.substr(5)),-1===l.parse(e,"uuid")?void 0:e},no_answer_timeout:function(e){if(i.isDecimal(e)){var t=Number(e);if(t>0)return t}},session_timers:function(e){if("boolean"==typeof e)return e},session_timers_refresh_method:function(e){if("string"==typeof e&&((e=e.toUpperCase())===o.INVITE||e===o.UPDATE))return e},session_timers_force_refresher:function(e){if("boolean"==typeof e)return e},password:function(e){return String(e)},realm:function(e){return String(e)},ha1:function(e){return String(e)},register:function(e){if("boolean"==typeof e)return e},register_expires:function(e){if(i.isDecimal(e)){var t=Number(e);if(t>0)return t}},registrar_server:function(e){/^sip:/i.test(e)||(e="".concat(o.SIP,":").concat(e));var t=u.parse(e);return t?t.user?void 0:t:void 0},use_preloaded_route:function(e){if("boolean"==typeof e)return e},extra_headers:function(e){var t=[];if(Array.isArray(e)&&e.length){var n,s=r(e);try{for(s.s();!(n=s.n()).done;){var i=n.value;"string"==typeof i&&t.push(i)}}catch(e){s.e(e)}finally{s.f()}return t}}}};n.load=function(e,t){for(var n in h.mandatory){if(!t.hasOwnProperty(n))throw new c.ConfigurationError(n);var r=t[n],s=h.mandatory[n](r);if(void 0===s)throw new c.ConfigurationError(n,r);e[n]=s}for(var o in h.optional)if(t.hasOwnProperty(o)){var l=t[o];if(i.isEmpty(l))continue;var u=h.optional[o](l);if(void 0===u)throw new c.ConfigurationError(o,l);e[o]=u}}},{"./Constants":2,"./Exceptions":6,"./Grammar":7,"./Socket":22,"./URI":27,"./Utils":28}],2:[function(e,t,n){"use strict";var r=e("../package.json");t.exports={USER_AGENT:"".concat(r.title," ").concat(r.version),SIP:"sip",SIPS:"sips",causes:{CONNECTION_ERROR:"Connection Error",REQUEST_TIMEOUT:"Request Timeout",SIP_FAILURE_CODE:"SIP Failure Code",INTERNAL_ERROR:"Internal Error",BUSY:"Busy",REJECTED:"Rejected",REDIRECTED:"Redirected",UNAVAILABLE:"Unavailable",NOT_FOUND:"Not Found",ADDRESS_INCOMPLETE:"Address Incomplete",INCOMPATIBLE_SDP:"Incompatible SDP",MISSING_SDP:"Missing SDP",AUTHENTICATION_ERROR:"Authentication Error",BYE:"Terminated",WEBRTC_ERROR:"WebRTC Error",CANCELED:"Canceled",NO_ANSWER:"No Answer",EXPIRES:"Expires",NO_ACK:"No ACK",DIALOG_ERROR:"Dialog Error",USER_DENIED_MEDIA_ACCESS:"User Denied Media Access",BAD_MEDIA_DESCRIPTION:"Bad Media Description",RTP_TIMEOUT:"RTP Timeout"},SIP_ERROR_CAUSES:{REDIRECTED:[300,301,302,305,380],BUSY:[486,600],REJECTED:[403,603],NOT_FOUND:[404,604],UNAVAILABLE:[480,410,408,430],ADDRESS_INCOMPLETE:[484,424],INCOMPATIBLE_SDP:[488,606],AUTHENTICATION_ERROR:[401,407]},ACK:"ACK",BYE:"BYE",CANCEL:"CANCEL",INFO:"INFO",INVITE:"INVITE",MESSAGE:"MESSAGE",NOTIFY:"NOTIFY",OPTIONS:"OPTIONS",REGISTER:"REGISTER",REFER:"REFER",UPDATE:"UPDATE",SUBSCRIBE:"SUBSCRIBE",DTMF_TRANSPORT:{INFO:"INFO",RFC2833:"RFC2833"},REASON_PHRASE:{100:"Trying",180:"Ringing",181:"Call Is Being Forwarded",182:"Queued",183:"Session Progress",199:"Early Dialog Terminated",200:"OK",202:"Accepted",204:"No Notification",300:"Multiple Choices",301:"Moved Permanently",302:"Moved Temporarily",305:"Use Proxy",380:"Alternative Service",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",410:"Gone",412:"Conditional Request Failed",413:"Request Entity Too Large",414:"Request-URI Too Long",415:"Unsupported Media Type",416:"Unsupported URI Scheme",417:"Unknown Resource-Priority",420:"Bad Extension",421:"Extension Required",422:"Session Interval Too Small",423:"Interval Too Brief",424:"Bad Location Information",428:"Use Identity Header",429:"Provide Referrer Identity",430:"Flow Failed",433:"Anonymity Disallowed",436:"Bad Identity-Info",437:"Unsupported Certificate",438:"Invalid Identity Header",439:"First Hop Lacks Outbound Support",440:"Max-Breadth Exceeded",469:"Bad Info Package",470:"Consent Needed",478:"Unresolvable Destination",480:"Temporarily Unavailable",481:"Call/Transaction Does Not Exist",482:"Loop Detected",483:"Too Many Hops",484:"Address Incomplete",485:"Ambiguous",486:"Busy Here",487:"Request Terminated",488:"Not Acceptable Here",489:"Bad Event",491:"Request Pending",493:"Undecipherable",494:"Security Agreement Required",500:"JsSIP Internal Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Server Time-out",505:"Version Not Supported",513:"Message Too Large",580:"Precondition Failure",600:"Busy Everywhere",603:"Decline",604:"Does Not Exist Anywhere",606:"Not Acceptable"},ALLOWED_METHODS:"INVITE,ACK,CANCEL,BYE,UPDATE,MESSAGE,OPTIONS,REFER,INFO,NOTIFY",ACCEPTED_BODY_TYPES:"application/sdp, application/dtmf-relay",MAX_FORWARDS:69,SESSION_EXPIRES:90,MIN_SESSION_EXPIRES:60,CONNECTION_RECOVERY_MAX_INTERVAL:30,CONNECTION_RECOVERY_MIN_INTERVAL:2}},{"../package.json":40}],3:[function(e,t,n){"use strict";function r(e,t){for(var n=0;n3&&void 0!==arguments[3]?arguments[3]:d.STATUS_CONFIRMED;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._owner=t,this._ua=t._ua,this._uac_pending_reply=!1,this._uas_pending_reply=!1,!n.hasHeader("contact"))return{error:"unable to create a Dialog without Contact header field"};n instanceof o.IncomingResponse&&(s=n.status_code<200?d.STATUS_EARLY:d.STATUS_CONFIRMED);var i=n.parseHeader("contact");"UAS"===r?(this._id={call_id:n.call_id,local_tag:n.to_tag,remote_tag:n.from_tag,toString:function(){return this.call_id+this.local_tag+this.remote_tag}},this._state=s,this._remote_seqnum=n.cseq,this._local_uri=n.parseHeader("to").uri,this._remote_uri=n.parseHeader("from").uri,this._remote_target=i.uri,this._route_set=n.getHeaders("record-route"),this._ack_seqnum=this._remote_seqnum):"UAC"===r&&(this._id={call_id:n.call_id,local_tag:n.from_tag,remote_tag:n.to_tag,toString:function(){return this.call_id+this.local_tag+this.remote_tag}},this._state=s,this._local_seqnum=n.cseq,this._local_uri=n.parseHeader("from").uri,this._remote_uri=n.parseHeader("to").uri,this._remote_target=i.uri,this._route_set=n.getHeaders("record-route").reverse(),this._ack_seqnum=null),this._ua.newDialog(this),h.debug("new ".concat(r," dialog created with status ").concat(this._state===d.STATUS_EARLY?"EARLY":"CONFIRMED"))}return s(e,null,[{key:"C",get:function(){return d}}]),s(e,[{key:"isTerminated",value:function(){return this._status===d.STATUS_TERMINATED}},{key:"update",value:function(e,t){this._state=d.STATUS_CONFIRMED,h.debug("dialog ".concat(this._id.toString()," changed to CONFIRMED state")),"UAC"===t&&(this._route_set=e.getHeaders("record-route").reverse())}},{key:"terminate",value:function(){h.debug("dialog ".concat(this._id.toString()," deleted")),this._ua.destroyDialog(this),this._state=d.STATUS_TERMINATED}},{key:"sendRequest",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=c.cloneArray(n.extraHeaders),s=c.cloneObject(n.eventHandlers),i=n.body||null,o=this._createRequest(e,r,i);return s.onAuthenticated=function(){t._local_seqnum+=1},new a(this,o,s).send(),o}},{key:"receiveRequest",value:function(e){this._checkInDialogRequest(e)&&(e.method===l.ACK&&null!==this._ack_seqnum?this._ack_seqnum=null:e.method===l.INVITE&&(this._ack_seqnum=e.cseq),this._owner.receiveRequest(e))}},{key:"_createRequest",value:function(e,t,n){t=c.cloneArray(t),this._local_seqnum||(this._local_seqnum=Math.floor(1e4*Math.random()));var r=e===l.CANCEL||e===l.ACK?this._local_seqnum:this._local_seqnum+=1;return new o.OutgoingRequest(e,this._remote_target,this._ua,{cseq:r,call_id:this._id.call_id,from_uri:this._local_uri,from_tag:this._id.local_tag,to_uri:this._remote_uri,to_tag:this._id.remote_tag,route_set:this._route_set},t,n)}},{key:"_checkInDialogRequest",value:function(e){var t=this;if(this._remote_seqnum)if(e.cseqthis._remote_seqnum&&(this._remote_seqnum=e.cseq);else this._remote_seqnum=e.cseq;if(e.method===l.INVITE||e.method===l.UPDATE&&e.body){if(!0===this._uac_pending_reply)e.reply(491);else{if(!0===this._uas_pending_reply){var n=1+(10*Math.random()|0);return e.reply(500,null,["Retry-After:".concat(n)]),!1}this._uas_pending_reply=!0;e.server_transaction.on("stateChanged",function n(){e.server_transaction.state!==u.C.STATUS_ACCEPTED&&e.server_transaction.state!==u.C.STATUS_COMPLETED&&e.server_transaction.state!==u.C.STATUS_TERMINATED||(e.server_transaction.removeListener("stateChanged",n),t._uas_pending_reply=!1)})}e.hasHeader("contact")&&e.server_transaction.on("stateChanged",function(){e.server_transaction.state===u.C.STATUS_ACCEPTED&&(t._remote_target=e.parseHeader("contact").uri)})}else e.method===l.NOTIFY&&e.hasHeader("contact")&&e.server_transaction.on("stateChanged",function(){e.server_transaction.state===u.C.STATUS_COMPLETED&&(t._remote_target=e.parseHeader("contact").uri)});return!0}},{key:"id",get:function(){return this._id}},{key:"local_seqnum",get:function(){return this._local_seqnum},set:function(e){this._local_seqnum=e}},{key:"owner",get:function(){return this._owner}},{key:"uac_pending_reply",get:function(){return this._uac_pending_reply},set:function(e){this._uac_pending_reply=e}},{key:"uas_pending_reply",get:function(){return this._uas_pending_reply}}]),e}()},{"./Constants":2,"./Dialog/RequestSender":4,"./Logger":9,"./SIPMessage":21,"./Transactions":24,"./Utils":28}],4:[function(e,t,n){"use strict";function r(e,t){for(var n=0;n=200&&e.status_code<300?this._eventHandlers.onSuccessResponse(e):e.status_code>=300&&this._eventHandlers.onErrorResponse(e):(this._request.cseq=this._dialog.local_seqnum+=1,this._reattemptTimer=setTimeout(function(){t._dialog.isTerminated()||(t._reattempt=!0,t.send())},1e3)):e.status_code>=200&&e.status_code<300?this._eventHandlers.onSuccessResponse(e):e.status_code>=300&&this._eventHandlers.onErrorResponse(e)}},{key:"request",get:function(){return this._request}}])&&r(t.prototype,n),u&&r(t,u),e}()},{"../Constants":2,"../RequestSender":20,"../Transactions":24}],5:[function(e,t,n){"use strict";function r(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:null;if(this._algorithm=t.algorithm,this._realm=t.realm,this._nonce=t.nonce,this._opaque=t.opaque,this._stale=t.stale,this._algorithm){if("MD5"!==this._algorithm)return o.warn('authenticate() | challenge with Digest algorithm different than "MD5", authentication aborted'),!1}else this._algorithm="MD5";if(!this._nonce)return o.warn("authenticate() | challenge without Digest nonce, authentication aborted"),!1;if(!this._realm)return o.warn("authenticate() | challenge without Digest realm, authentication aborted"),!1;if(!this._credentials.password){if(!this._credentials.ha1)return o.warn("authenticate() | no plain SIP password nor ha1 provided, authentication aborted"),!1;if(this._credentials.realm!==this._realm)return o.warn('authenticate() | no plain SIP password, and stored `realm` does not match the given `realm`, cannot authenticate [stored:"%s", given:"%s"]',this._credentials.realm,this._realm),!1}if(t.qop)if(t.qop.indexOf("auth-int")>-1)this._qop="auth-int";else{if(!(t.qop.indexOf("auth")>-1))return o.warn('authenticate() | challenge without Digest qop different than "auth" or "auth-int", authentication aborted'),!1;this._qop="auth"}else this._qop=null;this._method=n,this._uri=r,this._cnonce=l||i.createRandomToken(12),this._nc+=1;var u,a,c=Number(this._nc).toString(16);return this._ncHex="00000000".substr(0,8-c.length)+c,4294967296===this._nc&&(this._nc=1,this._ncHex="00000001"),this._credentials.password?this._ha1=i.calculateMD5("".concat(this._credentials.username,":").concat(this._realm,":").concat(this._credentials.password)):this._ha1=this._credentials.ha1,"auth"===this._qop?(u="".concat(this._method,":").concat(this._uri),a=i.calculateMD5(u),o.debug('authenticate() | using qop=auth [a2:"%s"]',u),this._response=i.calculateMD5("".concat(this._ha1,":").concat(this._nonce,":").concat(this._ncHex,":").concat(this._cnonce,":auth:").concat(a))):"auth-int"===this._qop?(u="".concat(this._method,":").concat(this._uri,":").concat(i.calculateMD5(s||"")),a=i.calculateMD5(u),o.debug('authenticate() | using qop=auth-int [a2:"%s"]',u),this._response=i.calculateMD5("".concat(this._ha1,":").concat(this._nonce,":").concat(this._ncHex,":").concat(this._cnonce,":auth-int:").concat(a))):null===this._qop&&(u="".concat(this._method,":").concat(this._uri),a=i.calculateMD5(u),o.debug('authenticate() | using qop=null [a2:"%s"]',u),this._response=i.calculateMD5("".concat(this._ha1,":").concat(this._nonce,":").concat(a))),o.debug("authenticate() | response generated"),!0}},{key:"toString",value:function(){var e=[];if(!this._response)throw new Error("response field does not exist, cannot generate Authorization header");return e.push("algorithm=".concat(this._algorithm)),e.push('username="'.concat(this._credentials.username,'"')),e.push('realm="'.concat(this._realm,'"')),e.push('nonce="'.concat(this._nonce,'"')),e.push('uri="'.concat(this._uri,'"')),e.push('response="'.concat(this._response,'"')),this._opaque&&e.push('opaque="'.concat(this._opaque,'"')),this._qop&&(e.push("qop=".concat(this._qop)),e.push('cnonce="'.concat(this._cnonce,'"')),e.push("nc=".concat(this._ncHex))),"Digest ".concat(e.join(", "))}}])&&r(t.prototype,n),s&&r(t,s),e}()},{"./Logger":9,"./Utils":28}],6:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}function o(e){var t=a();return function(){var n,s=h(e);if(t){var i=h(this).constructor;n=Reflect.construct(s,arguments,i)}else n=s.apply(this,arguments);return function(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function l(e){var t="function"==typeof Map?new Map:void 0;return(l=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return u(e,arguments,h(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),c(r,e)})(e)}function u(e,t,n){return(u=a()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var s=new(Function.bind.apply(e,r));return n&&c(s,n.prototype),s}).apply(null,arguments)}function a(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var d=function(e){i(n,l(Error));var t=o(n);function n(e,r){var i;return s(this,n),(i=t.call(this)).code=1,i.name="CONFIGURATION_ERROR",i.parameter=e,i.value=r,i.message=i.value?"Invalid value ".concat(JSON.stringify(i.value),' for parameter "').concat(i.parameter,'"'):"Missing parameter: ".concat(i.parameter),i}return n}(),f=function(e){i(n,l(Error));var t=o(n);function n(e){var r;return s(this,n),(r=t.call(this)).code=2,r.name="INVALID_STATE_ERROR",r.status=e,r.message="Invalid status: ".concat(e),r}return n}(),_=function(e){i(n,l(Error));var t=o(n);function n(e){var r;return s(this,n),(r=t.call(this)).code=3,r.name="NOT_SUPPORTED_ERROR",r.message=e,r}return n}(),p=function(e){i(n,l(Error));var t=o(n);function n(e){var r;return s(this,n),(r=t.call(this)).code=4,r.name="NOT_READY_ERROR",r.message=e,r}return n}();t.exports={ConfigurationError:d,InvalidStateError:f,NotSupportedError:_,NotReadyError:p}},{}],7:[function(e,t,n){"use strict";t.exports=function(){function t(e){return'"'+e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\x08/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/[\x00-\x07\x0B\x0E-\x1F\x80-\uFFFF]/g,escape)+'"'}var n={parse:function(n,r){var s={CRLF:c,DIGIT:h,ALPHA:d,HEXDIG:f,WSP:_,OCTET:p,DQUOTE:m,SP:v,HTAB:g,alphanum:y,reserved:T,unreserved:C,mark:b,escaped:S,LWS:E,SWS:A,HCOLON:R,TEXT_UTF8_TRIM:w,TEXT_UTF8char:I,UTF8_NONASCII:O,UTF8_CONT:k,LHEX:function(){var e;null===(e=h())&&(/^[a-f]/.test(n.charAt(i))?(e=n.charAt(i),i++):(e=null,0===o&&a("[a-f]")));return e},token:N,token_nodot:U,separators:function(){var e;40===n.charCodeAt(i)?(e="(",i++):(e=null,0===o&&a('"("'));null===e&&(41===n.charCodeAt(i)?(e=")",i++):(e=null,0===o&&a('")"')),null===e&&(60===n.charCodeAt(i)?(e="<",i++):(e=null,0===o&&a('"<"')),null===e&&(62===n.charCodeAt(i)?(e=">",i++):(e=null,0===o&&a('">"')),null===e&&(64===n.charCodeAt(i)?(e="@",i++):(e=null,0===o&&a('"@"')),null===e&&(44===n.charCodeAt(i)?(e=",",i++):(e=null,0===o&&a('","')),null===e&&(59===n.charCodeAt(i)?(e=";",i++):(e=null,0===o&&a('";"')),null===e&&(58===n.charCodeAt(i)?(e=":",i++):(e=null,0===o&&a('":"')),null===e&&(92===n.charCodeAt(i)?(e="\\",i++):(e=null,0===o&&a('"\\\\"')),null===e&&null===(e=m())&&(47===n.charCodeAt(i)?(e="/",i++):(e=null,0===o&&a('"/"')),null===e&&(91===n.charCodeAt(i)?(e="[",i++):(e=null,0===o&&a('"["')),null===e&&(93===n.charCodeAt(i)?(e="]",i++):(e=null,0===o&&a('"]"')),null===e&&(63===n.charCodeAt(i)?(e="?",i++):(e=null,0===o&&a('"?"')),null===e&&(61===n.charCodeAt(i)?(e="=",i++):(e=null,0===o&&a('"="')),null===e&&(123===n.charCodeAt(i)?(e="{",i++):(e=null,0===o&&a('"{"')),null===e&&(125===n.charCodeAt(i)?(e="}",i++):(e=null,0===o&&a('"}"')),null===e&&null===(e=v())&&(e=g()))))))))))))))));return e},word:x,STAR:D,SLASH:P,EQUAL:M,LPAREN:q,RPAREN:L,RAQUOT:H,LAQUOT:F,COMMA:j,SEMI:G,COLON:W,LDQUOT:V,RDQUOT:B,comment:function e(){var t,n,r;var s;s=i;t=q();if(null!==t){for(n=[],null===(r=K())&&null===(r=X())&&(r=e());null!==r;)n.push(r),null===(r=K())&&null===(r=X())&&(r=e());null!==n&&null!==(r=L())?t=[t,n,r]:(t=null,i=s)}else t=null,i=s;return t},ctext:K,quoted_string:z,quoted_string_clean:Y,qdtext:$,quoted_pair:X,SIP_URI_noparams:J,SIP_URI:Q,uri_scheme:Z,uri_scheme_sips:ee,uri_scheme_sip:te,userinfo:ne,user:re,user_unreserved:se,password:ie,hostport:oe,host:le,hostname:ue,domainlabel:ae,toplabel:ce,IPv6reference:he,IPv6address:de,h16:fe,ls32:_e,IPv4address:pe,dec_octet:me,port:ve,uri_parameters:ge,uri_parameter:ye,transport_param:Te,user_param:Ce,method_param:be,ttl_param:Se,maddr_param:Ee,lr_param:Ae,other_param:Re,pname:we,pvalue:Ie,paramchar:Oe,param_unreserved:ke,headers:Ne,header:Ue,hname:xe,hvalue:De,hnv_unreserved:Pe,Request_Response:function(){var e;null===(e=ht())&&(e=Me());return e},Request_Line:Me,Request_URI:qe,absoluteURI:Le,hier_part:He,net_path:Fe,abs_path:je,opaque_part:Ge,uric:We,uric_no_slash:Ve,path_segments:Be,segment:Ke,param:ze,pchar:Ye,scheme:$e,authority:Xe,srvr:Je,reg_name:Qe,query:Ze,SIP_Version:et,INVITEm:tt,ACKm:nt,OPTIONSm:rt,BYEm:st,CANCELm:it,REGISTERm:ot,SUBSCRIBEm:lt,NOTIFYm:ut,REFERm:at,Method:ct,Status_Line:ht,Status_Code:dt,extension_code:ft,Reason_Phrase:_t,Allow_Events:function(){var e,t,n,r,s,o;if(s=i,null!==(e=Lt())){for(t=[],o=i,null!==(n=j())&&null!==(r=Lt())?n=[n,r]:(n=null,i=o);null!==n;)t.push(n),o=i,null!==(n=j())&&null!==(r=Lt())?n=[n,r]:(n=null,i=o);null!==t?e=[e,t]:(e=null,i=s)}else e=null,i=s;return e},Call_ID:function(){var e,t,r,s,l,u;s=i,l=i,null!==(e=x())?(u=i,64===n.charCodeAt(i)?(t="@",i++):(t=null,0===o&&a('"@"')),null!==t&&null!==(r=x())?t=[t,r]:(t=null,i=u),null!==(t=null!==t?t:"")?e=[e,t]:(e=null,i=l)):(e=null,i=l);null!==e&&(c=s,e=void(jn=n.substring(i,c)));var c;null===e&&(i=s);return e},Contact:function(){var e,t,n,r,s,o,l;if(s=i,null===(e=D()))if(o=i,null!==(e=pt())){for(t=[],l=i,null!==(n=j())&&null!==(r=pt())?n=[n,r]:(n=null,i=l);null!==n;)t.push(n),l=i,null!==(n=j())&&null!==(r=pt())?n=[n,r]:(n=null,i=l);null!==t?e=[e,t]:(e=null,i=o)}else e=null,i=o;null!==e&&(e=function(e){var t,n;for(n=jn.multi_header.length,t=0;tl&&(l=i,u=[]),u.push(e))}function c(){var e;return"\r\n"===n.substr(i,2)?(e="\r\n",i+=2):(e=null,0===o&&a('"\\r\\n"')),e}function h(){var e;return/^[0-9]/.test(n.charAt(i))?(e=n.charAt(i),i++):(e=null,0===o&&a("[0-9]")),e}function d(){var e;return/^[a-zA-Z]/.test(n.charAt(i))?(e=n.charAt(i),i++):(e=null,0===o&&a("[a-zA-Z]")),e}function f(){var e;return/^[0-9a-fA-F]/.test(n.charAt(i))?(e=n.charAt(i),i++):(e=null,0===o&&a("[0-9a-fA-F]")),e}function _(){var e;return null===(e=v())&&(e=g()),e}function p(){var e;return/^[\0-\xFF]/.test(n.charAt(i))?(e=n.charAt(i),i++):(e=null,0===o&&a("[\\0-\\xFF]")),e}function m(){var e;return/^["]/.test(n.charAt(i))?(e=n.charAt(i),i++):(e=null,0===o&&a('["]')),e}function v(){var e;return 32===n.charCodeAt(i)?(e=" ",i++):(e=null,0===o&&a('" "')),e}function g(){var e;return 9===n.charCodeAt(i)?(e="\t",i++):(e=null,0===o&&a('"\\t"')),e}function y(){var e;return/^[a-zA-Z0-9]/.test(n.charAt(i))?(e=n.charAt(i),i++):(e=null,0===o&&a("[a-zA-Z0-9]")),e}function T(){var e;return 59===n.charCodeAt(i)?(e=";",i++):(e=null,0===o&&a('";"')),null===e&&(47===n.charCodeAt(i)?(e="/",i++):(e=null,0===o&&a('"/"')),null===e&&(63===n.charCodeAt(i)?(e="?",i++):(e=null,0===o&&a('"?"')),null===e&&(58===n.charCodeAt(i)?(e=":",i++):(e=null,0===o&&a('":"')),null===e&&(64===n.charCodeAt(i)?(e="@",i++):(e=null,0===o&&a('"@"')),null===e&&(38===n.charCodeAt(i)?(e="&",i++):(e=null,0===o&&a('"&"')),null===e&&(61===n.charCodeAt(i)?(e="=",i++):(e=null,0===o&&a('"="')),null===e&&(43===n.charCodeAt(i)?(e="+",i++):(e=null,0===o&&a('"+"')),null===e&&(36===n.charCodeAt(i)?(e="$",i++):(e=null,0===o&&a('"$"')),null===e&&(44===n.charCodeAt(i)?(e=",",i++):(e=null,0===o&&a('","'))))))))))),e}function C(){var e;return null===(e=y())&&(e=b()),e}function b(){var e;return 45===n.charCodeAt(i)?(e="-",i++):(e=null,0===o&&a('"-"')),null===e&&(95===n.charCodeAt(i)?(e="_",i++):(e=null,0===o&&a('"_"')),null===e&&(46===n.charCodeAt(i)?(e=".",i++):(e=null,0===o&&a('"."')),null===e&&(33===n.charCodeAt(i)?(e="!",i++):(e=null,0===o&&a('"!"')),null===e&&(126===n.charCodeAt(i)?(e="~",i++):(e=null,0===o&&a('"~"')),null===e&&(42===n.charCodeAt(i)?(e="*",i++):(e=null,0===o&&a('"*"')),null===e&&(39===n.charCodeAt(i)?(e="'",i++):(e=null,0===o&&a('"\'"')),null===e&&(40===n.charCodeAt(i)?(e="(",i++):(e=null,0===o&&a('"("')),null===e&&(41===n.charCodeAt(i)?(e=")",i++):(e=null,0===o&&a('")"')))))))))),e}function S(){var e,t,r,s,l;return s=i,l=i,37===n.charCodeAt(i)?(e="%",i++):(e=null,0===o&&a('"%"')),null!==e&&null!==(t=f())&&null!==(r=f())?e=[e,t,r]:(e=null,i=l),null!==e&&(e=e.join("")),null===e&&(i=s),e}function E(){var e,t,n,r,s,o;for(r=i,s=i,o=i,e=[],t=_();null!==t;)e.push(t),t=_();if(null!==e&&null!==(t=c())?e=[e,t]:(e=null,i=o),null!==(e=null!==e?e:"")){if(null!==(n=_()))for(t=[];null!==n;)t.push(n),n=_();else t=null;null!==t?e=[e,t]:(e=null,i=s)}else e=null,i=s;return null!==e&&(e=" "),null===e&&(i=r),e}function A(){var e;return e=null!==(e=E())?e:""}function R(){var e,t,r,s,l;for(s=i,l=i,e=[],null===(t=v())&&(t=g());null!==t;)e.push(t),null===(t=v())&&(t=g());return null!==e?(58===n.charCodeAt(i)?(t=":",i++):(t=null,0===o&&a('":"')),null!==t&&null!==(r=A())?e=[e,t,r]:(e=null,i=l)):(e=null,i=l),null!==e&&(e=":"),null===e&&(i=s),e}function w(){var e,t,r,s,o,l,u,a;if(o=i,l=i,null!==(t=I()))for(e=[];null!==t;)e.push(t),t=I();else e=null;if(null!==e){for(t=[],u=i,r=[],s=E();null!==s;)r.push(s),s=E();for(null!==r&&null!==(s=I())?r=[r,s]:(r=null,i=u);null!==r;){for(t.push(r),u=i,r=[],s=E();null!==s;)r.push(s),s=E();null!==r&&null!==(s=I())?r=[r,s]:(r=null,i=u)}null!==t?e=[e,t]:(e=null,i=l)}else e=null,i=l;return null!==e&&(a=o,e=n.substring(i,a)),null===e&&(i=o),e}function I(){var e;return/^[!-~]/.test(n.charAt(i))?(e=n.charAt(i),i++):(e=null,0===o&&a("[!-~]")),null===e&&(e=O()),e}function O(){var e;return/^[\x80-\uFFFF]/.test(n.charAt(i))?(e=n.charAt(i),i++):(e=null,0===o&&a("[\\x80-\\uFFFF]")),e}function k(){var e;return/^[\x80-\xBF]/.test(n.charAt(i))?(e=n.charAt(i),i++):(e=null,0===o&&a("[\\x80-\\xBF]")),e}function N(){var e,t,r,s;if(r=i,null===(t=y())&&(45===n.charCodeAt(i)?(t="-",i++):(t=null,0===o&&a('"-"')),null===t&&(46===n.charCodeAt(i)?(t=".",i++):(t=null,0===o&&a('"."')),null===t&&(33===n.charCodeAt(i)?(t="!",i++):(t=null,0===o&&a('"!"')),null===t&&(37===n.charCodeAt(i)?(t="%",i++):(t=null,0===o&&a('"%"')),null===t&&(42===n.charCodeAt(i)?(t="*",i++):(t=null,0===o&&a('"*"')),null===t&&(95===n.charCodeAt(i)?(t="_",i++):(t=null,0===o&&a('"_"')),null===t&&(43===n.charCodeAt(i)?(t="+",i++):(t=null,0===o&&a('"+"')),null===t&&(96===n.charCodeAt(i)?(t="`",i++):(t=null,0===o&&a('"`"')),null===t&&(39===n.charCodeAt(i)?(t="'",i++):(t=null,0===o&&a('"\'"')),null===t&&(126===n.charCodeAt(i)?(t="~",i++):(t=null,0===o&&a('"~"')))))))))))),null!==t)for(e=[];null!==t;)e.push(t),null===(t=y())&&(45===n.charCodeAt(i)?(t="-",i++):(t=null,0===o&&a('"-"')),null===t&&(46===n.charCodeAt(i)?(t=".",i++):(t=null,0===o&&a('"."')),null===t&&(33===n.charCodeAt(i)?(t="!",i++):(t=null,0===o&&a('"!"')),null===t&&(37===n.charCodeAt(i)?(t="%",i++):(t=null,0===o&&a('"%"')),null===t&&(42===n.charCodeAt(i)?(t="*",i++):(t=null,0===o&&a('"*"')),null===t&&(95===n.charCodeAt(i)?(t="_",i++):(t=null,0===o&&a('"_"')),null===t&&(43===n.charCodeAt(i)?(t="+",i++):(t=null,0===o&&a('"+"')),null===t&&(96===n.charCodeAt(i)?(t="`",i++):(t=null,0===o&&a('"`"')),null===t&&(39===n.charCodeAt(i)?(t="'",i++):(t=null,0===o&&a('"\'"')),null===t&&(126===n.charCodeAt(i)?(t="~",i++):(t=null,0===o&&a('"~"'))))))))))));else e=null;return null!==e&&(s=r,e=n.substring(i,s)),null===e&&(i=r),e}function U(){var e,t,r,s;if(r=i,null===(t=y())&&(45===n.charCodeAt(i)?(t="-",i++):(t=null,0===o&&a('"-"')),null===t&&(33===n.charCodeAt(i)?(t="!",i++):(t=null,0===o&&a('"!"')),null===t&&(37===n.charCodeAt(i)?(t="%",i++):(t=null,0===o&&a('"%"')),null===t&&(42===n.charCodeAt(i)?(t="*",i++):(t=null,0===o&&a('"*"')),null===t&&(95===n.charCodeAt(i)?(t="_",i++):(t=null,0===o&&a('"_"')),null===t&&(43===n.charCodeAt(i)?(t="+",i++):(t=null,0===o&&a('"+"')),null===t&&(96===n.charCodeAt(i)?(t="`",i++):(t=null,0===o&&a('"`"')),null===t&&(39===n.charCodeAt(i)?(t="'",i++):(t=null,0===o&&a('"\'"')),null===t&&(126===n.charCodeAt(i)?(t="~",i++):(t=null,0===o&&a('"~"'))))))))))),null!==t)for(e=[];null!==t;)e.push(t),null===(t=y())&&(45===n.charCodeAt(i)?(t="-",i++):(t=null,0===o&&a('"-"')),null===t&&(33===n.charCodeAt(i)?(t="!",i++):(t=null,0===o&&a('"!"')),null===t&&(37===n.charCodeAt(i)?(t="%",i++):(t=null,0===o&&a('"%"')),null===t&&(42===n.charCodeAt(i)?(t="*",i++):(t=null,0===o&&a('"*"')),null===t&&(95===n.charCodeAt(i)?(t="_",i++):(t=null,0===o&&a('"_"')),null===t&&(43===n.charCodeAt(i)?(t="+",i++):(t=null,0===o&&a('"+"')),null===t&&(96===n.charCodeAt(i)?(t="`",i++):(t=null,0===o&&a('"`"')),null===t&&(39===n.charCodeAt(i)?(t="'",i++):(t=null,0===o&&a('"\'"')),null===t&&(126===n.charCodeAt(i)?(t="~",i++):(t=null,0===o&&a('"~"')))))))))));else e=null;return null!==e&&(s=r,e=n.substring(i,s)),null===e&&(i=r),e}function x(){var e,t,r,s;if(r=i,null===(t=y())&&(45===n.charCodeAt(i)?(t="-",i++):(t=null,0===o&&a('"-"')),null===t&&(46===n.charCodeAt(i)?(t=".",i++):(t=null,0===o&&a('"."')),null===t&&(33===n.charCodeAt(i)?(t="!",i++):(t=null,0===o&&a('"!"')),null===t&&(37===n.charCodeAt(i)?(t="%",i++):(t=null,0===o&&a('"%"')),null===t&&(42===n.charCodeAt(i)?(t="*",i++):(t=null,0===o&&a('"*"')),null===t&&(95===n.charCodeAt(i)?(t="_",i++):(t=null,0===o&&a('"_"')),null===t&&(43===n.charCodeAt(i)?(t="+",i++):(t=null,0===o&&a('"+"')),null===t&&(96===n.charCodeAt(i)?(t="`",i++):(t=null,0===o&&a('"`"')),null===t&&(39===n.charCodeAt(i)?(t="'",i++):(t=null,0===o&&a('"\'"')),null===t&&(126===n.charCodeAt(i)?(t="~",i++):(t=null,0===o&&a('"~"')),null===t&&(40===n.charCodeAt(i)?(t="(",i++):(t=null,0===o&&a('"("')),null===t&&(41===n.charCodeAt(i)?(t=")",i++):(t=null,0===o&&a('")"')),null===t&&(60===n.charCodeAt(i)?(t="<",i++):(t=null,0===o&&a('"<"')),null===t&&(62===n.charCodeAt(i)?(t=">",i++):(t=null,0===o&&a('">"')),null===t&&(58===n.charCodeAt(i)?(t=":",i++):(t=null,0===o&&a('":"')),null===t&&(92===n.charCodeAt(i)?(t="\\",i++):(t=null,0===o&&a('"\\\\"')),null===t&&null===(t=m())&&(47===n.charCodeAt(i)?(t="/",i++):(t=null,0===o&&a('"/"')),null===t&&(91===n.charCodeAt(i)?(t="[",i++):(t=null,0===o&&a('"["')),null===t&&(93===n.charCodeAt(i)?(t="]",i++):(t=null,0===o&&a('"]"')),null===t&&(63===n.charCodeAt(i)?(t="?",i++):(t=null,0===o&&a('"?"')),null===t&&(123===n.charCodeAt(i)?(t="{",i++):(t=null,0===o&&a('"{"')),null===t&&(125===n.charCodeAt(i)?(t="}",i++):(t=null,0===o&&a('"}"')))))))))))))))))))))))),null!==t)for(e=[];null!==t;)e.push(t),null===(t=y())&&(45===n.charCodeAt(i)?(t="-",i++):(t=null,0===o&&a('"-"')),null===t&&(46===n.charCodeAt(i)?(t=".",i++):(t=null,0===o&&a('"."')),null===t&&(33===n.charCodeAt(i)?(t="!",i++):(t=null,0===o&&a('"!"')),null===t&&(37===n.charCodeAt(i)?(t="%",i++):(t=null,0===o&&a('"%"')),null===t&&(42===n.charCodeAt(i)?(t="*",i++):(t=null,0===o&&a('"*"')),null===t&&(95===n.charCodeAt(i)?(t="_",i++):(t=null,0===o&&a('"_"')),null===t&&(43===n.charCodeAt(i)?(t="+",i++):(t=null,0===o&&a('"+"')),null===t&&(96===n.charCodeAt(i)?(t="`",i++):(t=null,0===o&&a('"`"')),null===t&&(39===n.charCodeAt(i)?(t="'",i++):(t=null,0===o&&a('"\'"')),null===t&&(126===n.charCodeAt(i)?(t="~",i++):(t=null,0===o&&a('"~"')),null===t&&(40===n.charCodeAt(i)?(t="(",i++):(t=null,0===o&&a('"("')),null===t&&(41===n.charCodeAt(i)?(t=")",i++):(t=null,0===o&&a('")"')),null===t&&(60===n.charCodeAt(i)?(t="<",i++):(t=null,0===o&&a('"<"')),null===t&&(62===n.charCodeAt(i)?(t=">",i++):(t=null,0===o&&a('">"')),null===t&&(58===n.charCodeAt(i)?(t=":",i++):(t=null,0===o&&a('":"')),null===t&&(92===n.charCodeAt(i)?(t="\\",i++):(t=null,0===o&&a('"\\\\"')),null===t&&null===(t=m())&&(47===n.charCodeAt(i)?(t="/",i++):(t=null,0===o&&a('"/"')),null===t&&(91===n.charCodeAt(i)?(t="[",i++):(t=null,0===o&&a('"["')),null===t&&(93===n.charCodeAt(i)?(t="]",i++):(t=null,0===o&&a('"]"')),null===t&&(63===n.charCodeAt(i)?(t="?",i++):(t=null,0===o&&a('"?"')),null===t&&(123===n.charCodeAt(i)?(t="{",i++):(t=null,0===o&&a('"{"')),null===t&&(125===n.charCodeAt(i)?(t="}",i++):(t=null,0===o&&a('"}"'))))))))))))))))))))))));else e=null;return null!==e&&(s=r,e=n.substring(i,s)),null===e&&(i=r),e}function D(){var e,t,r,s,l;return s=i,l=i,null!==(e=A())?(42===n.charCodeAt(i)?(t="*",i++):(t=null,0===o&&a('"*"')),null!==t&&null!==(r=A())?e=[e,t,r]:(e=null,i=l)):(e=null,i=l),null!==e&&(e="*"),null===e&&(i=s),e}function P(){var e,t,r,s,l;return s=i,l=i,null!==(e=A())?(47===n.charCodeAt(i)?(t="/",i++):(t=null,0===o&&a('"/"')),null!==t&&null!==(r=A())?e=[e,t,r]:(e=null,i=l)):(e=null,i=l),null!==e&&(e="/"),null===e&&(i=s),e}function M(){var e,t,r,s,l;return s=i,l=i,null!==(e=A())?(61===n.charCodeAt(i)?(t="=",i++):(t=null,0===o&&a('"="')),null!==t&&null!==(r=A())?e=[e,t,r]:(e=null,i=l)):(e=null,i=l),null!==e&&(e="="),null===e&&(i=s),e}function q(){var e,t,r,s,l;return s=i,l=i,null!==(e=A())?(40===n.charCodeAt(i)?(t="(",i++):(t=null,0===o&&a('"("')),null!==t&&null!==(r=A())?e=[e,t,r]:(e=null,i=l)):(e=null,i=l),null!==e&&(e="("),null===e&&(i=s),e}function L(){var e,t,r,s,l;return s=i,l=i,null!==(e=A())?(41===n.charCodeAt(i)?(t=")",i++):(t=null,0===o&&a('")"')),null!==t&&null!==(r=A())?e=[e,t,r]:(e=null,i=l)):(e=null,i=l),null!==e&&(e=")"),null===e&&(i=s),e}function H(){var e,t,r,s;return r=i,s=i,62===n.charCodeAt(i)?(e=">",i++):(e=null,0===o&&a('">"')),null!==e&&null!==(t=A())?e=[e,t]:(e=null,i=s),null!==e&&(e=">"),null===e&&(i=r),e}function F(){var e,t,r,s;return r=i,s=i,null!==(e=A())?(60===n.charCodeAt(i)?(t="<",i++):(t=null,0===o&&a('"<"')),null!==t?e=[e,t]:(e=null,i=s)):(e=null,i=s),null!==e&&(e="<"),null===e&&(i=r),e}function j(){var e,t,r,s,l;return s=i,l=i,null!==(e=A())?(44===n.charCodeAt(i)?(t=",",i++):(t=null,0===o&&a('","')),null!==t&&null!==(r=A())?e=[e,t,r]:(e=null,i=l)):(e=null,i=l),null!==e&&(e=","),null===e&&(i=s),e}function G(){var e,t,r,s,l;return s=i,l=i,null!==(e=A())?(59===n.charCodeAt(i)?(t=";",i++):(t=null,0===o&&a('";"')),null!==t&&null!==(r=A())?e=[e,t,r]:(e=null,i=l)):(e=null,i=l),null!==e&&(e=";"),null===e&&(i=s),e}function W(){var e,t,r,s,l;return s=i,l=i,null!==(e=A())?(58===n.charCodeAt(i)?(t=":",i++):(t=null,0===o&&a('":"')),null!==t&&null!==(r=A())?e=[e,t,r]:(e=null,i=l)):(e=null,i=l),null!==e&&(e=":"),null===e&&(i=s),e}function V(){var e,t,n,r;return n=i,r=i,null!==(e=A())&&null!==(t=m())?e=[e,t]:(e=null,i=r),null!==e&&(e='"'),null===e&&(i=n),e}function B(){var e,t,n,r;return n=i,r=i,null!==(e=m())&&null!==(t=A())?e=[e,t]:(e=null,i=r),null!==e&&(e='"'),null===e&&(i=n),e}function K(){var e;return/^[!-']/.test(n.charAt(i))?(e=n.charAt(i),i++):(e=null,0===o&&a("[!-']")),null===e&&(/^[*-[]/.test(n.charAt(i))?(e=n.charAt(i),i++):(e=null,0===o&&a("[*-[]")),null===e&&(/^[\]-~]/.test(n.charAt(i))?(e=n.charAt(i),i++):(e=null,0===o&&a("[\\]-~]")),null===e&&null===(e=O())&&(e=E()))),e}function z(){var e,t,r,s,o,l,u;if(o=i,l=i,null!==(e=A()))if(null!==(t=m())){for(r=[],null===(s=$())&&(s=X());null!==s;)r.push(s),null===(s=$())&&(s=X());null!==r&&null!==(s=m())?e=[e,t,r,s]:(e=null,i=l)}else e=null,i=l;else e=null,i=l;return null!==e&&(u=o,e=n.substring(i,u)),null===e&&(i=o),e}function Y(){var e,t,r,s,o,l,u,a;if(o=i,l=i,null!==(e=A()))if(null!==(t=m())){for(r=[],null===(s=$())&&(s=X());null!==s;)r.push(s),null===(s=$())&&(s=X());null!==r&&null!==(s=m())?e=[e,t,r,s]:(e=null,i=l)}else e=null,i=l;else e=null,i=l;return null!==e&&(u=o,e=(a=n.substring(i,u).trim()).substring(1,a.length-1).replace(/\\([\x00-\x09\x0b-\x0c\x0e-\x7f])/g,"$1")),null===e&&(i=o),e}function $(){var e;return null===(e=E())&&(33===n.charCodeAt(i)?(e="!",i++):(e=null,0===o&&a('"!"')),null===e&&(/^[#-[]/.test(n.charAt(i))?(e=n.charAt(i),i++):(e=null,0===o&&a("[#-[]")),null===e&&(/^[\]-~]/.test(n.charAt(i))?(e=n.charAt(i),i++):(e=null,0===o&&a("[\\]-~]")),null===e&&(e=O())))),e}function X(){var e,t,r;return r=i,92===n.charCodeAt(i)?(e="\\",i++):(e=null,0===o&&a('"\\\\"')),null!==e?(/^[\0-\t]/.test(n.charAt(i))?(t=n.charAt(i),i++):(t=null,0===o&&a("[\\0-\\t]")),null===t&&(/^[\x0B-\f]/.test(n.charAt(i))?(t=n.charAt(i),i++):(t=null,0===o&&a("[\\x0B-\\f]")),null===t&&(/^[\x0E-]/.test(n.charAt(i))?(t=n.charAt(i),i++):(t=null,0===o&&a("[\\x0E-]")))),null!==t?e=[e,t]:(e=null,i=r)):(e=null,i=r),e}function J(){var e,t,r,s,l,u;return l=i,u=i,null!==(e=Z())?(58===n.charCodeAt(i)?(t=":",i++):(t=null,0===o&&a('":"')),null!==t&&null!==(r=null!==(r=ne())?r:"")&&null!==(s=oe())?e=[e,t,r,s]:(e=null,i=u)):(e=null,i=u),null!==e&&(e=function(e){try{jn.uri=new Hn(jn.scheme,jn.user,jn.host,jn.port),delete jn.scheme,delete jn.user,delete jn.host,delete jn.host_type,delete jn.port}catch(e){jn=-1}}()),null===e&&(i=l),e}function Q(){var e,t,s,l,u,c,h,d;return h=i,d=i,null!==(e=Z())?(58===n.charCodeAt(i)?(t=":",i++):(t=null,0===o&&a('":"')),null!==t&&null!==(s=null!==(s=ne())?s:"")&&null!==(l=oe())&&null!==(u=ge())&&null!==(c=null!==(c=Ne())?c:"")?e=[e,t,s,l,u,c]:(e=null,i=d)):(e=null,i=d),null!==e&&(e=function(e){try{jn.uri=new Hn(jn.scheme,jn.user,jn.host,jn.port,jn.uri_params,jn.uri_headers),delete jn.scheme,delete jn.user,delete jn.host,delete jn.host_type,delete jn.port,delete jn.uri_params,"SIP_URI"===r&&(jn=jn.uri)}catch(e){jn=-1}}()),null===e&&(i=h),e}function Z(){var e;return null===(e=ee())&&(e=te()),e}function ee(){var e,t,r;return t=i,"sips"===n.substr(i,4).toLowerCase()?(e=n.substr(i,4),i+=4):(e=null,0===o&&a('"sips"')),null!==e&&(r=e,e=void(jn.scheme=r.toLowerCase())),null===e&&(i=t),e}function te(){var e,t,r;return t=i,"sip"===n.substr(i,3).toLowerCase()?(e=n.substr(i,3),i+=3):(e=null,0===o&&a('"sip"')),null!==e&&(r=e,e=void(jn.scheme=r.toLowerCase())),null===e&&(i=t),e}function ne(){var e,t,r,s,l,u,c;return s=i,l=i,null!==(e=re())?(u=i,58===n.charCodeAt(i)?(t=":",i++):(t=null,0===o&&a('":"')),null!==t&&null!==(r=ie())?t=[t,r]:(t=null,i=u),null!==(t=null!==t?t:"")?(64===n.charCodeAt(i)?(r="@",i++):(r=null,0===o&&a('"@"')),null!==r?e=[e,t,r]:(e=null,i=l)):(e=null,i=l)):(e=null,i=l),null!==e&&(c=s,e=void(jn.user=decodeURIComponent(n.substring(i-1,c)))),null===e&&(i=s),e}function re(){var e,t;if(null===(t=C())&&null===(t=S())&&(t=se()),null!==t)for(e=[];null!==t;)e.push(t),null===(t=C())&&null===(t=S())&&(t=se());else e=null;return e}function se(){var e;return 38===n.charCodeAt(i)?(e="&",i++):(e=null,0===o&&a('"&"')),null===e&&(61===n.charCodeAt(i)?(e="=",i++):(e=null,0===o&&a('"="')),null===e&&(43===n.charCodeAt(i)?(e="+",i++):(e=null,0===o&&a('"+"')),null===e&&(36===n.charCodeAt(i)?(e="$",i++):(e=null,0===o&&a('"$"')),null===e&&(44===n.charCodeAt(i)?(e=",",i++):(e=null,0===o&&a('","')),null===e&&(59===n.charCodeAt(i)?(e=";",i++):(e=null,0===o&&a('";"')),null===e&&(63===n.charCodeAt(i)?(e="?",i++):(e=null,0===o&&a('"?"')),null===e&&(47===n.charCodeAt(i)?(e="/",i++):(e=null,0===o&&a('"/"'))))))))),e}function ie(){var e,t,r,s;for(r=i,e=[],null===(t=C())&&null===(t=S())&&(38===n.charCodeAt(i)?(t="&",i++):(t=null,0===o&&a('"&"')),null===t&&(61===n.charCodeAt(i)?(t="=",i++):(t=null,0===o&&a('"="')),null===t&&(43===n.charCodeAt(i)?(t="+",i++):(t=null,0===o&&a('"+"')),null===t&&(36===n.charCodeAt(i)?(t="$",i++):(t=null,0===o&&a('"$"')),null===t&&(44===n.charCodeAt(i)?(t=",",i++):(t=null,0===o&&a('","')))))));null!==t;)e.push(t),null===(t=C())&&null===(t=S())&&(38===n.charCodeAt(i)?(t="&",i++):(t=null,0===o&&a('"&"')),null===t&&(61===n.charCodeAt(i)?(t="=",i++):(t=null,0===o&&a('"="')),null===t&&(43===n.charCodeAt(i)?(t="+",i++):(t=null,0===o&&a('"+"')),null===t&&(36===n.charCodeAt(i)?(t="$",i++):(t=null,0===o&&a('"$"')),null===t&&(44===n.charCodeAt(i)?(t=",",i++):(t=null,0===o&&a('","')))))));return null!==e&&(s=r,e=void(jn.password=n.substring(i,s))),null===e&&(i=r),e}function oe(){var e,t,r,s,l;return s=i,null!==(e=le())?(l=i,58===n.charCodeAt(i)?(t=":",i++):(t=null,0===o&&a('":"')),null!==t&&null!==(r=ve())?t=[t,r]:(t=null,i=l),null!==(t=null!==t?t:"")?e=[e,t]:(e=null,i=s)):(e=null,i=s),e}function le(){var e,t,r;return t=i,null===(e=ue())&&null===(e=pe())&&(e=he()),null!==e&&(r=t,jn.host=n.substring(i,r).toLowerCase(),e=jn.host),null===e&&(i=t),e}function ue(){var e,t,r,s,l,u,c;for(s=i,l=i,e=[],u=i,null!==(t=ae())?(46===n.charCodeAt(i)?(r=".",i++):(r=null,0===o&&a('"."')),null!==r?t=[t,r]:(t=null,i=u)):(t=null,i=u);null!==t;)e.push(t),u=i,null!==(t=ae())?(46===n.charCodeAt(i)?(r=".",i++):(r=null,0===o&&a('"."')),null!==r?t=[t,r]:(t=null,i=u)):(t=null,i=u);return null!==e&&null!==(t=ce())?(46===n.charCodeAt(i)?(r=".",i++):(r=null,0===o&&a('"."')),null!==(r=null!==r?r:"")?e=[e,t,r]:(e=null,i=l)):(e=null,i=l),null!==e&&(c=s,jn.host_type="domain",e=n.substring(i,c)),null===e&&(i=s),e}function ae(){var e,t,r,s;if(s=i,null!==(e=y())){for(t=[],null===(r=y())&&(45===n.charCodeAt(i)?(r="-",i++):(r=null,0===o&&a('"-"')),null===r&&(95===n.charCodeAt(i)?(r="_",i++):(r=null,0===o&&a('"_"'))));null!==r;)t.push(r),null===(r=y())&&(45===n.charCodeAt(i)?(r="-",i++):(r=null,0===o&&a('"-"')),null===r&&(95===n.charCodeAt(i)?(r="_",i++):(r=null,0===o&&a('"_"'))));null!==t?e=[e,t]:(e=null,i=s)}else e=null,i=s;return e}function ce(){var e,t,r,s;if(s=i,null!==(e=d())){for(t=[],null===(r=y())&&(45===n.charCodeAt(i)?(r="-",i++):(r=null,0===o&&a('"-"')),null===r&&(95===n.charCodeAt(i)?(r="_",i++):(r=null,0===o&&a('"_"'))));null!==r;)t.push(r),null===(r=y())&&(45===n.charCodeAt(i)?(r="-",i++):(r=null,0===o&&a('"-"')),null===r&&(95===n.charCodeAt(i)?(r="_",i++):(r=null,0===o&&a('"_"'))));null!==t?e=[e,t]:(e=null,i=s)}else e=null,i=s;return e}function he(){var e,t,r,s,l,u;return s=i,l=i,91===n.charCodeAt(i)?(e="[",i++):(e=null,0===o&&a('"["')),null!==e&&null!==(t=de())?(93===n.charCodeAt(i)?(r="]",i++):(r=null,0===o&&a('"]"')),null!==r?e=[e,t,r]:(e=null,i=l)):(e=null,i=l),null!==e&&(u=s,jn.host_type="IPv6",e=n.substring(i,u)),null===e&&(i=s),e}function de(){var e,t,r,s,l,u,c,h,d,f,_,p,m,v,g,y,T;return v=i,g=i,null!==(e=fe())?(58===n.charCodeAt(i)?(t=":",i++):(t=null,0===o&&a('":"')),null!==t&&null!==(r=fe())?(58===n.charCodeAt(i)?(s=":",i++):(s=null,0===o&&a('":"')),null!==s&&null!==(l=fe())?(58===n.charCodeAt(i)?(u=":",i++):(u=null,0===o&&a('":"')),null!==u&&null!==(c=fe())?(58===n.charCodeAt(i)?(h=":",i++):(h=null,0===o&&a('":"')),null!==h&&null!==(d=fe())?(58===n.charCodeAt(i)?(f=":",i++):(f=null,0===o&&a('":"')),null!==f&&null!==(_=fe())?(58===n.charCodeAt(i)?(p=":",i++):(p=null,0===o&&a('":"')),null!==p&&null!==(m=_e())?e=[e,t,r,s,l,u,c,h,d,f,_,p,m]:(e=null,i=g)):(e=null,i=g)):(e=null,i=g)):(e=null,i=g)):(e=null,i=g)):(e=null,i=g)):(e=null,i=g),null===e&&(g=i,"::"===n.substr(i,2)?(e="::",i+=2):(e=null,0===o&&a('"::"')),null!==e&&null!==(t=fe())?(58===n.charCodeAt(i)?(r=":",i++):(r=null,0===o&&a('":"')),null!==r&&null!==(s=fe())?(58===n.charCodeAt(i)?(l=":",i++):(l=null,0===o&&a('":"')),null!==l&&null!==(u=fe())?(58===n.charCodeAt(i)?(c=":",i++):(c=null,0===o&&a('":"')),null!==c&&null!==(h=fe())?(58===n.charCodeAt(i)?(d=":",i++):(d=null,0===o&&a('":"')),null!==d&&null!==(f=fe())?(58===n.charCodeAt(i)?(_=":",i++):(_=null,0===o&&a('":"')),null!==_&&null!==(p=_e())?e=[e,t,r,s,l,u,c,h,d,f,_,p]:(e=null,i=g)):(e=null,i=g)):(e=null,i=g)):(e=null,i=g)):(e=null,i=g)):(e=null,i=g),null===e&&(g=i,"::"===n.substr(i,2)?(e="::",i+=2):(e=null,0===o&&a('"::"')),null!==e&&null!==(t=fe())?(58===n.charCodeAt(i)?(r=":",i++):(r=null,0===o&&a('":"')),null!==r&&null!==(s=fe())?(58===n.charCodeAt(i)?(l=":",i++):(l=null,0===o&&a('":"')),null!==l&&null!==(u=fe())?(58===n.charCodeAt(i)?(c=":",i++):(c=null,0===o&&a('":"')),null!==c&&null!==(h=fe())?(58===n.charCodeAt(i)?(d=":",i++):(d=null,0===o&&a('":"')),null!==d&&null!==(f=_e())?e=[e,t,r,s,l,u,c,h,d,f]:(e=null,i=g)):(e=null,i=g)):(e=null,i=g)):(e=null,i=g)):(e=null,i=g),null===e&&(g=i,"::"===n.substr(i,2)?(e="::",i+=2):(e=null,0===o&&a('"::"')),null!==e&&null!==(t=fe())?(58===n.charCodeAt(i)?(r=":",i++):(r=null,0===o&&a('":"')),null!==r&&null!==(s=fe())?(58===n.charCodeAt(i)?(l=":",i++):(l=null,0===o&&a('":"')),null!==l&&null!==(u=fe())?(58===n.charCodeAt(i)?(c=":",i++):(c=null,0===o&&a('":"')),null!==c&&null!==(h=_e())?e=[e,t,r,s,l,u,c,h]:(e=null,i=g)):(e=null,i=g)):(e=null,i=g)):(e=null,i=g),null===e&&(g=i,"::"===n.substr(i,2)?(e="::",i+=2):(e=null,0===o&&a('"::"')),null!==e&&null!==(t=fe())?(58===n.charCodeAt(i)?(r=":",i++):(r=null,0===o&&a('":"')),null!==r&&null!==(s=fe())?(58===n.charCodeAt(i)?(l=":",i++):(l=null,0===o&&a('":"')),null!==l&&null!==(u=_e())?e=[e,t,r,s,l,u]:(e=null,i=g)):(e=null,i=g)):(e=null,i=g),null===e&&(g=i,"::"===n.substr(i,2)?(e="::",i+=2):(e=null,0===o&&a('"::"')),null!==e&&null!==(t=fe())?(58===n.charCodeAt(i)?(r=":",i++):(r=null,0===o&&a('":"')),null!==r&&null!==(s=_e())?e=[e,t,r,s]:(e=null,i=g)):(e=null,i=g),null===e&&(g=i,"::"===n.substr(i,2)?(e="::",i+=2):(e=null,0===o&&a('"::"')),null!==e&&null!==(t=_e())?e=[e,t]:(e=null,i=g),null===e&&(g=i,"::"===n.substr(i,2)?(e="::",i+=2):(e=null,0===o&&a('"::"')),null!==e&&null!==(t=fe())?e=[e,t]:(e=null,i=g),null===e&&(g=i,null!==(e=fe())?("::"===n.substr(i,2)?(t="::",i+=2):(t=null,0===o&&a('"::"')),null!==t&&null!==(r=fe())?(58===n.charCodeAt(i)?(s=":",i++):(s=null,0===o&&a('":"')),null!==s&&null!==(l=fe())?(58===n.charCodeAt(i)?(u=":",i++):(u=null,0===o&&a('":"')),null!==u&&null!==(c=fe())?(58===n.charCodeAt(i)?(h=":",i++):(h=null,0===o&&a('":"')),null!==h&&null!==(d=fe())?(58===n.charCodeAt(i)?(f=":",i++):(f=null,0===o&&a('":"')),null!==f&&null!==(_=_e())?e=[e,t,r,s,l,u,c,h,d,f,_]:(e=null,i=g)):(e=null,i=g)):(e=null,i=g)):(e=null,i=g)):(e=null,i=g)):(e=null,i=g),null===e&&(g=i,null!==(e=fe())?(y=i,58===n.charCodeAt(i)?(t=":",i++):(t=null,0===o&&a('":"')),null!==t&&null!==(r=fe())?t=[t,r]:(t=null,i=y),null!==(t=null!==t?t:"")?("::"===n.substr(i,2)?(r="::",i+=2):(r=null,0===o&&a('"::"')),null!==r&&null!==(s=fe())?(58===n.charCodeAt(i)?(l=":",i++):(l=null,0===o&&a('":"')),null!==l&&null!==(u=fe())?(58===n.charCodeAt(i)?(c=":",i++):(c=null,0===o&&a('":"')),null!==c&&null!==(h=fe())?(58===n.charCodeAt(i)?(d=":",i++):(d=null,0===o&&a('":"')),null!==d&&null!==(f=_e())?e=[e,t,r,s,l,u,c,h,d,f]:(e=null,i=g)):(e=null,i=g)):(e=null,i=g)):(e=null,i=g)):(e=null,i=g)):(e=null,i=g),null===e&&(g=i,null!==(e=fe())?(y=i,58===n.charCodeAt(i)?(t=":",i++):(t=null,0===o&&a('":"')),null!==t&&null!==(r=fe())?t=[t,r]:(t=null,i=y),null!==(t=null!==t?t:"")?(y=i,58===n.charCodeAt(i)?(r=":",i++):(r=null,0===o&&a('":"')),null!==r&&null!==(s=fe())?r=[r,s]:(r=null,i=y),null!==(r=null!==r?r:"")?("::"===n.substr(i,2)?(s="::",i+=2):(s=null,0===o&&a('"::"')),null!==s&&null!==(l=fe())?(58===n.charCodeAt(i)?(u=":",i++):(u=null,0===o&&a('":"')),null!==u&&null!==(c=fe())?(58===n.charCodeAt(i)?(h=":",i++):(h=null,0===o&&a('":"')),null!==h&&null!==(d=_e())?e=[e,t,r,s,l,u,c,h,d]:(e=null,i=g)):(e=null,i=g)):(e=null,i=g)):(e=null,i=g)):(e=null,i=g)):(e=null,i=g),null===e&&(g=i,null!==(e=fe())?(y=i,58===n.charCodeAt(i)?(t=":",i++):(t=null,0===o&&a('":"')),null!==t&&null!==(r=fe())?t=[t,r]:(t=null,i=y),null!==(t=null!==t?t:"")?(y=i,58===n.charCodeAt(i)?(r=":",i++):(r=null,0===o&&a('":"')),null!==r&&null!==(s=fe())?r=[r,s]:(r=null,i=y),null!==(r=null!==r?r:"")?(y=i,58===n.charCodeAt(i)?(s=":",i++):(s=null,0===o&&a('":"')),null!==s&&null!==(l=fe())?s=[s,l]:(s=null,i=y),null!==(s=null!==s?s:"")?("::"===n.substr(i,2)?(l="::",i+=2):(l=null,0===o&&a('"::"')),null!==l&&null!==(u=fe())?(58===n.charCodeAt(i)?(c=":",i++):(c=null,0===o&&a('":"')),null!==c&&null!==(h=_e())?e=[e,t,r,s,l,u,c,h]:(e=null,i=g)):(e=null,i=g)):(e=null,i=g)):(e=null,i=g)):(e=null,i=g)):(e=null,i=g),null===e&&(g=i,null!==(e=fe())?(y=i,58===n.charCodeAt(i)?(t=":",i++):(t=null,0===o&&a('":"')),null!==t&&null!==(r=fe())?t=[t,r]:(t=null,i=y),null!==(t=null!==t?t:"")?(y=i,58===n.charCodeAt(i)?(r=":",i++):(r=null,0===o&&a('":"')),null!==r&&null!==(s=fe())?r=[r,s]:(r=null,i=y),null!==(r=null!==r?r:"")?(y=i,58===n.charCodeAt(i)?(s=":",i++):(s=null,0===o&&a('":"')),null!==s&&null!==(l=fe())?s=[s,l]:(s=null,i=y),null!==(s=null!==s?s:"")?(y=i,58===n.charCodeAt(i)?(l=":",i++):(l=null,0===o&&a('":"')),null!==l&&null!==(u=fe())?l=[l,u]:(l=null,i=y),null!==(l=null!==l?l:"")?("::"===n.substr(i,2)?(u="::",i+=2):(u=null,0===o&&a('"::"')),null!==u&&null!==(c=_e())?e=[e,t,r,s,l,u,c]:(e=null,i=g)):(e=null,i=g)):(e=null,i=g)):(e=null,i=g)):(e=null,i=g)):(e=null,i=g),null===e&&(g=i,null!==(e=fe())?(y=i,58===n.charCodeAt(i)?(t=":",i++):(t=null,0===o&&a('":"')),null!==t&&null!==(r=fe())?t=[t,r]:(t=null,i=y),null!==(t=null!==t?t:"")?(y=i,58===n.charCodeAt(i)?(r=":",i++):(r=null,0===o&&a('":"')),null!==r&&null!==(s=fe())?r=[r,s]:(r=null,i=y),null!==(r=null!==r?r:"")?(y=i,58===n.charCodeAt(i)?(s=":",i++):(s=null,0===o&&a('":"')),null!==s&&null!==(l=fe())?s=[s,l]:(s=null,i=y),null!==(s=null!==s?s:"")?(y=i,58===n.charCodeAt(i)?(l=":",i++):(l=null,0===o&&a('":"')),null!==l&&null!==(u=fe())?l=[l,u]:(l=null,i=y),null!==(l=null!==l?l:"")?(y=i,58===n.charCodeAt(i)?(u=":",i++):(u=null,0===o&&a('":"')),null!==u&&null!==(c=fe())?u=[u,c]:(u=null,i=y),null!==(u=null!==u?u:"")?("::"===n.substr(i,2)?(c="::",i+=2):(c=null,0===o&&a('"::"')),null!==c&&null!==(h=fe())?e=[e,t,r,s,l,u,c,h]:(e=null,i=g)):(e=null,i=g)):(e=null,i=g)):(e=null,i=g)):(e=null,i=g)):(e=null,i=g)):(e=null,i=g),null===e&&(g=i,null!==(e=fe())?(y=i,58===n.charCodeAt(i)?(t=":",i++):(t=null,0===o&&a('":"')),null!==t&&null!==(r=fe())?t=[t,r]:(t=null,i=y),null!==(t=null!==t?t:"")?(y=i,58===n.charCodeAt(i)?(r=":",i++):(r=null,0===o&&a('":"')),null!==r&&null!==(s=fe())?r=[r,s]:(r=null,i=y),null!==(r=null!==r?r:"")?(y=i,58===n.charCodeAt(i)?(s=":",i++):(s=null,0===o&&a('":"')),null!==s&&null!==(l=fe())?s=[s,l]:(s=null,i=y),null!==(s=null!==s?s:"")?(y=i,58===n.charCodeAt(i)?(l=":",i++):(l=null,0===o&&a('":"')),null!==l&&null!==(u=fe())?l=[l,u]:(l=null,i=y),null!==(l=null!==l?l:"")?(y=i,58===n.charCodeAt(i)?(u=":",i++):(u=null,0===o&&a('":"')),null!==u&&null!==(c=fe())?u=[u,c]:(u=null,i=y),null!==(u=null!==u?u:"")?(y=i,58===n.charCodeAt(i)?(c=":",i++):(c=null,0===o&&a('":"')),null!==c&&null!==(h=fe())?c=[c,h]:(c=null,i=y),null!==(c=null!==c?c:"")?("::"===n.substr(i,2)?(h="::",i+=2):(h=null,0===o&&a('"::"')),null!==h?e=[e,t,r,s,l,u,c,h]:(e=null,i=g)):(e=null,i=g)):(e=null,i=g)):(e=null,i=g)):(e=null,i=g)):(e=null,i=g)):(e=null,i=g)):(e=null,i=g))))))))))))))),null!==e&&(T=v,jn.host_type="IPv6",e=n.substring(i,T)),null===e&&(i=v),e}function fe(){var e,t,n,r,s;return s=i,null!==(e=f())&&null!==(t=null!==(t=f())?t:"")&&null!==(n=null!==(n=f())?n:"")&&null!==(r=null!==(r=f())?r:"")?e=[e,t,n,r]:(e=null,i=s),e}function _e(){var e,t,r,s;return s=i,null!==(e=fe())?(58===n.charCodeAt(i)?(t=":",i++):(t=null,0===o&&a('":"')),null!==t&&null!==(r=fe())?e=[e,t,r]:(e=null,i=s)):(e=null,i=s),null===e&&(e=pe()),e}function pe(){var e,t,r,s,l,u,c,h,d,f;return h=i,d=i,null!==(e=me())?(46===n.charCodeAt(i)?(t=".",i++):(t=null,0===o&&a('"."')),null!==t&&null!==(r=me())?(46===n.charCodeAt(i)?(s=".",i++):(s=null,0===o&&a('"."')),null!==s&&null!==(l=me())?(46===n.charCodeAt(i)?(u=".",i++):(u=null,0===o&&a('"."')),null!==u&&null!==(c=me())?e=[e,t,r,s,l,u,c]:(e=null,i=d)):(e=null,i=d)):(e=null,i=d)):(e=null,i=d),null!==e&&(f=h,jn.host_type="IPv4",e=n.substring(i,f)),null===e&&(i=h),e}function me(){var e,t,r,s;return s=i,"25"===n.substr(i,2)?(e="25",i+=2):(e=null,0===o&&a('"25"')),null!==e?(/^[0-5]/.test(n.charAt(i))?(t=n.charAt(i),i++):(t=null,0===o&&a("[0-5]")),null!==t?e=[e,t]:(e=null,i=s)):(e=null,i=s),null===e&&(s=i,50===n.charCodeAt(i)?(e="2",i++):(e=null,0===o&&a('"2"')),null!==e?(/^[0-4]/.test(n.charAt(i))?(t=n.charAt(i),i++):(t=null,0===o&&a("[0-4]")),null!==t&&null!==(r=h())?e=[e,t,r]:(e=null,i=s)):(e=null,i=s),null===e&&(s=i,49===n.charCodeAt(i)?(e="1",i++):(e=null,0===o&&a('"1"')),null!==e&&null!==(t=h())&&null!==(r=h())?e=[e,t,r]:(e=null,i=s),null===e&&(s=i,/^[1-9]/.test(n.charAt(i))?(e=n.charAt(i),i++):(e=null,0===o&&a("[1-9]")),null!==e&&null!==(t=h())?e=[e,t]:(e=null,i=s),null===e&&(e=h())))),e}function ve(){var e,t,n,r,s,o,l,u;return o=i,l=i,null!==(e=null!==(e=h())?e:"")&&null!==(t=null!==(t=h())?t:"")&&null!==(n=null!==(n=h())?n:"")&&null!==(r=null!==(r=h())?r:"")&&null!==(s=null!==(s=h())?s:"")?e=[e,t,n,r,s]:(e=null,i=l),null!==e&&(u=e,u=parseInt(u.join("")),jn.port=u,e=u),null===e&&(i=o),e}function ge(){var e,t,r,s;for(e=[],s=i,59===n.charCodeAt(i)?(t=";",i++):(t=null,0===o&&a('";"')),null!==t&&null!==(r=ye())?t=[t,r]:(t=null,i=s);null!==t;)e.push(t),s=i,59===n.charCodeAt(i)?(t=";",i++):(t=null,0===o&&a('";"')),null!==t&&null!==(r=ye())?t=[t,r]:(t=null,i=s);return e}function ye(){var e;return null===(e=Te())&&null===(e=Ce())&&null===(e=be())&&null===(e=Se())&&null===(e=Ee())&&null===(e=Ae())&&(e=Re()),e}function Te(){var e,t,r,s,l;return r=i,s=i,"transport="===n.substr(i,10).toLowerCase()?(e=n.substr(i,10),i+=10):(e=null,0===o&&a('"transport="')),null!==e?("udp"===n.substr(i,3).toLowerCase()?(t=n.substr(i,3),i+=3):(t=null,0===o&&a('"udp"')),null===t&&("tcp"===n.substr(i,3).toLowerCase()?(t=n.substr(i,3),i+=3):(t=null,0===o&&a('"tcp"')),null===t&&("sctp"===n.substr(i,4).toLowerCase()?(t=n.substr(i,4),i+=4):(t=null,0===o&&a('"sctp"')),null===t&&("tls"===n.substr(i,3).toLowerCase()?(t=n.substr(i,3),i+=3):(t=null,0===o&&a('"tls"')),null===t&&(t=N())))),null!==t?e=[e,t]:(e=null,i=s)):(e=null,i=s),null!==e&&(l=e[1],jn.uri_params||(jn.uri_params={}),e=void(jn.uri_params.transport=l.toLowerCase())),null===e&&(i=r),e}function Ce(){var e,t,r,s,l;return r=i,s=i,"user="===n.substr(i,5).toLowerCase()?(e=n.substr(i,5),i+=5):(e=null,0===o&&a('"user="')),null!==e?("phone"===n.substr(i,5).toLowerCase()?(t=n.substr(i,5),i+=5):(t=null,0===o&&a('"phone"')),null===t&&("ip"===n.substr(i,2).toLowerCase()?(t=n.substr(i,2),i+=2):(t=null,0===o&&a('"ip"')),null===t&&(t=N())),null!==t?e=[e,t]:(e=null,i=s)):(e=null,i=s),null!==e&&(l=e[1],jn.uri_params||(jn.uri_params={}),e=void(jn.uri_params.user=l.toLowerCase())),null===e&&(i=r),e}function be(){var e,t,r,s,l;return r=i,s=i,"method="===n.substr(i,7).toLowerCase()?(e=n.substr(i,7),i+=7):(e=null,0===o&&a('"method="')),null!==e&&null!==(t=ct())?e=[e,t]:(e=null,i=s),null!==e&&(l=e[1],jn.uri_params||(jn.uri_params={}),e=void(jn.uri_params.method=l)),null===e&&(i=r),e}function Se(){var e,t,r,s,l;return r=i,s=i,"ttl="===n.substr(i,4).toLowerCase()?(e=n.substr(i,4),i+=4):(e=null,0===o&&a('"ttl="')),null!==e&&null!==(t=An())?e=[e,t]:(e=null,i=s),null!==e&&(l=e[1],jn.params||(jn.params={}),e=void(jn.params.ttl=l)),null===e&&(i=r),e}function Ee(){var e,t,r,s,l;return r=i,s=i,"maddr="===n.substr(i,6).toLowerCase()?(e=n.substr(i,6),i+=6):(e=null,0===o&&a('"maddr="')),null!==e&&null!==(t=le())?e=[e,t]:(e=null,i=s),null!==e&&(l=e[1],jn.uri_params||(jn.uri_params={}),e=void(jn.uri_params.maddr=l)),null===e&&(i=r),e}function Ae(){var e,t,r,s,l,u;return s=i,l=i,"lr"===n.substr(i,2).toLowerCase()?(e=n.substr(i,2),i+=2):(e=null,0===o&&a('"lr"')),null!==e?(u=i,61===n.charCodeAt(i)?(t="=",i++):(t=null,0===o&&a('"="')),null!==t&&null!==(r=N())?t=[t,r]:(t=null,i=u),null!==(t=null!==t?t:"")?e=[e,t]:(e=null,i=l)):(e=null,i=l),null!==e&&(jn.uri_params||(jn.uri_params={}),e=void(jn.uri_params.lr=void 0)),null===e&&(i=s),e}function Re(){var e,t,r,s,l,u,c,h;return s=i,l=i,null!==(e=we())?(u=i,61===n.charCodeAt(i)?(t="=",i++):(t=null,0===o&&a('"="')),null!==t&&null!==(r=Ie())?t=[t,r]:(t=null,i=u),null!==(t=null!==t?t:"")?e=[e,t]:(e=null,i=l)):(e=null,i=l),null!==e&&(c=e[0],h=e[1],jn.uri_params||(jn.uri_params={}),h=void 0===h?void 0:h[1],e=void(jn.uri_params[c.toLowerCase()]=h)),null===e&&(i=s),e}function we(){var e,t,n;if(n=i,null!==(t=Oe()))for(e=[];null!==t;)e.push(t),t=Oe();else e=null;return null!==e&&(e=e.join("")),null===e&&(i=n),e}function Ie(){var e,t,n;if(n=i,null!==(t=Oe()))for(e=[];null!==t;)e.push(t),t=Oe();else e=null;return null!==e&&(e=e.join("")),null===e&&(i=n),e}function Oe(){var e;return null===(e=ke())&&null===(e=C())&&(e=S()),e}function ke(){var e;return 91===n.charCodeAt(i)?(e="[",i++):(e=null,0===o&&a('"["')),null===e&&(93===n.charCodeAt(i)?(e="]",i++):(e=null,0===o&&a('"]"')),null===e&&(47===n.charCodeAt(i)?(e="/",i++):(e=null,0===o&&a('"/"')),null===e&&(58===n.charCodeAt(i)?(e=":",i++):(e=null,0===o&&a('":"')),null===e&&(38===n.charCodeAt(i)?(e="&",i++):(e=null,0===o&&a('"&"')),null===e&&(43===n.charCodeAt(i)?(e="+",i++):(e=null,0===o&&a('"+"')),null===e&&(36===n.charCodeAt(i)?(e="$",i++):(e=null,0===o&&a('"$"')))))))),e}function Ne(){var e,t,r,s,l,u,c;if(u=i,63===n.charCodeAt(i)?(e="?",i++):(e=null,0===o&&a('"?"')),null!==e)if(null!==(t=Ue())){for(r=[],c=i,38===n.charCodeAt(i)?(s="&",i++):(s=null,0===o&&a('"&"')),null!==s&&null!==(l=Ue())?s=[s,l]:(s=null,i=c);null!==s;)r.push(s),c=i,38===n.charCodeAt(i)?(s="&",i++):(s=null,0===o&&a('"&"')),null!==s&&null!==(l=Ue())?s=[s,l]:(s=null,i=c);null!==r?e=[e,t,r]:(e=null,i=u)}else e=null,i=u;else e=null,i=u;return e}function Ue(){var e,t,r,s,l,u,c;return s=i,l=i,null!==(e=xe())?(61===n.charCodeAt(i)?(t="=",i++):(t=null,0===o&&a('"="')),null!==t&&null!==(r=De())?e=[e,t,r]:(e=null,i=l)):(e=null,i=l),null!==e&&(u=e[0],c=e[2],u=u.join("").toLowerCase(),c=c.join(""),jn.uri_headers||(jn.uri_headers={}),e=void(jn.uri_headers[u]?jn.uri_headers[u].push(c):jn.uri_headers[u]=[c])),null===e&&(i=s),e}function xe(){var e,t;if(null===(t=Pe())&&null===(t=C())&&(t=S()),null!==t)for(e=[];null!==t;)e.push(t),null===(t=Pe())&&null===(t=C())&&(t=S());else e=null;return e}function De(){var e,t;for(e=[],null===(t=Pe())&&null===(t=C())&&(t=S());null!==t;)e.push(t),null===(t=Pe())&&null===(t=C())&&(t=S());return e}function Pe(){var e;return 91===n.charCodeAt(i)?(e="[",i++):(e=null,0===o&&a('"["')),null===e&&(93===n.charCodeAt(i)?(e="]",i++):(e=null,0===o&&a('"]"')),null===e&&(47===n.charCodeAt(i)?(e="/",i++):(e=null,0===o&&a('"/"')),null===e&&(63===n.charCodeAt(i)?(e="?",i++):(e=null,0===o&&a('"?"')),null===e&&(58===n.charCodeAt(i)?(e=":",i++):(e=null,0===o&&a('":"')),null===e&&(43===n.charCodeAt(i)?(e="+",i++):(e=null,0===o&&a('"+"')),null===e&&(36===n.charCodeAt(i)?(e="$",i++):(e=null,0===o&&a('"$"')))))))),e}function Me(){var e,t,n,r,s,o;return o=i,null!==(e=ct())&&null!==(t=v())&&null!==(n=qe())&&null!==(r=v())&&null!==(s=et())?e=[e,t,n,r,s]:(e=null,i=o),e}function qe(){var e;return null===(e=Q())&&(e=Le()),e}function Le(){var e,t,r,s;return s=i,null!==(e=$e())?(58===n.charCodeAt(i)?(t=":",i++):(t=null,0===o&&a('":"')),null!==t?(null===(r=He())&&(r=Ge()),null!==r?e=[e,t,r]:(e=null,i=s)):(e=null,i=s)):(e=null,i=s),e}function He(){var e,t,r,s,l;return s=i,null===(e=Fe())&&(e=je()),null!==e?(l=i,63===n.charCodeAt(i)?(t="?",i++):(t=null,0===o&&a('"?"')),null!==t&&null!==(r=Ze())?t=[t,r]:(t=null,i=l),null!==(t=null!==t?t:"")?e=[e,t]:(e=null,i=s)):(e=null,i=s),e}function Fe(){var e,t,r,s;return s=i,"//"===n.substr(i,2)?(e="//",i+=2):(e=null,0===o&&a('"//"')),null!==e&&null!==(t=Xe())&&null!==(r=null!==(r=je())?r:"")?e=[e,t,r]:(e=null,i=s),e}function je(){var e,t,r;return r=i,47===n.charCodeAt(i)?(e="/",i++):(e=null,0===o&&a('"/"')),null!==e&&null!==(t=Be())?e=[e,t]:(e=null,i=r),e}function Ge(){var e,t,n,r;if(r=i,null!==(e=Ve())){for(t=[],n=We();null!==n;)t.push(n),n=We();null!==t?e=[e,t]:(e=null,i=r)}else e=null,i=r;return e}function We(){var e;return null===(e=T())&&null===(e=C())&&(e=S()),e}function Ve(){var e;return null===(e=C())&&null===(e=S())&&(59===n.charCodeAt(i)?(e=";",i++):(e=null,0===o&&a('";"')),null===e&&(63===n.charCodeAt(i)?(e="?",i++):(e=null,0===o&&a('"?"')),null===e&&(58===n.charCodeAt(i)?(e=":",i++):(e=null,0===o&&a('":"')),null===e&&(64===n.charCodeAt(i)?(e="@",i++):(e=null,0===o&&a('"@"')),null===e&&(38===n.charCodeAt(i)?(e="&",i++):(e=null,0===o&&a('"&"')),null===e&&(61===n.charCodeAt(i)?(e="=",i++):(e=null,0===o&&a('"="')),null===e&&(43===n.charCodeAt(i)?(e="+",i++):(e=null,0===o&&a('"+"')),null===e&&(36===n.charCodeAt(i)?(e="$",i++):(e=null,0===o&&a('"$"')),null===e&&(44===n.charCodeAt(i)?(e=",",i++):(e=null,0===o&&a('","'))))))))))),e}function Be(){var e,t,r,s,l,u;if(l=i,null!==(e=Ke())){for(t=[],u=i,47===n.charCodeAt(i)?(r="/",i++):(r=null,0===o&&a('"/"')),null!==r&&null!==(s=Ke())?r=[r,s]:(r=null,i=u);null!==r;)t.push(r),u=i,47===n.charCodeAt(i)?(r="/",i++):(r=null,0===o&&a('"/"')),null!==r&&null!==(s=Ke())?r=[r,s]:(r=null,i=u);null!==t?e=[e,t]:(e=null,i=l)}else e=null,i=l;return e}function Ke(){var e,t,r,s,l,u;for(l=i,e=[],t=Ye();null!==t;)e.push(t),t=Ye();if(null!==e){for(t=[],u=i,59===n.charCodeAt(i)?(r=";",i++):(r=null,0===o&&a('";"')),null!==r&&null!==(s=ze())?r=[r,s]:(r=null,i=u);null!==r;)t.push(r),u=i,59===n.charCodeAt(i)?(r=";",i++):(r=null,0===o&&a('";"')),null!==r&&null!==(s=ze())?r=[r,s]:(r=null,i=u);null!==t?e=[e,t]:(e=null,i=l)}else e=null,i=l;return e}function ze(){var e,t;for(e=[],t=Ye();null!==t;)e.push(t),t=Ye();return e}function Ye(){var e;return null===(e=C())&&null===(e=S())&&(58===n.charCodeAt(i)?(e=":",i++):(e=null,0===o&&a('":"')),null===e&&(64===n.charCodeAt(i)?(e="@",i++):(e=null,0===o&&a('"@"')),null===e&&(38===n.charCodeAt(i)?(e="&",i++):(e=null,0===o&&a('"&"')),null===e&&(61===n.charCodeAt(i)?(e="=",i++):(e=null,0===o&&a('"="')),null===e&&(43===n.charCodeAt(i)?(e="+",i++):(e=null,0===o&&a('"+"')),null===e&&(36===n.charCodeAt(i)?(e="$",i++):(e=null,0===o&&a('"$"')),null===e&&(44===n.charCodeAt(i)?(e=",",i++):(e=null,0===o&&a('","'))))))))),e}function $e(){var e,t,r,s,l,u;if(s=i,l=i,null!==(e=d())){for(t=[],null===(r=d())&&null===(r=h())&&(43===n.charCodeAt(i)?(r="+",i++):(r=null,0===o&&a('"+"')),null===r&&(45===n.charCodeAt(i)?(r="-",i++):(r=null,0===o&&a('"-"')),null===r&&(46===n.charCodeAt(i)?(r=".",i++):(r=null,0===o&&a('"."')))));null!==r;)t.push(r),null===(r=d())&&null===(r=h())&&(43===n.charCodeAt(i)?(r="+",i++):(r=null,0===o&&a('"+"')),null===r&&(45===n.charCodeAt(i)?(r="-",i++):(r=null,0===o&&a('"-"')),null===r&&(46===n.charCodeAt(i)?(r=".",i++):(r=null,0===o&&a('"."')))));null!==t?e=[e,t]:(e=null,i=l)}else e=null,i=l;return null!==e&&(u=s,e=void(jn.scheme=n.substring(i,u))),null===e&&(i=s),e}function Xe(){var e;return null===(e=Je())&&(e=Qe()),e}function Je(){var e,t,r,s;return r=i,s=i,null!==(e=ne())?(64===n.charCodeAt(i)?(t="@",i++):(t=null,0===o&&a('"@"')),null!==t?e=[e,t]:(e=null,i=s)):(e=null,i=s),null!==(e=null!==e?e:"")&&null!==(t=oe())?e=[e,t]:(e=null,i=r),e=null!==e?e:""}function Qe(){var e,t;if(null===(t=C())&&null===(t=S())&&(36===n.charCodeAt(i)?(t="$",i++):(t=null,0===o&&a('"$"')),null===t&&(44===n.charCodeAt(i)?(t=",",i++):(t=null,0===o&&a('","')),null===t&&(59===n.charCodeAt(i)?(t=";",i++):(t=null,0===o&&a('";"')),null===t&&(58===n.charCodeAt(i)?(t=":",i++):(t=null,0===o&&a('":"')),null===t&&(64===n.charCodeAt(i)?(t="@",i++):(t=null,0===o&&a('"@"')),null===t&&(38===n.charCodeAt(i)?(t="&",i++):(t=null,0===o&&a('"&"')),null===t&&(61===n.charCodeAt(i)?(t="=",i++):(t=null,0===o&&a('"="')),null===t&&(43===n.charCodeAt(i)?(t="+",i++):(t=null,0===o&&a('"+"')))))))))),null!==t)for(e=[];null!==t;)e.push(t),null===(t=C())&&null===(t=S())&&(36===n.charCodeAt(i)?(t="$",i++):(t=null,0===o&&a('"$"')),null===t&&(44===n.charCodeAt(i)?(t=",",i++):(t=null,0===o&&a('","')),null===t&&(59===n.charCodeAt(i)?(t=";",i++):(t=null,0===o&&a('";"')),null===t&&(58===n.charCodeAt(i)?(t=":",i++):(t=null,0===o&&a('":"')),null===t&&(64===n.charCodeAt(i)?(t="@",i++):(t=null,0===o&&a('"@"')),null===t&&(38===n.charCodeAt(i)?(t="&",i++):(t=null,0===o&&a('"&"')),null===t&&(61===n.charCodeAt(i)?(t="=",i++):(t=null,0===o&&a('"="')),null===t&&(43===n.charCodeAt(i)?(t="+",i++):(t=null,0===o&&a('"+"'))))))))));else e=null;return e}function Ze(){var e,t;for(e=[],t=We();null!==t;)e.push(t),t=We();return e}function et(){var e,t,r,s,l,u,c,d,f;if(c=i,d=i,"sip"===n.substr(i,3).toLowerCase()?(e=n.substr(i,3),i+=3):(e=null,0===o&&a('"SIP"')),null!==e)if(47===n.charCodeAt(i)?(t="/",i++):(t=null,0===o&&a('"/"')),null!==t){if(null!==(s=h()))for(r=[];null!==s;)r.push(s),s=h();else r=null;if(null!==r)if(46===n.charCodeAt(i)?(s=".",i++):(s=null,0===o&&a('"."')),null!==s){if(null!==(u=h()))for(l=[];null!==u;)l.push(u),u=h();else l=null;null!==l?e=[e,t,r,s,l]:(e=null,i=d)}else e=null,i=d;else e=null,i=d}else e=null,i=d;else e=null,i=d;return null!==e&&(f=c,e=void(jn.sip_version=n.substring(i,f))),null===e&&(i=c),e}function tt(){var e;return"INVITE"===n.substr(i,6)?(e="INVITE",i+=6):(e=null,0===o&&a('"INVITE"')),e}function nt(){var e;return"ACK"===n.substr(i,3)?(e="ACK",i+=3):(e=null,0===o&&a('"ACK"')),e}function rt(){var e;return"OPTIONS"===n.substr(i,7)?(e="OPTIONS",i+=7):(e=null,0===o&&a('"OPTIONS"')),e}function st(){var e;return"BYE"===n.substr(i,3)?(e="BYE",i+=3):(e=null,0===o&&a('"BYE"')),e}function it(){var e;return"CANCEL"===n.substr(i,6)?(e="CANCEL",i+=6):(e=null,0===o&&a('"CANCEL"')),e}function ot(){var e;return"REGISTER"===n.substr(i,8)?(e="REGISTER",i+=8):(e=null,0===o&&a('"REGISTER"')),e}function lt(){var e;return"SUBSCRIBE"===n.substr(i,9)?(e="SUBSCRIBE",i+=9):(e=null,0===o&&a('"SUBSCRIBE"')),e}function ut(){var e;return"NOTIFY"===n.substr(i,6)?(e="NOTIFY",i+=6):(e=null,0===o&&a('"NOTIFY"')),e}function at(){var e;return"REFER"===n.substr(i,5)?(e="REFER",i+=5):(e=null,0===o&&a('"REFER"')),e}function ct(){var e,t,r;return t=i,null===(e=tt())&&null===(e=nt())&&null===(e=rt())&&null===(e=st())&&null===(e=it())&&null===(e=ot())&&null===(e=lt())&&null===(e=ut())&&null===(e=at())&&(e=N()),null!==e&&(r=t,jn.method=n.substring(i,r),e=jn.method),null===e&&(i=t),e}function ht(){var e,t,n,r,s,o;return o=i,null!==(e=et())&&null!==(t=v())&&null!==(n=dt())&&null!==(r=v())&&null!==(s=_t())?e=[e,t,n,r,s]:(e=null,i=o),e}function dt(){var e,t,n;return t=i,null!==(e=ft())&&(n=e,e=void(jn.status_code=parseInt(n.join("")))),null===e&&(i=t),e}function ft(){var e,t,n,r;return r=i,null!==(e=h())&&null!==(t=h())&&null!==(n=h())?e=[e,t,n]:(e=null,i=r),e}function _t(){var e,t,r,s;for(r=i,e=[],null===(t=T())&&null===(t=C())&&null===(t=S())&&null===(t=O())&&null===(t=k())&&null===(t=v())&&(t=g());null!==t;)e.push(t),null===(t=T())&&null===(t=C())&&null===(t=S())&&null===(t=O())&&null===(t=k())&&null===(t=v())&&(t=g());return null!==e&&(s=r,e=void(jn.reason_phrase=n.substring(i,s))),null===e&&(i=r),e}function pt(){var e,t,n,r,s,o,l;if(s=i,o=i,null===(e=J())&&(e=mt()),null!==e){for(t=[],l=i,null!==(n=G())&&null!==(r=gt())?n=[n,r]:(n=null,i=l);null!==n;)t.push(n),l=i,null!==(n=G())&&null!==(r=gt())?n=[n,r]:(n=null,i=l);null!==t?e=[e,t]:(e=null,i=o)}else e=null,i=o;return null!==e&&(e=function(e){var t;jn.multi_header||(jn.multi_header=[]);try{t=new Fn(jn.uri,jn.display_name,jn.params),delete jn.uri,delete jn.display_name,delete jn.params}catch(e){t=null}jn.multi_header.push({possition:i,offset:e,parsed:t})}(s)),null===e&&(i=s),e}function mt(){var e,t,n,r,s;return s=i,null!==(e=null!==(e=vt())?e:"")&&null!==(t=F())&&null!==(n=Q())&&null!==(r=H())?e=[e,t,n,r]:(e=null,i=s),e}function vt(){var e,t,n,r,s,o,l,u;if(s=i,o=i,null!==(e=N())){for(t=[],l=i,null!==(n=E())&&null!==(r=N())?n=[n,r]:(n=null,i=l);null!==n;)t.push(n),l=i,null!==(n=E())&&null!==(r=N())?n=[n,r]:(n=null,i=l);null!==t?e=[e,t]:(e=null,i=o)}else e=null,i=o;return null===e&&(e=Y()),null!==e&&(u=e,e=void(jn.display_name="string"==typeof u?u:u[1].reduce(function(e,t){return e+t[0]+t[1]},u[0]))),null===e&&(i=s),e}function gt(){var e;return null===(e=yt())&&null===(e=Tt())&&(e=St()),e}function yt(){var e,t,r,s,l,u;return s=i,l=i,"q"===n.substr(i,1).toLowerCase()?(e=n.substr(i,1),i++):(e=null,0===o&&a('"q"')),null!==e&&null!==(t=M())&&null!==(r=bt())?e=[e,t,r]:(e=null,i=l),null!==e&&(u=e[2],jn.params||(jn.params={}),e=void(jn.params.q=u)),null===e&&(i=s),e}function Tt(){var e,t,r,s,l,u;return s=i,l=i,"expires"===n.substr(i,7).toLowerCase()?(e=n.substr(i,7),i+=7):(e=null,0===o&&a('"expires"')),null!==e&&null!==(t=M())&&null!==(r=Ct())?e=[e,t,r]:(e=null,i=l),null!==e&&(u=e[2],jn.params||(jn.params={}),e=void(jn.params.expires=u)),null===e&&(i=s),e}function Ct(){var e,t,n;if(n=i,null!==(t=h()))for(e=[];null!==t;)e.push(t),t=h();else e=null;return null!==e&&(e=parseInt(e.join(""))),null===e&&(i=n),e}function bt(){var e,t,r,s,l,u,c,d,f;return u=i,c=i,48===n.charCodeAt(i)?(e="0",i++):(e=null,0===o&&a('"0"')),null!==e?(d=i,46===n.charCodeAt(i)?(t=".",i++):(t=null,0===o&&a('"."')),null!==t&&null!==(r=null!==(r=h())?r:"")&&null!==(s=null!==(s=h())?s:"")&&null!==(l=null!==(l=h())?l:"")?t=[t,r,s,l]:(t=null,i=d),null!==(t=null!==t?t:"")?e=[e,t]:(e=null,i=c)):(e=null,i=c),null!==e&&(f=u,e=parseFloat(n.substring(i,f))),null===e&&(i=u),e}function St(){var e,t,n,r,s,o,l,u;return r=i,s=i,null!==(e=N())?(o=i,null!==(t=M())&&null!==(n=Et())?t=[t,n]:(t=null,i=o),null!==(t=null!==t?t:"")?e=[e,t]:(e=null,i=s)):(e=null,i=s),null!==e&&(l=e[0],u=e[1],jn.params||(jn.params={}),u=void 0===u?void 0:u[1],e=void(jn.params[l.toLowerCase()]=u)),null===e&&(i=r),e}function Et(){var e;return null===(e=N())&&null===(e=le())&&(e=z()),e}function At(){var e;return"render"===n.substr(i,6).toLowerCase()?(e=n.substr(i,6),i+=6):(e=null,0===o&&a('"render"')),null===e&&("session"===n.substr(i,7).toLowerCase()?(e=n.substr(i,7),i+=7):(e=null,0===o&&a('"session"')),null===e&&("icon"===n.substr(i,4).toLowerCase()?(e=n.substr(i,4),i+=4):(e=null,0===o&&a('"icon"')),null===e&&("alert"===n.substr(i,5).toLowerCase()?(e=n.substr(i,5),i+=5):(e=null,0===o&&a('"alert"')),null===e&&(e=N())))),e}function Rt(){var e;return null===(e=wt())&&(e=St()),e}function wt(){var e,t,r,s;return s=i,"handling"===n.substr(i,8).toLowerCase()?(e=n.substr(i,8),i+=8):(e=null,0===o&&a('"handling"')),null!==e&&null!==(t=M())?("optional"===n.substr(i,8).toLowerCase()?(r=n.substr(i,8),i+=8):(r=null,0===o&&a('"optional"')),null===r&&("required"===n.substr(i,8).toLowerCase()?(r=n.substr(i,8),i+=8):(r=null,0===o&&a('"required"')),null===r&&(r=N())),null!==r?e=[e,t,r]:(e=null,i=s)):(e=null,i=s),e}function It(){var e,t,n,r,s,o,l,u;if(l=i,null!==(e=Ot()))if(null!==(t=P()))if(null!==(n=Dt())){for(r=[],u=i,null!==(s=G())&&null!==(o=Pt())?s=[s,o]:(s=null,i=u);null!==s;)r.push(s),u=i,null!==(s=G())&&null!==(o=Pt())?s=[s,o]:(s=null,i=u);null!==r?e=[e,t,n,r]:(e=null,i=l)}else e=null,i=l;else e=null,i=l;else e=null,i=l;return e}function Ot(){var e;return null===(e=kt())&&(e=Nt()),e}function kt(){var e;return"text"===n.substr(i,4).toLowerCase()?(e=n.substr(i,4),i+=4):(e=null,0===o&&a('"text"')),null===e&&("image"===n.substr(i,5).toLowerCase()?(e=n.substr(i,5),i+=5):(e=null,0===o&&a('"image"')),null===e&&("audio"===n.substr(i,5).toLowerCase()?(e=n.substr(i,5),i+=5):(e=null,0===o&&a('"audio"')),null===e&&("video"===n.substr(i,5).toLowerCase()?(e=n.substr(i,5),i+=5):(e=null,0===o&&a('"video"')),null===e&&("application"===n.substr(i,11).toLowerCase()?(e=n.substr(i,11),i+=11):(e=null,0===o&&a('"application"')),null===e&&(e=Ut()))))),e}function Nt(){var e;return"message"===n.substr(i,7).toLowerCase()?(e=n.substr(i,7),i+=7):(e=null,0===o&&a('"message"')),null===e&&("multipart"===n.substr(i,9).toLowerCase()?(e=n.substr(i,9),i+=9):(e=null,0===o&&a('"multipart"')),null===e&&(e=Ut())),e}function Ut(){var e;return null===(e=N())&&(e=xt()),e}function xt(){var e,t,r;return r=i,"x-"===n.substr(i,2).toLowerCase()?(e=n.substr(i,2),i+=2):(e=null,0===o&&a('"x-"')),null!==e&&null!==(t=N())?e=[e,t]:(e=null,i=r),e}function Dt(){var e;return null===(e=Ut())&&(e=N()),e}function Pt(){var e,t,n,r;return r=i,null!==(e=N())&&null!==(t=M())&&null!==(n=Mt())?e=[e,t,n]:(e=null,i=r),e}function Mt(){var e;return null===(e=N())&&(e=z()),e}function qt(){var e,t,n,r;if(n=i,null!==(t=h()))for(e=[];null!==t;)e.push(t),t=h();else e=null;return null!==e&&(r=e,e=void(jn.value=parseInt(r.join("")))),null===e&&(i=n),e}function Lt(){var e,t,r,s,l,u;if(l=i,null!==(e=U())){for(t=[],u=i,46===n.charCodeAt(i)?(r=".",i++):(r=null,0===o&&a('"."')),null!==r&&null!==(s=U())?r=[r,s]:(r=null,i=u);null!==r;)t.push(r),u=i,46===n.charCodeAt(i)?(r=".",i++):(r=null,0===o&&a('"."')),null!==r&&null!==(s=U())?r=[r,s]:(r=null,i=u);null!==t?e=[e,t]:(e=null,i=l)}else e=null,i=l;return e}function Ht(){var e;return null===(e=Ft())&&(e=St()),e}function Ft(){var e,t,r,s,l,u;return s=i,l=i,"tag"===n.substr(i,3).toLowerCase()?(e=n.substr(i,3),i+=3):(e=null,0===o&&a('"tag"')),null!==e&&null!==(t=M())&&null!==(r=N())?e=[e,t,r]:(e=null,i=l),null!==e&&(u=e[2],e=void(jn.tag=u)),null===e&&(i=s),e}function jt(){var e,t,r,s,l,u,c,h;if(c=i,"digest"===n.substr(i,6).toLowerCase()?(e=n.substr(i,6),i+=6):(e=null,0===o&&a('"Digest"')),null!==e)if(null!==(t=E()))if(null!==(r=Vt())){for(s=[],h=i,null!==(l=j())&&null!==(u=Vt())?l=[l,u]:(l=null,i=h);null!==l;)s.push(l),h=i,null!==(l=j())&&null!==(u=Vt())?l=[l,u]:(l=null,i=h);null!==s?e=[e,t,r,s]:(e=null,i=c)}else e=null,i=c;else e=null,i=c;else e=null,i=c;return null===e&&(e=Gt()),e}function Gt(){var e,t,n,r,s,o,l,u;if(l=i,null!==(e=N()))if(null!==(t=E()))if(null!==(n=Wt())){for(r=[],u=i,null!==(s=j())&&null!==(o=Wt())?s=[s,o]:(s=null,i=u);null!==s;)r.push(s),u=i,null!==(s=j())&&null!==(o=Wt())?s=[s,o]:(s=null,i=u);null!==r?e=[e,t,n,r]:(e=null,i=l)}else e=null,i=l;else e=null,i=l;else e=null,i=l;return e}function Wt(){var e,t,n,r;return r=i,null!==(e=N())&&null!==(t=M())?(null===(n=N())&&(n=z()),null!==n?e=[e,t,n]:(e=null,i=r)):(e=null,i=r),e}function Vt(){var e;return null===(e=Bt())&&null===(e=zt())&&null===(e=$t())&&null===(e=Jt())&&null===(e=Qt())&&null===(e=Zt())&&null===(e=en())&&(e=Wt()),e}function Bt(){var e,t,r,s;return s=i,"realm"===n.substr(i,5).toLowerCase()?(e=n.substr(i,5),i+=5):(e=null,0===o&&a('"realm"')),null!==e&&null!==(t=M())&&null!==(r=Kt())?e=[e,t,r]:(e=null,i=s),e}function Kt(){var e,t,n;return t=i,null!==(e=Y())&&(n=e,e=void(jn.realm=n)),null===e&&(i=t),e}function zt(){var e,t,r,s,l,u,c,h,d;if(h=i,"domain"===n.substr(i,6).toLowerCase()?(e=n.substr(i,6),i+=6):(e=null,0===o&&a('"domain"')),null!==e)if(null!==(t=M()))if(null!==(r=V()))if(null!==(s=Yt())){if(l=[],d=i,null!==(c=v()))for(u=[];null!==c;)u.push(c),c=v();else u=null;for(null!==u&&null!==(c=Yt())?u=[u,c]:(u=null,i=d);null!==u;){if(l.push(u),d=i,null!==(c=v()))for(u=[];null!==c;)u.push(c),c=v();else u=null;null!==u&&null!==(c=Yt())?u=[u,c]:(u=null,i=d)}null!==l&&null!==(u=B())?e=[e,t,r,s,l,u]:(e=null,i=h)}else e=null,i=h;else e=null,i=h;else e=null,i=h;else e=null,i=h;return e}function Yt(){var e;return null===(e=Le())&&(e=je()),e}function $t(){var e,t,r,s;return s=i,"nonce"===n.substr(i,5).toLowerCase()?(e=n.substr(i,5),i+=5):(e=null,0===o&&a('"nonce"')),null!==e&&null!==(t=M())&&null!==(r=Xt())?e=[e,t,r]:(e=null,i=s),e}function Xt(){var e,t,n;return t=i,null!==(e=Y())&&(n=e,e=void(jn.nonce=n)),null===e&&(i=t),e}function Jt(){var e,t,r,s,l,u;return s=i,l=i,"opaque"===n.substr(i,6).toLowerCase()?(e=n.substr(i,6),i+=6):(e=null,0===o&&a('"opaque"')),null!==e&&null!==(t=M())&&null!==(r=Y())?e=[e,t,r]:(e=null,i=l),null!==e&&(u=e[2],e=void(jn.opaque=u)),null===e&&(i=s),e}function Qt(){var e,t,r,s,l;return s=i,"stale"===n.substr(i,5).toLowerCase()?(e=n.substr(i,5),i+=5):(e=null,0===o&&a('"stale"')),null!==e&&null!==(t=M())?(l=i,"true"===n.substr(i,4).toLowerCase()?(r=n.substr(i,4),i+=4):(r=null,0===o&&a('"true"')),null!==r&&(r=void(jn.stale=!0)),null===r&&(i=l),null===r&&(l=i,"false"===n.substr(i,5).toLowerCase()?(r=n.substr(i,5),i+=5):(r=null,0===o&&a('"false"')),null!==r&&(r=void(jn.stale=!1)),null===r&&(i=l)),null!==r?e=[e,t,r]:(e=null,i=s)):(e=null,i=s),e}function Zt(){var e,t,r,s,l,u;return s=i,l=i,"algorithm"===n.substr(i,9).toLowerCase()?(e=n.substr(i,9),i+=9):(e=null,0===o&&a('"algorithm"')),null!==e&&null!==(t=M())?("md5"===n.substr(i,3).toLowerCase()?(r=n.substr(i,3),i+=3):(r=null,0===o&&a('"MD5"')),null===r&&("md5-sess"===n.substr(i,8).toLowerCase()?(r=n.substr(i,8),i+=8):(r=null,0===o&&a('"MD5-sess"')),null===r&&(r=N())),null!==r?e=[e,t,r]:(e=null,i=l)):(e=null,i=l),null!==e&&(u=e[2],e=void(jn.algorithm=u.toUpperCase())),null===e&&(i=s),e}function en(){var e,t,r,s,l,u,c,h,d,f;if(h=i,"qop"===n.substr(i,3).toLowerCase()?(e=n.substr(i,3),i+=3):(e=null,0===o&&a('"qop"')),null!==e)if(null!==(t=M()))if(null!==(r=V())){if(d=i,null!==(s=tn())){for(l=[],f=i,44===n.charCodeAt(i)?(u=",",i++):(u=null,0===o&&a('","')),null!==u&&null!==(c=tn())?u=[u,c]:(u=null,i=f);null!==u;)l.push(u),f=i,44===n.charCodeAt(i)?(u=",",i++):(u=null,0===o&&a('","')),null!==u&&null!==(c=tn())?u=[u,c]:(u=null,i=f);null!==l?s=[s,l]:(s=null,i=d)}else s=null,i=d;null!==s&&null!==(l=B())?e=[e,t,r,s,l]:(e=null,i=h)}else e=null,i=h;else e=null,i=h;else e=null,i=h;return e}function tn(){var e,t,r;return t=i,"auth-int"===n.substr(i,8).toLowerCase()?(e=n.substr(i,8),i+=8):(e=null,0===o&&a('"auth-int"')),null===e&&("auth"===n.substr(i,4).toLowerCase()?(e=n.substr(i,4),i+=4):(e=null,0===o&&a('"auth"')),null===e&&(e=N())),null!==e&&(r=e,jn.qop||(jn.qop=[]),e=void jn.qop.push(r.toLowerCase())),null===e&&(i=t),e}function nn(){var e,t,n,r,s,o,l;if(s=i,o=i,null!==(e=mt())){for(t=[],l=i,null!==(n=G())&&null!==(r=St())?n=[n,r]:(n=null,i=l);null!==n;)t.push(n),l=i,null!==(n=G())&&null!==(r=St())?n=[n,r]:(n=null,i=l);null!==t?e=[e,t]:(e=null,i=o)}else e=null,i=o;return null!==e&&(e=function(e){var t;jn.multi_header||(jn.multi_header=[]);try{t=new Fn(jn.uri,jn.display_name,jn.params),delete jn.uri,delete jn.display_name,delete jn.params}catch(e){t=null}jn.multi_header.push({possition:i,offset:e,parsed:t})}(s)),null===e&&(i=s),e}function rn(){var e;return null===(e=sn())&&(e=St()),e}function sn(){var e,t,r,s,l,u,c;if(l=i,u=i,"cause"===n.substr(i,5).toLowerCase()?(e=n.substr(i,5),i+=5):(e=null,0===o&&a('"cause"')),null!==e)if(null!==(t=M())){if(null!==(s=h()))for(r=[];null!==s;)r.push(s),s=h();else r=null;null!==r?e=[e,t,r]:(e=null,i=u)}else e=null,i=u;else e=null,i=u;return null!==e&&(c=e[2],e=void(jn.cause=parseInt(c.join("")))),null===e&&(i=l),e}function on(){var e,t,n,r,s,o;if(s=i,null!==(e=mt())){for(t=[],o=i,null!==(n=G())&&null!==(r=St())?n=[n,r]:(n=null,i=o);null!==n;)t.push(n),o=i,null!==(n=G())&&null!==(r=St())?n=[n,r]:(n=null,i=o);null!==t?e=[e,t]:(e=null,i=s)}else e=null,i=s;return e}function ln(){var e,t,r;return t=i,"active"===n.substr(i,6).toLowerCase()?(e=n.substr(i,6),i+=6):(e=null,0===o&&a('"active"')),null===e&&("pending"===n.substr(i,7).toLowerCase()?(e=n.substr(i,7),i+=7):(e=null,0===o&&a('"pending"')),null===e&&("terminated"===n.substr(i,10).toLowerCase()?(e=n.substr(i,10),i+=10):(e=null,0===o&&a('"terminated"')),null===e&&(e=N()))),null!==e&&(r=t,e=void(jn.state=n.substring(i,r))),null===e&&(i=t),e}function un(){var e,t,r,s,l,u,c,h;return s=i,l=i,"reason"===n.substr(i,6).toLowerCase()?(e=n.substr(i,6),i+=6):(e=null,0===o&&a('"reason"')),null!==e&&null!==(t=M())&&null!==(r=an())?e=[e,t,r]:(e=null,i=l),null!==e&&(e=void(void 0!==(u=e[2])&&(jn.reason=u))),null===e&&(i=s),null===e&&(s=i,l=i,"expires"===n.substr(i,7).toLowerCase()?(e=n.substr(i,7),i+=7):(e=null,0===o&&a('"expires"')),null!==e&&null!==(t=M())&&null!==(r=Ct())?e=[e,t,r]:(e=null,i=l),null!==e&&(e=void(void 0!==(h=e[2])&&(jn.expires=h))),null===e&&(i=s),null===e&&(s=i,l=i,"retry_after"===n.substr(i,11).toLowerCase()?(e=n.substr(i,11),i+=11):(e=null,0===o&&a('"retry_after"')),null!==e&&null!==(t=M())&&null!==(r=Ct())?e=[e,t,r]:(e=null,i=l),null!==e&&(e=void(void 0!==(c=e[2])&&(jn.retry_after=c))),null===e&&(i=s),null===e&&(e=St()))),e}function an(){var e;return"deactivated"===n.substr(i,11).toLowerCase()?(e=n.substr(i,11),i+=11):(e=null,0===o&&a('"deactivated"')),null===e&&("probation"===n.substr(i,9).toLowerCase()?(e=n.substr(i,9),i+=9):(e=null,0===o&&a('"probation"')),null===e&&("rejected"===n.substr(i,8).toLowerCase()?(e=n.substr(i,8),i+=8):(e=null,0===o&&a('"rejected"')),null===e&&("timeout"===n.substr(i,7).toLowerCase()?(e=n.substr(i,7),i+=7):(e=null,0===o&&a('"timeout"')),null===e&&("giveup"===n.substr(i,6).toLowerCase()?(e=n.substr(i,6),i+=6):(e=null,0===o&&a('"giveup"')),null===e&&("noresource"===n.substr(i,10).toLowerCase()?(e=n.substr(i,10),i+=10):(e=null,0===o&&a('"noresource"')),null===e&&("invariant"===n.substr(i,9).toLowerCase()?(e=n.substr(i,9),i+=9):(e=null,0===o&&a('"invariant"')),null===e&&(e=N()))))))),e}function cn(){var e;return null===(e=Ft())&&(e=St()),e}function hn(){var e,t,n,r,s,o,l,u;if(l=i,null!==(e=yn()))if(null!==(t=E()))if(null!==(n=bn())){for(r=[],u=i,null!==(s=G())&&null!==(o=dn())?s=[s,o]:(s=null,i=u);null!==s;)r.push(s),u=i,null!==(s=G())&&null!==(o=dn())?s=[s,o]:(s=null,i=u);null!==r?e=[e,t,n,r]:(e=null,i=l)}else e=null,i=l;else e=null,i=l;else e=null,i=l;return e}function dn(){var e;return null===(e=fn())&&null===(e=_n())&&null===(e=pn())&&null===(e=mn())&&null===(e=vn())&&(e=St()),e}function fn(){var e,t,r,s,l,u;return s=i,l=i,"ttl"===n.substr(i,3).toLowerCase()?(e=n.substr(i,3),i+=3):(e=null,0===o&&a('"ttl"')),null!==e&&null!==(t=M())&&null!==(r=An())?e=[e,t,r]:(e=null,i=l),null!==e&&(u=e[2],e=void(jn.ttl=u)),null===e&&(i=s),e}function _n(){var e,t,r,s,l,u;return s=i,l=i,"maddr"===n.substr(i,5).toLowerCase()?(e=n.substr(i,5),i+=5):(e=null,0===o&&a('"maddr"')),null!==e&&null!==(t=M())&&null!==(r=le())?e=[e,t,r]:(e=null,i=l),null!==e&&(u=e[2],e=void(jn.maddr=u)),null===e&&(i=s),e}function pn(){var e,t,r,s,l,u;return s=i,l=i,"received"===n.substr(i,8).toLowerCase()?(e=n.substr(i,8),i+=8):(e=null,0===o&&a('"received"')),null!==e&&null!==(t=M())?(null===(r=pe())&&(r=de()),null!==r?e=[e,t,r]:(e=null,i=l)):(e=null,i=l),null!==e&&(u=e[2],e=void(jn.received=u)),null===e&&(i=s),e}function mn(){var e,t,r,s,l,u;return s=i,l=i,"branch"===n.substr(i,6).toLowerCase()?(e=n.substr(i,6),i+=6):(e=null,0===o&&a('"branch"')),null!==e&&null!==(t=M())&&null!==(r=N())?e=[e,t,r]:(e=null,i=l),null!==e&&(u=e[2],e=void(jn.branch=u)),null===e&&(i=s),e}function vn(){var e,t,r,s,l;return s=i,"rport"===n.substr(i,5).toLowerCase()?(e=n.substr(i,5),i+=5):(e=null,0===o&&a('"rport"')),null!==e?(l=i,null!==(t=M())&&null!==(r=gn())?t=[t,r]:(t=null,i=l),null!==(t=null!==t?t:"")?e=[e,t]:(e=null,i=s)):(e=null,i=s),e}function gn(){var e,t,n,r,s,o,l,u;return o=i,l=i,null!==(e=null!==(e=h())?e:"")&&null!==(t=null!==(t=h())?t:"")&&null!==(n=null!==(n=h())?n:"")&&null!==(r=null!==(r=h())?r:"")&&null!==(s=null!==(s=h())?s:"")?e=[e,t,n,r,s]:(e=null,i=l),null!==e&&(u=e,e=void(jn.rport=parseInt(u.join("")))),null===e&&(i=o),e}function yn(){var e,t,n,r,s,o;return o=i,null!==(e=Tn())&&null!==(t=P())&&null!==(n=N())&&null!==(r=P())&&null!==(s=Cn())?e=[e,t,n,r,s]:(e=null,i=o),e}function Tn(){var e,t,r;return t=i,"sip"===n.substr(i,3).toLowerCase()?(e=n.substr(i,3),i+=3):(e=null,0===o&&a('"SIP"')),null===e&&(e=N()),null!==e&&(r=e,e=void(jn.protocol=r)),null===e&&(i=t),e}function Cn(){var e,t,r;return t=i,"udp"===n.substr(i,3).toLowerCase()?(e=n.substr(i,3),i+=3):(e=null,0===o&&a('"UDP"')),null===e&&("tcp"===n.substr(i,3).toLowerCase()?(e=n.substr(i,3),i+=3):(e=null,0===o&&a('"TCP"')),null===e&&("tls"===n.substr(i,3).toLowerCase()?(e=n.substr(i,3),i+=3):(e=null,0===o&&a('"TLS"')),null===e&&("sctp"===n.substr(i,4).toLowerCase()?(e=n.substr(i,4),i+=4):(e=null,0===o&&a('"SCTP"')),null===e&&(e=N())))),null!==e&&(r=e,e=void(jn.transport=r)),null===e&&(i=t),e}function bn(){var e,t,n,r,s;return r=i,null!==(e=Sn())?(s=i,null!==(t=W())&&null!==(n=En())?t=[t,n]:(t=null,i=s),null!==(t=null!==t?t:"")?e=[e,t]:(e=null,i=r)):(e=null,i=r),e}function Sn(){var e,t,r;return t=i,null===(e=pe())&&null===(e=he())&&(e=ue()),null!==e&&(r=t,e=void(jn.host=n.substring(i,r))),null===e&&(i=t),e}function En(){var e,t,n,r,s,o,l,u;return o=i,l=i,null!==(e=null!==(e=h())?e:"")&&null!==(t=null!==(t=h())?t:"")&&null!==(n=null!==(n=h())?n:"")&&null!==(r=null!==(r=h())?r:"")&&null!==(s=null!==(s=h())?s:"")?e=[e,t,n,r,s]:(e=null,i=l),null!==e&&(u=e,e=void(jn.port=parseInt(u.join("")))),null===e&&(i=o),e}function An(){var e,t,n,r,s;return r=i,s=i,null!==(e=h())&&null!==(t=null!==(t=h())?t:"")&&null!==(n=null!==(n=h())?n:"")?e=[e,t,n]:(e=null,i=s),null!==e&&(e=parseInt(e.join(""))),null===e&&(i=r),e}function Rn(){var e,t,n;return t=i,null!==(e=Ct())&&(n=e,e=void(jn.expires=n)),null===e&&(i=t),e}function wn(){var e;return null===(e=In())&&(e=St()),e}function In(){var e,t,r,s,l,u;return s=i,l=i,"refresher"===n.substr(i,9).toLowerCase()?(e=n.substr(i,9),i+=9):(e=null,0===o&&a('"refresher"')),null!==e&&null!==(t=M())?("uac"===n.substr(i,3).toLowerCase()?(r=n.substr(i,3),i+=3):(r=null,0===o&&a('"uac"')),null===r&&("uas"===n.substr(i,3).toLowerCase()?(r=n.substr(i,3),i+=3):(r=null,0===o&&a('"uas"'))),null!==r?e=[e,t,r]:(e=null,i=l)):(e=null,i=l),null!==e&&(u=e[2],e=void(jn.refresher=u.toLowerCase())),null===e&&(i=s),e}function On(){var e,t;for(e=[],null===(t=I())&&null===(t=k())&&(t=E());null!==t;)e.push(t),null===(t=I())&&null===(t=k())&&(t=E());return e}function kn(){var e,t,r,s,l,u,c,h,d,f,_,p;return f=i,_=i,null!==(e=Un())?(45===n.charCodeAt(i)?(t="-",i++):(t=null,0===o&&a('"-"')),null!==t&&null!==(r=Nn())?(45===n.charCodeAt(i)?(s="-",i++):(s=null,0===o&&a('"-"')),null!==s&&null!==(l=Nn())?(45===n.charCodeAt(i)?(u="-",i++):(u=null,0===o&&a('"-"')),null!==u&&null!==(c=Nn())?(45===n.charCodeAt(i)?(h="-",i++):(h=null,0===o&&a('"-"')),null!==h&&null!==(d=xn())?e=[e,t,r,s,l,u,c,h,d]:(e=null,i=_)):(e=null,i=_)):(e=null,i=_)):(e=null,i=_)):(e=null,i=_),null!==e&&(p=f,e[0],e=void(jn=n.substring(i+5,p))),null===e&&(i=f),e}function Nn(){var e,t,n,r,s;return s=i,null!==(e=f())&&null!==(t=f())&&null!==(n=f())&&null!==(r=f())?e=[e,t,n,r]:(e=null,i=s),e}function Un(){var e,t,n;return n=i,null!==(e=Nn())&&null!==(t=Nn())?e=[e,t]:(e=null,i=n),e}function xn(){var e,t,n,r;return r=i,null!==(e=Nn())&&null!==(t=Nn())&&null!==(n=Nn())?e=[e,t,n]:(e=null,i=r),e}function Dn(){var e,t,r,s,l,u,c;return s=i,l=i,null!==(e=x())?(u=i,64===n.charCodeAt(i)?(t="@",i++):(t=null,0===o&&a('"@"')),null!==t&&null!==(r=x())?t=[t,r]:(t=null,i=u),null!==(t=null!==t?t:"")?e=[e,t]:(e=null,i=l)):(e=null,i=l),null!==e&&(c=s,e=void(jn.call_id=n.substring(i,c))),null===e&&(i=s),e}function Pn(){var e;return null===(e=Mn())&&null===(e=qn())&&null===(e=Ln())&&(e=St()),e}function Mn(){var e,t,r,s,l,u;return s=i,l=i,"to-tag"===n.substr(i,6)?(e="to-tag",i+=6):(e=null,0===o&&a('"to-tag"')),null!==e&&null!==(t=M())&&null!==(r=N())?e=[e,t,r]:(e=null,i=l),null!==e&&(u=e[2],e=void(jn.to_tag=u)),null===e&&(i=s),e}function qn(){var e,t,r,s,l,u;return s=i,l=i,"from-tag"===n.substr(i,8)?(e="from-tag",i+=8):(e=null,0===o&&a('"from-tag"')),null!==e&&null!==(t=M())&&null!==(r=N())?e=[e,t,r]:(e=null,i=l),null!==e&&(u=e[2],e=void(jn.from_tag=u)),null===e&&(i=s),e}function Ln(){var e,t;return t=i,"early-only"===n.substr(i,10)?(e="early-only",i+=10):(e=null,0===o&&a('"early-only"')),null!==e&&(e=void(jn.early_only=!0)),null===e&&(i=t),e}var Hn=e("./URI"),Fn=e("./NameAddrHeader"),jn={};if(null===s[r]()||i!==n.length){var Gn=Math.max(i,l),Wn=Gn2&&void 0!==arguments[2]?arguments[2]:{},s=e;if(void 0===e||void 0===t)throw new TypeError("Not enough arguments");if(!(e=this._ua.normalizeTarget(e)))throw new TypeError("Invalid target: ".concat(s));var i=d.cloneArray(r.extraHeaders),o=d.cloneObject(r.eventHandlers),l=r.contentType||"text/plain",u={};for(var a in r.fromUserName&&(u.from_uri=new p("sip",r.fromUserName,this._ua.configuration.uri.host),i.push("P-Preferred-Identity: ".concat(this._ua.configuration.uri.toString()))),r.fromDisplayName&&(u.from_display_name=r.fromDisplayName),o)Object.prototype.hasOwnProperty.call(o,a)&&this.on(a,o[a]);i.push("Content-Type: ".concat(l)),this._request=new h.OutgoingRequest(c.MESSAGE,e,this._ua,u,i),t&&(this._request.body=t);var _=new f(this._ua,this._request,{onRequestTimeout:function(){n._onRequestTimeout()},onTransportError:function(){n._onTransportError()},onReceiveResponse:function(e){n._receiveResponse(e)}});this._newMessage("local",this._request),_.send()}},{key:"init_incoming",value:function(e){this._request=e,this._newMessage("remote",e),this._is_replied||(this._is_replied=!0,e.reply(200)),this._close()}},{key:"accept",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=d.cloneArray(e.extraHeaders),n=e.body;if("incoming"!==this._direction)throw new _.NotSupportedError('"accept" not supported for outgoing Message');if(this._is_replied)throw new Error("incoming Message already replied");this._is_replied=!0,this._request.reply(200,null,t,n)}},{key:"reject",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.status_code||480,n=e.reason_phrase,r=d.cloneArray(e.extraHeaders),s=e.body;if("incoming"!==this._direction)throw new _.NotSupportedError('"reject" not supported for outgoing Message');if(this._is_replied)throw new Error("incoming Message already replied");if(t<300||t>=700)throw new TypeError("Invalid status_code: ".concat(t));this._is_replied=!0,this._request.reply(t,n,r,s)}},{key:"_receiveResponse",value:function(e){if(!this._closed)switch(!0){case/^1[0-9]{2}$/.test(e.status_code):break;case/^2[0-9]{2}$/.test(e.status_code):this._succeeded("remote",e);break;default:var t=d.sipErrorCause(e.status_code);this._failed("remote",e,t)}}},{key:"_onRequestTimeout",value:function(){this._closed||this._failed("system",null,c.causes.REQUEST_TIMEOUT)}},{key:"_onTransportError",value:function(){this._closed||this._failed("system",null,c.causes.CONNECTION_ERROR)}},{key:"_close",value:function(){this._closed=!0,this._ua.destroyMessage(this)}},{key:"_newMessage",value:function(e,t){"remote"===e?(this._direction="incoming",this._local_identity=t.to,this._remote_identity=t.from):"local"===e&&(this._direction="outgoing",this._local_identity=t.from,this._remote_identity=t.to),this._ua.newMessage(this,{originator:e,message:this,request:t})}},{key:"_failed",value:function(e,t,n){m.debug("MESSAGE failed"),this._close(),m.debug('emit "failed"'),this.emit("failed",{originator:e,response:t||null,cause:n})}},{key:"_succeeded",value:function(e,t){m.debug("MESSAGE succeeded"),this._close(),m.debug('emit "succeeded"'),this.emit("succeeded",{originator:e,response:t})}},{key:"direction",get:function(){return this._direction}},{key:"local_identity",get:function(){return this._local_identity}},{key:"remote_identity",get:function(){return this._remote_identity}}])&&s(t.prototype,n),r&&s(t,r),a}()},{"./Constants":2,"./Exceptions":6,"./Logger":9,"./RequestSender":20,"./SIPMessage":21,"./URI":27,"./Utils":28,events:31}],11:[function(e,t,n){"use strict";function r(e,t){for(var n=0;n"),this._parameters)Object.prototype.hasOwnProperty.call(this._parameters,t)&&(e+=";".concat(t),null!==this._parameters[t]&&(e+="=".concat(this._parameters[t])));return e}},{key:"uri",get:function(){return this._uri}},{key:"display_name",get:function(){return this._display_name},set:function(e){this._display_name=0===e?"0":e}}]),e}()},{"./Grammar":7,"./URI":27}],12:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{},s=e;if(void 0===e)throw new TypeError("A target is required for OPTIONS");if(!(e=this._ua.normalizeTarget(e)))throw new TypeError("Invalid target: ".concat(s));var i=d.cloneArray(r.extraHeaders),o=d.cloneObject(r.eventHandlers),l=r.contentType||"application/sdp";for(var u in o)Object.prototype.hasOwnProperty.call(o,u)&&this.on(u,o[u]);i.push("Content-Type: ".concat(l)),this._request=new h.OutgoingRequest(c.OPTIONS,e,this._ua,null,i),t&&(this._request.body=t);var a=new f(this._ua,this._request,{onRequestTimeout:function(){n._onRequestTimeout()},onTransportError:function(){n._onTransportError()},onReceiveResponse:function(e){n._receiveResponse(e)}});this._newOptions("local",this._request),a.send()}},{key:"init_incoming",value:function(e){this._request=e,this._newOptions("remote",e),this._is_replied||(this._is_replied=!0,e.reply(200)),this._close()}},{key:"accept",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=d.cloneArray(e.extraHeaders),n=e.body;if("incoming"!==this._direction)throw new _.NotSupportedError('"accept" not supported for outgoing Options');if(this._is_replied)throw new Error("incoming Options already replied");this._is_replied=!0,this._request.reply(200,null,t,n)}},{key:"reject",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.status_code||480,n=e.reason_phrase,r=d.cloneArray(e.extraHeaders),s=e.body;if("incoming"!==this._direction)throw new _.NotSupportedError('"reject" not supported for outgoing Options');if(this._is_replied)throw new Error("incoming Options already replied");if(t<300||t>=700)throw new TypeError("Invalid status_code: ".concat(t));this._is_replied=!0,this._request.reply(t,n,r,s)}},{key:"_receiveResponse",value:function(e){if(!this._closed)switch(!0){case/^1[0-9]{2}$/.test(e.status_code):break;case/^2[0-9]{2}$/.test(e.status_code):this._succeeded("remote",e);break;default:var t=d.sipErrorCause(e.status_code);this._failed("remote",e,t)}}},{key:"_onRequestTimeout",value:function(){this._closed||this._failed("system",null,c.causes.REQUEST_TIMEOUT)}},{key:"_onTransportError",value:function(){this._closed||this._failed("system",null,c.causes.CONNECTION_ERROR)}},{key:"_close",value:function(){this._closed=!0,this._ua.destroyMessage(this)}},{key:"_newOptions",value:function(e,t){"remote"===e?(this._direction="incoming",this._local_identity=t.to,this._remote_identity=t.from):"local"===e&&(this._direction="outgoing",this._local_identity=t.from,this._remote_identity=t.to),this._ua.newOptions(this,{originator:e,message:this,request:t})}},{key:"_failed",value:function(e,t,n){p.debug("OPTIONS failed"),this._close(),p.debug('emit "failed"'),this.emit("failed",{originator:e,response:t||null,cause:n})}},{key:"_succeeded",value:function(e,t){p.debug("OPTIONS succeeded"),this._close(),p.debug('emit "succeeded"'),this.emit("succeeded",{originator:e,response:t})}},{key:"direction",get:function(){return this._direction}},{key:"local_identity",get:function(){return this._local_identity}},{key:"remote_identity",get:function(){return this._remote_identity}}])&&s(t.prototype,n),r&&s(t,r),a}()},{"./Constants":2,"./Exceptions":6,"./Logger":9,"./RequestSender":20,"./SIPMessage":21,"./Utils":28,events:31}],13:[function(e,t,n){"use strict";function r(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,l=!0,u=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return l=e.done,e},e:function(e){u=!0,o=e},f:function(){try{l||null==n.return||n.return()}finally{if(u)throw o}}}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,l=!0,u=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return l=e.done,e},e:function(e){u=!0,o=e},f:function(){try{l||null==n.return||n.return()}finally{if(u)throw o}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;w.debug("connect()");var r=e,s=v.cloneObject(t.eventHandlers),i=v.cloneArray(t.extraHeaders),o=v.cloneObject(t.mediaConstraints,{audio:!0,video:!0}),l=t.mediaStream||null,u=v.cloneObject(t.pcConfig,{iceServers:[]}),a=t.rtcConstraints||null,c=t.rtcOfferConstraints||null;if(this._rtcOfferConstraints=c,this._rtcAnswerConstraints=t.rtcAnswerConstraints||null,this._data=t.data||this._data,void 0===e)throw new TypeError("Not enough arguments");if(this._status!==I.STATUS_NULL)throw new p.InvalidStateError(this._status);if(!window.RTCPeerConnection)throw new p.NotSupportedError("WebRTC not supported");if(!(e=this._ua.normalizeTarget(e)))throw new TypeError("Invalid target: ".concat(r));for(var h in this._sessionTimers.enabled&&v.isDecimal(t.sessionTimersExpires)&&(t.sessionTimersExpires>=_.MIN_SESSION_EXPIRES?this._sessionTimers.defaultExpires=t.sessionTimersExpires:this._sessionTimers.defaultExpires=_.SESSION_EXPIRES),s)Object.prototype.hasOwnProperty.call(s,h)&&this.on(h,s[h]);this._from_tag=v.newTag();var d=t.anonymous||!1,f={from_tag:this._from_tag};this._contact=this._ua.contact.toString({anonymous:d,outbound:!0}),d?(f.from_display_name="Anonymous",f.from_uri=new R("sip","anonymous","anonymous.invalid"),i.push("P-Preferred-Identity: ".concat(this._ua.configuration.uri.toString())),i.push("Privacy: id")):t.fromUserName&&(f.from_uri=new R("sip",t.fromUserName,this._ua.configuration.uri.host),i.push("P-Preferred-Identity: ".concat(this._ua.configuration.uri.toString()))),t.fromDisplayName&&(f.from_display_name=t.fromDisplayName),i.push("Contact: ".concat(this._contact)),i.push("Content-Type: application/sdp"),this._sessionTimers.enabled&&i.push("Session-Expires: ".concat(this._sessionTimers.defaultExpires).concat(this._ua.configuration.session_timers_force_refresher?";refresher=uac":"")),this._request=new y.InitialOutgoingInviteRequest(e,this._ua,f,i),this._id=this._request.call_id+this._from_tag,this._createRTCConnection(u,a),this._direction="outgoing",this._local_identity=this._request.from,this._remote_identity=this._request.to,n&&n(this),this._newRTCSession("local",this._request),this._sendInitialRequest(o,c,l)}},{key:"init_incoming",value:function(e,t){var n,r=this;w.debug("init_incoming()");var s=e.hasHeader("Content-Type")?e.getHeader("Content-Type").toLowerCase():void 0;e.body&&"application/sdp"!==s?e.reply(415):(this._status=I.STATUS_INVITE_RECEIVED,this._from_tag=e.from_tag,this._id=e.call_id+this._from_tag,this._request=e,this._contact=this._ua.contact.toString(),e.hasHeader("expires")&&(n=1e3*e.getHeader("expires")),e.to_tag=v.newTag(),this._createDialog(e,"UAS",!0)?(e.body?this._late_sdp=!1:this._late_sdp=!0,this._status=I.STATUS_WAITING_FOR_ANSWER,this._timers.userNoAnswerTimer=setTimeout(function(){e.reply(408),r._failed("local",null,_.causes.NO_ANSWER)},this._ua.configuration.no_answer_timeout),n&&(this._timers.expiresTimer=setTimeout(function(){r._status===I.STATUS_WAITING_FOR_ANSWER&&(e.reply(487),r._failed("system",null,_.causes.EXPIRES))},n)),this._direction="incoming",this._local_identity=e.to,this._remote_identity=e.from,t&&t(this),this._newRTCSession("remote",e),this._status!==I.STATUS_TERMINATED&&(e.reply(180,null,["Contact: ".concat(this._contact)]),this._progress("local",null))):e.reply(500,"Missing Contact header field"))}},{key:"answer",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};w.debug("answer()");var n=this._request,r=v.cloneArray(t.extraHeaders),i=v.cloneObject(t.mediaConstraints),o=t.mediaStream||null,l=v.cloneObject(t.pcConfig,{iceServers:[]}),u=t.rtcConstraints||null,a=t.rtcAnswerConstraints||null,c=v.cloneObject(t.rtcOfferConstraints),h=!1,d=!1,f=!1,m=!1;if(this._rtcAnswerConstraints=a,this._rtcOfferConstraints=t.rtcOfferConstraints||null,this._data=t.data||this._data,"incoming"!==this._direction)throw new p.NotSupportedError('"answer" not supported for outgoing RTCSession');if(this._status!==I.STATUS_WAITING_FOR_ANSWER)throw new p.InvalidStateError(this._status);if(this._sessionTimers.enabled&&v.isDecimal(t.sessionTimersExpires)&&(t.sessionTimersExpires>=_.MIN_SESSION_EXPIRES?this._sessionTimers.defaultExpires=t.sessionTimersExpires:this._sessionTimers.defaultExpires=_.SESSION_EXPIRES),this._status=I.STATUS_ANSWERED,this._createDialog(n,"UAS")){clearTimeout(this._timers.userNoAnswerTimer),r.unshift("Contact: ".concat(this._contact));var g=n.parseSDP();Array.isArray(g.media)||(g.media=[g.media]);var y,T=s(g.media);try{for(T.s();!(y=T.n()).done;){var C=y.value;"audio"===C.type&&(h=!0,C.direction&&"sendrecv"!==C.direction||(f=!0)),"video"===C.type&&(d=!0,C.direction&&"sendrecv"!==C.direction||(m=!0))}}catch(e){T.e(e)}finally{T.f()}if(o&&!1===i.audio){var b,S=s(o.getAudioTracks());try{for(S.s();!(b=S.n()).done;){var E=b.value;o.removeTrack(E)}}catch(e){S.e(e)}finally{S.f()}}if(o&&!1===i.video){var A,R=s(o.getVideoTracks());try{for(R.s();!(A=R.n()).done;){var O=A.value;o.removeTrack(O)}}catch(e){R.e(e)}finally{R.f()}}o||void 0!==i.audio||(i.audio=f),o||void 0!==i.video||(i.video=m),o||h||c.offerToReceiveAudio||(i.audio=!1),o||d||c.offerToReceiveVideo||(i.video=!1),this._createRTCConnection(l,u),Promise.resolve().then(function(){return o||(i.audio||i.video?(e._localMediaStreamLocallyGenerated=!0,navigator.mediaDevices.getUserMedia(i).catch(function(t){if(e._status===I.STATUS_TERMINATED)throw new Error("terminated");throw n.reply(480),e._failed("local",null,_.causes.USER_DENIED_MEDIA_ACCESS),w.warn('emit "getusermediafailed" [error:%o]',t),e.emit("getusermediafailed",t),new Error("getUserMedia() failed")})):void 0)}).then(function(t){if(e._status===I.STATUS_TERMINATED)throw new Error("terminated");e._localMediaStream=t,t&&t.getTracks().forEach(function(n){e._connection.addTrack(n,t)})}).then(function(){if(!e._late_sdp){var t={originator:"remote",type:"offer",sdp:n.body};w.debug('emit "sdp"'),e.emit("sdp",t);var r=new RTCSessionDescription({type:"offer",sdp:t.sdp});return e._connectionPromiseQueue=e._connectionPromiseQueue.then(function(){return e._connection.setRemoteDescription(r)}).catch(function(t){throw n.reply(488),e._failed("system",null,_.causes.WEBRTC_ERROR),w.warn('emit "peerconnection:setremotedescriptionfailed" [error:%o]',t),e.emit("peerconnection:setremotedescriptionfailed",t),new Error("peerconnection.setRemoteDescription() failed")}),e._connectionPromiseQueue}}).then(function(){if(e._status===I.STATUS_TERMINATED)throw new Error("terminated");return e._connecting(n),e._late_sdp?e._createLocalDescription("offer",e._rtcOfferConstraints).catch(function(){throw n.reply(500),new Error("_createLocalDescription() failed")}):e._createLocalDescription("answer",a).catch(function(){throw n.reply(500),new Error("_createLocalDescription() failed")})}).then(function(t){if(e._status===I.STATUS_TERMINATED)throw new Error("terminated");e._handleSessionTimersInIncomingRequest(n,r),n.reply(200,null,r,t,function(){e._status=I.STATUS_WAITING_FOR_ACK,e._setInvite2xxTimer(n,t),e._setACKTimer(),e._accepted("local")},function(){e._failed("system",null,_.causes.CONNECTION_ERROR)})}).catch(function(t){e._status!==I.STATUS_TERMINATED&&w.warn(t)})}else n.reply(500,"Error creating dialog")}},{key:"terminate",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};w.debug("terminate()");var n,r=t.cause||_.causes.BYE,s=v.cloneArray(t.extraHeaders),i=t.body,o=t.status_code,l=t.reason_phrase;if(this._status===I.STATUS_TERMINATED)throw new p.InvalidStateError(this._status);switch(this._status){case I.STATUS_NULL:case I.STATUS_INVITE_SENT:case I.STATUS_1XX_RECEIVED:if(w.debug("canceling session"),o&&(o<200||o>=700))throw new TypeError("Invalid status_code: ".concat(o));o&&(l=l||_.REASON_PHRASE[o]||"",n="SIP ;cause=".concat(o,' ;text="').concat(l,'"')),this._status===I.STATUS_NULL||this._status===I.STATUS_INVITE_SENT?(this._is_canceled=!0,this._cancel_reason=n):this._status===I.STATUS_1XX_RECEIVED&&this._request.cancel(n),this._status=I.STATUS_CANCELED,this._failed("local",null,_.causes.CANCELED);break;case I.STATUS_WAITING_FOR_ANSWER:case I.STATUS_ANSWERED:if(w.debug("rejecting session"),(o=o||480)<300||o>=700)throw new TypeError("Invalid status_code: ".concat(o));this._request.reply(o,l,s,i),this._failed("local",null,_.causes.REJECTED);break;case I.STATUS_WAITING_FOR_ACK:case I.STATUS_CONFIRMED:if(w.debug("terminating session"),l=t.reason_phrase||_.REASON_PHRASE[o]||"",o&&(o<200||o>=700))throw new TypeError("Invalid status_code: ".concat(o));if(o&&s.push("Reason: SIP ;cause=".concat(o,'; text="').concat(l,'"')),this._status===I.STATUS_WAITING_FOR_ACK&&"incoming"===this._direction&&this._request.server_transaction.state!==m.C.STATUS_TERMINATED){var u=this._dialog;this.receiveRequest=function(t){t.method===_.ACK&&(e.sendRequest(_.BYE,{extraHeaders:s,body:i}),u.terminate())},this._request.server_transaction.on("stateChanged",function(){e._request.server_transaction.state===m.C.STATUS_TERMINATED&&(e.sendRequest(_.BYE,{extraHeaders:s,body:i}),u.terminate())}),this._ended("local",null,r),this._dialog=u,this._ua.newDialog(u)}else this.sendRequest(_.BYE,{extraHeaders:s,body:i}),this._ended("local",null,r)}}},{key:"sendDTMF",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};w.debug("sendDTMF() | tones: %s",e);var n=0,r=t.duration||null,s=t.interToneGap||null,i=t.transportType||_.DTMF_TRANSPORT.INFO;if(void 0===e)throw new TypeError("Not enough arguments");if(this._status!==I.STATUS_CONFIRMED&&this._status!==I.STATUS_WAITING_FOR_ACK&&this._status!==I.STATUS_1XX_RECEIVED)throw new p.InvalidStateError(this._status);if(i!==_.DTMF_TRANSPORT.INFO&&i!==_.DTMF_TRANSPORT.RFC2833)throw new TypeError("invalid transportType: ".concat(i));if("number"==typeof e&&(e=e.toString()),!e||"string"!=typeof e||!e.match(/^[0-9A-DR#*,]+$/i))throw new TypeError("Invalid tones: ".concat(e));if(r&&!v.isDecimal(r))throw new TypeError("Invalid tone duration: ".concat(r));if(r?rb.C.MAX_DURATION?(w.debug('"duration" value is greater than the maximum allowed, setting it to '.concat(b.C.MAX_DURATION," milliseconds")),r=b.C.MAX_DURATION):r=Math.abs(r):r=b.C.DEFAULT_DURATION,t.duration=r,s&&!v.isDecimal(s))throw new TypeError("Invalid interToneGap: ".concat(s));if(s?s=this._tones.length)return void(this._tones=null);var l=this._tones[n];n+=1;if(","===l)o=2e3;else{var u=new b(this);t.eventHandlers={onFailed:function(){i._tones=null}},u.send(l,t),o=r+s}setTimeout(e.bind(this),o)}.call(this));else{var o=this._getDTMFRTPSender();o&&(e=o.toneBuffer+e,o.insertDTMF(e,r,s))}}},{key:"sendInfo",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(w.debug("sendInfo()"),this._status!==I.STATUS_CONFIRMED&&this._status!==I.STATUS_WAITING_FOR_ACK&&this._status!==I.STATUS_1XX_RECEIVED)throw new p.InvalidStateError(this._status);new S(this).send(e,t,n)}},{key:"mute",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{audio:!0,video:!1};w.debug("mute()");var t=!1,n=!1;!1===this._audioMuted&&e.audio&&(t=!0,this._audioMuted=!0,this._toggleMuteAudio(!0)),!1===this._videoMuted&&e.video&&(n=!0,this._videoMuted=!0,this._toggleMuteVideo(!0)),!0!==t&&!0!==n||this._onmute({audio:t,video:n})}},{key:"unmute",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{audio:!0,video:!0};w.debug("unmute()");var t=!1,n=!1;!0===this._audioMuted&&e.audio&&(t=!0,this._audioMuted=!1,!1===this._localHold&&this._toggleMuteAudio(!1)),!0===this._videoMuted&&e.video&&(n=!0,this._videoMuted=!1,!1===this._localHold&&this._toggleMuteVideo(!1)),!0!==t&&!0!==n||this._onunmute({audio:t,video:n})}},{key:"hold",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(w.debug("hold()"),this._status!==I.STATUS_WAITING_FOR_ACK&&this._status!==I.STATUS_CONFIRMED)return!1;if(!0===this._localHold)return!1;if(!this._isReadyToReOffer())return!1;this._localHold=!0,this._onhold("local");var r={succeeded:function(){n&&n()},failed:function(){e.terminate({cause:_.causes.WEBRTC_ERROR,status_code:500,reason_phrase:"Hold Failed"})}};return t.useUpdate?this._sendUpdate({sdpOffer:!0,eventHandlers:r,extraHeaders:t.extraHeaders}):this._sendReinvite({eventHandlers:r,extraHeaders:t.extraHeaders}),!0}},{key:"unhold",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(w.debug("unhold()"),this._status!==I.STATUS_WAITING_FOR_ACK&&this._status!==I.STATUS_CONFIRMED)return!1;if(!1===this._localHold)return!1;if(!this._isReadyToReOffer())return!1;this._localHold=!1,this._onunhold("local");var r={succeeded:function(){n&&n()},failed:function(){e.terminate({cause:_.causes.WEBRTC_ERROR,status_code:500,reason_phrase:"Unhold Failed"})}};return t.useUpdate?this._sendUpdate({sdpOffer:!0,eventHandlers:r,extraHeaders:t.extraHeaders}):this._sendReinvite({eventHandlers:r,extraHeaders:t.extraHeaders}),!0}},{key:"renegotiate",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;w.debug("renegotiate()");var r=t.rtcOfferConstraints||null;if(this._status!==I.STATUS_WAITING_FOR_ACK&&this._status!==I.STATUS_CONFIRMED)return!1;if(!this._isReadyToReOffer())return!1;var s={succeeded:function(){n&&n()},failed:function(){e.terminate({cause:_.causes.WEBRTC_ERROR,status_code:500,reason_phrase:"Media Renegotiation Failed"})}};return this._setLocalMediaStatus(),t.useUpdate?this._sendUpdate({sdpOffer:!0,eventHandlers:s,rtcOfferConstraints:r,extraHeaders:t.extraHeaders}):this._sendReinvite({eventHandlers:s,rtcOfferConstraints:r,extraHeaders:t.extraHeaders}),!0}},{key:"refer",value:function(e,t){var n=this;w.debug("refer()");var r=e;if(this._status!==I.STATUS_WAITING_FOR_ACK&&this._status!==I.STATUS_CONFIRMED)return!1;if(!(e=this._ua.normalizeTarget(e)))throw new TypeError("Invalid target: ".concat(r));var s=new A(this);s.sendRefer(e,t);var i=s.id;return this._referSubscribers[i]=s,s.on("requestFailed",function(){delete n._referSubscribers[i]}),s.on("accepted",function(){delete n._referSubscribers[i]}),s.on("failed",function(){delete n._referSubscribers[i]}),s}},{key:"sendRequest",value:function(e,t){return w.debug("sendRequest()"),this._dialog.sendRequest(e,t)}},{key:"receiveRequest",value:function(e){var t=this;if(w.debug("receiveRequest()"),e.method===_.CANCEL)this._status!==I.STATUS_WAITING_FOR_ANSWER&&this._status!==I.STATUS_ANSWERED||(this._status=I.STATUS_CANCELED,this._request.reply(487),this._failed("remote",e,_.causes.CANCELED));else switch(e.method){case _.ACK:if(this._status!==I.STATUS_WAITING_FOR_ACK)return;if(this._status=I.STATUS_CONFIRMED,clearTimeout(this._timers.ackTimer),clearTimeout(this._timers.invite2xxTimer),this._late_sdp){if(!e.body){this.terminate({cause:_.causes.MISSING_SDP,status_code:400});break}var n={originator:"remote",type:"answer",sdp:e.body};w.debug('emit "sdp"'),this.emit("sdp",n);var r=new RTCSessionDescription({type:"answer",sdp:n.sdp});this._connectionPromiseQueue=this._connectionPromiseQueue.then(function(){return t._connection.setRemoteDescription(r)}).then(function(){t._is_confirmed||t._confirmed("remote",e)}).catch(function(e){t.terminate({cause:_.causes.BAD_MEDIA_DESCRIPTION,status_code:488}),w.warn('emit "peerconnection:setremotedescriptionfailed" [error:%o]',e),t.emit("peerconnection:setremotedescriptionfailed",e)})}else this._is_confirmed||this._confirmed("remote",e);break;case _.BYE:this._status===I.STATUS_CONFIRMED||this._status===I.STATUS_WAITING_FOR_ACK?(e.reply(200),this._ended("remote",e,_.causes.BYE)):this._status===I.STATUS_INVITE_RECEIVED||this._status===I.STATUS_WAITING_FOR_ANSWER?(e.reply(200),this._request.reply(487,"BYE Received"),this._ended("remote",e,_.causes.BYE)):e.reply(403,"Wrong Status");break;case _.INVITE:this._status===I.STATUS_CONFIRMED?e.hasHeader("replaces")?this._receiveReplaces(e):this._receiveReinvite(e):e.reply(403,"Wrong Status");break;case _.INFO:if(this._status===I.STATUS_1XX_RECEIVED||this._status===I.STATUS_WAITING_FOR_ANSWER||this._status===I.STATUS_ANSWERED||this._status===I.STATUS_WAITING_FOR_ACK||this._status===I.STATUS_CONFIRMED){var s=e.hasHeader("Content-Type")?e.getHeader("Content-Type").toLowerCase():void 0;s&&s.match(/^application\/dtmf-relay/i)?new b(this).init_incoming(e):void 0!==s?new S(this).init_incoming(e):e.reply(415)}else e.reply(403,"Wrong Status");break;case _.UPDATE:this._status===I.STATUS_CONFIRMED?this._receiveUpdate(e):e.reply(403,"Wrong Status");break;case _.REFER:this._status===I.STATUS_CONFIRMED?this._receiveRefer(e):e.reply(403,"Wrong Status");break;case _.NOTIFY:this._status===I.STATUS_CONFIRMED?this._receiveNotify(e):e.reply(403,"Wrong Status");break;default:e.reply(501)}}},{key:"onTransportError",value:function(){w.warn("onTransportError()"),this._status!==I.STATUS_TERMINATED&&this.terminate({status_code:500,reason_phrase:_.causes.CONNECTION_ERROR,cause:_.causes.CONNECTION_ERROR})}},{key:"onRequestTimeout",value:function(){w.warn("onRequestTimeout()"),this._status!==I.STATUS_TERMINATED&&this.terminate({status_code:408,reason_phrase:_.causes.REQUEST_TIMEOUT,cause:_.causes.REQUEST_TIMEOUT})}},{key:"onDialogError",value:function(){w.warn("onDialogError()"),this._status!==I.STATUS_TERMINATED&&this.terminate({status_code:500,reason_phrase:_.causes.DIALOG_ERROR,cause:_.causes.DIALOG_ERROR})}},{key:"newDTMF",value:function(e){w.debug("newDTMF()"),this.emit("newDTMF",e)}},{key:"newInfo",value:function(e){w.debug("newInfo()"),this.emit("newInfo",e)}},{key:"_isReadyToReOffer",value:function(){return this._rtcReady?this._dialog?!0!==this._dialog.uac_pending_reply&&!0!==this._dialog.uas_pending_reply||(w.debug("_isReadyToReOffer() | there is another INVITE/UPDATE transaction in progress"),!1):(w.debug("_isReadyToReOffer() | session not established yet"),!1):(w.debug("_isReadyToReOffer() | internal WebRTC status not ready"),!1)}},{key:"_close",value:function(){if(w.debug("close()"),this._localMediaStream&&this._localMediaStreamLocallyGenerated&&(w.debug("close() | closing local MediaStream"),v.closeMediaStream(this._localMediaStream)),this._status!==I.STATUS_TERMINATED){if(this._status=I.STATUS_TERMINATED,this._connection)try{this._connection.close()}catch(e){w.warn("close() | error closing the RTCPeerConnection: %o",e)}for(var e in this._timers)Object.prototype.hasOwnProperty.call(this._timers,e)&&clearTimeout(this._timers[e]);for(var t in clearTimeout(this._sessionTimers.timer),this._dialog&&(this._dialog.terminate(),delete this._dialog),this._earlyDialogs)Object.prototype.hasOwnProperty.call(this._earlyDialogs,t)&&(this._earlyDialogs[t].terminate(),delete this._earlyDialogs[t]);for(var n in this._referSubscribers)Object.prototype.hasOwnProperty.call(this._referSubscribers,n)&&delete this._referSubscribers[n];this._ua.destroyRTCSession(this)}}},{key:"_setInvite2xxTimer",value:function(e,t){var n=g.T1;this._timers.invite2xxTimer=setTimeout(function r(){this._status===I.STATUS_WAITING_FOR_ACK&&(e.reply(200,null,["Contact: ".concat(this._contact)],t),ng.T2&&(n=g.T2),this._timers.invite2xxTimer=setTimeout(r.bind(this),n))}.bind(this),n)}},{key:"_setACKTimer",value:function(){var e=this;this._timers.ackTimer=setTimeout(function(){e._status===I.STATUS_WAITING_FOR_ACK&&(w.debug("no ACK received, terminating the session"),clearTimeout(e._timers.invite2xxTimer),e.sendRequest(_.BYE),e._ended("remote",null,_.causes.NO_ACK))},g.TIMER_H)}},{key:"_createRTCConnection",value:function(e,t){var n=this;this._connection=new RTCPeerConnection(e,t),this._connection.addEventListener("iceconnectionstatechange",function(){"failed"===n._connection.iceConnectionState&&n.terminate({cause:_.causes.RTP_TIMEOUT,status_code:408,reason_phrase:_.causes.RTP_TIMEOUT})}),w.debug('emit "peerconnection"'),this.emit("peerconnection",{peerconnection:this._connection})}},{key:"_createLocalDescription",value:function(e,t){var n=this;if(w.debug("createLocalDescription()"),"offer"!==e&&"answer"!==e)throw new Error('createLocalDescription() | invalid type "'.concat(e,'"'));var r=this._connection;return this._rtcReady=!1,Promise.resolve().then(function(){return"offer"===e?r.createOffer(t).catch(function(e){return w.warn('emit "peerconnection:createofferfailed" [error:%o]',e),n.emit("peerconnection:createofferfailed",e),Promise.reject(e)}):r.createAnswer(t).catch(function(e){return w.warn('emit "peerconnection:createanswerfailed" [error:%o]',e),n.emit("peerconnection:createanswerfailed",e),Promise.reject(e)})}).then(function(e){return r.setLocalDescription(e).catch(function(e){return n._rtcReady=!0,w.warn('emit "peerconnection:setlocaldescriptionfailed" [error:%o]',e),n.emit("peerconnection:setlocaldescriptionfailed",e),Promise.reject(e)})}).then(function(){var s=t&&t.iceRestart;if("complete"===r.iceGatheringState&&!s||"gathering"===r.iceGatheringState&&n._iceReady){n._rtcReady=!0;var i={originator:"local",type:e,sdp:r.localDescription.sdp};return w.debug('emit "sdp"'),n.emit("sdp",i),Promise.resolve(i.sdp)}return new Promise(function(t){var s,i,o=!1;n._iceReady=!1;var l=function(){if(!o){r.removeEventListener("icecandidate",s),r.removeEventListener("icegatheringstatechange",i),o=!0,n._rtcReady=!0,n._iceReady=!0;var l={originator:"local",type:e,sdp:r.localDescription.sdp};w.debug('emit "sdp"'),n.emit("sdp",l),t(l.sdp)}};r.addEventListener("icecandidate",s=function(e){var t=e.candidate;t?n.emit("icecandidate",{candidate:t,ready:l}):l()}),r.addEventListener("icegatheringstatechange",i=function(){"complete"===r.iceGatheringState&&l()})})})}},{key:"_createDialog",value:function(e,t,n){var r="UAS"===t?e.to_tag:e.from_tag,s="UAS"===t?e.from_tag:e.to_tag,i=e.call_id+r+s,o=this._earlyDialogs[i];if(n)return!!o||((o=new T(this,e,t,T.C.STATUS_EARLY)).error?(w.debug(o.error),this._failed("remote",e,_.causes.INTERNAL_ERROR),!1):(this._earlyDialogs[i]=o,!0));if(this._from_tag=e.from_tag,this._to_tag=e.to_tag,o)return o.update(e,t),this._dialog=o,delete this._earlyDialogs[i],!0;var l=new T(this,e,t);return l.error?(w.debug(l.error),this._failed("remote",e,_.causes.INTERNAL_ERROR),!1):(this._dialog=l,!0)}},{key:"_receiveReinvite",value:function(e){var t=this;w.debug("receiveReinvite()");var n=e.hasHeader("Content-Type")?e.getHeader("Content-Type").toLowerCase():void 0,r={request:e,callback:void 0,reject:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};s=!0;var n=t.status_code||403,r=t.reason_phrase||"",i=v.cloneArray(t.extraHeaders);if(this._status!==I.STATUS_CONFIRMED)return!1;if(n<300||n>=700)throw new TypeError("Invalid status_code: ".concat(n));e.reply(n,r,i)}.bind(this)},s=!1;if(this.emit("reinvite",r),!s){if(this._late_sdp=!1,!e.body)return this._late_sdp=!0,this._remoteHold&&(this._remoteHold=!1,this._onunhold("remote")),void(this._connectionPromiseQueue=this._connectionPromiseQueue.then(function(){return t._createLocalDescription("offer",t._rtcOfferConstraints)}).then(function(e){i.call(t,e)}).catch(function(){e.reply(500)}));if("application/sdp"!==n)return w.debug("invalid Content-Type"),void e.reply(415);this._processInDialogSdpOffer(e).then(function(e){t._status!==I.STATUS_TERMINATED&&i.call(t,e)}).catch(function(e){w.warn(e)})}function i(t){var n=this,s=["Contact: ".concat(this._contact)];this._handleSessionTimersInIncomingRequest(e,s),this._late_sdp&&(t=this._mangleOffer(t)),e.reply(200,null,s,t,function(){n._status=I.STATUS_WAITING_FOR_ACK,n._setInvite2xxTimer(e,t),n._setACKTimer()}),"function"==typeof r.callback&&r.callback()}}},{key:"_receiveUpdate",value:function(e){var t=this;w.debug("receiveUpdate()");var n=e.hasHeader("Content-Type")?e.getHeader("Content-Type").toLowerCase():void 0,r={request:e,callback:void 0,reject:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};s=!0;var n=t.status_code||403,r=t.reason_phrase||"",i=v.cloneArray(t.extraHeaders);if(this._status!==I.STATUS_CONFIRMED)return!1;if(n<300||n>=700)throw new TypeError("Invalid status_code: ".concat(n));e.reply(n,r,i)}.bind(this)},s=!1;if(this.emit("update",r),!s)if(e.body){if("application/sdp"!==n)return w.debug("invalid Content-Type"),void e.reply(415);this._processInDialogSdpOffer(e).then(function(e){t._status!==I.STATUS_TERMINATED&&i.call(t,e)}).catch(function(e){w.warn(e)})}else i.call(this,null);function i(t){var n=["Contact: ".concat(this._contact)];this._handleSessionTimersInIncomingRequest(e,n),e.reply(200,null,n,t),"function"==typeof r.callback&&r.callback()}}},{key:"_processInDialogSdpOffer",value:function(e){var t=this;w.debug("_processInDialogSdpOffer()");var n,r=e.parseSDP(),i=!1,o=s(r.media);try{for(o.s();!(n=o.n()).done;){var l=n.value;if(-1!==O.indexOf(l.type)){var u=l.direction||r.direction||"sendrecv";if("sendonly"!==u&&"inactive"!==u){i=!1;break}i=!0}}}catch(e){o.e(e)}finally{o.f()}var a={originator:"remote",type:"offer",sdp:e.body};w.debug('emit "sdp"'),this.emit("sdp",a);var c=new RTCSessionDescription({type:"offer",sdp:a.sdp});return this._connectionPromiseQueue=this._connectionPromiseQueue.then(function(){if(t._status===I.STATUS_TERMINATED)throw new Error("terminated");return t._connection.setRemoteDescription(c).catch(function(n){throw e.reply(488),w.warn('emit "peerconnection:setremotedescriptionfailed" [error:%o]',n),t.emit("peerconnection:setremotedescriptionfailed",n),n})}).then(function(){if(t._status===I.STATUS_TERMINATED)throw new Error("terminated");!0===t._remoteHold&&!1===i?(t._remoteHold=!1,t._onunhold("remote")):!1===t._remoteHold&&!0===i&&(t._remoteHold=!0,t._onhold("remote"))}).then(function(){if(t._status===I.STATUS_TERMINATED)throw new Error("terminated");return t._createLocalDescription("answer",t._rtcAnswerConstraints).catch(function(t){throw e.reply(500),w.warn('emit "peerconnection:createtelocaldescriptionfailed" [error:%o]',t),t})}).catch(function(e){w.warn("_processInDialogSdpOffer() failed [error: %o]",e)}),this._connectionPromiseQueue}},{key:"_receiveRefer",value:function(e){var t=this;if(w.debug("receiveRefer()"),!e.refer_to)return w.debug("no Refer-To header field present in REFER"),void e.reply(400);if(e.refer_to.uri.scheme!==_.SIP)return w.debug("Refer-To header field points to a non-SIP URI scheme"),void e.reply(416);e.reply(202);var r=new E(this,e.cseq);w.debug('emit "refer"'),this.emit("refer",{request:e,accept:function(s,i){(function(t){var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t="function"==typeof t?t:null,this._status!==I.STATUS_WAITING_FOR_ACK&&this._status!==I.STATUS_CONFIRMED)return!1;var i=new n(this._ua);if(i.on("progress",function(e){var t=e.response;r.notify(t.status_code,t.reason_phrase)}),i.on("accepted",function(e){var t=e.response;r.notify(t.status_code,t.reason_phrase)}),i.on("_failed",function(e){var t=e.message,n=e.cause;t?r.notify(t.status_code,t.reason_phrase):r.notify(487,n)}),e.refer_to.uri.hasHeader("replaces")){var o=decodeURIComponent(e.refer_to.uri.getHeader("replaces"));s.extraHeaders=v.cloneArray(s.extraHeaders),s.extraHeaders.push("Replaces: ".concat(o))}i.connect(e.refer_to.uri.toAor(),s,t)}).call(t,s,i)},reject:function(){(function(){r.notify(603)}).call(t)}})}},{key:"_receiveNotify",value:function(e){switch(w.debug("receiveNotify()"),e.event||e.reply(400),e.event.event){case"refer":var t,n;if(e.event.params&&e.event.params.id)t=e.event.params.id,n=this._referSubscribers[t];else{if(1!==Object.keys(this._referSubscribers).length)return void e.reply(400,"Missing event id parameter");n=this._referSubscribers[Object.keys(this._referSubscribers)[0]]}if(!n)return void e.reply(481,"Subscription does not exist");n.receiveNotify(e),e.reply(200);break;default:e.reply(489)}}},{key:"_receiveReplaces",value:function(e){var t=this;w.debug("receiveReplaces()"),this.emit("replaces",{request:e,accept:function(r){(function(t){var r=this;if(this._status!==I.STATUS_WAITING_FOR_ACK&&this._status!==I.STATUS_CONFIRMED)return!1;var s=new n(this._ua);s.on("confirmed",function(){r.terminate()}),s.init_incoming(e,t)}).call(t,r)},reject:function(){(function(){w.debug("Replaced INVITE rejected by the user"),e.reply(486)}).call(t)}})}},{key:"_sendInitialRequest",value:function(e,t,n){var r=this,s=new C(this._ua,this._request,{onRequestTimeout:function(){r.onRequestTimeout()},onTransportError:function(){r.onTransportError()},onAuthenticated:function(e){r._request=e},onReceiveResponse:function(e){r._receiveInviteResponse(e)}});Promise.resolve().then(function(){return n||(e.audio||e.video?(r._localMediaStreamLocallyGenerated=!0,navigator.mediaDevices.getUserMedia(e).catch(function(e){if(r._status===I.STATUS_TERMINATED)throw new Error("terminated");throw r._failed("local",null,_.causes.USER_DENIED_MEDIA_ACCESS),w.warn('emit "getusermediafailed" [error:%o]',e),r.emit("getusermediafailed",e),e})):void 0)}).then(function(e){if(r._status===I.STATUS_TERMINATED)throw new Error("terminated");return r._localMediaStream=e,e&&e.getTracks().forEach(function(t){r._connection.addTrack(t,e)}),r._connecting(r._request),r._createLocalDescription("offer",t).catch(function(e){throw r._failed("local",null,_.causes.WEBRTC_ERROR),e})}).then(function(e){if(r._is_canceled||r._status===I.STATUS_TERMINATED)throw new Error("terminated");r._request.body=e,r._status=I.STATUS_INVITE_SENT,w.debug('emit "sending" [request:%o]',r._request),r.emit("sending",{request:r._request}),s.send()}).catch(function(e){r._status!==I.STATUS_TERMINATED&&w.warn(e)})}},{key:"_getDTMFRTPSender",value:function(){var e=this._connection.getSenders().find(function(e){return e.track&&"audio"===e.track.kind});if(e&&e.dtmf)return e.dtmf;w.warn("sendDTMF() | no local audio track to send DTMF with")}},{key:"_receiveInviteResponse",value:function(e){var t=this;if(w.debug("receiveInviteResponse()"),this._dialog&&e.status_code>=200&&e.status_code<=299){if(this._dialog.id.call_id===e.call_id&&this._dialog.id.local_tag===e.from_tag&&this._dialog.id.remote_tag===e.to_tag)return void this.sendRequest(_.ACK);var n=new T(this,e,"UAC");return void 0!==n.error?void w.debug(n.error):(this.sendRequest(_.ACK),void this.sendRequest(_.BYE))}if(this._is_canceled)e.status_code>=100&&e.status_code<200?this._request.cancel(this._cancel_reason):e.status_code>=200&&e.status_code<299&&this._acceptAndTerminate(e);else if(this._status===I.STATUS_INVITE_SENT||this._status===I.STATUS_1XX_RECEIVED)switch(!0){case/^100$/.test(e.status_code):this._status=I.STATUS_1XX_RECEIVED;break;case/^1[0-9]{2}$/.test(e.status_code):if(!e.to_tag){w.debug("1xx response received without to tag");break}if(e.hasHeader("contact")&&!this._createDialog(e,"UAC",!0))break;if(this._status=I.STATUS_1XX_RECEIVED,!e.body){this._progress("remote",e);break}var r={originator:"remote",type:"answer",sdp:e.body};w.debug('emit "sdp"'),this.emit("sdp",r);var s=new RTCSessionDescription({type:"answer",sdp:r.sdp});this._connectionPromiseQueue=this._connectionPromiseQueue.then(function(){return t._connection.setRemoteDescription(s)}).then(function(){return t._progress("remote",e)}).catch(function(e){w.warn('emit "peerconnection:setremotedescriptionfailed" [error:%o]',e),t.emit("peerconnection:setremotedescriptionfailed",e)});break;case/^2[0-9]{2}$/.test(e.status_code):if(this._status=I.STATUS_CONFIRMED,!e.body){this._acceptAndTerminate(e,400,_.causes.MISSING_SDP),this._failed("remote",e,_.causes.BAD_MEDIA_DESCRIPTION);break}if(!this._createDialog(e,"UAC"))break;var i={originator:"remote",type:"answer",sdp:e.body};w.debug('emit "sdp"'),this.emit("sdp",i);var o=new RTCSessionDescription({type:"answer",sdp:i.sdp});this._connectionPromiseQueue=this._connectionPromiseQueue.then(function(){if("stable"===t._connection.signalingState)return t._connection.createOffer(t._rtcOfferConstraints).then(function(e){return t._connection.setLocalDescription(e)}).catch(function(n){t._acceptAndTerminate(e,500,n.toString()),t._failed("local",e,_.causes.WEBRTC_ERROR)})}).then(function(){t._connection.setRemoteDescription(o).then(function(){t._handleSessionTimersInIncomingResponse(e),t._accepted("remote",e),t.sendRequest(_.ACK),t._confirmed("local",null)}).catch(function(n){t._acceptAndTerminate(e,488,"Not Acceptable Here"),t._failed("remote",e,_.causes.BAD_MEDIA_DESCRIPTION),w.warn('emit "peerconnection:setremotedescriptionfailed" [error:%o]',n),t.emit("peerconnection:setremotedescriptionfailed",n)})});break;default:var l=v.sipErrorCause(e.status_code);this._failed("remote",e,l)}}},{key:"_sendReinvite",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};w.debug("sendReinvite()");var n=v.cloneArray(t.extraHeaders),r=v.cloneObject(t.eventHandlers),s=t.rtcOfferConstraints||this._rtcOfferConstraints||null,i=!1;function o(e){r.failed&&r.failed(e)}n.push("Contact: ".concat(this._contact)),n.push("Content-Type: application/sdp"),this._sessionTimers.running&&n.push("Session-Expires: ".concat(this._sessionTimers.currentExpires,";refresher=").concat(this._sessionTimers.refresher?"uac":"uas")),this._connectionPromiseQueue=this._connectionPromiseQueue.then(function(){return e._createLocalDescription("offer",s)}).then(function(t){var s={originator:"local",type:"offer",sdp:t=e._mangleOffer(t)};w.debug('emit "sdp"'),e.emit("sdp",s),e.sendRequest(_.INVITE,{extraHeaders:n,body:t,eventHandlers:{onSuccessResponse:function(t){(function(e){var t=this;if(this._status===I.STATUS_TERMINATED)return;if(this.sendRequest(_.ACK),i)return;if(this._handleSessionTimersInIncomingResponse(e),!e.body)return void o.call(this);if(!e.hasHeader("Content-Type")||"application/sdp"!==e.getHeader("Content-Type").toLowerCase())return void o.call(this);var n={originator:"remote",type:"answer",sdp:e.body};w.debug('emit "sdp"'),this.emit("sdp",n);var s=new RTCSessionDescription({type:"answer",sdp:n.sdp});this._connectionPromiseQueue=this._connectionPromiseQueue.then(function(){return t._connection.setRemoteDescription(s)}).then(function(){r.succeeded&&r.succeeded(e)}).catch(function(e){o.call(t),w.warn('emit "peerconnection:setremotedescriptionfailed" [error:%o]',e),t.emit("peerconnection:setremotedescriptionfailed",e)})}).call(e,t),i=!0},onErrorResponse:function(t){o.call(e,t)},onTransportError:function(){e.onTransportError()},onRequestTimeout:function(){e.onRequestTimeout()},onDialogError:function(){e.onDialogError()}}})}).catch(function(){o()})}},{key:"_sendUpdate",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};w.debug("sendUpdate()");var n=v.cloneArray(t.extraHeaders),r=v.cloneObject(t.eventHandlers),s=t.rtcOfferConstraints||this._rtcOfferConstraints||null,i=t.sdpOffer||!1,o=!1;function l(e){var t=this;if(this._status!==I.STATUS_TERMINATED&&!o)if(this._handleSessionTimersInIncomingResponse(e),i){if(!e.body)return void u.call(this);if(!e.hasHeader("Content-Type")||"application/sdp"!==e.getHeader("Content-Type").toLowerCase())return void u.call(this);var n={originator:"remote",type:"answer",sdp:e.body};w.debug('emit "sdp"'),this.emit("sdp",n);var s=new RTCSessionDescription({type:"answer",sdp:n.sdp});this._connectionPromiseQueue=this._connectionPromiseQueue.then(function(){return t._connection.setRemoteDescription(s)}).then(function(){r.succeeded&&r.succeeded(e)}).catch(function(e){u.call(t),w.warn('emit "peerconnection:setremotedescriptionfailed" [error:%o]',e),t.emit("peerconnection:setremotedescriptionfailed",e)})}else r.succeeded&&r.succeeded(e)}function u(e){r.failed&&r.failed(e)}n.push("Contact: ".concat(this._contact)),this._sessionTimers.running&&n.push("Session-Expires: ".concat(this._sessionTimers.currentExpires,";refresher=").concat(this._sessionTimers.refresher?"uac":"uas")),i?(n.push("Content-Type: application/sdp"),this._connectionPromiseQueue=this._connectionPromiseQueue.then(function(){return e._createLocalDescription("offer",s)}).then(function(t){var r={originator:"local",type:"offer",sdp:t=e._mangleOffer(t)};w.debug('emit "sdp"'),e.emit("sdp",r),e.sendRequest(_.UPDATE,{extraHeaders:n,body:t,eventHandlers:{onSuccessResponse:function(t){l.call(e,t),o=!0},onErrorResponse:function(t){u.call(e,t)},onTransportError:function(){e.onTransportError()},onRequestTimeout:function(){e.onRequestTimeout()},onDialogError:function(){e.onDialogError()}}})}).catch(function(){u.call(e)})):this.sendRequest(_.UPDATE,{extraHeaders:n,eventHandlers:{onSuccessResponse:function(t){l.call(e,t)},onErrorResponse:function(t){u.call(e,t)},onTransportError:function(){e.onTransportError()},onRequestTimeout:function(){e.onRequestTimeout()},onDialogError:function(){e.onDialogError()}}})}},{key:"_acceptAndTerminate",value:function(e,t,n){w.debug("acceptAndTerminate()");var r=[];t&&(n=n||_.REASON_PHRASE[t]||"",r.push("Reason: SIP ;cause=".concat(t,'; text="').concat(n,'"'))),(this._dialog||this._createDialog(e,"UAC"))&&(this.sendRequest(_.ACK),this.sendRequest(_.BYE,{extraHeaders:r})),this._status=I.STATUS_TERMINATED}},{key:"_mangleOffer",value:function(e){if(!this._localHold&&!this._remoteHold)return e;if(e=d.parse(e),this._localHold&&!this._remoteHold){w.debug("mangleOffer() | me on hold, mangling offer");var t,n=s(e.media);try{for(n.s();!(t=n.n()).done;){var r=t.value;-1!==O.indexOf(r.type)&&(r.direction?"sendrecv"===r.direction?r.direction="sendonly":"recvonly"===r.direction&&(r.direction="inactive"):r.direction="sendonly")}}catch(e){n.e(e)}finally{n.f()}}else if(this._localHold&&this._remoteHold){w.debug("mangleOffer() | both on hold, mangling offer");var i,o=s(e.media);try{for(o.s();!(i=o.n()).done;){var l=i.value;-1!==O.indexOf(l.type)&&(l.direction="inactive")}}catch(e){o.e(e)}finally{o.f()}}else if(this._remoteHold){w.debug("mangleOffer() | remote on hold, mangling offer");var u,a=s(e.media);try{for(a.s();!(u=a.n()).done;){var c=u.value;-1!==O.indexOf(c.type)&&(c.direction?"sendrecv"===c.direction?c.direction="recvonly":"recvonly"===c.direction&&(c.direction="inactive"):c.direction="recvonly")}}catch(e){a.e(e)}finally{a.f()}}return d.write(e)}},{key:"_setLocalMediaStatus",value:function(){var e=!0,t=!0;(this._localHold||this._remoteHold)&&(e=!1,t=!1),this._audioMuted&&(e=!1),this._videoMuted&&(t=!1),this._toggleMuteAudio(!e),this._toggleMuteVideo(!t)}},{key:"_handleSessionTimersInIncomingRequest",value:function(e,t){var n;this._sessionTimers.enabled&&(e.session_expires&&e.session_expires>=_.MIN_SESSION_EXPIRES?(this._sessionTimers.currentExpires=e.session_expires,n=e.session_expires_refresher||"uas"):(this._sessionTimers.currentExpires=this._sessionTimers.defaultExpires,n="uas"),t.push("Session-Expires: ".concat(this._sessionTimers.currentExpires,";refresher=").concat(n)),this._sessionTimers.refresher="uas"===n,this._runSessionTimer())}},{key:"_handleSessionTimersInIncomingResponse",value:function(e){var t;this._sessionTimers.enabled&&(e.session_expires&&e.session_expires>=_.MIN_SESSION_EXPIRES?(this._sessionTimers.currentExpires=e.session_expires,t=e.session_expires_refresher||"uac"):(this._sessionTimers.currentExpires=this._sessionTimers.defaultExpires,t="uac"),this._sessionTimers.refresher="uac"===t,this._runSessionTimer())}},{key:"_runSessionTimer",value:function(){var e=this,t=this._sessionTimers.currentExpires;this._sessionTimers.running=!0,clearTimeout(this._sessionTimers.timer),this._sessionTimers.refresher?this._sessionTimers.timer=setTimeout(function(){e._status!==I.STATUS_TERMINATED&&e._isReadyToReOffer()&&(w.debug("runSessionTimer() | sending session refresh request"),e._sessionTimers.refreshMethod===_.UPDATE?e._sendUpdate():e._sendReinvite())},500*t):this._sessionTimers.timer=setTimeout(function(){e._status!==I.STATUS_TERMINATED&&(w.warn("runSessionTimer() | timer expired, terminating the session"),e.terminate({cause:_.causes.REQUEST_TIMEOUT,status_code:408,reason_phrase:"Session Timer Expired"}))},1100*t)}},{key:"_toggleMuteAudio",value:function(e){var t,n=s(this._connection.getSenders().filter(function(e){return e.track&&"audio"===e.track.kind}));try{for(n.s();!(t=n.n()).done;){t.value.track.enabled=!e}}catch(e){n.e(e)}finally{n.f()}}},{key:"_toggleMuteVideo",value:function(e){var t,n=s(this._connection.getSenders().filter(function(e){return e.track&&"video"===e.track.kind}));try{for(n.s();!(t=n.n()).done;){t.value.track.enabled=!e}}catch(e){n.e(e)}finally{n.f()}}},{key:"_newRTCSession",value:function(e,t){w.debug("newRTCSession()"),this._ua.newRTCSession(this,{originator:e,session:this,request:t})}},{key:"_connecting",value:function(e){w.debug("session connecting"),w.debug('emit "connecting"'),this.emit("connecting",{request:e})}},{key:"_progress",value:function(e,t){w.debug("session progress"),w.debug('emit "progress"'),this.emit("progress",{originator:e,response:t||null})}},{key:"_accepted",value:function(e,t){w.debug("session accepted"),this._start_time=new Date,w.debug('emit "accepted"'),this.emit("accepted",{originator:e,response:t||null})}},{key:"_confirmed",value:function(e,t){w.debug("session confirmed"),this._is_confirmed=!0,w.debug('emit "confirmed"'),this.emit("confirmed",{originator:e,ack:t||null})}},{key:"_ended",value:function(e,t,n){w.debug("session ended"),this._end_time=new Date,this._close(),w.debug('emit "ended"'),this.emit("ended",{originator:e,message:t||null,cause:n})}},{key:"_failed",value:function(e,t,n){w.debug("session failed"),w.debug('emit "_failed"'),this.emit("_failed",{originator:e,message:t||null,cause:n}),this._close(),w.debug('emit "failed"'),this.emit("failed",{originator:e,message:t||null,cause:n})}},{key:"_onhold",value:function(e){w.debug("session onhold"),this._setLocalMediaStatus(),w.debug('emit "hold"'),this.emit("hold",{originator:e})}},{key:"_onunhold",value:function(e){w.debug("session onunhold"),this._setLocalMediaStatus(),w.debug('emit "unhold"'),this.emit("unhold",{originator:e})}},{key:"_onmute",value:function(e){var t=e.audio,n=e.video;w.debug("session onmute"),this._setLocalMediaStatus(),w.debug('emit "muted"'),this.emit("muted",{audio:t,video:n})}},{key:"_onunmute",value:function(e){var t=e.audio,n=e.video;w.debug("session onunmute"),this._setLocalMediaStatus(),w.debug('emit "unmuted"'),this.emit("unmuted",{audio:t,video:n})}},{key:"C",get:function(){return I}},{key:"causes",get:function(){return _.causes}},{key:"id",get:function(){return this._id}},{key:"connection",get:function(){return this._connection}},{key:"contact",get:function(){return this._contact}},{key:"direction",get:function(){return this._direction}},{key:"local_identity",get:function(){return this._local_identity}},{key:"remote_identity",get:function(){return this._remote_identity}},{key:"start_time",get:function(){return this._start_time}},{key:"end_time",get:function(){return this._end_time}},{key:"data",get:function(){return this._data},set:function(e){this._data=e}},{key:"status",get:function(){return this._status}}]),n}()},{"./Constants":2,"./Dialog":3,"./Exceptions":6,"./Logger":9,"./RTCSession/DTMF":15,"./RTCSession/Info":16,"./RTCSession/ReferNotifier":17,"./RTCSession/ReferSubscriber":18,"./RequestSender":20,"./SIPMessage":21,"./Timers":23,"./Transactions":24,"./URI":27,"./Utils":28,events:31,"sdp-transform":37}],15:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};if(void 0===e)throw new TypeError("Not enough arguments");if(this._direction="outgoing",this._session.status!==this._session.C.STATUS_CONFIRMED&&this._session.status!==this._session.C.STATUS_WAITING_FOR_ACK)throw new h.InvalidStateError(this._session.status);var r=d.cloneArray(n.extraHeaders);if(this.eventHandlers=d.cloneObject(n.eventHandlers),"string"==typeof e)e=e.toUpperCase();else{if("number"!=typeof e)throw new TypeError("Invalid tone: ".concat(e));e=e.toString()}if(!e.match(/^[0-9A-DR#*]$/))throw new TypeError("Invalid tone: ".concat(e));this._tone=e,this._duration=n.duration,r.push("Content-Type: application/dtmf-relay");var s="Signal=".concat(this._tone,"\r\n");s+="Duration=".concat(this._duration),this._session.newDTMF({originator:"local",dtmf:this,request:this._request}),this._session.sendRequest(c.INFO,{extraHeaders:r,eventHandlers:{onSuccessResponse:function(e){t.emit("succeeded",{originator:"remote",response:e})},onErrorResponse:function(e){t.eventHandlers.onFailed&&t.eventHandlers.onFailed(),t.emit("failed",{originator:"remote",response:e})},onRequestTimeout:function(){t._session.onRequestTimeout()},onTransportError:function(){t._session.onTransportError()},onDialogError:function(){t._session.onDialogError()}},body:s})}},{key:"init_incoming",value:function(e){var t=/^(Signal\s*?=\s*?)([0-9A-D#*]{1})(\s)?.*/,n=/^(Duration\s?=\s?)([0-9]{1,4})(\s)?.*/;if(this._direction="incoming",this._request=e,e.reply(200),e.body){var r=e.body.split("\n");r.length>=1&&t.test(r[0])&&(this._tone=r[0].replace(t,"$2")),r.length>=2&&n.test(r[1])&&(this._duration=parseInt(r[1].replace(n,"$2"),10))}this._duration||(this._duration=_.DEFAULT_DURATION),this._tone?this._session.newDTMF({originator:"remote",dtmf:this,request:e}):f.debug("invalid INFO DTMF received, discarded")}},{key:"tone",get:function(){return this._tone}},{key:"duration",get:function(){return this._duration}}])&&s(t.prototype,n),r&&s(t,r),a}(),t.exports.C=_},{"../Constants":2,"../Exceptions":6,"../Logger":9,"../Utils":28,events:31}],16:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{};if(this._direction="outgoing",void 0===e)throw new TypeError("Not enough arguments");if(this._session.status!==this._session.C.STATUS_CONFIRMED&&this._session.status!==this._session.C.STATUS_WAITING_FOR_ACK)throw new c.InvalidStateError(this._session.status);this._contentType=e,this._body=t;var s=h.cloneArray(r.extraHeaders);s.push("Content-Type: ".concat(e)),this._session.newInfo({originator:"local",info:this,request:this.request}),this._session.sendRequest(a.INFO,{extraHeaders:s,eventHandlers:{onSuccessResponse:function(e){n.emit("succeeded",{originator:"remote",response:e})},onErrorResponse:function(e){n.emit("failed",{originator:"remote",response:e})},onTransportError:function(){n._session.onTransportError()},onRequestTimeout:function(){n._session.onRequestTimeout()},onDialogError:function(){n._session.onDialogError()}},body:t})}},{key:"init_incoming",value:function(e){this._direction="incoming",this.request=e,e.reply(200),this._contentType=e.hasHeader("Content-Type")?e.getHeader("Content-Type").toLowerCase():void 0,this._body=e.body,this._session.newInfo({originator:"remote",info:this,request:e})}},{key:"contentType",get:function(){return this._contentType}},{key:"body",get:function(){return this._body}}])&&s(t.prototype,n),r&&s(t,r),d}()},{"../Constants":2,"../Exceptions":6,"../Utils":28,events:31}],17:[function(e,t,n){"use strict";function r(e,t){for(var n=0;n=200?"terminated;reason=noresource":"active;expires=".concat(this._expires),this._session.sendRequest(i.NOTIFY,{extraHeaders:["Event: ".concat(l.event_type,";id=").concat(this._id),"Subscription-State: ".concat(n),"Content-Type: ".concat(l.body_type)],body:"SIP/2.0 ".concat(e," ").concat(t),eventHandlers:{onErrorResponse:function(){this._active=!1}}}))}}])&&r(t.prototype,n),s&&r(t,s),e}()},{"../Constants":2,"../Logger":9}],18:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};f.debug("sendRefer()");var r=d.cloneArray(n.extraHeaders),s=d.cloneObject(n.eventHandlers);for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&this.on(i,s[i]);var o=null;n.replaces&&(o=n.replaces._request.call_id,o+=";to-tag=".concat(n.replaces._to_tag),o+=";from-tag=".concat(n.replaces._from_tag),o=encodeURIComponent(o));var l="Refer-To: <".concat(e).concat(o?"?Replaces=".concat(o):"",">");if(r.push(l),!r.some(function(e){return e.toLowerCase().startsWith("referred-by:")})){var u="Referred-By: <".concat(this._session._ua._configuration.uri._scheme,":").concat(this._session._ua._configuration.uri._user,"@").concat(this._session._ua._configuration.uri._host,">");r.push(u)}r.push("Contact: ".concat(this._session.contact));var a=this._session.sendRequest(c.REFER,{extraHeaders:r,eventHandlers:{onSuccessResponse:function(e){t._requestSucceeded(e)},onErrorResponse:function(e){t._requestFailed(e,c.causes.REJECTED)},onTransportError:function(){t._requestFailed(null,c.causes.CONNECTION_ERROR)},onRequestTimeout:function(){t._requestFailed(null,c.causes.REQUEST_TIMEOUT)},onDialogError:function(){t._requestFailed(null,c.causes.DIALOG_ERROR)}}});this._id=a.cseq}},{key:"receiveNotify",value:function(e){if(f.debug("receiveNotify()"),e.body){var t=h.parse(e.body.trim().split("\r\n",1)[0],"Status_Line");if(-1!==t)switch(!0){case/^100$/.test(t.status_code):this.emit("trying",{request:e,status_line:t});break;case/^1[0-9]{2}$/.test(t.status_code):this.emit("progress",{request:e,status_line:t});break;case/^2[0-9]{2}$/.test(t.status_code):this.emit("accepted",{request:e,status_line:t});break;default:this.emit("failed",{request:e,status_line:t})}else f.debug('receiveNotify() | error parsing NOTIFY body: "'.concat(e.body,'"'))}}},{key:"_requestSucceeded",value:function(e){f.debug("REFER succeeded"),f.debug('emit "requestSucceeded"'),this.emit("requestSucceeded",{response:e})}},{key:"_requestFailed",value:function(e,t){f.debug("REFER failed"),f.debug('emit "requestFailed"'),this.emit("requestFailed",{response:e||null,cause:t})}},{key:"id",get:function(){return this._id}}])&&s(t.prototype,n),r&&s(t,r),a}()},{"../Constants":2,"../Grammar":7,"../Logger":9,"../Utils":28,events:31}],19:[function(e,t,n){"use strict";function r(e,t){for(var n=0;n"'),this._contact+=";reg-id=".concat(this._reg_id),this._contact+=";+sip.instance=".concat(this._sipInstance)}var t,n,s;return t=e,(n=[{key:"setExtraHeaders",value:function(e){Array.isArray(e)||(e=[]),this._extraHeaders=e.slice()}},{key:"setExtraContactParams",value:function(e){for(var t in e instanceof Object||(e={}),this._extraContactParams="",e)if(Object.prototype.hasOwnProperty.call(e,t)){var n=e[t];this._extraContactParams+=";".concat(t),n&&(this._extraContactParams+="=".concat(n))}}},{key:"register",value:function(){var e=this;if(this._registering)a.debug("Register request in progress...");else{var t=this._extraHeaders.slice();t.push("Contact: ".concat(this._contact,";expires=").concat(this._expires).concat(this._extraContactParams)),t.push("Expires: ".concat(this._expires));var n=new l.OutgoingRequest(o.REGISTER,this._registrar,this._ua,{to_uri:this._to_uri,call_id:this._call_id,cseq:this._cseq+=1},t),r=new u(this._ua,n,{onRequestTimeout:function(){e._registrationFailure(null,o.causes.REQUEST_TIMEOUT)},onTransportError:function(){e._registrationFailure(null,o.causes.CONNECTION_ERROR)},onAuthenticated:function(){e._cseq+=1},onReceiveResponse:function(t){if(t.cseq===e._cseq)switch(null!==e._registrationTimer&&(clearTimeout(e._registrationTimer),e._registrationTimer=null),!0){case/^1[0-9]{2}$/.test(t.status_code):break;case/^2[0-9]{2}$/.test(t.status_code):if(e._registering=!1,!t.hasHeader("Contact")){a.debug("no Contact header in response to REGISTER, response ignored");break}var n=t.headers.Contact.reduce(function(e,t){return e.concat(t.parsed)},[]),r=n.find(function(t){return e._sipInstance===t.getParam("+sip.instance")&&e._reg_id===parseInt(t.getParam("reg-id"))});if(r||(r=n.find(function(t){return t.uri.user===e._ua.contact.uri.user})),!r){a.debug("no Contact header pointing to us, response ignored");break}var s=r.getParam("expires");!s&&t.hasHeader("expires")&&(s=t.getHeader("expires")),s||(s=e._expires),(s=Number(s))<10&&(s=10);var l=s>64?1e3*s/2+Math.floor(1e3*(s/2-32)*Math.random()):1e3*s-5e3;e._registrationTimer=setTimeout(function(){e._registrationTimer=null,0===e._ua.listeners("registrationExpiring").length?e.register():e._ua.emit("registrationExpiring")},l),r.hasParam("temp-gruu")&&(e._ua.contact.temp_gruu=r.getParam("temp-gruu").replace(/"/g,"")),r.hasParam("pub-gruu")&&(e._ua.contact.pub_gruu=r.getParam("pub-gruu").replace(/"/g,"")),e._registered||(e._registered=!0,e._ua.registered({response:t}));break;case/^423$/.test(t.status_code):t.hasHeader("min-expires")?(e._expires=Number(t.getHeader("min-expires")),e._expires<10&&(e._expires=10),e.register()):(a.debug("423 response received for REGISTER without Min-Expires"),e._registrationFailure(t,o.causes.SIP_FAILURE_CODE));break;default:var u=i.sipErrorCause(t.status_code);e._registrationFailure(t,u)}}});this._registering=!0,r.send()}}},{key:"unregister",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this._registered){this._registered=!1,null!==this._registrationTimer&&(clearTimeout(this._registrationTimer),this._registrationTimer=null);var n=this._extraHeaders.slice();t.all?n.push("Contact: *".concat(this._extraContactParams)):n.push("Contact: ".concat(this._contact,";expires=0").concat(this._extraContactParams)),n.push("Expires: 0");var r=new l.OutgoingRequest(o.REGISTER,this._registrar,this._ua,{to_uri:this._to_uri,call_id:this._call_id,cseq:this._cseq+=1},n);new u(this._ua,r,{onRequestTimeout:function(){e._unregistered(null,o.causes.REQUEST_TIMEOUT)},onTransportError:function(){e._unregistered(null,o.causes.CONNECTION_ERROR)},onAuthenticated:function(){e._cseq+=1},onReceiveResponse:function(t){switch(!0){case/^1[0-9]{2}$/.test(t.status_code):break;case/^2[0-9]{2}$/.test(t.status_code):e._unregistered(t);break;default:var n=i.sipErrorCause(t.status_code);e._unregistered(t,n)}}}).send()}else a.debug("already unregistered")}},{key:"close",value:function(){this._registered&&this.unregister()}},{key:"onTransportClosed",value:function(){this._registering=!1,null!==this._registrationTimer&&(clearTimeout(this._registrationTimer),this._registrationTimer=null),this._registered&&(this._registered=!1,this._ua.unregistered({}))}},{key:"_registrationFailure",value:function(e,t){this._registering=!1,this._ua.registrationFailed({response:e||null,cause:t}),this._registered&&(this._registered=!1,this._ua.unregistered({response:e||null,cause:t}))}},{key:"_unregistered",value:function(e,t){this._registering=!1,this._registered=!1,this._ua.unregistered({response:e||null,cause:t||null})}},{key:"registered",get:function(){return this._registered}}])&&r(t.prototype,n),s&&r(t,s),e}()},{"./Constants":2,"./Logger":9,"./RequestSender":20,"./SIPMessage":21,"./Utils":28}],20:[function(e,t,n){"use strict";function r(e,t){for(var n=0;n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,l=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){l=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(l)throw i}}}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n")),this.setHeader("via",""),this.setHeader("max-forwards",p.MAX_FORWARDS);var l=s.to_uri||n,u=s.to_tag?{tag:s.to_tag}:null,a=void 0!==s.to_display_name?s.to_display_name:null;this.to=new v(l,a,u),this.setHeader("to",this.to.toString());var h,d=s.from_uri||r.configuration.uri,f={tag:s.from_tag||m.newTag()};h=void 0!==s.from_display_name?s.from_display_name:r.configuration.display_name?r.configuration.display_name:null,this.from=new v(d,h,f),this.setHeader("from",this.from.toString());var _=s.call_id||r.configuration.jssip_id+m.createRandomToken(15);this.call_id=_,this.setHeader("call-id",_);var g=s.cseq||Math.floor(1e4*Math.random());this.cseq=g,this.setHeader("cseq","".concat(g," ").concat(t))}return d(e,[{key:"setHeader",value:function(e,t){for(var n=new RegExp("^\\s*".concat(e,"\\s*:"),"i"),r=0;r1&&void 0!==arguments[1]?arguments[1]:0;if(e=m.headerize(e),this.headers[e]){if(!(t>=this.headers[e].length)){var n=this.headers[e][t],r=n.raw;if(n.parsed)return n.parsed;var s=g.parse(r,e.replace(/-/g,"_"));return-1===s?(this.headers[e].splice(t,1),void y.debug('error parsing "'.concat(e,'" header field with value "').concat(r,'"'))):(n.parsed=s,s)}y.debug('not so many "'.concat(e,'" headers present'))}else y.debug('header "'.concat(e,'" not present'))}},{key:"s",value:function(e,t){return this.parseHeader(e,t)}},{key:"setHeader",value:function(e,t){var n={raw:t};this.headers[m.headerize(e)]=[n]}},{key:"parseSDP",value:function(e){return!e&&this.sdp?this.sdp:(this.sdp=f.parse(this.body||""),this.sdp)}},{key:"toString",value:function(){return this.data}}]),e}(),S=function(e){s(n,b);var t=o(n);function n(e){var r;return c(this,n),(r=t.call(this)).ua=e,r.headers={},r.ruri=null,r.transport=null,r.server_transaction=null,r}return d(n,[{key:"reply",value:function(e,t,n,r,s,i){var o=[],l=this.getHeader("To");if(t=t||null,!(e=e||null)||e<100||e>699)throw new TypeError("Invalid status_code: ".concat(e));if(t&&"string"!=typeof t&&!(t instanceof String))throw new TypeError("Invalid reason_phrase: ".concat(t));t=t||p.REASON_PHRASE[e]||"",n=m.cloneArray(n),this.ua.configuration.extra_headers&&(n=n.concat(this.ua.configuration.extra_headers));var a="SIP/2.0 ".concat(e," ").concat(t,"\r\n");if(this.method===p.INVITE&&e>100&&e<=200){var c,h=u(this.getHeaders("record-route"));try{for(h.s();!(c=h.n()).done;){var d=c.value;a+="Record-Route: ".concat(d,"\r\n")}}catch(e){h.e(e)}finally{h.f()}}var f,_=u(this.getHeaders("via"));try{for(_.s();!(f=_.n()).done;){var v=f.value;a+="Via: ".concat(v,"\r\n")}}catch(e){_.e(e)}finally{_.f()}!this.to_tag&&e>100?l+=";tag=".concat(m.newTag()):this.to_tag&&!this.s("to").hasParam("tag")&&(l+=";tag=".concat(this.to_tag)),a+="To: ".concat(l,"\r\n"),a+="From: ".concat(this.getHeader("From"),"\r\n"),a+="Call-ID: ".concat(this.call_id,"\r\n"),a+="CSeq: ".concat(this.cseq," ").concat(this.method,"\r\n");var g,y=u(n);try{for(y.s();!(g=y.n()).done;){var T=g.value;a+="".concat(T.trim(),"\r\n")}}catch(e){y.e(e)}finally{y.f()}switch(this.method){case p.INVITE:this.ua.configuration.session_timers&&o.push("timer"),(this.ua.contact.pub_gruu||this.ua.contact.temp_gruu)&&o.push("gruu"),o.push("ice","replaces");break;case p.UPDATE:this.ua.configuration.session_timers&&o.push("timer"),r&&o.push("ice"),o.push("replaces")}if(o.push("outbound"),this.method===p.OPTIONS?(a+="Allow: ".concat(p.ALLOWED_METHODS,"\r\n"),a+="Accept: ".concat(p.ACCEPTED_BODY_TYPES,"\r\n")):405===e?a+="Allow: ".concat(p.ALLOWED_METHODS,"\r\n"):415===e&&(a+="Accept: ".concat(p.ACCEPTED_BODY_TYPES,"\r\n")),a+="Supported: ".concat(o,"\r\n"),r){var C=m.str_utf8_length(r);a+="Content-Type: application/sdp\r\n",a+="Content-Length: ".concat(C,"\r\n\r\n"),a+=r}else a+="Content-Length: ".concat(0,"\r\n\r\n");this.server_transaction.receiveResponse(e,a,s,i)}},{key:"reply_sl",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.getHeaders("via");if(!e||e<100||e>699)throw new TypeError("Invalid status_code: ".concat(e));if(t&&"string"!=typeof t&&!(t instanceof String))throw new TypeError("Invalid reason_phrase: ".concat(t));t=t||p.REASON_PHRASE[e]||"";var r,s="SIP/2.0 ".concat(e," ").concat(t,"\r\n"),i=u(n);try{for(i.s();!(r=i.n()).done;){var o=r.value;s+="Via: ".concat(o,"\r\n")}}catch(e){i.e(e)}finally{i.f()}var l=this.getHeader("To");if(!this.to_tag&&e>100?l+=";tag=".concat(m.newTag()):this.to_tag&&!this.s("to").hasParam("tag")&&(l+=";tag=".concat(this.to_tag)),s+="To: ".concat(l,"\r\n"),s+="From: ".concat(this.getHeader("From"),"\r\n"),s+="Call-ID: ".concat(this.call_id,"\r\n"),s+="CSeq: ".concat(this.cseq," ").concat(this.method,"\r\n"),this.ua.configuration.extra_headers){var a,c=u(this.ua.configuration.extra_headers);try{for(c.s();!(a=c.n()).done;){var h=a.value;s+="".concat(h.trim(),"\r\n")}}catch(e){c.e(e)}finally{c.f()}}s+="Content-Length: ".concat(0,"\r\n\r\n"),this.transport.send(s)}}]),n}(),E=function(e){s(n,b);var t=o(n);function n(){var e;return c(this,n),(e=t.call(this)).headers={},e.status_code=null,e.reason_phrase=null,e}return n}();t.exports={OutgoingRequest:T,InitialOutgoingInviteRequest:C,IncomingRequest:S,IncomingResponse:E}},{"./Constants":2,"./Grammar":7,"./Logger":9,"./NameAddrHeader":11,"./Utils":28,"sdp-transform":37}],22:[function(e,t,n){"use strict";var r=e("./Logger"),s=e("./Utils"),i=e("./Grammar"),o=new r("Socket");n.isSocket=function(e){if(Array.isArray(e))return!1;if(void 0===e)return o.warn("undefined JsSIP.Socket instance"),!1;try{if(!s.isString(e.url))throw o.warn("missing or invalid JsSIP.Socket url property"),new Error("Missing or invalid JsSIP.Socket url property");if(!s.isString(e.via_transport))throw o.warn("missing or invalid JsSIP.Socket via_transport property"),new Error("Missing or invalid JsSIP.Socket via_transport property");if(-1===i.parse(e.sip_uri,"SIP_URI"))throw o.warn("missing or invalid JsSIP.Socket sip_uri property"),new Error("missing or invalid JsSIP.Socket sip_uri property")}catch(e){return!1}try{["connect","disconnect","send"].forEach(function(t){if(!s.isFunction(e[t]))throw o.warn("missing or invalid JsSIP.Socket method: ".concat(t)),new Error("Missing or invalid JsSIP.Socket method: ".concat(t))})}catch(e){return!1}return!0}},{"./Grammar":7,"./Logger":9,"./Utils":28}],23:[function(e,t,n){"use strict";var r=500;t.exports={T1:r,T2:4e3,T4:5e3,TIMER_B:32e3,TIMER_D:0,TIMER_F:32e3,TIMER_H:32e3,TIMER_I:0,TIMER_J:0,TIMER_K:0,TIMER_L:32e3,TIMER_M:32e3,PROVISIONAL_RESPONSE_INTERVAL:6e4}},{}],24:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n=100&&n<=199)switch(this.state){case b.STATUS_CALLING:this.stateChanged(b.STATUS_PROCEEDING),this.eventHandlers.onReceiveResponse(e);break;case b.STATUS_PROCEEDING:this.eventHandlers.onReceiveResponse(e)}else if(n>=200&&n<=299)switch(this.state){case b.STATUS_CALLING:case b.STATUS_PROCEEDING:this.stateChanged(b.STATUS_ACCEPTED),this.M=setTimeout(function(){t.timer_M()},m.TIMER_M),this.eventHandlers.onReceiveResponse(e);break;case b.STATUS_ACCEPTED:this.eventHandlers.onReceiveResponse(e)}else if(n>=300&&n<=699)switch(this.state){case b.STATUS_CALLING:case b.STATUS_PROCEEDING:this.stateChanged(b.STATUS_COMPLETED),this.sendACK(e),this.eventHandlers.onReceiveResponse(e);break;case b.STATUS_COMPLETED:this.sendACK(e)}}},{key:"C",get:function(){return b}}]),n}(),A=function(e){l(n,d);var t=a(n);function n(e,r,i,o){var l;s(this,n),(l=t.call(this)).id="z9hG4bK".concat(Math.floor(1e7*Math.random())),l.transport=r,l.request=i,l.eventHandlers=o;var u="SIP/2.0/".concat(r.via_transport);return u+=" ".concat(e.configuration.via_host,";branch=").concat(l.id),l.request.setHeader("via",u),l}return o(n,[{key:"send",value:function(){this.transport.send(this.request)||this.onTransportError()}},{key:"onTransportError",value:function(){y.debug("transport error occurred for transaction ".concat(this.id)),this.eventHandlers.onTransportError()}},{key:"C",get:function(){return b}}]),n}(),R=function(e){l(n,d);var t=a(n);function n(e,r,i){var o;return s(this,n),(o=t.call(this)).type=b.NON_INVITE_SERVER,o.id=i.via_branch,o.ua=e,o.transport=r,o.request=i,o.last_response="",i.server_transaction=c(o),o.state=b.STATUS_TRYING,e.newTransaction(c(o)),o}return o(n,[{key:"stateChanged",value:function(e){this.state=e,this.emit("stateChanged")}},{key:"timer_J",value:function(){T.debug("Timer J expired for transaction ".concat(this.id)),this.stateChanged(b.STATUS_TERMINATED),this.ua.destroyTransaction(this)}},{key:"onTransportError",value:function(){this.transportError||(this.transportError=!0,T.debug("transport error occurred, deleting transaction ".concat(this.id)),clearTimeout(this.J),this.stateChanged(b.STATUS_TERMINATED),this.ua.destroyTransaction(this))}},{key:"receiveResponse",value:function(e,t,n,r){var s=this;if(100===e)switch(this.state){case b.STATUS_TRYING:this.stateChanged(b.STATUS_PROCEEDING),this.transport.send(t)||this.onTransportError();break;case b.STATUS_PROCEEDING:this.last_response=t,this.transport.send(t)?n&&n():(this.onTransportError(),r&&r())}else if(e>=200&&e<=699)switch(this.state){case b.STATUS_TRYING:case b.STATUS_PROCEEDING:this.stateChanged(b.STATUS_COMPLETED),this.last_response=t,this.J=setTimeout(function(){s.timer_J()},m.TIMER_J),this.transport.send(t)?n&&n():(this.onTransportError(),r&&r());break;case b.STATUS_COMPLETED:}}},{key:"C",get:function(){return b}}]),n}(),w=function(e){l(n,d);var t=a(n);function n(e,r,i){var o;return s(this,n),(o=t.call(this)).type=b.INVITE_SERVER,o.id=i.via_branch,o.ua=e,o.transport=r,o.request=i,o.last_response="",i.server_transaction=c(o),o.state=b.STATUS_PROCEEDING,e.newTransaction(c(o)),o.resendProvisionalTimer=null,i.reply(100),o}return o(n,[{key:"stateChanged",value:function(e){this.state=e,this.emit("stateChanged")}},{key:"timer_H",value:function(){C.debug("Timer H expired for transaction ".concat(this.id)),this.state===b.STATUS_COMPLETED&&C.debug("ACK not received, dialog will be terminated"),this.stateChanged(b.STATUS_TERMINATED),this.ua.destroyTransaction(this)}},{key:"timer_I",value:function(){this.stateChanged(b.STATUS_TERMINATED),this.ua.destroyTransaction(this)}},{key:"timer_L",value:function(){C.debug("Timer L expired for transaction ".concat(this.id)),this.state===b.STATUS_ACCEPTED&&(this.stateChanged(b.STATUS_TERMINATED),this.ua.destroyTransaction(this))}},{key:"onTransportError",value:function(){this.transportError||(this.transportError=!0,C.debug("transport error occurred, deleting transaction ".concat(this.id)),null!==this.resendProvisionalTimer&&(clearInterval(this.resendProvisionalTimer),this.resendProvisionalTimer=null),clearTimeout(this.L),clearTimeout(this.H),clearTimeout(this.I),this.stateChanged(b.STATUS_TERMINATED),this.ua.destroyTransaction(this))}},{key:"resend_provisional",value:function(){this.transport.send(this.last_response)||this.onTransportError()}},{key:"receiveResponse",value:function(e,t,n,r){var s=this;if(e>=100&&e<=199)switch(this.state){case b.STATUS_PROCEEDING:this.transport.send(t)||this.onTransportError(),this.last_response=t}if(e>100&&e<=199&&this.state===b.STATUS_PROCEEDING)null===this.resendProvisionalTimer&&(this.resendProvisionalTimer=setInterval(function(){s.resend_provisional()},m.PROVISIONAL_RESPONSE_INTERVAL));else if(e>=200&&e<=299)switch(this.state){case b.STATUS_PROCEEDING:this.stateChanged(b.STATUS_ACCEPTED),this.last_response=t,this.L=setTimeout(function(){s.timer_L()},m.TIMER_L),null!==this.resendProvisionalTimer&&(clearInterval(this.resendProvisionalTimer),this.resendProvisionalTimer=null);case b.STATUS_ACCEPTED:this.transport.send(t)?n&&n():(this.onTransportError(),r&&r())}else if(e>=300&&e<=699)switch(this.state){case b.STATUS_PROCEEDING:null!==this.resendProvisionalTimer&&(clearInterval(this.resendProvisionalTimer),this.resendProvisionalTimer=null),this.transport.send(t)?(this.stateChanged(b.STATUS_COMPLETED),this.H=setTimeout(function(){s.timer_H()},m.TIMER_H),n&&n()):(this.onTransportError(),r&&r())}}},{key:"C",get:function(){return b}}]),n}();t.exports={C:b,NonInviteClientTransaction:S,InviteClientTransaction:E,AckClientTransaction:A,NonInviteServerTransaction:R,InviteServerTransaction:w,checkTransaction:function(e,t){var n,r=e._transactions;switch(t.method){case _.INVITE:if(n=r.ist[t.via_branch]){switch(n.state){case b.STATUS_PROCEEDING:n.transport.send(n.last_response);break;case b.STATUS_ACCEPTED:}return!0}break;case _.ACK:if(!(n=r.ist[t.via_branch]))return!1;if(n.state===b.STATUS_ACCEPTED)return!1;if(n.state===b.STATUS_COMPLETED)return n.state=b.STATUS_CONFIRMED,n.I=setTimeout(function(){n.timer_I()},m.TIMER_I),!0;break;case _.CANCEL:return(n=r.ist[t.via_branch])?(t.reply_sl(200),n.state!==b.STATUS_PROCEEDING):(t.reply_sl(481),!0);default:if(n=r.nist[t.via_branch]){switch(n.state){case b.STATUS_TRYING:break;case b.STATUS_PROCEEDING:case b.STATUS_COMPLETED:n.transport.send(n.last_response)}return!0}}}}},{"./Constants":2,"./Logger":9,"./SIPMessage":21,"./Timers":23,events:31}],25:[function(e,t,n){"use strict";function r(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:u.recovery_options;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),l.debug("new()"),this.status=u.STATUS_DISCONNECTED,this.socket=null,this.sockets=[],this.recovery_options=n,this.recover_attempts=0,this.recovery_timer=null,this.close_requested=!1;try{this.textDecoder=new TextDecoder("utf8")}catch(e){l.warn("cannot use TextDecoder: ".concat(e))}if(void 0===t)throw new TypeError("Invalid argument. undefined 'sockets' argument");t instanceof Array||(t=[t]),t.forEach(function(e){if(!i.isSocket(e.socket))throw new TypeError("Invalid argument. invalid 'JsSIP.Socket' instance");if(e.weight&&!Number(e.weight))throw new TypeError("Invalid argument. 'weight' attribute is not a number");this.sockets.push({socket:e.socket,weight:e.weight||0,status:u.SOCKET_STATUS_READY})},this),this._getSocket()}var t,n,s;return t=e,(n=[{key:"connect",value:function(){l.debug("connect()"),this.isConnected()?l.debug("Transport is already connected"):this.isConnecting()?l.debug("Transport is connecting"):(this.close_requested=!1,this.status=u.STATUS_CONNECTING,this.onconnecting({socket:this.socket,attempts:this.recover_attempts}),this.close_requested||(this.socket.onconnect=this._onConnect.bind(this),this.socket.ondisconnect=this._onDisconnect.bind(this),this.socket.ondata=this._onData.bind(this),this.socket.connect()))}},{key:"disconnect",value:function(){l.debug("close()"),this.close_requested=!0,this.recover_attempts=0,this.status=u.STATUS_DISCONNECTED,null!==this.recovery_timer&&(clearTimeout(this.recovery_timer),this.recovery_timer=null),this.socket.onconnect=function(){},this.socket.ondisconnect=function(){},this.socket.ondata=function(){},this.socket.disconnect(),this.ondisconnect({socket:this.socket,error:!1})}},{key:"send",value:function(e){if(l.debug("send()"),!this.isConnected())return l.warn("unable to send message, transport is not connected"),!1;var t=e.toString();return l.debug("sending message:\n\n".concat(t,"\n")),this.socket.send(t)}},{key:"isConnected",value:function(){return this.status===u.STATUS_CONNECTED}},{key:"isConnecting",value:function(){return this.status===u.STATUS_CONNECTING}},{key:"_reconnect",value:function(){var e=this;this.recover_attempts+=1;var t=Math.floor(Math.random()*Math.pow(2,this.recover_attempts)+1);tthis.recovery_options.max_interval&&(t=this.recovery_options.max_interval),l.debug("reconnection attempt: ".concat(this.recover_attempts,". next connection attempt in ").concat(t," seconds")),this.recovery_timer=setTimeout(function(){e.close_requested||e.isConnected()||e.isConnecting()||(e._getSocket(),e.connect())},1e3*t)}},{key:"_getSocket",value:function(){var e=[];if(this.sockets.forEach(function(t){t.status!==u.SOCKET_STATUS_ERROR&&(0===e.length?e.push(t):t.weight>e[0].weight?e=[t]:t.weight===e[0].weight&&e.push(t))}),0===e.length)return this.sockets.forEach(function(e){e.status=u.SOCKET_STATUS_READY}),void this._getSocket();var t=Math.floor(Math.random()*e.length);this.socket=e[t].socket}},{key:"_onConnect",value:function(){this.recover_attempts=0,this.status=u.STATUS_CONNECTED,null!==this.recovery_timer&&(clearTimeout(this.recovery_timer),this.recovery_timer=null),this.onconnect({socket:this})}},{key:"_onDisconnect",value:function(e,t,n){this.status=u.STATUS_DISCONNECTED,this.ondisconnect({socket:this.socket,error:e,code:t,reason:n}),this.close_requested||(this.sockets.forEach(function(e){this.socket===e.socket&&(e.status=u.SOCKET_STATUS_ERROR)},this),this._reconnect(e))}},{key:"_onData",value:function(e){if("\r\n\r\n"!==e)if("\r\n"!==e){if("string"!=typeof e){try{e=this.textDecoder?this.textDecoder.decode(e):String.fromCharCode.apply(null,new Uint8Array(e))}catch(e){return void l.debug("received binary message failed to be converted into string, message discarded")}l.debug("received binary message:\n\n".concat(e,"\n"))}else l.debug("received text message:\n\n".concat(e,"\n"));this.ondata({transport:this,message:e})}else l.debug("received message with CRLF Keep Alive response");else{l.debug("received message with double-CRLF Keep Alive request");try{this.socket.send("\r\n")}catch(e){l.warn("error sending Keep Alive response: ".concat(e))}}}},{key:"via_transport",get:function(){return this.socket.via_transport}},{key:"url",get:function(){return this.socket.url}},{key:"sip_uri",get:function(){return this.socket.sip_uri}}])&&r(t.prototype,n),s&&r(t,s),e}()},{"./Constants":2,"./Logger":9,"./Socket":22}],26:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},t=e.anonymous||null,n=e.outbound||null,r="<";return r+=t?this.temp_gruu||"sip:anonymous@anonymous.invalid;transport=ws":this.pub_gruu||this.uri.toString(),!n||(t?this.temp_gruu:this.pub_gruu)||(r+=";ob"),r+=">"}};var r=["authorization_user","password","realm","ha1","authorization_jwt","display_name","register","extra_headers"];for(var s in this._configuration)Object.prototype.hasOwnProperty.call(this._configuration,s)&&(-1!==r.indexOf(s)?Object.defineProperty(this._configuration,s,{writable:!0,configurable:!1}):Object.defineProperty(this._configuration,s,{writable:!1,configurable:!1}));for(var i in R.debug("configuration parameters after validation:"),this._configuration)if(Object.prototype.hasOwnProperty.call(A.settings,i))switch(i){case"uri":case"registrar_server":R.debug("- ".concat(i,": ").concat(this._configuration[i]));break;case"password":case"ha1":case"authorization_jwt":R.debug("- ".concat(i,": NOT SHOWN"));break;default:R.debug("- ".concat(i,": ").concat(JSON.stringify(this._configuration[i])))}}},{key:"C",get:function(){return w}},{key:"status",get:function(){return this._status}},{key:"contact",get:function(){return this._contact}},{key:"configuration",get:function(){return this._configuration}},{key:"transport",get:function(){return this._transport}}]),n}()},{"./Config":1,"./Constants":2,"./Exceptions":6,"./Logger":9,"./Message":10,"./Options":12,"./Parser":13,"./RTCSession":14,"./Registrator":19,"./SIPMessage":21,"./Transactions":24,"./Transport":25,"./URI":27,"./Utils":28,"./sanityCheck":30,events:31}],27:[function(e,t,n){"use strict";function r(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,l=!0,u=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return l=e.done,e},e:function(e){u=!0,o=e},f:function(){try{l||null==n.return||n.return()}finally{if(u)throw o}}}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n4&&void 0!==arguments[4]?arguments[4]:{},o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!r)throw new TypeError('missing or invalid "host" parameter');for(var u in this._parameters={},this._headers={},this._scheme=t||l.SIP,this._user=n,this._host=r,this._port=s,i)Object.prototype.hasOwnProperty.call(i,u)&&this.setParam(u,i[u]);for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&this.setHeader(a,o[a])}return o(e,null,[{key:"parse",value:function(e){return-1!==(e=a.parse(e,"SIP_URI"))?e:void 0}}]),o(e,[{key:"setParam",value:function(e,t){e&&(this._parameters[e.toLowerCase()]=null==t?null:t.toString())}},{key:"getParam",value:function(e){if(e)return this._parameters[e.toLowerCase()]}},{key:"hasParam",value:function(e){if(e)return!!this._parameters.hasOwnProperty(e.toLowerCase())}},{key:"deleteParam",value:function(e){if(e=e.toLowerCase(),this._parameters.hasOwnProperty(e)){var t=this._parameters[e];return delete this._parameters[e],t}}},{key:"clearParams",value:function(){this._parameters={}}},{key:"setHeader",value:function(e,t){this._headers[u.headerize(e)]=Array.isArray(t)?t:[t]}},{key:"getHeader",value:function(e){if(e)return this._headers[u.headerize(e)]}},{key:"hasHeader",value:function(e){if(e)return!!this._headers.hasOwnProperty(u.headerize(e))}},{key:"deleteHeader",value:function(e){if(e=u.headerize(e),this._headers.hasOwnProperty(e)){var t=this._headers[e];return delete this._headers[e],t}}},{key:"clearHeaders",value:function(){this._headers={}}},{key:"clone",value:function(){return new e(this._scheme,this._user,this._host,this._port,JSON.parse(JSON.stringify(this._parameters)),JSON.parse(JSON.stringify(this._headers)))}},{key:"toString",value:function(){var e=[],t="".concat(this._scheme,":");for(var n in this._user&&(t+="".concat(u.escapeUser(this._user),"@")),t+=this._host,(this._port||0===this._port)&&(t+=":".concat(this._port)),this._parameters)Object.prototype.hasOwnProperty.call(this._parameters,n)&&(t+=";".concat(n),null!==this._parameters[n]&&(t+="=".concat(this._parameters[n])));for(var s in this._headers)if(Object.prototype.hasOwnProperty.call(this._headers,s)){var i,o=r(this._headers[s]);try{for(o.s();!(i=o.n()).done;){var l=i.value;e.push("".concat(s,"=").concat(l))}}catch(e){o.e(e)}finally{o.f()}}return e.length>0&&(t+="?".concat(e.join("&"))),t}},{key:"toAor",value:function(e){var t="".concat(this._scheme,":");return this._user&&(t+="".concat(u.escapeUser(this._user),"@")),t+=this._host,e&&(this._port||0===this._port)&&(t+=":".concat(this._port)),t}},{key:"scheme",get:function(){return this._scheme},set:function(e){this._scheme=e.toLowerCase()}},{key:"user",get:function(){return this._user},set:function(e){this._user=e}},{key:"host",get:function(){return this._host},set:function(e){this._host=e.toLowerCase()}},{key:"port",get:function(){return this._port},set:function(e){this._port=0===e?e:parseInt(e,10)||null}}]),e}()},{"./Constants":2,"./Grammar":7,"./Utils":28}],28:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,s=function(){};return{s:s,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,l=!0,u=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return l=e.done,e},e:function(e){u=!0,o=e},f:function(){try{l||null==n.return||n.return()}finally{if(u)throw o}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?t-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:32,r="";for(t=0;t>>32-t}function n(e,t){var n=2147483648&e,r=2147483648&t,s=1073741824&e,i=1073741824&t,o=(1073741823&e)+(1073741823&t);return s&i?2147483648^o^n^r:s|i?1073741824&o?3221225472^o^n^r:1073741824^o^n^r:o^n^r}function r(e,r,s,i,o,l,u){return e=n(e,n(n(function(e,t,n){return e&t|~e&n}(r,s,i),o),u)),n(t(e,l),r)}function s(e,r,s,i,o,l,u){return e=n(e,n(n(function(e,t,n){return e&n|t&~n}(r,s,i),o),u)),n(t(e,l),r)}function i(e,r,s,i,o,l,u){return e=n(e,n(n(function(e,t,n){return e^t^n}(r,s,i),o),u)),n(t(e,l),r)}function o(e,r,s,i,o,l,u){return e=n(e,n(n(function(e,t,n){return t^(e|~n)}(r,s,i),o),u)),n(t(e,l),r)}function l(e){var t,n="",r="";for(t=0;t<=3;t++)n+=(r="0".concat((e>>>8*t&255).toString(16))).substr(r.length-2,2);return n}var u,a,c,h,d,f,_,p,m,v;for(u=function(e){for(var t,n=e.length,r=n+8,s=16*((r-r%64)/64+1),i=new Array(s-1),o=0,l=0;l>>29,i}(e=function(e){for(var t="",n=0;n127&&r<2048?(t+=String.fromCharCode(r>>6|192),t+=String.fromCharCode(63&r|128)):(t+=String.fromCharCode(r>>12|224),t+=String.fromCharCode(r>>6&63|128),t+=String.fromCharCode(63&r|128))}return t}(e)),_=1732584193,p=4023233417,m=2562383102,v=271733878,a=0;a1&&void 0!==arguments[1]?arguments[1]:{};return e&&Object.assign({},e)||t}},{"./Constants":2,"./Grammar":7,"./URI":27}],29:[function(e,t,n){"use strict";function r(e,t){for(var n=0;n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,l=!0,u=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return l=e.done,e},e:function(e){u=!0,o=e},f:function(){try{l||null==n.return||n.return()}finally{if(u)throw o}}}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1)return d.debug("more than one Via header field present in the response, dropping the response"),!1},function(){var e=h.str_utf8_length(i.body),t=i.getHeader("content-length");if(e0&&l.length>i){l.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+l.length+' "'+String(t)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=l.length,"object"==typeof console&&console.warn&&console.warn("%s: %s",u.name,u.message)}}else l=o[t]=n,++e._eventsCount;return e}function d(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var e=new Array(arguments.length),t=0;t1&&(t=arguments[1]),t instanceof Error)throw t;var u=new Error('Unhandled "error" event. ('+t+")");throw u.context=t,u}if(!(n=o[e]))return!1;var a="function"==typeof n;switch(r=arguments.length){case 1:!function(e,t,n){if(t)e.call(n);else for(var r=e.length,s=m(e,r),i=0;i=0;o--)if(n[o]===t||n[o].listener===t){l=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(e,t){for(var n=t,r=n+1,s=e.length;r=0;i--)this.removeListener(e,t[i]);return this},o.prototype.listeners=function(e){return _(this,e,!0)},o.prototype.rawListeners=function(e){return _(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},o.prototype.listenerCount=p,o.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]}},{}],32:[function(e,t,n){(function(r){n.log=function(...e){return"object"==typeof console&&console.log&&console.log(...e)},n.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;e.splice(1,0,n,"color: inherit");let r=0,s=0;e[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(r++,"%c"===e&&(s=r))}),e.splice(s,0,n)},n.save=function(e){try{e?n.storage.setItem("debug",e):n.storage.removeItem("debug")}catch(e){}},n.load=function(){let e;try{e=n.storage.getItem("debug")}catch(e){}!e&&void 0!==r&&"env"in r&&(e=r.env.DEBUG);return e},n.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},n.storage=function(){try{return localStorage}catch(e){}}(),n.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.exports=e("./common")(n);const{formatters:s}=t.exports;s.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}).call(this,e("_process"))},{"./common":33,_process:35}],33:[function(e,t,n){t.exports=function(t){function n(e){let t=0;for(let n=0;n{if("%%"===t)return t;l++;const i=r.formatters[s];if("function"==typeof i){const r=e[l];t=i.call(n,r),e.splice(l,1),l--}return t}),r.formatArgs.call(n,e),(n.log||r.log).apply(n,e)}return o.namespace=e,o.enabled=r.enabled(e),o.useColors=r.useColors(),o.color=n(e),o.destroy=s,o.extend=i,"function"==typeof r.init&&r.init(o),r.instances.push(o),o}function s(){const e=r.instances.indexOf(this);return-1!==e&&(r.instances.splice(e,1),!0)}function i(e,t){const n=r(this.namespace+(void 0===t?":":t)+e);return n.log=this.log,n}function o(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return r.debug=r,r.default=r,r.coerce=function(e){return e instanceof Error?e.stack||e.message:e},r.disable=function(){const e=[...r.names.map(o),...r.skips.map(o).map(e=>"-"+e)].join(",");return r.enable(""),e},r.enable=function(e){let t;r.save(e),r.names=[],r.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),s=n.length;for(t=0;t{r[e]=t[e]}),r.instances=[],r.names=[],r.skips=[],r.formatters={},r.selectColor=n,r.enable(r.load()),r}},{ms:34}],34:[function(e,t,n){var r=1e3,s=60*r,i=60*s,o=24*i,l=7*o,u=365.25*o;function a(e,t,n,r){var s=t>=1.5*n;return Math.round(e/n)+" "+r+(s?"s":"")}t.exports=function(e,t){t=t||{};var n=typeof e;if("string"===n&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var n=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return n*u;case"weeks":case"week":case"w":return n*l;case"days":case"day":case"d":return n*o;case"hours":case"hour":case"hrs":case"hr":case"h":return n*i;case"minutes":case"minute":case"mins":case"min":case"m":return n*s;case"seconds":case"second":case"secs":case"sec":case"s":return n*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}(e);if("number"===n&&isFinite(e))return t.long?function(e){var t=Math.abs(e);if(t>=o)return a(e,t,o,"day");if(t>=i)return a(e,t,i,"hour");if(t>=s)return a(e,t,s,"minute");if(t>=r)return a(e,t,r,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=o)return Math.round(e/o)+"d";if(t>=i)return Math.round(e/i)+"h";if(t>=s)return Math.round(e/s)+"m";if(t>=r)return Math.round(e/r)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},{}],35:[function(e,t,n){var r,s,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function l(){throw new Error("clearTimeout has not been defined")}function u(e){if(r===setTimeout)return setTimeout(e,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(e){r=o}try{s="function"==typeof clearTimeout?clearTimeout:l}catch(e){s=l}}();var a,c=[],h=!1,d=-1;function f(){h&&a&&(h=!1,a.length?c=a.concat(c):d=-1,c.length&&_())}function _(){if(!h){var e=u(f);h=!0;for(var t=c.length;t;){for(a=c,c=[];++d1)for(var n=1;n1&&(e[n[0]]=void 0),e};n.parseParams=function(e){return e.split(/;\s?/).reduce(l,{})},n.parseFmtpConfig=n.parseParams,n.parsePayloads=function(e){return e.toString().split(" ").map(Number)},n.parseRemoteCandidates=function(e){for(var t=[],n=e.split(" ").map(r),s=0;s=r)return e;var s=n[t];switch(t+=1,e){case"%%":return"%";case"%s":return String(s);case"%d":return Number(s);case"%v":return""}})}.apply(null,r)},o=["v","o","s","i","u","e","p","c","b","t","r","z","a"],l=["i","c","b","a"];t.exports=function(e,t){t=t||{},null==e.version&&(e.version=0),null==e.name&&(e.name=" "),e.media.forEach(function(e){null==e.payloads&&(e.payloads="")});var n=t.outerOrder||o,s=t.innerOrder||l,u=[];return n.forEach(function(t){r[t].forEach(function(n){n.name in e&&null!=e[n.name]?u.push(i(t,n,e)):n.push in e&&null!=e[n.push]&&e[n.push].forEach(function(e){u.push(i(t,n,e))})})}),e.media.forEach(function(e){u.push(i("m",r.m[0],e)),s.forEach(function(t){r[t].forEach(function(n){n.name in e&&null!=e[n.name]?u.push(i(t,n,e)):n.push in e&&null!=e[n.push]&&e[n.push].forEach(function(e){u.push(i(t,n,e))})})})}),u.join("\r\n")+"\r\n"}},{"./grammar":36}],40:[function(e,t,n){t.exports={name:"jssip",title:"JsSIP",description:"the Javascript SIP library",version:"3.10.1",homepage:"https://jssip.net",contributors:["José Luis Millán (https://github.com/jmillan)","Iñaki Baz Castillo (https://inakibaz.me)"],types:"lib/JsSIP.d.ts",main:"lib-es5/JsSIP.js",keywords:["sip","websocket","webrtc","node","browser","library"],license:"MIT",repository:{type:"git",url:"https://github.com/versatica/JsSIP.git"},bugs:{url:"https://github.com/versatica/JsSIP/issues"},dependencies:{"@types/events":"^3.0.0","@types/debug":"^4.1.7",debug:"^4.3.1",events:"^3.3.0","sdp-transform":"^2.14.1"},devDependencies:{"@babel/core":"^7.19.6","@babel/preset-env":"^7.19.4","ansi-colors":"^3.2.4",browserify:"^16.5.1",eslint:"^5.16.0","fancy-log":"^1.3.3",gulp:"^4.0.2","gulp-babel":"^8.0.0","gulp-eslint":"^5.0.0","gulp-expect-file":"^1.0.2","gulp-header":"^2.0.9","gulp-nodeunit-runner":"^0.2.2","gulp-plumber":"^1.2.1","gulp-rename":"^1.4.0","gulp-uglify-es":"^1.0.4",pegjs:"^0.7.0","vinyl-buffer":"^1.0.1","vinyl-source-stream":"^2.0.0"},scripts:{lint:"node npm-scripts.js lint",test:"node npm-scripts.js test",prepublish:"node npm-scripts.js prepublish",release:"node npm-scripts.js release"}}},{}]},{},[8])(8)}); \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100755 index 00000000..ccebba77 Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100755 index 00000000..aa02b02f --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip +networkTimeout=10000 +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew new file mode 100755 index 00000000..79a61d42 --- /dev/null +++ b/gradlew @@ -0,0 +1,244 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +# This is normally unused +# shellcheck disable=SC2034 +APP_BASE_NAME=${0##*/} +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC3045 + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC3045 + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100755 index 00000000..6689b85b --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,92 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%"=="" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if %ERRORLEVEL% equ 0 goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/settings.gradle b/settings.gradle new file mode 100755 index 00000000..8b013503 --- /dev/null +++ b/settings.gradle @@ -0,0 +1,5 @@ +rootProject.name = "ari4java" +include "codegen" +if (file(".inc-examples").exists()) { + include "examples" +} diff --git a/spotbugs-exclude.xml b/spotbugs-exclude.xml new file mode 100644 index 00000000..621edacb --- /dev/null +++ b/spotbugs-exclude.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/src/main/java/ch/loway/oss/ari4java/ARI.java b/src/main/java/ch/loway/oss/ari4java/ARI.java new file mode 100755 index 00000000..8ccec0a0 --- /dev/null +++ b/src/main/java/ch/loway/oss/ari4java/ARI.java @@ -0,0 +1,570 @@ +package ch.loway.oss.ari4java; + +import ch.loway.oss.ari4java.generated.actions.*; +import ch.loway.oss.ari4java.generated.actions.requests.EventsEventWebsocketGetRequest; +import ch.loway.oss.ari4java.generated.models.Application; +import ch.loway.oss.ari4java.generated.models.Message; +import ch.loway.oss.ari4java.tools.*; +import ch.loway.oss.ari4java.tools.tags.EventSource; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.IOException; +import java.io.InputStream; +import java.security.SecureRandom; +import java.util.Properties; +import java.util.concurrent.CopyOnWriteArrayList; + +/** + * ARI factory and helper class + * + * @author lenz + * @author mwalton + */ +public class ARI { + + private static final String ALLOWED_IN_UID = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + + private String appName = ""; + private AriVersion version; + private HttpClient httpClient; + private WsClient wsClient; + private ActionEvents liveActionEvent = null; + private final AriSubscriber subscriptions = new AriSubscriber(); + private final CopyOnWriteArrayList liveActionList = new CopyOnWriteArrayList<>(); + private static final Logger logger = LoggerFactory.getLogger(ARI.class); + private static final SecureRandom random = new SecureRandom(); + + /** + * Sets the client + * + * @param httpClient the http client + */ + public void setHttpClient(HttpClient httpClient) { + this.httpClient = httpClient; + } + + /** + * Sets the client + * + * @param wsClient the ws client + */ + public void setWsClient(WsClient wsClient) { + this.wsClient = wsClient; + } + + /** + * Sets the Version + * + * @param version the version + */ + public void setVersion(AriVersion version) { + this.version = version; + } + + /** + * Returns the current ARI version + * + * @return the version + * @throws ARIRuntimeException when version null + */ + public AriVersion getVersion() { + if (version == null) { + throw new ARIRuntimeException("AriVersion not set"); + } + return version; + } + + /** + * Get the implementation for a given action interface + * + * @param klazz the required action interface class + * @param interface class + * @return An implementation instance + * @throws ARIException when error + */ + @SuppressWarnings("unchecked") + public T getActionImpl(Class klazz) throws ARIException { + if (!klazz.getName().startsWith("ch.loway.oss.ari4java.generated.actions.Action")) { + throw new ARIException("Invalid Class for action " + klazz); + } + Object action = buildConcreteImplementation(klazz); + setupAction(action); + if (klazz == ActionEvents.class) { + liveActionEvent = (ActionEvents) action; + } + return (T) action; + } + + /** + * Get the implementation for a given model interface + * + * @param klazz the required model interface class + * @param interface class + * @return An implementation instance + * @throws ARIException when error + */ + @SuppressWarnings("unchecked") + public T getModelImpl(Class klazz) throws ARIException { + if (!klazz.getName().startsWith("ch.loway.oss.ari4java.generated.models.")) { + throw new ARIException("Invalid Class for model " + klazz); + } + return (T) buildConcreteImplementation(klazz); + } + + /** + * Builds a concrete instance given an interface. + * Note that we make no assumptions on the type of objects being built. + * + * @param klazz the class + * @return the concrete implementation for that interface under the ARI in use. + * @throws ARIException when error + */ + private Object buildConcreteImplementation(Class klazz) throws ARIException { + Class concrete = getVersion().builder().getClassFactory().getImplementationFor(klazz); + if (concrete == null) { + throw new ARIException("No concrete implementation in " + getVersion().name() + " for " + klazz); + } + try { + return concrete.getDeclaredConstructor().newInstance(); + } catch (Exception e) { + throw new ARIException("Unable to build concrete implementation for " + + klazz.getName() + " in " + getVersion().name(), e); + } + } + + /** + * Close an action object that is open for WebSocket interaction + * + * @param action the action object + * @throws ARIException when error + */ + public void closeAction(Object action) throws ARIException { + if (!(action instanceof BaseAriAction)) { + throw new ARIException("Class " + action.getClass().getName() + " is not an Action implementation"); + } + BaseAriAction ba = (BaseAriAction) action; + ba.disconnectWs(); + } + + /** + * Minimal helper to build an instance of ARI + * + * @param url url + * @param app app + * @param user user + * @param pass The password + * @param version The required version + * @return instance + * @throws ARIException exception + * @see ARI#build(String, String, String, String, AriVersion, boolean) + */ + public static ARI build(String url, String app, String user, String pass, AriVersion version) throws ARIException { + return build(url, app, user, pass, version, true); + } + + /** + * Helper to build an instance of ARI. + * If the version is set as IM_FEELING_LUCKY the AriFactory will determine the version by 1st connecting + * to the server and requesting the resources.json to extract the version number. + * + * @param url The URL of the Asterisk web server, e.g. http://10.10.5.8:8088/ (defined in http.conf) + * @param app The app + * @param user The user name (defined in ari.conf) + * @param pass The password (defined in ari.conf) + * @param version The required version + * @param testConnection Test the connection details by executing the ping operation + * @return an instance + * @throws ARIException If the url is invalid, or the version of ARI is not supported. + */ + public static ARI build(String url, String app, String user, String pass, AriVersion version, boolean testConnection) throws ARIException { + try { + return AriFactory.nettyHttp(url, user, pass, version, app, testConnection); + } catch (Exception e) { + throw new ARIException(e.getMessage(), e); + } + } + + /** + * Sets the application name. + * + * @param s app name + */ + public void setAppName(String s) { + this.appName = s; + } + + /** + * Return the current application name. + * + * @return the appName + */ + public String getAppName() { + return this.appName; + } + + /** + * This operation is the opposite of a build() - to be called in the final + * clause where the ARI object is built. + *

+ * In any case, it is good practice to have a way to deallocate stuff like + * the websocket or any circular reference. + */ + public void cleanup() { + try { + unsubscribeApplication(); + } catch (ARIException e) { + // ignore on cleanup... + } + for (BaseAriAction liveAction : liveActionList) { + try { + closeAction(liveAction); + } catch (ARIException e) { + // ignore on cleanup... + } + } + if (wsClient != null) { + wsClient.destroy(); + } + if (httpClient != null && !httpClient.equals(wsClient)) { + httpClient.destroy(); + } + wsClient = null; + httpClient = null; + liveActionEvent = null; + } + + /** + * unsubscribe from all resources of the stasis application + * + * @throws ARIException when error + */ + private void unsubscribeApplication() throws ARIException { + Application application = applications().get(appName).execute(); + // unsubscribe from all channels + for (int i = 0; i < application.getChannel_ids().size(); i++) { + applications().unsubscribe(appName, "channel:" + application.getChannel_ids().get(i)).execute(); + } + // unsubscribe from all bridges + for (int i = 0; i < application.getBridge_ids().size(); i++) { + applications().unsubscribe(appName, "bridge:" + application.getBridge_ids().get(i)).execute(); + } + // unsubscribe from all endpoints + for (int i = 0; i < application.getEndpoint_ids().size(); i++) { + applications().unsubscribe(appName, "endpoint:" + application.getEndpoint_ids().get(i)).execute(); + } + // unsubscribe from all deviceState + for (int i = 0; i < application.getDevice_names().size(); i++) { + applications().unsubscribe(appName, "deviceState:" + application.getDevice_names().get(i)).execute(); + } + } + + /** + * Create the events Websocket with the provided callback + * + * @param callback AriCallback + * @throws ARIException when error + */ + public void eventsCallback(AriCallback callback) throws ARIException { + eventsCallback(callback, false); + } + + /** + * Create the events Websocket with the provided callback + * + * @param callback AriCallback + * @param subscribeAll subscribe to all + * @throws ARIException when error + */ + public void eventsCallback(AriCallback callback, boolean subscribeAll) throws ARIException { + if (liveActionEvent != null) { + throw new ARIException("Websocket already present"); + } + EventsEventWebsocketGetRequest eventsRequest = events().eventWebsocket(appName); + try { + if (subscribeAll) eventsRequest.setSubscribeAll(true); + } catch (UnsupportedOperationException e) { + logger.warn(e.getMessage(), e); + } + eventsRequest.execute(callback); + } + + + /** + * Gets an instance of a message queue + * + * @return MessageQueue + * @throws ARIException when error + */ + public MessageQueue getWebsocketQueue() throws ARIException { + return getWebsocketQueue(false); + } + + /** + * In order to avoid multi-threading for users, you can get a + * MessageQueue object and poll on it for new messages. + * This makes sure you don't really need to synchonize or be worried by + * threading issues + * + * @param subscribeAll subscribe to all events + * @return The MQ connected to your websocket. + * @throws ARIException when error + */ + public MessageQueue getWebsocketQueue(boolean subscribeAll) throws ARIException { + final MessageQueue q = new MessageQueue(); + AriCallback callback = new AriCallback() { + @Override + public void onSuccess(Message result) { + q.queue(result); + } + + @Override + public void onFailure(RestException e) { + q.queueError("Err:" + e.getMessage()); + } + }; + eventsCallback(callback, subscribeAll); + return q; + } + + /** + * Gets a ready to use Applications Action. + * + * @return ActionApplications + */ + public ActionApplications applications() { + return (ActionApplications) setupAction(getVersion().builder().actionApplications()); + } + + /** + * Gets a ready to use Asterisk Action. + * + * @return ActionAsterisk + */ + public ActionAsterisk asterisk() { + return (ActionAsterisk) setupAction(getVersion().builder().actionAsterisk()); + } + + /** + * Gets a ready to use Bridges Action. + * + * @return ActionBridges + */ + public ActionBridges bridges() { + return (ActionBridges) setupAction(getVersion().builder().actionBridges()); + } + + /** + * Gets a ready to use Channels Action. + * + * @return ActionChannels + */ + public ActionChannels channels() { + return (ActionChannels) setupAction(getVersion().builder().actionChannels()); + } + + /** + * Gets a ready to use Device States Action. + * + * @return ActionDeviceStates + */ + public ActionDeviceStates deviceStates() { + return (ActionDeviceStates) setupAction(getVersion().builder().actionDeviceStates()); + } + + /** + * Gets a ready to use Endpoints Action. + * + * @return ActionEndpoints + */ + public ActionEndpoints endpoints() { + return (ActionEndpoints) setupAction(getVersion().builder().actionEndpoints()); + } + + /** + * Gets a ready to use Events Action. + * + * @return ActionEvents + */ + public ActionEvents events() { + liveActionEvent = (ActionEvents) setupAction(getVersion().builder().actionEvents()); + return liveActionEvent; + } + + /** + * Gets a ready to use Mailboxes Action. + * + * @return ActionMailboxes + */ + public ActionMailboxes mailboxes() { + return (ActionMailboxes) setupAction(getVersion().builder().actionMailboxes()); + } + + /** + * Gets a ready to use Playbacks Action. + * + * @return ActionPlaybacks + */ + public ActionPlaybacks playbacks() { + return (ActionPlaybacks) setupAction(getVersion().builder().actionPlaybacks()); + } + + /** + * Gets a ready to use Recordings Action. + * + * @return ActionRecordings + */ + public ActionRecordings recordings() { + return (ActionRecordings) setupAction(getVersion().builder().actionRecordings()); + } + + /** + * Gets a ready to use Sounds Action. + * + * @return ActionSounds + */ + public ActionSounds sounds() { + return (ActionSounds) setupAction(getVersion().builder().actionSounds()); + } + + /** + * Checks if a BaseAriAction and sets the base properties + * + * @param a the action object + * @return an Action object on which we'll set the default clients. + * @throws IllegalArgumentException when error + */ + private Object setupAction(Object a) { + if (a instanceof BaseAriAction) { + BaseAriAction action = (BaseAriAction) a; + if (httpClient == null || wsClient == null) { + throw new IllegalArgumentException("ARI possibly shutdown or not setup"); + } + action.setHttpClient(httpClient); + action.setWsClient(wsClient); + action.setLiveActionList(liveActionList); + } else { + throw new IllegalArgumentException("Object does not seem to be an Action implementation " + a.toString()); + } + return a; + } + + /** + * Wrapper of the Thread.sleep() to avoid exception. + * + * @param ms how long is it going to sleep. + */ + public static void sleep(long ms) { + try { + Thread.sleep(ms); + } catch (InterruptedException e) {//NOSONAR + logger.warn("Interrupted: {}", e.getMessage(), e); + } + } + + /** + * Generates a pseudo-random ID like "a4j.ZH6IA.IXEX0.TUIE8". + * + * @return the UID + */ + public static String getUID() { + StringBuilder sb = new StringBuilder(20); + sb.append("a4j"); + for (int n = 0; n < 15; n++) { + if ((n % 5) == 0) { + sb.append("."); + } + int pos = random.nextInt(ALLOWED_IN_UID.length()); + sb.append(ALLOWED_IN_UID.charAt(pos)); + } + return sb.toString(); + } + + /** + * Subscribes to an event source. + * + * @param m event + * @return the Application object + * @throws RestException when error + */ + public Application subscribe(EventSource m) throws RestException { + return subscriptions.subscribe(this, m); + } + + /** + * Unsubscribes from an event source. + * + * @param m event + * @throws RestException when error + */ + public void unsubscribe(EventSource m) throws RestException { + subscriptions.unsubscribe(this, m); + } + + /** + * Unsubscribes from all known subscriptions. + * + * @throws RestException when error + */ + public void unsubscribeAll() throws RestException { + subscriptions.unsubscribeAll(this); + } + + /** + * Gets the package information an + * + * @return String + */ + public String getBuildVersion() { + String buildVersion = "x"; + try { + if (getClass().getPackage().getImplementationVersion() != null) { + buildVersion = getClass().getPackage().getImplementationVersion(); + } + } catch (Exception e) { + // oh well + } + InputStream stream = null; + try { + stream = getClass().getClassLoader().getResourceAsStream("build.properties"); + if (stream != null) { + Properties p = new Properties(); + p.load(stream); + final String prop = "BUILD_NUMBER"; + if (p.containsKey(prop) && p.getProperty(prop) != null && + !"x".equalsIgnoreCase(p.getProperty(prop))) { + buildVersion += " (Build: " + p.getProperty(prop) + ")"; + } + } + } catch (IOException e) { + // oh well + } finally { + if (stream != null) { + try { + stream.close(); + } catch (IOException e) { + // oh well + } + } + } + return buildVersion; + } + + /** + * This interface is used to go from an interface to its concrete implementation. + */ + public interface ClassFactory { + public Class getImplementationFor(Class interfaceClass); + } + + /** + * Is the Websocket is connected + * @return true if connected + */ + public boolean isWsConnected() { + if (wsClient != null) { + return wsClient.isWsConnected(); + } + return false; + } +} diff --git a/src/main/java/ch/loway/oss/ari4java/ARIRuntimeException.java b/src/main/java/ch/loway/oss/ari4java/ARIRuntimeException.java new file mode 100755 index 00000000..09ed6843 --- /dev/null +++ b/src/main/java/ch/loway/oss/ari4java/ARIRuntimeException.java @@ -0,0 +1,19 @@ +package ch.loway.oss.ari4java; + +public class ARIRuntimeException extends RuntimeException { + + private static final long serialVersionUID = 1L; + + public ARIRuntimeException(String message) { + super(message); + } + + public ARIRuntimeException(Throwable t) { + super(t.getMessage(), t); + } + + public ARIRuntimeException(String message, Throwable t) { + super(message, t); + } + +} diff --git a/src/main/java/ch/loway/oss/ari4java/AriFactory.java b/src/main/java/ch/loway/oss/ari4java/AriFactory.java new file mode 100755 index 00000000..266de57f --- /dev/null +++ b/src/main/java/ch/loway/oss/ari4java/AriFactory.java @@ -0,0 +1,115 @@ +package ch.loway.oss.ari4java; + +import ch.loway.oss.ari4java.tools.http.NettyHttpClient; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.net.URISyntaxException; + +/** + * This class is a placeholder for convenience factory methods. + * + * @author lenz + */ +public class AriFactory { + + static NettyHttpClient nettyHttpClient = null; + + /** + * Your default HTTP connector through Netty (without app). + * + * @param uri uri + * @param login login + * @param pass pass + * @param version version + * @return a ready-to-use connector. + * @throws URISyntaxException when error + */ + public static ARI nettyHttp(String uri, String login, String pass, AriVersion version) throws URISyntaxException { + return nettyHttp(uri, login, pass, version, ""); + } + + /** + * This connects to an application. + * + * @param uri uri + * @param login login + * @param pass pass + * @param version version + * @param app app + * @return your ready-to-use connector. + * @throws URISyntaxException when error + */ + public static ARI nettyHttp(String uri, String login, String pass, AriVersion version, String app) throws URISyntaxException { + return nettyHttp(uri, login, pass, version, app, true); + } + + /** + * This connects to an application. + * If the version is set as IM_FEELING_LUCKY the AriFactory will determine the version by 1st connecting + * to the server and requesting the resources.json to extract the version number. + * + * @param uri uri + * @param login login + * @param pass pass + * @param version version + * @param app app + * @param testConnection testConnection + * @return your ready-to-use connector. + * @throws URISyntaxException when error + */ + public static ARI nettyHttp(String uri, String login, String pass, AriVersion version, String app, boolean testConnection) throws URISyntaxException { + NettyHttpClient client; + if (nettyHttpClient != null) { + client = nettyHttpClient; + } else { + client = new NettyHttpClient(); + client.initialize(uri, login, pass); + } + ARI ari = new ARI(); + ari.setAppName(app); + ari.setHttpClient(client); + ari.setWsClient(client); + if (AriVersion.IM_FEELING_LUCKY.equals(version)) { + ari.setVersion(detectAriVersion(client)); + } else { + ari.setVersion(version); + } + try { + int majorVer = Integer.parseInt(ari.getVersion().version().split("\\.")[0]); + // ping was added in version 5 (Asterisk 16) and back ported to some... I'm only including 1.10.2 (Asterisk 13) from the back port... + if (testConnection && (majorVer >= 5 || AriVersion.ARI_1_10_2.equals(version))) { + ari.asterisk().ping(); + } + } catch (Exception e) { + throw new RuntimeException("Failed to test connection: " + e.getMessage(), e); + } + return ari; + } + + /** + * Connect and detect the current ARI version. + * If the ARI version is not supported, + * will raise an exception as we have no bindings for it. + * + * @param client an instance of the NettyHttpClient + * @return the version of your server + * @throws RuntimeException if the version is not supported + */ + protected static AriVersion detectAriVersion(NettyHttpClient client) { + try { + String response = client.httpActionSync("/api-docs/resources.json", "GET", null, null, null); + if (response != null && !response.isEmpty()) { + ObjectMapper mapper = new ObjectMapper(); + JsonNode jsonNode = mapper.reader().readTree(response); + if (jsonNode.has("apiVersion")) { + return AriVersion.fromVersionString(jsonNode.get("apiVersion").asText()); + } + } + throw new RuntimeException("Could find apiVersion"); + } catch (Exception e) { + throw new RuntimeException(e.getMessage(), e); + } + } + +} diff --git a/src/main/java/ch/loway/oss/ari4java/AriSubscriber.java b/src/main/java/ch/loway/oss/ari4java/AriSubscriber.java new file mode 100755 index 00000000..765359e8 --- /dev/null +++ b/src/main/java/ch/loway/oss/ari4java/AriSubscriber.java @@ -0,0 +1,68 @@ +package ch.loway.oss.ari4java; + +import ch.loway.oss.ari4java.generated.models.*; +import ch.loway.oss.ari4java.tools.RestException; +import ch.loway.oss.ari4java.tools.tags.EventSource; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author lenz + */ +public class AriSubscriber { + + List subscriptions = new ArrayList<>(); + + public Application subscribe(ARI ari, EventSource m) throws RestException { + + String model = toModelName(m); + Application a = ari.applications().subscribe(ari.getAppName(), model).execute(); + subscriptions.add(model); + return a; + } + + public void unsubscribe(ARI ari, EventSource m) throws RestException { + String model = toModelName(m); + ari.applications().unsubscribe(ari.getAppName(), model); + subscriptions.remove(model); + } + + public void unsubscribeAll(ARI ari) throws RestException { + for (String model : subscriptions) { + ari.applications().unsubscribe(ari.getAppName(), model); + } + subscriptions.clear(); + } + + /** + * Return the correct string "modeltype:id". + *

+ * See + * channel:{channelId}, + * bridge:{bridgeId}, + * endpoint:{tech}[/{resource}, + * deviceState:{deviceName} + * + * @param m event + * @return a string representation, e.g. "channel:1234" + */ + public String toModelName(EventSource m) { + if (m instanceof Bridge) { + Bridge b = (Bridge) m; + return "bridge:" + b.getId(); + } else if (m instanceof Channel) { + Channel b = (Channel) m; + return "channel:" + b.getId(); + } else if (m instanceof Endpoint) { + Endpoint b = (Endpoint) m; + return "endpoint:" + b.getTechnology() + "/" + b.getResource(); + } else if (m instanceof DeviceState) { + DeviceState b = (DeviceState) m; + return "deviceState:" + b.getName(); + } else { + throw new IllegalArgumentException("Cannot subscribe model " + m.getClass().getName()); + } + } + +} diff --git a/src/main/java/ch/loway/oss/ari4java/tools/ARIEncoder.java b/src/main/java/ch/loway/oss/ari4java/tools/ARIEncoder.java new file mode 100755 index 00000000..435441b3 --- /dev/null +++ b/src/main/java/ch/loway/oss/ari4java/tools/ARIEncoder.java @@ -0,0 +1,43 @@ +package ch.loway.oss.ari4java.tools; + +import io.netty.buffer.ByteBuf; +import io.netty.buffer.Unpooled; +import io.netty.handler.codec.base64.Base64; + +import java.net.URLEncoder; +import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; + +public class ARIEncoder { + + public final static Charset ENCODING = StandardCharsets.UTF_8; + + /** + * Exception safe way to encode url parts + * @param url the part to encode + * @return a encoded string + */ + public static String encodeUrl(String url) { + try { + return URLEncoder.encode(url, ARIEncoder.ENCODING); + } catch (Exception e) { + // this should happen, but if so return the input + return url; + } + } + + public static String encodeCreds(String username, String password) { + ByteBuf buf1 = Unpooled.copiedBuffer(username + ":" + password, ARIEncoder.ENCODING); + try { + ByteBuf buf2 = Base64.encode(buf1, false); + try { + return "Basic " + buf2.toString(ARIEncoder.ENCODING); + } finally { + buf2.release(); + } + } finally { + buf1.release(); + } + } + +} diff --git a/src/main/java/ch/loway/oss/ari4java/tools/ARIException.java b/src/main/java/ch/loway/oss/ari4java/tools/ARIException.java new file mode 100755 index 00000000..420c9027 --- /dev/null +++ b/src/main/java/ch/loway/oss/ari4java/tools/ARIException.java @@ -0,0 +1,19 @@ +package ch.loway.oss.ari4java.tools; + +public class ARIException extends Exception { + + private static final long serialVersionUID = 1L; + + public ARIException(String message) { + super(message); + } + + public ARIException(Throwable t) { + super(t.getMessage(), t); + } + + public ARIException(String message, Throwable t) { + super(message, t); + } + +} diff --git a/src/main/java/ch/loway/oss/ari4java/tools/AriAsyncHandler.java b/src/main/java/ch/loway/oss/ari4java/tools/AriAsyncHandler.java new file mode 100755 index 00000000..1fa049ed --- /dev/null +++ b/src/main/java/ch/loway/oss/ari4java/tools/AriAsyncHandler.java @@ -0,0 +1,100 @@ + +package ch.loway.oss.ari4java.tools; + +import com.fasterxml.jackson.core.type.TypeReference; + +/** + * Delegate for handling asynchronous ARI responses. + * + * + */ +public class AriAsyncHandler implements HttpResponseHandler { + private final AriCallback callback; + private Class klazz; + private TypeReference klazzType; + private long lastResponseTime = 0; + + public AriAsyncHandler(AriCallback callback, Class klazz) { + this.callback = callback; + this.klazz = klazz; + } + + public AriAsyncHandler(AriCallback callback, TypeReference klazzType) { + this.callback = callback; + this.klazzType = klazzType; + } + + public AriCallback getCallback() { + return callback; + } + + void handleResponse(String json) { + try { + T result; + if (Void.class.equals(klazz)) { + result = null; + } else if (klazz != null) { + result = BaseAriAction.deserializeJson(json, klazz); + } else { + result = BaseAriAction.deserializeJson(json, klazzType); + } + this.callback.onSuccess(result); + } catch (RestException e) { + this.callback.onFailure(e); + } + } + + @Override + public void onChReadyToWrite() { + lastResponseTime = System.currentTimeMillis(); + connectionEvent(AriConnectionEvent.WS_CONNECTED); + } + + private void connectionEvent(AriConnectionEvent event) { + if (this.callback instanceof AriWSCallback) { + ((AriWSCallback) this.callback).onConnectionEvent(event); + } + } + + @Override + public void onResponseReceived() { + lastResponseTime = System.currentTimeMillis(); + } + + @Override + public void onDisconnect() { + connectionEvent(AriConnectionEvent.WS_DISCONNECTED); + } + + @Override + public void onSuccess(String response) { + handleResponse(response); + } + + @Override + public void onSuccess(byte[] response) { + this.callback.onSuccess((T) response); + } + + @Override + public void onFailure(Throwable e) { + if (e instanceof RestException) { + this.callback.onFailure((RestException) e); + } else { + this.callback.onFailure(new RestException(e)); + } + } + + @Override + public long getLastResponseTime() { + return lastResponseTime; + } + + @Override + public Class getType() { + return klazz; + } +} + +// $Log$ +// diff --git a/classes/ch/loway/oss/ari4java/tools/AriCallback.java b/src/main/java/ch/loway/oss/ari4java/tools/AriCallback.java old mode 100644 new mode 100755 similarity index 100% rename from classes/ch/loway/oss/ari4java/tools/AriCallback.java rename to src/main/java/ch/loway/oss/ari4java/tools/AriCallback.java diff --git a/src/main/java/ch/loway/oss/ari4java/tools/AriConnectionEvent.java b/src/main/java/ch/loway/oss/ari4java/tools/AriConnectionEvent.java new file mode 100755 index 00000000..50bf5248 --- /dev/null +++ b/src/main/java/ch/loway/oss/ari4java/tools/AriConnectionEvent.java @@ -0,0 +1,6 @@ +package ch.loway.oss.ari4java.tools; + +public enum AriConnectionEvent { + WS_CONNECTED, + WS_DISCONNECTED; +} diff --git a/src/main/java/ch/loway/oss/ari4java/tools/AriWSCallback.java b/src/main/java/ch/loway/oss/ari4java/tools/AriWSCallback.java new file mode 100755 index 00000000..c3360535 --- /dev/null +++ b/src/main/java/ch/loway/oss/ari4java/tools/AriWSCallback.java @@ -0,0 +1,10 @@ +package ch.loway.oss.ari4java.tools; + +/** + * Callback interface for WS ARI operations + * + * @param The type of result returned in callback + */ +public interface AriWSCallback extends AriCallback { + void onConnectionEvent(AriConnectionEvent event); +} diff --git a/src/main/java/ch/loway/oss/ari4java/tools/BaseAriAction.java b/src/main/java/ch/loway/oss/ari4java/tools/BaseAriAction.java new file mode 100755 index 00000000..64bbffef --- /dev/null +++ b/src/main/java/ch/loway/oss/ari4java/tools/BaseAriAction.java @@ -0,0 +1,335 @@ +package ch.loway.oss.ari4java.tools; + +import ch.loway.oss.ari4java.generated.models.Message; +import ch.loway.oss.ari4java.tools.WsClient.WsClientConnection; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.deser.DeserializationProblemHandler; +import com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.IOException; +import java.util.*; + +/** + * Base functionality for ARI actions + *

+ * Provides asynchronous and synchronous methods for forwarding requests to the + * HTTP or WebSocket server. + *

+ * Provides serialize/deserialize interface for JSON encoded objects + * + * @author lenz + * @author mwalton + */ +public class BaseAriAction { + + private static Logger logger = LoggerFactory.getLogger(BaseAriAction.class); + + public static class AriRequest { + private List queryParams = new ArrayList<>(); + private Map bodyFields = new HashMap<>(); + private List lE = new ArrayList<>(); + private String url; + private String method; + private boolean wsUpgrade = false; + + public AriRequest(String url, String method) { + this.url = url; + this.method = method; + } + + public void addParamQuery(HttpParam param) { + queryParams.add(param); + } + + public void setBodyField(String field, Object value) { + if ("fields".equals(field) && value instanceof Map) { + ArrayList> list = new ArrayList<>(); + Iterator> entryIterator = ((Map) value).entrySet().iterator(); + while (entryIterator.hasNext()) { + Map.Entry item = entryIterator.next(); + Map f = new HashMap<>(); + f.put("attribute", item.getKey()); + f.put("value", item.getValue()); + list.add(f); + } + bodyFields.put(field, list); + } else { + bodyFields.put(field, value); + } + } + + public void addErrorResponse(HttpResponse res) { + lE.add(res); + } + + public void setWsUpgrade(boolean wsUpgrade) { + this.wsUpgrade = wsUpgrade; + } + } + + // Shared ObjectMapper + private static final ObjectMapper mapper = new ObjectMapper(); + + private String forcedResponse = null; + private HttpClient httpClient; + private WsClient wsClient; + protected WsClientConnection wsConnection; + private List liveActionList; + + /** + * Exception safe way to encode url parts + * + * @param urlPart the part to encode + * @return a encoded string + * @see ARIEncoder#ENCODING + */ + protected String encodeUrlPart(String urlPart) { + return ARIEncoder.encodeUrl(urlPart); + } + + /** + * Initiate synchronous HTTP interaction with server + * + * @param request the request object + * @return Response from server + * @throws RestException when error + */ + protected synchronized String httpActionSync(AriRequest request) throws RestException { + if (forcedResponse != null) { + return forcedResponse; + } else { + if (httpClient == null) { + throw new RestException("HTTP client implementation not set"); + } else { + return httpClient.httpActionSync(request.url, request.method, request.queryParams, serializeToJson(request.bodyFields), request.lE); + } + } + } + + /** + * Initiate synchronous HTTP interaction with server + * + * @param request the request object + * @return Response from server + * @throws RestException when error + */ + protected synchronized byte[] httpActionSyncAsBytes(AriRequest request) throws RestException { + if (httpClient == null) { + throw new RestException("HTTP client implementation not set"); + } else { + return httpClient.httpActionSyncAsBytes(request.url, request.method, request.queryParams, serializeToJson(request.bodyFields), request.lE); + } + } + + /** + * Initiate asynchronous HTTP or WebSocket interaction with server + * + * @param request the request object + * @param asyncHandler the handler + */ + private synchronized void httpActionAsync(AriRequest request, AriAsyncHandler asyncHandler) { + if (forcedResponse != null) { + asyncHandler.handleResponse(forcedResponse); + } else if (request.wsUpgrade) { + // Websocket connection + if (wsClient == null) { + asyncHandler.getCallback().onFailure(new RestException("WebSocket client implementation not set")); + return; + } + if (wsConnection != null) { + asyncHandler.getCallback().onFailure(new RestException("This action is already connected to a WebSocket")); + return; + } + try { + wsConnection = wsClient.connect(asyncHandler, request.url, request.queryParams); + liveActionList.add(this); + } catch (RestException e) { + asyncHandler.getCallback().onFailure(e); + } + } else if (httpClient == null) { + asyncHandler.getCallback().onFailure(new RestException("HTTP client implementation not set")); + } else { + try { + boolean binary = byte[].class.equals(asyncHandler.getType()); + httpClient.httpActionAsync(request.url, request.method, request.queryParams, serializeToJson(request.bodyFields), request.lE, asyncHandler, binary); + } catch (RestException e) { + asyncHandler.getCallback().onFailure(e); + } + } + } + + // Different styled asynchronous methods + protected void httpActionAsync(AriRequest request, AriCallback callback) { + httpActionAsync(request, new AriAsyncHandler(callback, Void.class)); + } + + protected void httpActionAsync(AriRequest request, AriCallback callback, Class klazz) { + httpActionAsync(request, new AriAsyncHandler(callback, klazz)); + } + + protected void httpActionAsync( + AriRequest request, AriCallback> callback, TypeReference> klazzType) { + httpActionAsync(request, new AriAsyncHandler(callback, klazzType)); + } + + /** + * Serialize an object to json + * + * @param obj the Object + * @return String + */ + public static String serializeToJson(Object obj) { + if (obj == null) { + return null; + } + if (obj instanceof Map && ((Map) obj).size() == 0) { + return null; + } + try { + return mapper.writeValueAsString(obj); + } catch (IOException e) { + throw new RuntimeException("Encoding JSON: " + e.getMessage(), e); + } + } + + /** + * Deserialize a type + * + * @param json the json string + * @param klazz the class to deserialize to + * @param the class to deserialize to + * @return Deserialized type + * @throws RestException when fail to deserialize + */ + public static T deserializeJson(String json, Class klazz) throws RestException { + try { + return mapper.readValue(json, klazz); + } catch (IOException e) { + throw new RestException("Decoding JSON: " + e.getMessage(), e); + } + } + + /** + * Deserialize a list + * + * @param json the json string + * @param klazzType the class to deserialize to + * @param the class to deserialize to + * @return The deserialized list + * @throws RestException when fail to deserialize + */ + public static T deserializeJson(String json, TypeReference klazzType) throws RestException { + try { + return mapper.readValue(json, klazzType); + } catch (IOException e) { + throw new RestException("Decoding JSON list: " + e.getMessage(), e); + } + } + + /** + * Deserialize an object as a list of interface. Class erasure in Java plain + * sucks, I tell ya. + *

+ * In theory we should be safe given the condition that A extends C. I hope + * at least. This is bug #17 - Avoid Lists of ? extends something + * + * @param The abstract type for members of the list. + * @param The concrete type for members of the list. + * @param json Data in + * @param refConcreteType The reference concrete type, should be a List<C> + * @return a list of A's + * @throws RestException when fail to deserialize + */ + public static List deserializeJsonAsAbstractList(String json, TypeReference> refConcreteType) throws RestException { + try { + List lC = mapper.readValue(json, refConcreteType); + List lA = (List) lC; + return lA; + } catch (IOException e) { + throw new RestException("Decoding JSON list: " + e.getMessage(), e); + } + } + + /** + * Deserialize the event. + * + * @param json the json string + * @param klazz the class to deserialize to + * @return The event deserialized. + * @throws RestException when fail to deserialize + */ + public static Message deserializeEvent(String json, Class klazz) throws RestException { + try { + return (Message) mapper.readValue(json, klazz); + } catch (IOException e) { + throw new RestException("Decoding JSON event: " + e.getMessage(), e); + } + } + + /** + * Close the WebSocket connection + * + * @throws RestException when fail + */ + public synchronized void disconnectWs() throws RestException { + if (wsConnection != null) { + liveActionList.remove(this); + wsConnection.disconnect(); + } + wsConnection = null; + } + + public synchronized void setHttpClient(HttpClient httpClient) { + this.httpClient = httpClient; + } + + public synchronized HttpClient getHttpClient() { + return this.httpClient; + } + + public synchronized void setWsClient(WsClient wsClient) { + this.wsClient = wsClient; + } + + public synchronized WsClient getWsClient() { + return this.wsClient; + } + + public synchronized void setLiveActionList(List liveActionList) { + this.liveActionList = liveActionList; + } + + public synchronized List getLiveActionList() { + return this.liveActionList; + } + + public synchronized void setForcedResponse(String forcedResponse) { + this.forcedResponse = forcedResponse; + } + + public synchronized String getForcedResponse() { + return this.forcedResponse; + } + + public static void setObjectMapperLessStrict() { + mapper.addHandler(new DeserializationProblemHandler() { + @Override + public boolean handleUnknownProperty(DeserializationContext ctxt, JsonParser p, JsonDeserializer deserializer, Object beanOrClass, String propertyName) throws IOException { + Collection propIds = (deserializer == null) ? null : deserializer.getKnownPropertyNames(); + UnrecognizedPropertyException e = UnrecognizedPropertyException.from(p, beanOrClass, propertyName, propIds); + logger.warn(e.toString()); + return e.toString().length() > 0; + } + }); + } +} + +// + diff --git a/src/main/java/ch/loway/oss/ari4java/tools/HttpClient.java b/src/main/java/ch/loway/oss/ari4java/tools/HttpClient.java new file mode 100755 index 00000000..44401a8a --- /dev/null +++ b/src/main/java/ch/loway/oss/ari4java/tools/HttpClient.java @@ -0,0 +1,20 @@ +package ch.loway.oss.ari4java.tools; + +import java.util.List; + +/** + * Interface to pluggable HTTP client implementation + * + * @author mwalton + */ +public interface HttpClient { + + String httpActionSync(String uri, String method, List parametersQuery, String body, List errors) throws RestException; + + byte[] httpActionSyncAsBytes(String uri, String method, List parametersQuery, String body, List errors) throws RestException; + + void httpActionAsync(String uri, String method, List parametersQuery, String body, List errors, HttpResponseHandler responseHandler, boolean binary) throws RestException; + + void destroy(); + +} diff --git a/src/main/java/ch/loway/oss/ari4java/tools/HttpParam.java b/src/main/java/ch/loway/oss/ari4java/tools/HttpParam.java new file mode 100755 index 00000000..364c0a03 --- /dev/null +++ b/src/main/java/ch/loway/oss/ari4java/tools/HttpParam.java @@ -0,0 +1,70 @@ + +package ch.loway.oss.ari4java.tools; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +/** + * + * @author lenz + */ +public class HttpParam { + private String name; + private String value; + + public static HttpParam build(String n, String v) { + HttpParam p = new HttpParam(); + p.setName(n); + p.setValue(v); + return p; + } + + public static List build(String key, Map variables) { + ArrayList vars = new ArrayList<>(); + vars.add(build("key", key)); + if (variables != null) { + for (Map.Entry entry : variables.entrySet()) { + vars.add(build(entry.getKey(), entry.getValue())); + } + } + return vars; + } + + public static HttpParam build(String n, Integer v) { + if (null == v) + return build(n, (String)null); + return build(n, Integer.toString(v)); + } + + public static HttpParam build(String n, Long v) { + if (null == v) + return build(n, (String)null); + return build(n, Long.toString(v)); + } + + public static HttpParam build(String n, Boolean v) { + if (null == v) + return build(n, (String)null); + return build(n, Boolean.TRUE.equals(v) ? "true" : "false"); + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } +} + +// $Log$ +// diff --git a/src/main/java/ch/loway/oss/ari4java/tools/HttpResponse.java b/src/main/java/ch/loway/oss/ari4java/tools/HttpResponse.java new file mode 100755 index 00000000..41a5b1a1 --- /dev/null +++ b/src/main/java/ch/loway/oss/ari4java/tools/HttpResponse.java @@ -0,0 +1,35 @@ + +package ch.loway.oss.ari4java.tools; + +/** + * + * @author lenz + */ +public class HttpResponse { + private int code = 0; + private String description = ""; + + public static HttpResponse build(int code, String descr) { + HttpResponse r = new HttpResponse(); + r.setCode(code); + r.setDescription(descr); + return r; + } + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } +} + diff --git a/src/main/java/ch/loway/oss/ari4java/tools/HttpResponseHandler.java b/src/main/java/ch/loway/oss/ari4java/tools/HttpResponseHandler.java new file mode 100755 index 00000000..5dff11c0 --- /dev/null +++ b/src/main/java/ch/loway/oss/ari4java/tools/HttpResponseHandler.java @@ -0,0 +1,59 @@ +package ch.loway.oss.ari4java.tools; + +/** + * Interface to implementation that can handle HTTP responses + * + * @author mwalton + */ +public interface HttpResponseHandler { + + /** + * Client started rending response. + */ + void onChReadyToWrite(); + + /** + * Server finished sending response + */ + void onResponseReceived(); + + /** + * WebSocket disconnected + */ + void onDisconnect(); + + /** + * All went well. + * + * @param response res + */ + void onSuccess(String response); + + /** + * All went well. + * + * @param response res + */ + void onSuccess(byte[] response); + + /** + * Something bad happened. + * + * @param e exception + */ + void onFailure(Throwable e); + + /** + * The last time in epoch since last response + * + * @return epoch + */ + long getLastResponseTime(); + + /** + * To determine if String or Binary response + * + * @return the class + */ + Class getType(); +} diff --git a/classes/ch/loway/oss/ari4java/tools/MessageQueue.java b/src/main/java/ch/loway/oss/ari4java/tools/MessageQueue.java old mode 100644 new mode 100755 similarity index 76% rename from classes/ch/loway/oss/ari4java/tools/MessageQueue.java rename to src/main/java/ch/loway/oss/ari4java/tools/MessageQueue.java index 102b2a3e..6e88fe16 --- a/classes/ch/loway/oss/ari4java/tools/MessageQueue.java +++ b/src/main/java/ch/loway/oss/ari4java/tools/MessageQueue.java @@ -2,7 +2,7 @@ package ch.loway.oss.ari4java.tools; import ch.loway.oss.ari4java.ARI; -import ch.loway.oss.ari4java.generated.Message; +import ch.loway.oss.ari4java.generated.models.Message; import java.util.LinkedList; import java.util.List; @@ -14,14 +14,13 @@ */ public class MessageQueue { - public List lEvents = new LinkedList(); + private final List lEvents = new LinkedList(); /** * Adds a message to the queue. * - * @param msg + * @param msg the message */ - public synchronized void queue( Message msg ) { lEvents.add(msg); } @@ -29,9 +28,8 @@ public synchronized void queue( Message msg ) { /** * Adds an error to the queue, using a specilized message pleceholder. * - * @param error + * @param error the error */ - public void queueError( String error ) { ErrorMessage err = new ErrorMessage(); err.setType(error); @@ -44,7 +42,6 @@ public void queueError( String error ) { * * @return the message just removed. */ - public synchronized Message dequeue() { if ( lEvents.isEmpty() ) { return null; @@ -60,11 +57,10 @@ public synchronized Message dequeue() { * a 'max' of ms polling every 'interval' ms. * This method in NOT synchronized - it only locks when calling dequeue(). * - * @param max - * @param interval + * @param max max + * @param interval interval * @return the message. */ - public Message dequeueMax( int max, int interval ) { long endAfter = System.currentTimeMillis() + max; while ( System.currentTimeMillis() < endAfter ) { @@ -79,10 +75,9 @@ public Message dequeueMax( int max, int interval ) { } - /* - * How many messages are queued? + /** + * @return How many messages are queued */ - public synchronized int size() { return lEvents.size(); } @@ -91,22 +86,31 @@ public synchronized int size() { * A placeholder for error messages. * */ - - public static class ErrorMessage implements Message { String type = ""; + String asterisk_id = ""; + @Override public void setType(String val) { - type=val; + this.type=val; } + @Override public String getType() { - return type; + return this.type; + } + + @Override + public void setAsterisk_id(String val) { + this.asterisk_id = val; + } + + @Override + public String getAsterisk_id() { + return this.asterisk_id; } } } -// $Log$ -// diff --git a/src/main/java/ch/loway/oss/ari4java/tools/RestException.java b/src/main/java/ch/loway/oss/ari4java/tools/RestException.java new file mode 100755 index 00000000..48e5df25 --- /dev/null +++ b/src/main/java/ch/loway/oss/ari4java/tools/RestException.java @@ -0,0 +1,109 @@ +package ch.loway.oss.ari4java.tools; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; + +/** + * A REST error. + * Made it inherit from ARIException so that you can trap ony one exception. + * + * @author lenz + */ +public class RestException extends ARIException { + + private static final ObjectMapper mapper = new ObjectMapper(); + private static final long serialVersionUID = 1L; + private final int code; + private final String message; + private final String response; + + public RestException(String s) { + super(s); + message = s; + response = ""; + code = 0; + } + + public RestException(String s, int code) { + super(s); + response = s; + message = extractError(s); + this.code = code; + } + + public RestException(String s, String r, int code) { + super(s); + this.code = code; + response = r; + String msg = extractError(r); + if (msg != null && !msg.equals(r)) { + message = msg; + } else { + message = extractError(s); + } + } + + public RestException(Throwable cause) { + super(cause); + message = cause.toString(); + response = ""; + code = 0; + } + + public RestException(String s, Throwable cause) { + super(s, cause); + message = s; + response = ""; + code = 0; + } + + /** + * parse the response and extract the "message" or "error" property + * @param s + * @return + */ + private String extractError(String s) { + if (s != null && s.indexOf("{") == 0) { + try { + JsonNode jsonNode = mapper.readTree(s); + if (jsonNode.has("message")) { + return jsonNode.get("message").asText(); + } else if (jsonNode.has("error")) { + return jsonNode.get("error").asText(); + } + } catch (JsonProcessingException e) { + // ignoring + } + } + return s; + } + + @Override + public String getMessage() { + return message; + } + + public int getCode() { + return code; + } + + public String getResponse() { + return response; + } + + @Override + public String toString() { + String s = getClass().getName(); + if (code != 0) { + s += ": (HTTP " + code + " Error)"; + } + if (message != null) { + if (code == 0) { + s += ":"; + } + s += " " + message; + } + return s; + } +} diff --git a/src/main/java/ch/loway/oss/ari4java/tools/WsClient.java b/src/main/java/ch/loway/oss/ari4java/tools/WsClient.java new file mode 100755 index 00000000..acec7d2a --- /dev/null +++ b/src/main/java/ch/loway/oss/ari4java/tools/WsClient.java @@ -0,0 +1,24 @@ +package ch.loway.oss.ari4java.tools; + +import java.util.List; + +/** + * Interface to pluggable WebSocket client implementation + * + * @author mwalton + */ +public interface WsClient { + + public interface WsClientConnection { + void disconnect() throws RestException; + } + + WsClientConnection connect(HttpResponseHandler callback, + String url, + List lParamQuery) throws RestException; + + void destroy(); + + boolean isWsConnected(); + +} diff --git a/src/main/java/ch/loway/oss/ari4java/tools/http/HTTPLogger.java b/src/main/java/ch/loway/oss/ari4java/tools/http/HTTPLogger.java new file mode 100755 index 00000000..483db4cc --- /dev/null +++ b/src/main/java/ch/loway/oss/ari4java/tools/http/HTTPLogger.java @@ -0,0 +1,92 @@ +package ch.loway.oss.ari4java.tools.http; + +import ch.loway.oss.ari4java.tools.ARIEncoder; +import io.netty.handler.codec.http.FullHttpRequest; +import io.netty.handler.codec.http.FullHttpResponse; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.Arrays; +import java.util.Map; + +public final class HTTPLogger { + + private HTTPLogger() { + throw new IllegalStateException("Utility class"); + } + + private static final Logger logger = LoggerFactory.getLogger(HTTPLogger.class); + + private static final int MAX_LEN = 1000; + + public static void traceRequest(FullHttpRequest request, String body) { + if (logger.isTraceEnabled()) { + StringBuilder data = new StringBuilder(); + data.append(request.method()); + data.append(" "); + data.append(request.uri()); + data.append(" "); + data.append(request.protocolVersion()); + data.append("\n"); + for (Map.Entry e: request.headers()) { + data.append(e.getKey()); + data.append(": "); + // replace authorization password + if ("authorization".equalsIgnoreCase(e.getKey())) { + data.append("*****"); + } else { + data.append(e.getValue()); + } + data.append("\n"); + } + if (body != null) { + data.append("\n"); + data.append(body); + } + logger.trace("HTTP Request:\n{}", data.toString().trim()); + } + } + + public static void traceResponse(FullHttpResponse response, byte[] responseBytes) { + if (logger.isTraceEnabled()) { + StringBuilder data = new StringBuilder(); + data.append(response.protocolVersion()); + data.append(" "); + data.append(response.status().toString()); + data.append("\n"); + for (Map.Entry e: response.headers()) { + data.append(e.getKey()); + data.append(": "); + data.append(e.getValue()); + data.append("\n"); + } + if (responseBytes != null) { + data.append("\n"); + if ("audio/wav".equals(response.headers().get("Content-Type"))) { + data.append("[binary data...]"); + } else { + int len = responseBytes.length; + if (len > MAX_LEN) { + len = MAX_LEN; + } + data.append(new String(Arrays.copyOf(responseBytes, len), ARIEncoder.ENCODING)); + if (responseBytes.length > MAX_LEN) { + data.append("[truncated...]"); + } + } + } + logger.trace("HTTP Response:\n{}", data.toString().trim()); + } + } + + public static void traceWebSocketFrame(String text) { + if (logger.isTraceEnabled()) { + if (text.length() > MAX_LEN) { + logger.trace("WS Frame:\n{}", text.substring(0, MAX_LEN)); + } else { + logger.trace("WS Frame:\n{}", text); + } + } + } + +} diff --git a/src/main/java/ch/loway/oss/ari4java/tools/http/NettyHttpClient.java b/src/main/java/ch/loway/oss/ari4java/tools/http/NettyHttpClient.java new file mode 100755 index 00000000..7626383a --- /dev/null +++ b/src/main/java/ch/loway/oss/ari4java/tools/http/NettyHttpClient.java @@ -0,0 +1,702 @@ +package ch.loway.oss.ari4java.tools.http; + +import ch.loway.oss.ari4java.tools.HttpResponse; +import ch.loway.oss.ari4java.tools.*; +import io.netty.bootstrap.Bootstrap; +import io.netty.buffer.ByteBuf; +import io.netty.buffer.PooledByteBufAllocator; +import io.netty.buffer.Unpooled; +import io.netty.channel.*; +import io.netty.channel.nio.NioIoHandler; +import io.netty.channel.pool.ChannelPool; +import io.netty.channel.pool.ChannelPoolHandler; +import io.netty.channel.pool.FixedChannelPool; +import io.netty.channel.socket.SocketChannel; +import io.netty.channel.socket.nio.NioSocketChannel; +import io.netty.handler.codec.http.*; +import io.netty.handler.codec.http.websocketx.*; +import io.netty.handler.logging.ByteBufFormat; +import io.netty.handler.logging.LogLevel; +import io.netty.handler.logging.LoggingHandler; +import io.netty.handler.ssl.SslContext; +import io.netty.handler.ssl.SslContextBuilder; +import io.netty.handler.ssl.util.InsecureTrustManagerFactory; +import io.netty.handler.timeout.ReadTimeoutHandler; +import io.netty.util.NettyRuntime; +import io.netty.util.concurrent.Future; +import io.netty.util.concurrent.FutureListener; +import io.netty.util.concurrent.ScheduledFuture; +import io.netty.util.internal.SystemPropertyUtil; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.net.ssl.SSLException; +import java.net.URI; +import java.net.URISyntaxException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicInteger; + +/** + * HTTP and WebSocket client implementation based on netty.io. + *

+ * Threading is handled by MultiThreadIoEventLoopGroup, which selects on multiple + * sockets and provides threads to handle the events on the sockets. + *

+ * Requires netty + * + * @author mwalton + */ +public class NettyHttpClient implements HttpClient, WsClient { + + public static final int CONNECTION_TIMEOUT_SEC = 10; + public static final int READ_TIMEOUT_SEC = 30; + public static final int MAX_HTTP_REQUEST = 16 * 1024 * 1024; // 16MB + public static final int MAX_HTTP_BIN_REQUEST = 150 * 1024 * 1024; // 150MB + + private static final String HTTP = "http"; + private static final String HTTPS = "https"; + private static final String HTTP_CODEC = "http-codec"; + private static final String HTTP_AGGREGATOR = "http-aggregator"; + private static final String HTTP_HANDLER = "http-handler"; + + private final Logger logger = LoggerFactory.getLogger(NettyHttpClient.class); + + protected Bootstrap httpBootstrap; + protected URI baseUri; + private EventLoopGroup group; + private EventLoopGroup shutDownGroup; + protected String auth; + + protected HttpResponseHandler wsCallback; + private String wsEventsUrl; + private List wsEventsParamQuery; + private WsClientConnection wsClientConnection; + private final AtomicInteger reconnectCount = new AtomicInteger(0); + private int maxReconnectCount = 10; // -1 = infinite reconnect attempts + private ChannelFuture wsChannelFuture; + private ScheduledFuture wsPingTimer = null; + private ScheduledFuture wsConnectionTimeout = null; + protected NettyWSClientHandler wsHandler; + protected ChannelFutureListener wsFuture; + private static SslContext sslContext; + + private int pongFailureCount = 0; + private long lastPong = 0; + private static boolean autoReconnect = true; + protected int pingPeriod = 5; + protected TimeUnit pingTimeUnit = TimeUnit.MINUTES; + protected ChannelPool pool; + private final int threadCount; + + public NettyHttpClient() { + // use at least 3 threads + threadCount = Math.min(3, SystemPropertyUtil.getInt( + "io.netty.eventLoopThreads", NettyRuntime.availableProcessors() * 2)); + logger.debug("Starting NioEventLoopGroup with {} threads", threadCount); + group = new MultiThreadIoEventLoopGroup(threadCount, NioIoHandler.newFactory()); + shutDownGroup = new MultiThreadIoEventLoopGroup(1, NioIoHandler.newFactory()); + } + + public void initialize(String baseUrl, String username, String password) throws URISyntaxException { + if (!baseUrl.endsWith("/")) { + baseUrl = baseUrl + "/"; + } + logger.debug("initialize url: {}, user: {}", baseUrl, username); + baseUri = new URI(baseUrl); + String protocol = baseUri.getScheme(); + if (!HTTP.equalsIgnoreCase(protocol) && !HTTPS.equalsIgnoreCase(protocol)) { + logger.warn("Not http(s), protocol: {}", protocol); + throw new IllegalArgumentException("Unsupported protocol: " + protocol); + } + this.auth = ARIEncoder.encodeCreds(username, password); + initHttpBootstrap(); + } + + protected void initHttpBootstrap() { + if (httpBootstrap == null) { + // Bootstrap is the factory for HTTP connections + logger.debug(""" + Bootstrap with + connection timeout: {}, + read timeout: {}, + aggregator max-length: {}""", + CONNECTION_TIMEOUT_SEC, + READ_TIMEOUT_SEC, + MAX_HTTP_REQUEST); + httpBootstrap = new Bootstrap(); + httpBootstrap.remoteAddress(baseUri.getHost(), getPort()); + httpBootstrap.group(group); + bootstrapOptions(httpBootstrap); + pool = new FixedChannelPool(httpBootstrap, new ChannelPoolHandler() { + @Override + public void channelCreated(Channel ch) throws Exception { + logger.trace("Channel Pool connection created: {}", ch); + ChannelPipeline pipeline = ch.pipeline(); + pipeline.addFirst("logger", new LoggingHandler(HTTPLogger.class, LogLevel.TRACE, ByteBufFormat.SIMPLE)); + addSSLIfRequired(pipeline, baseUri); + pipeline.addLast("read-timeout", new ReadTimeoutHandler(READ_TIMEOUT_SEC)); + pipeline.addLast(HTTP_CODEC, new HttpClientCodec()); + pipeline.addLast(HTTP_AGGREGATOR, new HttpObjectAggregator(MAX_HTTP_REQUEST)); + pipeline.addLast(HTTP_HANDLER, new NettyHttpClientHandler()); + logger.debug("pipeline names: {}", pipeline.names()); + ch.closeFuture().addListener(future -> logger.debug("Channel closed, {}", ch)); + } + + @Override + public void channelAcquired(Channel ch) { + logger.trace("Channel Pool connection acquired: {}", ch); + } + + @Override + public void channelReleased(Channel ch) { + logger.trace("Channel Pool connection released: {}", ch); + } + }, threadCount); + } + } + + private void bootstrapOptions(Bootstrap bootStrap) { + bootStrap.channel(NioSocketChannel.class); + bootStrap.option(ChannelOption.TCP_NODELAY, true); + bootStrap.option(ChannelOption.ALLOCATOR, PooledByteBufAllocator.DEFAULT); + bootStrap.option(ChannelOption.SO_REUSEADDR, false); + bootStrap.option(ChannelOption.CONNECT_TIMEOUT_MILLIS, CONNECTION_TIMEOUT_SEC * 1000); + } + + private static synchronized void addSSLIfRequired(ChannelPipeline pipeline, URI baseUri) throws SSLException { + if (HTTPS.equalsIgnoreCase(baseUri.getScheme())) { + if (sslContext == null) { + sslContext = SslContextBuilder.forClient().trustManager(InsecureTrustManagerFactory.INSTANCE).build(); + } + pipeline.addLast("ssl", sslContext.newHandler(pipeline.channel().alloc())); + } + } + + private int getPort() { + int port = baseUri.getPort(); + if (port == -1) { + if (HTTP.equalsIgnoreCase(baseUri.getScheme())) { + port = 80; + } else if (HTTPS.equalsIgnoreCase(baseUri.getScheme())) { + port = 443; + } + } + return port; + } + + protected Future poolAcquire() { + return pool.acquire(); + } + + protected void poolRelease(Channel ch) { + pool.release(ch); + } + + @Override + public void destroy() { + logger.debug("destroy..."); + // use a different event group to execute the shutdown to avoid deadlocks + shutDownGroup.execute(() -> { + logger.debug("running shutdown..."); + if (wsPingTimer != null) { + logger.debug("cancel ping..."); + wsPingTimer.cancel(true); + wsPingTimer = null; + } + if (wsConnectionTimeout != null) { + logger.debug("cancel wsConnectionTimeout..."); + wsConnectionTimeout.cancel(true); + wsConnectionTimeout = null; + } + if (wsClientConnection != null) { + try { + logger.debug("there is a web socket, disconnect..."); + wsClientConnection.disconnect(); + wsClientConnection = null; + } catch (RestException e) { + // not bubbling exception up, just ignoring + } + } + if (group != null && !group.isShuttingDown()) { + logger.debug("wsGroup shutdownGracefully"); + group.shutdownGracefully(0, 1, TimeUnit.SECONDS).syncUninterruptibly(); + group = null; + logger.debug("wsGroup shutdown complete"); + } + if (group != null && !group.isShuttingDown()) { + logger.debug("httpGroup shutdownGracefully"); + group.shutdownGracefully(0, 1, TimeUnit.SECONDS).syncUninterruptibly(); + group = null; + logger.debug("httpGroup shutdown complete"); + } + }); + shutDownGroup.shutdownGracefully(0, 5, TimeUnit.SECONDS).syncUninterruptibly(); + shutDownGroup = null; + logger.debug("... destroyed"); + } + + protected String buildURL(String path, List parametersQuery, boolean withAddress) { + StringBuilder uriBuilder = new StringBuilder(); + if (withAddress) { + uriBuilder.append(baseUri); + } else { + uriBuilder.append(baseUri.getPath()); + } + uriBuilder.append("ari"); + uriBuilder.append(path); + boolean first = true; + if (parametersQuery != null) { + for (HttpParam hp : parametersQuery) { + if (hp.getValue() != null && !hp.getValue().isEmpty()) { + if (first) { + uriBuilder.append("?"); + first = false; + } else { + uriBuilder.append("&"); + } + uriBuilder.append(hp.getName()); + uriBuilder.append("="); + uriBuilder.append(ARIEncoder.encodeUrl(hp.getValue())); + } + } + } + return uriBuilder.toString(); + } + + // Factory for WS handshakes + protected WebSocketClientHandshaker getWsHandshake(String path, List parametersQuery) throws URISyntaxException { + String url = buildURL(path, parametersQuery, true); + if (url.regionMatches(true, 0, HTTP, 0, 4)) { + // http(s):// -> ws(s):// + url = "ws" + url.substring(4); + } + URI uri = new URI(url); + HttpHeaders headers = new DefaultHttpHeaders(); + headers.set(HttpHeaderNames.AUTHORIZATION, this.auth); + return WebSocketClientHandshakerFactory.newHandshaker( + uri, WebSocketVersion.V13, null, false, headers); + } + + // Build the HTTP request based on the given parameters + private HttpRequest buildRequest(String path, String method, List parametersQuery, String body) { + String url = buildURL(path, parametersQuery, false); + FullHttpRequest request = new DefaultFullHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.valueOf(method), url); + if (body != null && !body.isEmpty()) { + ByteBuf bbuf = Unpooled.copiedBuffer(body, ARIEncoder.ENCODING); + request.headers().add(HttpHeaderNames.CONTENT_TYPE, HttpHeaderValues.APPLICATION_JSON); + request.headers().set(HttpHeaderNames.CONTENT_LENGTH, bbuf.readableBytes()); + request.content().clear().writeBytes(bbuf); + } + request.headers().set(HttpHeaderNames.HOST, baseUri.getHost()); + request.headers().set(HttpHeaderNames.CONNECTION, HttpHeaderValues.KEEP_ALIVE); + request.headers().set(HttpHeaderNames.AUTHORIZATION, this.auth); + HTTPLogger.traceRequest(request, body); + return request; + } + + private RestException makeException(HttpResponseStatus status, String response, List errors) { + + if (status == null && response == null) { + return new RestException("No HTTP Status and Response, timeout or client shutdown"); + } else if (status == null) { + return new RestException("Error: " + response); + } + + if (errors != null) { + for (HttpResponse hr : errors) { + if (hr.getCode() == status.code()) { + return new RestException(hr.getDescription(), response, status.code()); + } + } + } + + return new RestException(response, status.code()); + } + + // Synchronous HTTP action + @Override + public String httpActionSync(String uri, String method, List parametersQuery, + String body, List errors) throws RestException { + NettyHttpClientHandler handler = httpActionSyncHandler(uri, method, parametersQuery, body, errors); + return handler != null ? handler.getResponseText() : null; + } + + // Synchronous HTTP action + @Override + public byte[] httpActionSyncAsBytes(String uri, String method, List parametersQuery, + String body, List errors) throws RestException { + NettyHttpClientHandler handler = httpActionSyncHandler(uri, method, parametersQuery, body, errors, true); + return handler != null ? handler.getResponseBytes() : null; + } + + private NettyHttpClientHandler httpActionSyncHandler(String uri, String method, List parametersQuery, + String body, List errors) throws RestException { + return httpActionSyncHandler(uri, method, parametersQuery, body, errors, false); + } + + private NettyHttpClientHandler httpActionSyncHandler(String uri, String method, List parametersQuery, + String body, List errors, boolean binary) throws RestException { + HttpRequest request = buildRequest(uri, method, parametersQuery, body); + logger.debug("Sync Action - {} to {}", request.method(), request.uri()); + Channel ch = poolAcquire().syncUninterruptibly().getNow(); + try { + replaceAggregator(binary, ch); + NettyHttpClientHandler handler = (NettyHttpClientHandler) ch.pipeline().get(HTTP_HANDLER); + if (handler == null) return null; + handler.reset(); + ch.writeAndFlush(request); + logger.debug("Wait for response..."); + handler.waitForResponse(READ_TIMEOUT_SEC); + if (handler.getException() != null) { + logger.debug("got an error: {}", handler.getException().toString()); + throw new RestException(handler.getException()); + } else if (httpResponseOkay(handler.getResponseStatus())) { + logger.debug("got OK response"); + return handler; + } else { + logger.debug("...done waiting"); + throw makeException(handler.getResponseStatus(), handler.getResponseText(), errors); + } + } finally { + poolRelease(ch); + } + } + + private void replaceAggregator(boolean binary, Channel ch) { + HttpObjectAggregator aggregator = (HttpObjectAggregator) ch.pipeline().get(HTTP_AGGREGATOR); + if (aggregator != null) { + if (binary && aggregator.maxContentLength() != MAX_HTTP_BIN_REQUEST) { + logger.debug("Replace http-aggregator with larger content length..."); + ch.pipeline().replace( + HTTP_AGGREGATOR, HTTP_AGGREGATOR, new HttpObjectAggregator(MAX_HTTP_BIN_REQUEST)); + } else if (!binary && aggregator.maxContentLength() != MAX_HTTP_REQUEST) { + logger.debug("Replace http-aggregator with smaller content length..."); + ch.pipeline().replace( + HTTP_AGGREGATOR, HTTP_AGGREGATOR, new HttpObjectAggregator(MAX_HTTP_REQUEST)); + } + } + } + + // Asynchronous HTTP action, response is passed to HttpResponseHandler + @Override + public void httpActionAsync(String uri, String method, List parametersQuery, + String body, final List errors, + final HttpResponseHandler responseHandler, boolean binary) { + + final HttpRequest request = buildRequest(uri, method, parametersQuery, body); + logger.debug("Async Action - {} to {}", request.method(), request.uri()); + // Get future channel + Future cf = poolAcquire(); + cf.addListener((FutureListener) future1 -> { + if (future1.isSuccess()) { + Channel ch = future1.getNow(); + logger.debug("Channel, {}", ch); + group.execute(responseHandler::onChReadyToWrite); + replaceAggregator(binary, ch); + final NettyHttpClientHandler handler = (NettyHttpClientHandler) ch.pipeline().get(HTTP_HANDLER); + handler.reset(); + ch.writeAndFlush(request).addListener(future2 -> + group.execute(() -> { + try { + logger.debug("Wait for response..."); + handler.waitForResponse(READ_TIMEOUT_SEC); + if (handler.getException() != null) { + logger.debug("got an error: {}", handler.getException().toString()); + onFailure(responseHandler, new RestException(handler.getException())); + } else if (httpResponseOkay(handler.getResponseStatus())) { + logger.debug("got OK response"); + if (binary) { + responseHandler.onSuccess(handler.getResponseBytes()); + } else { + responseHandler.onSuccess(handler.getResponseText()); + } + } else { + logger.debug("...done waiting"); + onFailure(responseHandler, makeException(handler.getResponseStatus(), handler.getResponseText(), errors)); + } + } finally { + poolRelease(ch); + } + }) + ); + } else { + onFailure(responseHandler, future1.cause()); + } + }); + } + // WsClient implementation - connect to WebSocket server + + private void onFailure(HttpResponseHandler responseHandler, Throwable cause) { + if (!group.isShuttingDown()) { + group.execute(() -> responseHandler.onFailure(cause)); + } + } + + @Override + public WsClientConnection connect(final HttpResponseHandler callback, final String url, final List lParamQuery) throws RestException { + if (isWsConnected()) { + return wsClientConnection; + } + try { + WebSocketClientHandshaker handshake = getWsHandshake(url, lParamQuery); + logger.debug("WS Connect uri: {}", handshake.uri()); + this.wsEventsUrl = url; + this.wsEventsParamQuery = lParamQuery; + this.wsHandler = new NettyWSClientHandler(handshake, this); + this.wsCallback = callback; + return connect(new Bootstrap(), callback); + } catch (Exception e) { + throw new RestException("WS Connection Error - " + e.getMessage(), e); + } + } + + protected WsClientConnection connect(Bootstrap wsBootStrap, final HttpResponseHandler callback) { + wsBootStrap.group(group); + bootstrapOptions(wsBootStrap); + wsBootStrap.handler(new ChannelInitializer() { + @Override + public void initChannel(SocketChannel ch) throws Exception { + ChannelPipeline pipeline = ch.pipeline(); + addSSLIfRequired(pipeline, baseUri); + pipeline.addFirst("logger", new LoggingHandler(HTTPLogger.class, LogLevel.TRACE, ByteBufFormat.SIMPLE)); + pipeline.addLast(HTTP_CODEC, new HttpClientCodec()); + pipeline.addLast(HTTP_AGGREGATOR, new HttpObjectAggregator(MAX_HTTP_REQUEST)); + pipeline.addLast("ws-handler", wsHandler); + } + }); + wsConnectionTimeout = group.schedule( + () -> reconnectWs(new RestException("WS Connect Timeout")), CONNECTION_TIMEOUT_SEC, TimeUnit.SECONDS); + wsChannelFuture = wsBootStrap.connect(baseUri.getHost(), getPort()); + wsFuture = new ChannelFutureListener() { + @Override + public void operationComplete(ChannelFuture future) throws Exception { + if (future.isSuccess()) { + logger.debug("HTTP connected, waiting for WS Upgrade..."); + wsHandler.handshakeFuture().addListener(new ChannelFutureListener() { + @Override + public void operationComplete(ChannelFuture future) throws Exception { + // cancel the connection timeout + cancelWsConnectionTimeout(); + if (future.isSuccess()) { + logger.debug("WS connected..."); + // start a ping and reset reconnect counter + startPing(); + reconnectCount.set(0); + if (!group.isShuttingDown()) { + group.execute(callback::onChReadyToWrite); + } + } else { + if (future.cause() != null) { + logger.error("WS Upgrade Error - {}", future.cause().getMessage(), future.cause()); + reconnectWs(future.cause()); + } else { + logger.error("WS Upgrade Error - Unknown"); + reconnectWs(new RestException("WS Upgrade Error - Unknown")); + } + } + } + }); + } else { + cancelWsConnectionTimeout(); + if (future.cause() != null) { + logger.error("WS/HTTP Connection Error - {}", future.cause().getMessage(), future.cause()); + reconnectWs(future.cause()); + } else { + logger.error("WS/HTTP Connection Error - Unknown"); + reconnectWs(new RestException("WS/HTTP Connection Error - Unknown")); + } + } + } + }; + wsChannelFuture.addListener(wsFuture); + + // Provide disconnection handle to client + return createWsClientConnection(); + } + + private void cancelWsConnectionTimeout() { + if (wsConnectionTimeout != null) { + wsConnectionTimeout.cancel(true); + wsConnectionTimeout = null; + } + } + + private void startPing() { + if (wsPingTimer == null) { + pongFailureCount = 0; + wsPingTimer = group.scheduleAtFixedRate(() -> { + if (isWsConnected() && (System.currentTimeMillis() - wsCallback.getLastResponseTime()) > 15000) { + WebSocketFrame frame = new PingWebSocketFrame(Unpooled.wrappedBuffer("ari4j".getBytes(ARIEncoder.ENCODING))); + logger.debug("Send Ping at {}", System.currentTimeMillis()); + wsChannelFuture.channel().writeAndFlush(frame); + boolean noPong = true; + for (int i = 0; i < 10; i++) { + if (wsHandler != null && wsHandler.isShuttingDown()) { + break; + } + try { + Thread.sleep(1000); + } catch (InterruptedException e) {//NOSONAR + // probably from the reconnect, so stop running... + return; + } + if ((System.currentTimeMillis() - lastPong) < 10000) { + logger.debug("Pong at {}", lastPong); + pongFailureCount = 0; + noPong = false; + break; + } else { + logger.warn("No Pong at {}", System.currentTimeMillis()); + } + } + if (noPong && wsHandler != null && !wsHandler.isShuttingDown()) { + pongFailureCount++; + if (pongFailureCount >= 1) { + logger.warn("No Ping response from server, reconnect..."); + reconnectWs(new RestException("No Ping response from server")); + } + } + } + }, 1, pingPeriod, pingTimeUnit); + } + } + + private WsClientConnection createWsClientConnection() { + if (this.wsClientConnection == null) { + this.wsClientConnection = new WsClientConnection() { + + @Override + public void disconnect() throws RestException { + Channel ch = wsChannelFuture.channel(); + if (ch != null) { + // if connected send CloseWebSocketFrame as NettyWSClientHandler will close the connection when the server responds to it + // only when not shutdown yet, so we don't try to send another close frame + if (!wsHandler.isShuttingDown()) { + logger.debug("Send CloseWebSocketFrame ..."); + ch.writeAndFlush(new CloseWebSocketFrame()); + } + wsHandler.setShuttingDown(true); + // if the server is no longer there then close any way + ch.close(); + } + wsChannelFuture.removeListener(wsFuture); + wsChannelFuture.cancel(true); + } + }; + } + return this.wsClientConnection; + } + + /** + * Checks if a response is okay. + * All 2XX responses are supposed to be okay. + * + * @param status http status + * @return whether it is a 2XX code or not (error!) + */ + private boolean httpResponseOkay(HttpResponseStatus status) { + return HttpResponseStatus.OK.equals(status) + || HttpResponseStatus.NO_CONTENT.equals(status) + || HttpResponseStatus.ACCEPTED.equals(status) + || HttpResponseStatus.CREATED.equals(status); + } + + public void reconnectWs(Throwable cause) { + // send the disconnect callback + if (!group.isShuttingDown()) { + group.execute(() -> wsCallback.onDisconnect()); + } + // cancel the ping timer + if (wsPingTimer != null) { + wsPingTimer.cancel(true); + wsPingTimer = null; + } + + if (!autoReconnect || (maxReconnectCount > -1 && reconnectCount.get() >= maxReconnectCount)) { + logger.warn("Cannot connect: {} - executing failure callback", cause.getMessage()); + if (!group.isShuttingDown()) { + group.execute(() -> wsCallback.onFailure(cause)); + } + return; + } + + // if not shutdown reconnect, note the check not on the shutDownGroup + if (!group.isShuttingDown()) { + // schedule reconnect after a 2,5,10 seconds + long[] timeouts = {2L, 5L, 10L}; + long timeout = reconnectCount.get() >= timeouts.length ? timeouts[timeouts.length - 1] : timeouts[reconnectCount.get()]; + reconnectCount.incrementAndGet(); + logger.error("WS Connect Error: {}, reconnecting in {} seconds... try: {}", cause.getMessage(), timeout, reconnectCount.get()); + shutDownGroup.schedule(() -> { + try { + // 1st close up + wsClientConnection.disconnect(); + // then connect again + connect(wsCallback, wsEventsUrl, wsEventsParamQuery); + } catch (RestException e) { + group.execute(() -> wsCallback.onFailure(e)); + } + }, timeout, TimeUnit.SECONDS); + } + } + + public void onWSResponseReceived() { + if (!group.isShuttingDown()) { + group.execute(() -> wsCallback.onResponseReceived()); + } + } + + public void onWSSuccess(String text) { + if (!group.isShuttingDown()) { + group.execute(() -> wsCallback.onSuccess(text)); + } + } + + public void onWSFailure(Throwable cause) { + if (!group.isShuttingDown()) { + group.execute(() -> wsCallback.onFailure(cause)); + } + } + + public void onWSPong() { + lastPong = System.currentTimeMillis(); + } + + /** + * The ability to turn on/off the websocket auto reconnect, defaulted to on + * + * @param val auto reconnect + */ + public static void setAutoReconnect(boolean val) { + NettyHttpClient.autoReconnect = val; + } + + /** + * The ability to provide a custom SSL Contect for + * + * @param sslContext the ssl context + */ + public static void setSslContext(SslContext sslContext) { + NettyHttpClient.sslContext = sslContext; + } + + /** + * Checks if websocket is connected + * + * @return true when connected, false otherwise + */ + public boolean isWsConnected() { + return wsClientConnection != null && wsHandler != null && !wsHandler.isShuttingDown() && wsChannelFuture != null && + !wsChannelFuture.isCancelled() && wsChannelFuture.channel() != null && wsChannelFuture.channel().isActive(); + } + + /** + * Sets maximal reconnect count + * + * @param count max number of reconnect attempts, -1 for infinite reconnecting + */ + public void setMaxReconnectCount(int count) { + maxReconnectCount = count; + } +} diff --git a/src/main/java/ch/loway/oss/ari4java/tools/http/NettyHttpClientHandler.java b/src/main/java/ch/loway/oss/ari4java/tools/http/NettyHttpClientHandler.java new file mode 100755 index 00000000..474e7b6a --- /dev/null +++ b/src/main/java/ch/loway/oss/ari4java/tools/http/NettyHttpClientHandler.java @@ -0,0 +1,103 @@ +package ch.loway.oss.ari4java.tools.http; + +import ch.loway.oss.ari4java.tools.ARIEncoder; +import ch.loway.oss.ari4java.tools.RestException; +import io.netty.channel.ChannelHandler; +import io.netty.channel.ChannelHandlerContext; +import io.netty.channel.SimpleChannelInboundHandler; +import io.netty.handler.codec.http.FullHttpResponse; +import io.netty.handler.codec.http.HttpHeaderNames; +import io.netty.handler.codec.http.HttpResponseStatus; +import io.netty.handler.timeout.ReadTimeoutException; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.Arrays; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.TimeUnit; + +/** + * HttpClientHandler handles the asynchronous response from the remote + * HTTP server. + * + * @author mwalton + */ + +@ChannelHandler.Sharable +public class NettyHttpClientHandler extends SimpleChannelInboundHandler { + protected byte[] responseBytes; + protected HttpResponseStatus responseStatus; + private Throwable exception; + private CountDownLatch latch = new CountDownLatch(1); + + private final Logger logger = LoggerFactory.getLogger(NettyHttpClientHandler.class); + + public void reset() { + latch = new CountDownLatch(1); + responseBytes = null; + responseStatus = null; + } + + @Override + protected void channelRead0(ChannelHandlerContext ctx, Object msg) throws Exception { + if (msg instanceof FullHttpResponse) { + FullHttpResponse response = (FullHttpResponse) msg; + responseBytes = new byte[response.content().readableBytes()]; + response.content().readBytes(responseBytes); + responseStatus = response.status(); + HTTPLogger.traceResponse(response, responseBytes); + if (response.headers().get(HttpHeaderNames.CONTENT_LENGTH) != null && + responseBytes.length != response.headers().getInt(HttpHeaderNames.CONTENT_LENGTH)) { + logger.error("HTTP Content-Length: {}, but body read: {}", + response.headers().getInt(HttpHeaderNames.CONTENT_LENGTH), responseBytes.length); + } + } else if (msg != null) { + latch.countDown(); + logger.warn("Unexpected: {}", msg); + throw new RestException("Unknown object: " + msg.getClass().getSimpleName() + ", expecting FullHttpResponse"); + } + latch.countDown(); + } + + public String getResponseText() { + if (responseBytes == null || responseBytes.length == 0) { + return null; + } + return new String(responseBytes, ARIEncoder.ENCODING); + } + + public byte[] getResponseBytes() { + if (responseBytes == null || responseBytes.length == 0) { + return null; + } + return Arrays.copyOf(responseBytes, responseBytes.length); + } + + public HttpResponseStatus getResponseStatus() { + return responseStatus; + } + + public Throwable getException() { + return exception; + } + + @Override + public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) { + this.exception = cause; + if (!(cause instanceof ReadTimeoutException)) { + logger.error("Not a read timeout", cause); + } + ctx.fireExceptionCaught(cause); + ctx.close(); + } + + public void waitForResponse(int timeout) { + try { + latch.await(timeout, TimeUnit.SECONDS); + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + } + } + +} + diff --git a/src/main/java/ch/loway/oss/ari4java/tools/http/NettyWSClientHandler.java b/src/main/java/ch/loway/oss/ari4java/tools/http/NettyWSClientHandler.java new file mode 100755 index 00000000..ec0d18fb --- /dev/null +++ b/src/main/java/ch/loway/oss/ari4java/tools/http/NettyWSClientHandler.java @@ -0,0 +1,124 @@ +package ch.loway.oss.ari4java.tools.http; + +import ch.loway.oss.ari4java.tools.*; +import io.netty.channel.Channel; +import io.netty.channel.ChannelFuture; +import io.netty.channel.ChannelHandler; +import io.netty.channel.ChannelHandlerContext; +import io.netty.channel.ChannelPromise; +import io.netty.handler.codec.http.FullHttpResponse; +import io.netty.handler.codec.http.websocketx.*; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + + +/** + * NettyWSClientHandler handles the transactions with the remote + * WebSocket, forwarding to the client HttpResponseHandler interface. + * + * @author mwalton + * + */ +@ChannelHandler.Sharable +public class NettyWSClientHandler extends NettyHttpClientHandler { + + final WebSocketClientHandshaker handshaker; + private ChannelPromise handshakeFuture; + private NettyHttpClient client = null; + private boolean shuttingDown = false; + private final Logger logger = LoggerFactory.getLogger(NettyWSClientHandler.class); + + public NettyWSClientHandler(WebSocketClientHandshaker handshaker, NettyHttpClient client) { + this.handshaker = handshaker; + this.client = client; + } + + public ChannelFuture handshakeFuture() { + return handshakeFuture; + } + + @Override + public void handlerAdded(ChannelHandlerContext ctx) { + handshakeFuture = ctx.newPromise(); + } + + @Override + public void channelActive(ChannelHandlerContext ctx) { + handshaker.handshake(ctx.channel()); + } + + @Override + public void channelInactive(ChannelHandlerContext ctx) { + if (!shuttingDown) { + logger.debug("WS channel inactive - {}", ctx); + client.reconnectWs(new RestException("WS channel inactive")); + } + } + + @Override + protected void channelRead0(ChannelHandlerContext ctx, Object msg) throws Exception { + logger.debug("Received Message - {}", msg.getClass().getSimpleName()); + Channel ch = ctx.channel(); + + if (msg instanceof FullHttpResponse) { + FullHttpResponse response = (FullHttpResponse) msg; + responseBytes = new byte[response.content().readableBytes()]; + response.content().readBytes(responseBytes); + HTTPLogger.traceResponse(response, responseBytes); + if (!handshaker.isHandshakeComplete()) { + logger.debug("Finish WS Handshake..."); + handshaker.finishHandshake(ch, response); + handshakeFuture.setSuccess(); + return; + } + String error = "Unexpected FullHttpResponse (getStatus=" + response.status().toString() + ", content=" + getResponseText() + ')'; + logger.error(error); + throw new ARIException(error); + } + + // call this so we can set the last received time + client.onWSResponseReceived(); + + if (msg instanceof TextWebSocketFrame) { + TextWebSocketFrame textFrame = (TextWebSocketFrame) msg; + String text = textFrame.content().toString(ARIEncoder.ENCODING); + HTTPLogger.traceWebSocketFrame(text); + responseBytes = text.getBytes(ARIEncoder.ENCODING); + client.onWSSuccess(text); + } else if (msg instanceof CloseWebSocketFrame) { + ch.close(); + if (!shuttingDown) { + client.reconnectWs(new RestException("CloseWebSocketFrame received")); + } + } else if (msg instanceof PongWebSocketFrame) { + client.onWSPong(); + } else { + HTTPLogger.traceWebSocketFrame(msg.toString()); + String error = "Not expecting: " + msg.getClass().getSimpleName(); + logger.error(error); + throw new ARIException(error); + } + } + + @Override + public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) { + if (!shuttingDown) + return; + logger.error("exceptionCaught: {}", cause.getMessage(), cause); + if (!handshakeFuture.isDone()) { + handshakeFuture.setFailure(cause); + } + ctx.fireExceptionCaught(cause); + ctx.close(); + client.onWSFailure(cause); + } + + public boolean isShuttingDown() { + return shuttingDown; + } + + public void setShuttingDown(boolean shuttingDown) { + this.shuttingDown = shuttingDown; + } +} + diff --git a/classes/ch/loway/oss/ari4java/tools/tags/EventSource.java b/src/main/java/ch/loway/oss/ari4java/tools/tags/EventSource.java old mode 100644 new mode 100755 similarity index 100% rename from classes/ch/loway/oss/ari4java/tools/tags/EventSource.java rename to src/main/java/ch/loway/oss/ari4java/tools/tags/EventSource.java diff --git a/src/overview.html b/src/overview.html new file mode 100755 index 00000000..a7810d77 --- /dev/null +++ b/src/overview.html @@ -0,0 +1,27 @@ + + +A full getting started guide can be found on the ARI4Java Wiki +
+    // create instance
+    ARI ari = ARI.build("http://192.168.56.44:8088/", "test-app", "ari4java", "yothere", AriVersion.IM_FEELING_LUCKY);
+    // get info
+    AsteriskInfo info = ari.asterisk().getInfo().execute();
+    // get event websocket
+    ari.events().eventWebsocket("test-app").execute(new AriWSCallback<Message<() {new AriWSCallback<List<Channel>>() {
+        @Override
+        public void onSuccess(List<Channel> result) {
+            // code to handle the result ...
+        }
+        @Override
+        public void onFailure(RestException e) {
+            e.printStackTrace();
+        }
+        @Override
+        public void onConnectionEvent(AriConnectionEvent event) {
+            // if you wish to know the status (connected/disconnected) of the WS connection
+        }
+    });
+
+See ch.loway.oss.ari4java.ARI Methods + + diff --git a/src/test/java/ch/loway/oss/ari4java/ARITest.java b/src/test/java/ch/loway/oss/ari4java/ARITest.java new file mode 100755 index 00000000..781d522d --- /dev/null +++ b/src/test/java/ch/loway/oss/ari4java/ARITest.java @@ -0,0 +1,171 @@ +package ch.loway.oss.ari4java; + +import ch.loway.oss.ari4java.generated.actions.ActionAsterisk; +import ch.loway.oss.ari4java.generated.actions.ActionBridges; +import ch.loway.oss.ari4java.generated.actions.ActionEvents; +import ch.loway.oss.ari4java.generated.ari_0_0_1.actions.ActionAsterisk_impl_ari_0_0_1; +import ch.loway.oss.ari4java.generated.ari_0_0_1.actions.ActionBridges_impl_ari_0_0_1; +import ch.loway.oss.ari4java.generated.ari_0_0_1.models.Bridge_impl_ari_0_0_1; +import ch.loway.oss.ari4java.generated.ari_1_0_0.actions.*; +import ch.loway.oss.ari4java.generated.models.Bridge; +import ch.loway.oss.ari4java.generated.models.Mailbox; +import ch.loway.oss.ari4java.tools.*; +import ch.loway.oss.ari4java.tools.http.NettyHttpClient; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; + +import java.util.concurrent.atomic.AtomicBoolean; + +import static org.junit.jupiter.api.Assertions.*; +import static org.mockito.Mockito.*; + +/** + * @author lenz + */ +public class ARITest { + + static NettyHttpClient client; + + @BeforeAll + public static void start() { + client = mock(NettyHttpClient.class); + AriFactory.nettyHttpClient = client; + } + + @Test + public void testImplementationFactory() throws Exception { + ARI ari = new ARI(); + ari.setHttpClient(mock(HttpClient.class)); + ari.setWsClient(mock(WsClient.class)); + try { + ari.getActionImpl(ActionAsterisk.class); + fail("Expecting an exception"); + } catch (Exception e) { + assertEquals("AriVersion not set", e.getMessage()); + } + ari.setVersion(AriVersion.ARI_0_0_1); + assertEquals(AriVersion.ARI_0_0_1, ari.getVersion()); + assertEquals(ActionBridges_impl_ari_0_0_1.class, ari.getActionImpl(ActionBridges.class).getClass()); + assertEquals(Bridge_impl_ari_0_0_1.class, ari.getModelImpl(Bridge.class).getClass()); + boolean exception = false; + try { + ari.getModelImpl(Mailbox.class); + } catch (ARIException e) { + exception = e.getMessage().contains("No concrete implementation"); + } + assertTrue(exception, "Expected 'No concrete implementation' exception for getModelImpl(String.class)"); + exception = false; + try { + ari.getModelImpl(String.class); + } catch (ARIException e) { + exception = e.getMessage().contains("Invalid Class"); + } + assertTrue(exception, "Expected 'Invalid Class' exception for getModelImpl(String.class)"); + assertNotNull(ari.getActionImpl(ActionEvents.class), "Expected Action"); + try { + ari.getActionImpl(String.class); + fail("Expected exception"); + } catch (Exception e) { + assertEquals("Invalid Class for action class java.lang.String", e.getMessage()); + } + } + + @Test + public void testBuildAction() throws Exception { + ARI ari = new ARI(); + try { + ari.asterisk(); + fail("Expecting an exception"); + } catch (Exception e) { + assertEquals("AriVersion not set", e.getMessage()); + } + ari.setVersion(AriVersion.ARI_0_0_1); + ari.setHttpClient(mock(HttpClient.class)); + ari.setWsClient(mock(WsClient.class)); + + ActionAsterisk asterisk = ari.asterisk(); + assertEquals(ActionAsterisk_impl_ari_0_0_1.class.toString(), asterisk.getClass().toString()); + + ari.setVersion(AriVersion.ARI_1_0_0); + asterisk = ari.asterisk(); + assertEquals(ActionAsterisk_impl_ari_1_0_0.class.toString(), asterisk.getClass().toString()); + assertNotNull(((ActionAsterisk_impl_ari_1_0_0)asterisk).getHttpClient(), "Expecting HttpClient to be set"); + assertNotNull(((ActionAsterisk_impl_ari_1_0_0)asterisk).getWsClient(), "Expecting WsClient to be set"); + + asterisk = ari.getActionImpl(ActionAsterisk.class); + assertEquals(ActionAsterisk_impl_ari_1_0_0.class.toString(), asterisk.getClass().toString()); + assertNotNull(((ActionAsterisk_impl_ari_1_0_0)asterisk).getHttpClient(), "Expecting HttpClient to be set"); + assertNotNull(((ActionAsterisk_impl_ari_1_0_0)asterisk).getWsClient(), "Expecting WsClient to be set"); + + assertEquals(ActionApplications_impl_ari_1_0_0.class.toString(), ari.applications().getClass().toString()); + assertEquals(ActionBridges_impl_ari_1_0_0.class.toString(), ari.bridges().getClass().toString()); + assertEquals(ActionChannels_impl_ari_1_0_0.class.toString(), ari.channels().getClass().toString()); + assertEquals(ActionDeviceStates_impl_ari_1_0_0.class.toString(), ari.deviceStates().getClass().toString()); + assertEquals(ActionEndpoints_impl_ari_1_0_0.class.toString(), ari.endpoints().getClass().toString()); + assertEquals(ActionEvents_impl_ari_1_0_0.class.toString(), ari.events().getClass().toString()); + assertEquals(ActionPlaybacks_impl_ari_1_0_0.class.toString(), ari.playbacks().getClass().toString()); + assertEquals(ActionRecordings_impl_ari_1_0_0.class.toString(), ari.recordings().getClass().toString()); + assertEquals(ActionSounds_impl_ari_1_0_0.class.toString(), ari.sounds().getClass().toString()); + } + + @Test + public void testCreateUid() { + String v = ARI.getUID(); + assertTrue(v.length() > 0, "UID created"); + assertNotSame(v, ARI.getUID(), "new UID the same as previous"); + } + + @Test + public void testBuildVersion() { + String v = new ARI().getBuildVersion(); + assertNotNull(v, "Build Version cannot be null"); + } + + @Test + public void testBuild() throws Exception { + when(client.httpActionSync(eq("/applications/test"), eq("GET"), any(), any(), any())).thenReturn( + "{\"channel_ids\": [], \"bridge_ids\": [], \"endpoint_ids\": [], \"device_names\": []}" + ); + ARI ari = ARI.build("http://local:8088/ari/", "test", "test", "test", AriVersion.ARI_0_0_1); + assertEquals("test", ari.getAppName()); + assertEquals(AriVersion.ARI_0_0_1, ari.getVersion()); + MessageQueue queue = ari.getWebsocketQueue(); + assertEquals(0, queue.size()); + try { + ari.getWebsocketQueue(); + fail("Expected an exception"); + } catch (Exception e) { + assertEquals("Websocket already present", e.getMessage()); + } + ari.cleanup(); + ari.setHttpClient(client); + ari.setWsClient(mock(WsClient.class)); // must be a different ref so we can get the code coverage... + ari.cleanup(); + } + + @Test + public void testCloseAction() throws Exception { + ARI ari = new ARI(); + try { + ari.closeAction(new Object()); + fail("Expecting exception"); + } catch (ARIException e) { + assertTrue(e.getMessage().contains("is not an Action implementation"), "Expecting an implementation error"); + } + AtomicBoolean disconnected = new AtomicBoolean(false); + ari.closeAction(new BaseAriAction() { + @Override + public synchronized void disconnectWs() throws RestException { + disconnected.set(true); + } + }); + assertTrue(disconnected.get(), "Expected disconnectWs to be called"); + } + + @AfterAll + public static void end() { + AriFactory.nettyHttpClient = null; + } + +} diff --git a/src/test/java/ch/loway/oss/ari4java/AriFactoryTest.java b/src/test/java/ch/loway/oss/ari4java/AriFactoryTest.java new file mode 100755 index 00000000..37186bdd --- /dev/null +++ b/src/test/java/ch/loway/oss/ari4java/AriFactoryTest.java @@ -0,0 +1,50 @@ +package ch.loway.oss.ari4java; + +import ch.loway.oss.ari4java.tools.http.NettyHttpClient; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.*; +import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.Mockito.*; + +public class AriFactoryTest { + + static NettyHttpClient httpClient = mock(NettyHttpClient.class); + + private static void setHttpClient() { + AriFactory.nettyHttpClient = httpClient; + } + + @Test + public void testDetectAriVersion() throws Exception { + try { + AriFactory.nettyHttp("test://local:8088/", "", "", AriVersion.IM_FEELING_LUCKY); + fail("Expected an exception"); + } catch (Exception e) { + assertEquals("Unsupported protocol: test", e.getMessage()); + } + setHttpClient(); + when(httpClient.httpActionSync( + eq("/api-docs/resources.json"), eq("GET"), + eq(null), eq(null), eq(null))).thenReturn("{}"); + try { + AriFactory.nettyHttp("http://localhost", "", "", AriVersion.IM_FEELING_LUCKY); + fail("Expected exception"); + } catch (Exception e) { + assertEquals("Could find apiVersion", e.getMessage()); + } + reset(httpClient); + when(httpClient.httpActionSync( + eq("/api-docs/resources.json"), eq("GET"), + eq(null), eq(null), eq(null))).thenReturn("{\"apiVersion\": \"0.0.1\"}"); + AriVersion ver = AriFactory.nettyHttp("http://localhost", "", "", AriVersion.IM_FEELING_LUCKY).getVersion(); + assertEquals(AriVersion.ARI_0_0_1, ver); + } + + @AfterAll + public static void end() { + AriFactory.nettyHttpClient = null; + } + +} diff --git a/src/test/java/ch/loway/oss/ari4java/AriVersionTest.java b/src/test/java/ch/loway/oss/ari4java/AriVersionTest.java new file mode 100755 index 00000000..45e342b4 --- /dev/null +++ b/src/test/java/ch/loway/oss/ari4java/AriVersionTest.java @@ -0,0 +1,36 @@ +package ch.loway.oss.ari4java; + +import ch.loway.oss.ari4java.generated.ari_0_0_1.AriBuilder_impl_ari_0_0_1; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.*; + +public class AriVersionTest { + + @Test + public void builder() { + try { + AriVersion.IM_FEELING_LUCKY.builder(); + fail("Expecting an exception"); + } catch (Exception e) { + assertEquals("This version has no builder. Library error for IM_FEELING_LUCKY", e.getMessage()); + } + assertEquals(AriBuilder_impl_ari_0_0_1.class.toString(), AriVersion.ARI_0_0_1.builder().getClass().toString()); + } + + @Test + public void version() { + assertEquals("0.0.1", AriVersion.ARI_0_0_1.version()); + } + + @Test + public void fromVersionString() throws Exception { + assertEquals(AriVersion.ARI_0_0_1, AriVersion.fromVersionString("0.0.1")); + try { + AriVersion.fromVersionString("0"); + fail("Expecting an exception"); + } catch (Exception e) { + assertEquals("Unknown ARI Version object for 0", e.getMessage()); + } + } +} diff --git a/src/test/java/ch/loway/oss/ari4java/generated/ActionChannelTest.java b/src/test/java/ch/loway/oss/ari4java/generated/ActionChannelTest.java new file mode 100755 index 00000000..1748369b --- /dev/null +++ b/src/test/java/ch/loway/oss/ari4java/generated/ActionChannelTest.java @@ -0,0 +1,40 @@ +package ch.loway.oss.ari4java.generated; + +import ch.loway.oss.ari4java.generated.actions.ActionChannels; +import ch.loway.oss.ari4java.generated.ari_6_0_0.actions.ActionChannels_impl_ari_6_0_0; +import ch.loway.oss.ari4java.generated.models.RTPstat; +import ch.loway.oss.ari4java.tools.RestException; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertInstanceOf; + +/** + * @author lenz + */ +public class ActionChannelTest extends BaseActionTest { + + @Override + protected String getJson() { + return requoteString("" + + "{" + + " 'local_ssrc': 1176001751," + + " 'remote_ssrc': 3175369733" + + " }"); + } + + @Override + protected ActionChannels getInstance() { + return new ActionChannels_impl_ari_6_0_0(); + } + + @Override + protected void ariActionTest(ActionChannels a) throws RestException { + RTPstat stat = a.rtpstatistics("abcde").execute(); + // check the generator overwrote the int definition to a long as values larger than 2147483647 are set + assertInstanceOf(Long.class, stat.getLocal_ssrc()); + assertInstanceOf(Long.class, stat.getRemote_ssrc()); + assertEquals(1176001751L, stat.getLocal_ssrc()); + assertEquals(3175369733L, stat.getRemote_ssrc()); + } + +} diff --git a/src/test/java/ch/loway/oss/ari4java/generated/ActionSoundsTest.java b/src/test/java/ch/loway/oss/ari4java/generated/ActionSoundsTest.java new file mode 100755 index 00000000..795d760a --- /dev/null +++ b/src/test/java/ch/loway/oss/ari4java/generated/ActionSoundsTest.java @@ -0,0 +1,61 @@ +package ch.loway.oss.ari4java.generated; + +import ch.loway.oss.ari4java.generated.actions.ActionSounds; +import ch.loway.oss.ari4java.generated.ari_0_0_1.actions.ActionSounds_impl_ari_0_0_1; +import ch.loway.oss.ari4java.generated.models.Sound; +import ch.loway.oss.ari4java.tools.AriCallback; +import ch.loway.oss.ari4java.tools.RestException; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +/** + * @author lenz + */ +public class ActionSoundsTest extends BaseActionTest { + + @Override + protected String getJson() { + return requoteString("" + + "{" + + " 'id': 'abcde'," + + " 'text': 'some text'," + + " 'formats': [" + + " { 'language': 'en', 'format': 'wav' }," + + " { 'language': 'es', 'format': 'wav' }," + + " { 'language': 'es', 'format': 'gsm' }" + + " ]" + + " }"); + } + + @Override + protected ActionSounds getInstance() { + return new ActionSounds_impl_ari_0_0_1(); + } + + @Override + protected void ariActionTest(ActionSounds a) throws RestException { + + Sound s = a.get("abcde").execute(); + + assertEquals("abcde", s.getId()); + assertEquals(3, s.getFormats().size()); + assertEquals("es", s.getFormats().get(1).getLanguage()); + + a.get("abcde").execute(new AriCallback() { + + @Override + public void onSuccess(Sound result) { + assertEquals("abcde", result.getId()); + assertEquals(3, result.getFormats().size()); + assertEquals("es", result.getFormats().get(1).getLanguage()); + } + + @Override + public void onFailure(RestException e) { + e.printStackTrace(); + } + }); + + } + +} diff --git a/src/test/java/ch/loway/oss/ari4java/generated/ActonBridgesTest.java b/src/test/java/ch/loway/oss/ari4java/generated/ActonBridgesTest.java new file mode 100755 index 00000000..462d0219 --- /dev/null +++ b/src/test/java/ch/loway/oss/ari4java/generated/ActonBridgesTest.java @@ -0,0 +1,46 @@ +package ch.loway.oss.ari4java.generated; + +import ch.loway.oss.ari4java.generated.actions.ActionBridges; +import ch.loway.oss.ari4java.generated.ari_0_0_1.actions.ActionBridges_impl_ari_0_0_1; +import ch.loway.oss.ari4java.generated.models.Bridge; +import ch.loway.oss.ari4java.tools.RestException; + +import static org.junit.jupiter.api.Assertions.*; + +/** + * @author lenz + */ +public class ActonBridgesTest extends BaseActionTest { + + @Override + protected String getJson() { + return requoteString("" + + "{" + + " 'id': 'aaa'," + + " 'technology': 'xxx'," + + " 'bridge_type': 'mixing'," + + " 'bridge_class': 'aaa'," + + " 'channels': ['a', 'b', 'c' ]" + + " }"); + } + + @Override + protected ActionBridges getInstance() { + return new ActionBridges_impl_ari_0_0_1(); + } + + @Override + protected void ariActionTest(ActionBridges a) throws RestException { + Bridge b = a.get("abcd").execute(); + assertEquals("aaa", b.getId()); + assertEquals(3, b.getChannels().size()); + + boolean exceptionRaised = false; + try { + a.play("aaa", "sss").execute(); + } catch (RestException e) { + exceptionRaised = true; + } + assertTrue(exceptionRaised, "Exception triggered"); + } +} diff --git a/src/test/java/ch/loway/oss/ari4java/generated/BaseActionTest.java b/src/test/java/ch/loway/oss/ari4java/generated/BaseActionTest.java new file mode 100755 index 00000000..4b09f91a --- /dev/null +++ b/src/test/java/ch/loway/oss/ari4java/generated/BaseActionTest.java @@ -0,0 +1,43 @@ +package ch.loway.oss.ari4java.generated; + +import ch.loway.oss.ari4java.tools.BaseAriAction; +import ch.loway.oss.ari4java.tools.RestException; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertTrue; + +/** + * @author lenz + */ +public abstract class BaseActionTest { + + abstract protected String getJson(); + abstract protected T getInstance(); + abstract protected void ariActionTest(T a) throws RestException; + + /** + * Strings in a JSON object need the double quotes. + * Unfortunately using double quotes in Java is a PITA. + * So... + * + * @param s string + * @return Translating 's to "s + */ + protected static String requoteString(String s) { + return s.replace("'", "\""); + } + + protected T createWForcedResponse() { + T a = getInstance(); + assertTrue(a instanceof BaseAriAction); + ((BaseAriAction)a).setForcedResponse(getJson()); + return a; + } + + @Test + public void testAriAction() throws RestException { + T a = createWForcedResponse(); + ariActionTest(a); + } + +} diff --git a/src/test/java/ch/loway/oss/ari4java/generated/DeserializeToListOfInterfaceTest.java b/src/test/java/ch/loway/oss/ari4java/generated/DeserializeToListOfInterfaceTest.java new file mode 100755 index 00000000..3be502d4 --- /dev/null +++ b/src/test/java/ch/loway/oss/ari4java/generated/DeserializeToListOfInterfaceTest.java @@ -0,0 +1,113 @@ +package ch.loway.oss.ari4java.generated; + +import ch.loway.oss.ari4java.tools.BaseAriAction; +import ch.loway.oss.ari4java.tools.RestException; +import com.fasterxml.jackson.core.type.TypeReference; +import org.junit.jupiter.api.Test; + +import java.util.List; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +/** + * Test how we can deserialize a Json blob to a List of Interface. + * To make our life easier, we create a custom interface and a + * matching object. + * + * @author lenz + */ +public class DeserializeToListOfInterfaceTest { + + /** + * Test if all the machinery is correct. + */ + @Test + public void testDeserializeConcrete() throws RestException { + + List l = BaseAriAction.deserializeJson(STR_TUPLE, + new TypeReference>() { + }); + + assertEquals(2, l.size()); + assertEquals("x1", l.get(0).getA()); + assertEquals("y2", l.get(1).getB()); + } + + /** + * Now this gets us what we need. + * + * @throws RestException + */ + @Test + public void testDeserializeAbstract() throws RestException { + + List l = BaseAriAction.deserializeJsonAsAbstractList(STR_TUPLE, + new TypeReference>() { + } + ); + + assertEquals(2, l.size()); + assertEquals("x1", l.get(0).getA()); + assertEquals("y2", l.get(1).getB()); + } + + public static final String STR_TUPLE = "[\n" + + " {\"a\": \"x1\", \"b\": \"x2\" },\n" + + " {\"a\": \"y1\", \"b\": \"y2\" }\n" + + "]"; + + /** + * My interface + */ + private interface Tuple_if { + public String getA(); + + public String getB(); + + public void setA(String v); + + public void setB(String v); + } + + /** + * My physical class + */ + private static class Tuple_impl implements Tuple_if { + private String a; + private String b; + + /** + * @return the a + */ + @Override + public String getA() { + return a; + } + + /** + * @param a the a to set + */ + @Override + public void setA(String a) { + this.a = a; + } + + /** + * @return the b + */ + @Override + public String getB() { + return b; + } + + /** + * @param b the b to set + */ + @Override + public void setB(String b) { + this.b = b; + } + + } + +} diff --git a/src/test/java/ch/loway/oss/ari4java/generated/EventBuilderTest.java b/src/test/java/ch/loway/oss/ari4java/generated/EventBuilderTest.java new file mode 100755 index 00000000..f525e5b8 --- /dev/null +++ b/src/test/java/ch/loway/oss/ari4java/generated/EventBuilderTest.java @@ -0,0 +1,69 @@ +package ch.loway.oss.ari4java.generated; + +import ch.loway.oss.ari4java.generated.ari_0_0_1.models.Message_impl_ari_0_0_1; +import ch.loway.oss.ari4java.generated.models.Message; +import ch.loway.oss.ari4java.generated.models.StasisStart; +import ch.loway.oss.ari4java.tools.BaseAriAction; +import ch.loway.oss.ari4java.tools.RestException; + +import static org.junit.jupiter.api.Assertions.*; + +/** + * @author lenz + */ +public class EventBuilderTest extends BaseActionTest { + + @Override + protected String getJson() { + return requoteString("" + + " {" + + " 'application': 'hello'," + + " 'args': [" + + " 'world'" + + " ]," + + " 'channel': {" + + " 'accountcode': ''," + + " 'caller': {" + + " 'name': 'blink'," + + " 'number': 'blink'" + + " }," + + " 'connected': {" + + " 'name': ''," + + " 'number': ''" + + " }," + + " 'creationtime': '2013-10-15T15:54:12.625-0500'," + + " 'dialplan': {" + + " 'context': 'default'," + + " 'exten': '7000'," + + " 'priority': 2" + + " }," + + " 'id': '1381870452.0'," + + " 'name': 'SIP/blink-00000000'," + + " 'state': 'Ring'" + + " }," + + " 'timestamp': '2013-10-15T15:54:12.626-0500'," + + " 'type': 'StasisStart'" + + " }"); + } + + @Override + protected Message getInstance() { + try { + return BaseAriAction.deserializeEvent(getJson(), Message_impl_ari_0_0_1.class); + } catch (RestException e) { + fail("Error deserializing event", e); + return null; + } + } + + protected Message createWForcedResponse() { + return getInstance(); + } + + @Override + protected void ariActionTest(Message msg) throws RestException { + assertInstanceOf(StasisStart.class, msg); + StasisStart ss = (StasisStart) msg; + assertEquals("blink", ss.getChannel().getCaller().getName()); + } +} diff --git a/src/test/java/ch/loway/oss/ari4java/tools/http/NettyHttpClientHandlerTest.java b/src/test/java/ch/loway/oss/ari4java/tools/http/NettyHttpClientHandlerTest.java new file mode 100755 index 00000000..563a451c --- /dev/null +++ b/src/test/java/ch/loway/oss/ari4java/tools/http/NettyHttpClientHandlerTest.java @@ -0,0 +1,24 @@ +package ch.loway.oss.ari4java.tools.http; + +import ch.loway.oss.ari4java.tools.ARIEncoder; +import io.netty.buffer.Unpooled; +import io.netty.channel.embedded.EmbeddedChannel; +import io.netty.handler.codec.http.*; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.*; + +public class NettyHttpClientHandlerTest { + + @Test + public void testResponse() { + NettyHttpClientHandler h = new NettyHttpClientHandler(); + EmbeddedChannel channel = new EmbeddedChannel(); + channel.pipeline().addLast("http-codec", new HttpClientCodec()); + channel.pipeline().addLast("http-aggregator", new HttpObjectAggregator(NettyHttpClient.MAX_HTTP_REQUEST)); + channel.pipeline().addLast("http-handler", h); + channel.writeInbound(new DefaultFullHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.OK, Unpooled.copiedBuffer("test", ARIEncoder.ENCODING))); + assertEquals("test", h.getResponseText()); + } + +} diff --git a/src/test/java/ch/loway/oss/ari4java/tools/http/NettyHttpClientTest.java b/src/test/java/ch/loway/oss/ari4java/tools/http/NettyHttpClientTest.java new file mode 100755 index 00000000..312d8fb7 --- /dev/null +++ b/src/test/java/ch/loway/oss/ari4java/tools/http/NettyHttpClientTest.java @@ -0,0 +1,343 @@ +package ch.loway.oss.ari4java.tools.http; + +import ch.loway.oss.ari4java.generated.actions.requests.AsteriskPingGetRequest; +import ch.loway.oss.ari4java.generated.ari_6_0_0.actions.requests.*; +import ch.loway.oss.ari4java.generated.models.AsteriskPing; +import ch.loway.oss.ari4java.tools.*; +import io.netty.bootstrap.Bootstrap; +import io.netty.buffer.ByteBuf; +import io.netty.buffer.Unpooled; +import io.netty.channel.*; +import io.netty.channel.embedded.EmbeddedChannel; +import io.netty.handler.codec.http.*; +import io.netty.handler.codec.http.websocketx.WebSocketVersion; +import io.netty.util.concurrent.Future; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.Test; +import org.mockito.ArgumentCaptor; + +import java.net.URI; +import java.net.URISyntaxException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicBoolean; + +import static org.junit.jupiter.api.Assertions.*; +import static org.mockito.Mockito.*; + +public class NettyHttpClientTest { + + private NettyHttpClient client; + private ChannelFuture cf; + private Future fc; + private final ExecutorService executor = Executors.newSingleThreadExecutor(); + + private void setupTestClient(boolean init, Channel ch) throws URISyntaxException { + client = new NettyHttpClient() { + protected void initHttpBootstrap() { + // for testing skip the bootstrapping + } + + @Override + protected Future poolAcquire() { + return fc; + } + + @Override + protected void poolRelease(Channel ch) { + // for testing skip + } + }; + if (init) { + client.initialize("http://localhost:8088/", "user", "p@ss"); + } + if (ch instanceof EmbeddedChannel) { + fc = ch.eventLoop().newSucceededFuture(ch); + } else { + //noinspection unchecked + fc = (Future) mock(Future.class); + when(fc.syncUninterruptibly()).thenReturn(fc); + when(fc.getNow()).thenReturn(ch); + } + } + + @AfterEach + public void tearDown() { + if (client != null) { + client.destroy(); + } + } + + @Test + public void testInitializeBadURL() throws URISyntaxException { + setupTestClient(false, null); + assertThrows(URISyntaxException.class, () -> + client.initialize(":", "", "")); + } + + @Test + public void testInitializeInvalidURL() throws URISyntaxException { + setupTestClient(false, null); + assertThrows(IllegalArgumentException.class, () -> + client.initialize("ws://localhost:8088/", "", "")); + } + + @Test + public void testBuildURL() throws Exception { + setupTestClient(true, null); + List queryParams = new ArrayList<>(); + queryParams.add(HttpParam.build("a", "b/c")); + queryParams.add(HttpParam.build("d", "e")); + String url = client.buildURL("/channels", queryParams, false); + assertEquals("/ari/channels?a=b%2Fc&d=e", url); + } + + @Test + public void testInitialize() throws Exception { + NettyHttpClient client = new NettyHttpClient(); + client.initialize("http://localhost:8088/", "user", "p@ss"); + client.destroy(); + assertNotNull(client.baseUri); + } + + @Test + public void testWsConnect() throws Exception { + Bootstrap bootstrap = mock(Bootstrap.class); + NettyWSClientHandler testHandler = mock(NettyWSClientHandler.class); + ChannelFuture handshakeFuture = mock(ChannelFuture.class); + when(testHandler.handshakeFuture()).thenReturn(handshakeFuture); + EmbeddedChannel channel = createTestChannel("ws-handler", testHandler); + FullHttpRequest req = new DefaultFullHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.GET, "/events"); + HttpHeaders headers = req.headers(); + headers.set(HttpHeaderNames.UPGRADE, HttpHeaderValues.WEBSOCKET); + headers.set(HttpHeaderNames.SEC_WEBSOCKET_KEY, "dGhlIHNhbXBsZSBub25jZQ=="); + headers.set(HttpHeaderNames.SEC_WEBSOCKET_VERSION, WebSocketVersion.V13); + cf = channel.closeFuture(); + when(bootstrap.connect(eq("localhost"), eq(443))).thenReturn(cf); + ((DefaultChannelPromise) cf).setSuccess(null); + HttpResponseHandler testWsCallback = mock(HttpResponseHandler.class); + when(testWsCallback.getLastResponseTime()).thenReturn(0L); + class TestNettyHttpClient extends NettyHttpClient { + @Override + public WsClientConnection connect(final HttpResponseHandler callback, final String url, + final List lParamQuery) { + try { + baseUri = new URI("https://localhost/"); + this.auth = "123"; + getWsHandshake(url, lParamQuery); // here so the code is run for code coverage + } catch (URISyntaxException e) { + // oh well + } + pingPeriod = 1; + pingTimeUnit = TimeUnit.SECONDS; + wsHandler = testHandler; + wsCallback = testWsCallback; + return connect(bootstrap, callback); + } + } + TestNettyHttpClient client = new TestNettyHttpClient(); + WsClient.WsClientConnection connection = client.connect(mock(HttpResponseHandler.class), "/events", null); + assertNotNull(connection, "Expected WsClientConnection"); + channel.writeInbound(req); + ArgumentCaptor captor = ArgumentCaptor.forClass(ChannelFutureListener.class); + verify(handshakeFuture).addListener(captor.capture()); + captor.getValue().operationComplete(channel.newSucceededFuture()); + client.onWSPong(); + Thread.sleep(2500); + System.out.println(channel.inboundMessages().toString()); + channel.readOutbound(); + client.destroy(); + } + + @Test + public void testHttpActionSync() throws Exception { + Channel ch = mock(Channel.class); + ChannelPipeline p = mock(ChannelPipeline.class); + when(ch.pipeline()).thenReturn(p); + setupTestClient(true, ch); + NettyHttpClientHandler h = new NettyHttpClientHandler() { + @Override + public void reset() { + // dont reset for this test + } + + @Override + public void waitForResponse(int timeout) { + // dont wait for test + } + }; + when(p.get("http-handler")).thenReturn(h); + h.responseStatus = HttpResponseStatus.OK; + h.responseBytes = "testing".getBytes(ARIEncoder.ENCODING); + String res = client.httpActionSync("", "GET", null, null, null); + assertEquals("testing", res); + } + + private EmbeddedChannel createTestChannel() { + EmbeddedChannel channel = createTestChannel("http-handler", new NettyHttpClientHandler()); + cf = channel.closeFuture(); + ((DefaultChannelPromise) cf).setSuccess(null); + return channel; + } + + private EmbeddedChannel createTestChannel(String name, ChannelHandler handler) { + EmbeddedChannel channel = new EmbeddedChannel(); + channel.pipeline().addLast("http-codec", new HttpClientCodec()); + channel.pipeline().addLast("http-aggregator", new HttpObjectAggregator(NettyHttpClient.MAX_HTTP_REQUEST)); + channel.pipeline().addLast(name, handler); + return channel; + } + + private void delayedWriteInbound(EmbeddedChannel channel, HttpResponseStatus status, String data) { + delayedWriteInbound(channel, status, data, 200); + } + + private void delayedWriteInbound(EmbeddedChannel channel, HttpResponseStatus status, String data, long sleep) { + executor.submit(() -> { + try { + Thread.sleep(sleep); + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + } + channel.writeInbound(new DefaultFullHttpResponse( + HttpVersion.HTTP_1_1, status, Unpooled.copiedBuffer(data, ARIEncoder.ENCODING))); + }); + } + + private AsteriskPingGetRequest pingSetup(EmbeddedChannel channel) { + delayedWriteInbound(channel, HttpResponseStatus.OK, + "{\"ping\":\"pong\",\"timestamp\":\"2020-01-01T00:00:00.000+0000\",\"asterisk_id\":\"test_asterisk\"}", 500); + AsteriskPingGetRequest_impl_ari_6_0_0 req = new AsteriskPingGetRequest_impl_ari_6_0_0(); + req.setHttpClient(client); + return req; + } + + private void pingValidate(EmbeddedChannel channel, AsteriskPing res) { + String data = ((ByteBuf) channel.readOutbound()).toString(ARIEncoder.ENCODING); + String expecting = "GET /ari/asterisk/ping HTTP/1.1"; + assertTrue(data.startsWith(expecting), "HTTP Request Data does not start with " + expecting); + assertTrue(data.contains("authorization: Basic dXNlcjpwQHNz"), "Expected HTTP Auth Header"); + assertEquals("pong", res.getPing()); + assertEquals("test_asterisk", res.getAsterisk_id()); + } + + @Test + public void testHttpActionSyncPing() throws Exception { + EmbeddedChannel channel = createTestChannel(); + setupTestClient(true, channel); + AsteriskPingGetRequest req = pingSetup(channel); + AsteriskPing res = req.execute(); + pingValidate(channel, res); + } + + @Test + public void testHttpActionAsyncPing() throws Exception { + EmbeddedChannel channel = createTestChannel(); + setupTestClient(true, channel); + AsteriskPingGetRequest req = pingSetup(channel); + final AtomicBoolean callback = new AtomicBoolean(false); + req.execute(new AriCallback() { + @Override + public void onSuccess(AsteriskPing res) { + pingValidate(channel, res); + callback.set(true); + } + + @Override + public void onFailure(RestException e) { + fail(e.toString()); + } + }); + Thread.sleep(550); + channel.runPendingTasks(); + assertTrue(callback.get(), "No onSuccess Callback"); + } + + @Test + public void testHttpActionException() throws Exception { + EmbeddedChannel channel = createTestChannel(); + setupTestClient(true, channel); + ApplicationsGetRequest_impl_ari_6_0_0 req = new ApplicationsGetRequest_impl_ari_6_0_0("test"); + req.setHttpClient(client); + // when the response is JSON error then return the error from the server + delayedWriteInbound(channel, HttpResponseStatus.NOT_FOUND, "{\"message\":\"a test error\"}"); + boolean exception = false; + try { + req.execute(); + } catch (RestException e) { + assertEquals("a test error", e.getMessage()); + exception = true; + } + assertTrue(exception, "Expecting an exception"); + // when the response is not JSON and there is an error definition from the API then return API definition + delayedWriteInbound(channel, HttpResponseStatus.NOT_FOUND, "Not found"); + exception = false; + try { + req.execute(); + } catch (RestException e) { + assertEquals("Application does not exist.", e.getMessage()); + exception = true; + } + assertTrue(exception, "Expecting an exception"); + } + + @Test + public void testBodyFieldSerialisation() throws Exception { + EmbeddedChannel channel = createTestChannel(); + setupTestClient(true, channel); + delayedWriteInbound(channel, HttpResponseStatus.OK, "[]"); + AsteriskUpdateObjectPutRequest_impl_ari_6_0_0 req = new AsteriskUpdateObjectPutRequest_impl_ari_6_0_0( + "cc", "ot", "id"); + req.setHttpClient(client); + req.addFields("key1", "val1").addFields("key2", "val2").execute(); + validateBody(channel, "fields"); + } + + @Test + public void testBodyVariableSerialisation() throws Exception { + EmbeddedChannel channel = createTestChannel(); + setupTestClient(true, channel); + delayedWriteInbound(channel, HttpResponseStatus.OK, "{}"); + EndpointsSendMessagePutRequest_impl_ari_6_0_0 req = new EndpointsSendMessagePutRequest_impl_ari_6_0_0("to", "from"); + req.setHttpClient(client); + req.addVariables("key1", "val1").addVariables("key2", "val2").execute(); + validateBody(channel, "variables"); + } + + @Test + public void testBodyObjectSerialisation() throws Exception { + final EmbeddedChannel channel = createTestChannel(); + setupTestClient(true, channel); + delayedWriteInbound(channel, HttpResponseStatus.OK, "{}"); + Map map = new HashMap<>(); + map.put("key1", "val1"); + map.put("key2", "val2"); + ApplicationsFilterPutRequest_impl_ari_6_0_0 req = new ApplicationsFilterPutRequest_impl_ari_6_0_0("app"); + req.setHttpClient(client); + req.setFilter(map).execute(); + validateBody(channel, "filter"); + } + + private void validateBody(EmbeddedChannel channel, String field) { + String expected = "{\"" + field + "\":{\"key1\":\"val1\",\"key2\":\"val2\"}}"; + if ("fields".equals(field)) { + expected = "{\"fields\":[{\"attribute\":\"key1\",\"value\":\"val1\"},{\"attribute\":\"key2\",\"value\":\"val2\"}]}"; + } + StringBuilder buffer = new StringBuilder(); + ByteBuf data = channel.readOutbound(); + while (data != null) { + if (data.readableBytes() > 0) { + buffer.append(data.toString(ARIEncoder.ENCODING)); + } + data = channel.readOutbound(); + } + String[] lines = buffer.toString().split("\n"); + assertEquals(expected, lines[lines.length - 1].trim()); + } + +} diff --git a/src/test/resources/logback.xml b/src/test/resources/logback.xml new file mode 100644 index 00000000..b997c8f5 --- /dev/null +++ b/src/test/resources/logback.xml @@ -0,0 +1,16 @@ + + + + + + %cyan(%d{ISO8601}) %highlight(%-5level) [%blue(%t)] %green(%c{1}): %msg%n%throwable + + + + + + + + + + \ No newline at end of file diff --git a/tests/ch/loway/oss/ari4java/ARITest.java b/tests/ch/loway/oss/ari4java/ARITest.java deleted file mode 100644 index 537020b2..00000000 --- a/tests/ch/loway/oss/ari4java/ARITest.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package ch.loway.oss.ari4java; - -import ch.loway.oss.ari4java.generated.ActionApplications; -import ch.loway.oss.ari4java.generated.ActionAsterisk; -import ch.loway.oss.ari4java.generated.ActionBridges; -import ch.loway.oss.ari4java.generated.ActionChannels; -import ch.loway.oss.ari4java.generated.ActionDeviceStates; -import ch.loway.oss.ari4java.generated.ActionEndpoints; -import ch.loway.oss.ari4java.generated.ActionEvents; -import ch.loway.oss.ari4java.generated.ActionPlaybacks; -import ch.loway.oss.ari4java.generated.ActionRecordings; -import ch.loway.oss.ari4java.generated.ActionSounds; -import ch.loway.oss.ari4java.generated.ari_0_0_1.actions.ActionAsterisk_impl_ari_0_0_1; -import ch.loway.oss.ari4java.generated.ari_0_0_1.actions.ActionBridges_impl_ari_0_0_1; -import ch.loway.oss.ari4java.tools.ARIException; -import ch.loway.oss.ari4java.tools.HttpClient; -import ch.loway.oss.ari4java.tools.MessageQueue; -import ch.loway.oss.ari4java.tools.WsClient; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; -import static org.junit.Assert.*; - -/** - * - * @author lenz - */ -public class ARITest { - - public ARITest() { - } - - @BeforeClass - public static void setUpClass() { - } - - @AfterClass - public static void tearDownClass() { - } - - @Before - public void setUp() { - } - - @After - public void tearDown() { - } - - - /** - * An example abstract to concrete builder. - */ - - public static class SampleClassFactory implements ARI.ClassFactory { - - @Override - public Class getImplementationFor(Class interfaceClass) { - - if ( interfaceClass.equals(ActionBridges.class) ) { - return ActionBridges_impl_ari_0_0_1.class; - } else - - { - return null; - } - } - } - - @Test - public void testImplementationFactory() { - ARI.ClassFactory factory = new SampleClassFactory(); - - assertEquals("ActionBridges", ActionBridges_impl_ari_0_0_1.class, factory.getImplementationFor(ActionBridges.class)); - assertEquals("Not found", null, factory.getImplementationFor(String.class)); - } - - @Test - public void testBuildAction() throws ARIException { - ARI ari = new ARI(); - ari.setVersion(AriVersion.ARI_0_0_1); - - ActionAsterisk asterisk = ari.asterisk(); - assertTrue( "Correct type", asterisk instanceof ActionAsterisk_impl_ari_0_0_1 ); - } - - @Test - public void testCreateUid() throws ARIException { - ARI ari = new ARI(); - String v = ari.getUID(); - System.out.println("UID: "+v); - assertTrue( "UID created", v.length() > 0); - } - - -} diff --git a/tests/ch/loway/oss/ari4java/generated/ActionSoundsTest.java b/tests/ch/loway/oss/ari4java/generated/ActionSoundsTest.java deleted file mode 100644 index b14fad3d..00000000 --- a/tests/ch/loway/oss/ari4java/generated/ActionSoundsTest.java +++ /dev/null @@ -1,107 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -import ch.loway.oss.ari4java.generated.ari_0_0_1.actions.ActionSounds_impl_ari_0_0_1; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.RestException; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; -import static org.junit.Assert.*; - -/** - * - * @author lenz - */ -public class ActionSoundsTest { - - static final String jsonSounds = requoteString( "" - + " { " - + " 'id': 'abcde', " - + " 'text': 'some text', " - + " 'formats': [ " - + " { 'language': 'en', 'format': 'wav' }, " - + " { 'language': 'es', 'format': 'wav' }, " - + " { 'language': 'es', 'format': 'gsm' } " - + " ] " - + " } " ); - - public ActionSoundsTest() { - } - - @BeforeClass - public static void setUpClass() throws Exception { - } - - @AfterClass - public static void tearDownClass() throws Exception { - } - - @Before - public void setUp() { - } - - @After - public void tearDown() { - } - - /** - * Strings in a JSON object need the double quotes. - * Unfortunately using double quotes in Java is a PITA. - * So... - * - * @param s - * @return Translating 's to "s - */ - - public static String requoteString( String s ) { - return s.replace("'", "\""); - } - - - private ActionSounds createWForcedResponse( String response ) { - ActionSounds_impl_ari_0_0_1 a = new ActionSounds_impl_ari_0_0_1(); - a.forceResponse( response ); - - ActionSounds aa = (ActionSounds) a; - return aa; - } - - - /** - * Tries generating a bridge. - * - */ - - @Test - public void generateSound() throws RestException { - ActionSounds aa = createWForcedResponse(jsonSounds); - - Sound s = aa.get("abcde"); - - assertEquals("Id", "abcde", s.getId() ); - assertEquals("Formats", 3, s.getFormats().size() ); - assertEquals("Language of format #2", "es", s.getFormats().get(1).getLanguage() ); - - aa.get("abcde", new AriCallback() { - - @Override - public void onSuccess(Sound result) { - assertEquals("Id", "abcde", result.getId() ); - assertEquals("Formats", 3, result.getFormats().size() ); - assertEquals("Language of format #2", "es", result.getFormats().get(1).getLanguage() ); - } - - @Override - public void onFailure(RestException e) { - e.printStackTrace(); - } - }); - - } - - - - -} \ No newline at end of file diff --git a/tests/ch/loway/oss/ari4java/generated/ActonBridgesTest.java b/tests/ch/loway/oss/ari4java/generated/ActonBridgesTest.java deleted file mode 100644 index 13e3ad80..00000000 --- a/tests/ch/loway/oss/ari4java/generated/ActonBridgesTest.java +++ /dev/null @@ -1,112 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -import ch.loway.oss.ari4java.generated.ari_0_0_1.actions.ActionBridges_impl_ari_0_0_1; -import ch.loway.oss.ari4java.tools.RestException; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; -import static org.junit.Assert.*; - -/** - * - * @author lenz - */ -public class ActonBridgesTest { - - static final String jsonBridge = requoteString( "" - + " { " - + " 'id': 'aaa', " - + " 'technology': 'xxx', " - + " 'bridge_type': 'mixing', " - + " 'bridge_class': 'aaa', " - + " 'channels': ['a', 'b', 'c' ] " - + " } " ); - - - public ActonBridgesTest() { - } - - @BeforeClass - public static void setUpClass() throws Exception { - } - - @AfterClass - public static void tearDownClass() throws Exception { - } - - @Before - public void setUp() { - } - - @After - public void tearDown() { - } - - /** - * Strings in a JSON object need the double quotes. - * Unfortunately using double quotes in Java is a PITA. - * So... - * - * @param s - * @return Translating 's to "s - */ - - public static String requoteString( String s ) { - return s.replace("'", "\""); - } - - - private ActionBridges createWForcedResponse( String response ) { - ActionBridges_impl_ari_0_0_1 a = new ActionBridges_impl_ari_0_0_1(); - a.forceResponse( response ); - - ActionBridges aa = (ActionBridges) a; - return aa; - } - - - /** - * Tries generating a bridge. - * - */ - - @Test - public void generateABridge() throws RestException { - ActionBridges aa = createWForcedResponse(jsonBridge); - - Bridge b = aa.get("abcd"); - - assertEquals("Id", "aaa", b.getId() ); - assertEquals("N channels", 3, b.getChannels().size() ); - - } - - - /** - * In this example we force the wrong result. - * The object caannot then be deserialized and we expect an exception to be thrown. - * - * @throws RestException - */ - - @Test - public void receiveWrongMessage() throws RestException { - - ActionBridges aa = createWForcedResponse(jsonBridge); - - boolean exceptionRaised = false; - - try { - Playback pb = aa.play("aaa", "sss", "en", 0, 0); - } catch ( RestException e ) { - exceptionRaised = true; - } - - assertTrue("Exception triggered", exceptionRaised); - - } - - -} \ No newline at end of file diff --git a/tests/ch/loway/oss/ari4java/generated/DeserializeToListOfInterfaceTest.java b/tests/ch/loway/oss/ari4java/generated/DeserializeToListOfInterfaceTest.java deleted file mode 100644 index ca6d871d..00000000 --- a/tests/ch/loway/oss/ari4java/generated/DeserializeToListOfInterfaceTest.java +++ /dev/null @@ -1,143 +0,0 @@ -package ch.loway.oss.ari4java.generated; - -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import com.fasterxml.jackson.core.type.TypeReference; -import java.util.List; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; -import static org.junit.Assert.*; - -/** - * Test how we can deserialize a Json blob to a List of Interface. - * To make our life easier, we create a custom interface and a - * matching object. - * - * @author lenz - */ -public class DeserializeToListOfInterfaceTest { - - public DeserializeToListOfInterfaceTest() { - } - - @BeforeClass - public static void setUpClass() throws Exception { - } - - @AfterClass - public static void tearDownClass() throws Exception { - } - - @Before - public void setUp() { - } - - @After - public void tearDown() { - } - - - - /** - * Test if all the machinery is correct. - * - */ - - @Test - public void testDeserializeConcrete() throws RestException { - - List l = BaseAriAction.deserializeJson( STR_TUPLE, - new TypeReference>() {} ); - - List x2 = (List) l; - - assertEquals( "Size", 2, l.size() ); - assertEquals( "El 1 A", "x1", l.get(0).getA() ); - assertEquals( "El 2 B", "y2", l.get(1).getB() ); - } - - /** - * Now this gets us what we need. - * - * @throws RestException - */ - - @Test - public void testDeserializeAbstract() throws RestException { - - List l = BaseAriAction.deserializeJsonAsAbstractList(STR_TUPLE, - new TypeReference>() {} - ); - - assertEquals( "Size", 2, l.size() ); - assertEquals( "El 1 A", "x1", l.get(0).getA() ); - assertEquals( "El 2 B", "y2", l.get(1).getB() ); - System.out.println( l.get(0) ); - } - - - - - - public static String STR_TUPLE = "[\n" + - " {\"a\": \"x1\", \"b\": \"x2\" },\n" + - " {\"a\": \"y1\", \"b\": \"y2\" }\n" + - "]"; - - /** - * My interface - */ - - private static interface Tuple_if { - public String getA(); - public String getB(); - public void setA( String v ); - public void setB( String v ); - } - - /** - * My physical class - */ - - private static class Tuple_impl implements Tuple_if { - private String a; - private String b; - - /** - * @return the a - */ - @Override - public String getA() { - return a; - } - - /** - * @param a the a to set - */ - @Override - public void setA(String a) { - this.a = a; - } - - /** - * @return the b - */ - @Override - public String getB() { - return b; - } - - /** - * @param b the b to set - */ - @Override - public void setB(String b) { - this.b = b; - } - - } - -} \ No newline at end of file diff --git a/tests/ch/loway/oss/ari4java/generated/EventBuilderTest.java b/tests/ch/loway/oss/ari4java/generated/EventBuilderTest.java deleted file mode 100644 index 4a0e394a..00000000 --- a/tests/ch/loway/oss/ari4java/generated/EventBuilderTest.java +++ /dev/null @@ -1,106 +0,0 @@ -package ch.loway.oss.ari4java.generated; - - -import ch.loway.oss.ari4java.generated.ari_0_0_1.models.Message_impl_ari_0_0_1; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; -import static org.junit.Assert.*; - -/** - * - * @author lenz - */ -public class EventBuilderTest { - - static final String jsonStasisStartEvent = requoteString( "" -+ " { " -+ " 'application': 'hello', " -+ " 'args': [ " -+ " 'world' " -+ " ], " -+ " 'channel': { " -+ " 'accountcode': '', " -+ " 'caller': { " -+ " 'name': 'blink', " -+ " 'number': 'blink' " -+ " }, " -+ " 'connected': { " -+ " 'name': '', " -+ " 'number': '' " -+ " }, " -+ " 'creationtime': '2013-10-15T15:54:12.625-0500', " -+ " 'dialplan': { " -+ " 'context': 'default', " -+ " 'exten': '7000', " -+ " 'priority': 2 " -+ " }, " -+ " 'id': '1381870452.0', " -+ " 'name': 'SIP/blink-00000000', " -+ " 'state': 'Ring' " -+ " }, " -+ " 'timestamp': '2013-10-15T15:54:12.626-0500', " -+ " 'type': 'StasisStart' " -+ " } " ); - - public EventBuilderTest() { - } - - @BeforeClass - public static void setUpClass() throws Exception { - } - - @AfterClass - public static void tearDownClass() throws Exception { - } - - @Before - public void setUp() { - } - - @After - public void tearDown() { - } - - /** - * Strings in a JSON object need the double quotes. - * Unfortunately using double quotes in Java is a PITA. - * So... - * - * @param s - * @return Translating 's to "s - */ - - public static String requoteString( String s ) { - return s.replace("'", "\""); - } - - - - /** - * Tries creating an event out of the response. - * - */ - - @Test - public void generateStatsiStartOutOfData() throws RestException { - - BaseAriAction action = new BaseAriAction(); - Message msg = action.deserializeEvent(jsonStasisStartEvent, Message_impl_ari_0_0_1.class ); - - assertTrue("Type: StasisStart", msg instanceof StasisStart ); - - StasisStart ss = (StasisStart) msg; - - assertEquals( "Caller ID", "blink", ss.getChannel().getCaller().getName() ); - - } - - - - -} \ No newline at end of file diff --git a/tests/ch/loway/oss/ari4java/sandbox/TestARI.java b/tests/ch/loway/oss/ari4java/sandbox/TestARI.java deleted file mode 100644 index dbfdc4f3..00000000 --- a/tests/ch/loway/oss/ari4java/sandbox/TestARI.java +++ /dev/null @@ -1,99 +0,0 @@ -package ch.loway.oss.ari4java.sandbox; - -import java.util.List; - -import ch.loway.oss.ari4java.ARI; -import ch.loway.oss.ari4java.AriVersion; -import ch.loway.oss.ari4java.generated.ActionApplications; -import ch.loway.oss.ari4java.generated.ActionAsterisk; -import ch.loway.oss.ari4java.generated.ActionEvents; -import ch.loway.oss.ari4java.generated.Application; -import ch.loway.oss.ari4java.generated.AsteriskInfo; -import ch.loway.oss.ari4java.generated.Message; -import ch.loway.oss.ari4java.generated.Variable; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.RestException; -import ch.loway.oss.ari4java.tools.http.NettyHttpClient; - -public class TestARI { - - public static void main(String[] args) { - ARI ari = new ARI(); - NettyHttpClient hc = new NettyHttpClient(); - try { - hc.initialize("http://192.168.0.194:8088/", "admin", "admin"); - ari.setHttpClient(hc); - ari.setWsClient(hc); - ari.setVersion(AriVersion.ARI_0_0_1); - ActionApplications ac = ari.getActionImpl(ActionApplications.class); - List alist = ac.list(); - for (Application app : alist) { - System.out.println(app.getName()); - } - ActionAsterisk aa = ari.getActionImpl(ActionAsterisk.class); - AsteriskInfo ai = aa.getInfo(""); - System.out.println(ai.getSystem().getEntity_id()); - // Let's try async - aa.getInfo("", new AriCallback() { - @Override - public void onSuccess(AsteriskInfo result) { - System.out.println(result.getSystem().getEntity_id()); - } - @Override - public void onFailure(RestException e) { - e.printStackTrace(); - } - }); - aa.getGlobalVar("AMPMGRPASS", new AriCallback() { - @Override - public void onSuccess(Variable result) { - System.out.println(result.getValue()); - } - @Override - public void onFailure(RestException e) { - e.printStackTrace(); - } - }); - aa.setGlobalVar("WHATUP", "Hoo", new AriCallback() { - @Override - public void onSuccess(Void result) { - System.out.println("Done"); - } - @Override - public void onFailure(RestException e) { - e.printStackTrace(); - } - }); - aa.getGlobalVar("WHATUP", new AriCallback() { - @Override - public void onSuccess(Variable result) { - System.out.println(result.getValue()); - } - @Override - public void onFailure(RestException e) { - e.printStackTrace(); - } - }); - System.out.println("Waiting for response..."); - ActionEvents ae = ari.getActionImpl(ActionEvents.class); - ae.eventWebsocket("hello,goodbye", new AriCallback() { - @Override - public void onSuccess(Message result) { - System.out.println("ws="+result); - } - - @Override - public void onFailure(RestException e) { - e.printStackTrace(); - } - }); - Thread.sleep(5000); // Allow wheels to turn before applying brakes - ari.closeAction(ae); - Thread.sleep(5000); - hc.destroy(); - } catch (Exception e) { - e.printStackTrace(); - } - } - -} diff --git a/tests/ch/loway/oss/ari4java/sandbox/TestNettyHttp.java b/tests/ch/loway/oss/ari4java/sandbox/TestNettyHttp.java deleted file mode 100644 index 8ee07eec..00000000 --- a/tests/ch/loway/oss/ari4java/sandbox/TestNettyHttp.java +++ /dev/null @@ -1,127 +0,0 @@ -package ch.loway.oss.ari4java.sandbox; - -import io.netty.bootstrap.Bootstrap; -import io.netty.channel.Channel; -import io.netty.channel.ChannelFuture; -import io.netty.channel.ChannelHandlerContext; -import io.netty.channel.ChannelInitializer; -import io.netty.channel.ChannelPipeline; -import io.netty.channel.ChannelPromise; -import io.netty.channel.EventLoopGroup; -import io.netty.channel.SimpleChannelInboundHandler; -import io.netty.channel.nio.NioEventLoopGroup; -import io.netty.channel.socket.SocketChannel; -import io.netty.channel.socket.nio.NioSocketChannel; -import io.netty.handler.codec.http.DefaultHttpRequest; -import io.netty.handler.codec.http.FullHttpResponse; -import io.netty.handler.codec.http.HttpClientCodec; -import io.netty.handler.codec.http.HttpHeaders; -import io.netty.handler.codec.http.HttpMethod; -import io.netty.handler.codec.http.HttpObjectAggregator; -import io.netty.handler.codec.http.HttpRequest; -import io.netty.handler.codec.http.HttpVersion; -import io.netty.handler.codec.http.websocketx.CloseWebSocketFrame; -import io.netty.handler.codec.http.websocketx.PongWebSocketFrame; -import io.netty.handler.codec.http.websocketx.TextWebSocketFrame; -import io.netty.handler.codec.http.websocketx.WebSocketClientHandshaker; -import io.netty.handler.codec.http.websocketx.WebSocketFrame; -import io.netty.util.CharsetUtil; - -import java.net.URI; -import java.nio.charset.Charset; - -import ch.loway.oss.ari4java.generated.AsteriskInfo; -import ch.loway.oss.ari4java.generated.Message; -import ch.loway.oss.ari4java.generated.ari_0_0_1.models.AsteriskInfo_impl_ari_0_0_1; -import ch.loway.oss.ari4java.generated.ari_0_0_1.models.Message_impl_ari_0_0_1; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; - -public class TestNettyHttp { - - public static class HttpClientHandler extends SimpleChannelInboundHandler { - - public HttpClientHandler() { - } - - - @Override - public void handlerAdded(ChannelHandlerContext ctx) throws Exception { - } - - @Override - public void channelActive(ChannelHandlerContext ctx) throws Exception { - } - - @Override - public void channelInactive(ChannelHandlerContext ctx) throws Exception { - } - - @Override - protected void channelRead0(ChannelHandlerContext ctx, Object msg) - throws Exception { - Channel ch = ctx.channel(); - - if (msg instanceof FullHttpResponse) { - FullHttpResponse response = (FullHttpResponse) msg; - System.out.println("msg="+response); - BaseAriAction ba = new BaseAriAction(); - try { - AsteriskInfo m = ba.deserializeJson(response.content().toString(Charset.defaultCharset()), AsteriskInfo_impl_ari_0_0_1.class); - System.out.println(m); - } catch (RestException e) { - e.printStackTrace(); - } - } else { - } - - } - - @Override - public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception { - cause.printStackTrace(); - - ctx.close(); - } - - } - public static void main(String[] args) { - EventLoopGroup group = new NioEventLoopGroup(); - try { - URI uri = new URI("http://192.168.0.194:8088/"); - Bootstrap b = new Bootstrap(); - String protocol = uri.getScheme(); - if (!"http".equals(protocol)) { - throw new IllegalArgumentException("Unsupported protocol: " + protocol); - } - final HttpClientHandler handler = new HttpClientHandler(); - b.group(group) - .channel(NioSocketChannel.class) - .handler(new ChannelInitializer() { - @Override - public void initChannel(SocketChannel ch) throws Exception { - ChannelPipeline pipeline = ch.pipeline(); - pipeline.addLast("http-codec", new HttpClientCodec()); - pipeline.addLast("aggregator", new HttpObjectAggregator(8192)); - pipeline.addLast("http-handler", handler); - } - }); - - System.out.println("HTTP Client connecting"); - Channel ch = b.connect(uri.getHost(), uri.getPort()).sync().channel(); - - HttpRequest request = new DefaultHttpRequest( - HttpVersion.HTTP_1_1, HttpMethod.GET, "/ari/asterisk/info?api_key=admin:admin"); - request.headers().set(HttpHeaders.Names.HOST, "localhost"); - request.headers().set(HttpHeaders.Names.CONNECTION, HttpHeaders.Values.CLOSE); - ch.writeAndFlush(request); - ch.closeFuture().sync(); - - - } catch (Exception e) { - e.printStackTrace(); - } finally { - group.shutdownGracefully(); - } - } -} diff --git a/tests/ch/loway/oss/ari4java/sandbox/TestNettyWs.java b/tests/ch/loway/oss/ari4java/sandbox/TestNettyWs.java deleted file mode 100644 index 7e4bb6ab..00000000 --- a/tests/ch/loway/oss/ari4java/sandbox/TestNettyWs.java +++ /dev/null @@ -1,188 +0,0 @@ -package ch.loway.oss.ari4java.sandbox; - -import io.netty.bootstrap.Bootstrap; -import io.netty.buffer.Unpooled; -import io.netty.channel.Channel; -import io.netty.channel.ChannelFuture; -import io.netty.channel.ChannelHandlerContext; -import io.netty.channel.ChannelInitializer; -import io.netty.channel.ChannelPipeline; -import io.netty.channel.ChannelPromise; -import io.netty.channel.EventLoopGroup; -import io.netty.channel.SimpleChannelInboundHandler; -import io.netty.channel.nio.NioEventLoopGroup; -import io.netty.channel.socket.SocketChannel; -import io.netty.channel.socket.nio.NioSocketChannel; -import io.netty.handler.codec.http.DefaultHttpHeaders; -import io.netty.handler.codec.http.FullHttpResponse; -import io.netty.handler.codec.http.HttpClientCodec; -import io.netty.handler.codec.http.HttpHeaders; -import io.netty.handler.codec.http.HttpObjectAggregator; -import io.netty.handler.codec.http.websocketx.CloseWebSocketFrame; -import io.netty.handler.codec.http.websocketx.PingWebSocketFrame; -import io.netty.handler.codec.http.websocketx.PongWebSocketFrame; -import io.netty.handler.codec.http.websocketx.TextWebSocketFrame; -import io.netty.handler.codec.http.websocketx.WebSocketClientHandshaker; -import io.netty.handler.codec.http.websocketx.WebSocketClientHandshakerFactory; -import io.netty.handler.codec.http.websocketx.WebSocketFrame; -import io.netty.handler.codec.http.websocketx.WebSocketVersion; -import io.netty.util.CharsetUtil; - -import java.net.URI; -import java.util.concurrent.CountDownLatch; - -import ch.loway.oss.ari4java.generated.Message; -import ch.loway.oss.ari4java.generated.ari_0_0_1.models.Message_impl_ari_0_0_1; -import ch.loway.oss.ari4java.tools.BaseAriAction; -import ch.loway.oss.ari4java.tools.RestException; -//import ch.loway.oss.ari4java.generated.Channel; - -public class TestNettyWs { - - public static class WebSocketClientHandler extends SimpleChannelInboundHandler { - - private final WebSocketClientHandshaker handshaker; - private ChannelPromise handshakeFuture; - - public WebSocketClientHandler(WebSocketClientHandshaker handshaker) { - this.handshaker = handshaker; - } - - public ChannelFuture handshakeFuture() { - return handshakeFuture; - } - - @Override - public void handlerAdded(ChannelHandlerContext ctx) throws Exception { - handshakeFuture = ctx.newPromise(); - } - - @Override - public void channelActive(ChannelHandlerContext ctx) throws Exception { - handshaker.handshake(ctx.channel()); - } - - @Override - public void channelInactive(ChannelHandlerContext ctx) throws Exception { - System.out.println("WebSocket Client disconnected!"); - } - - @Override - //public void messageReceived(ChannelHandlerContext ctx, Object msg) throws Exception { - protected void channelRead0(ChannelHandlerContext ctx, Object msg) - throws Exception { - Channel ch = ctx.channel(); - if (!handshaker.isHandshakeComplete()) { - handshaker.finishHandshake(ch, (FullHttpResponse) msg); - System.out.println("WebSocket Client connected!"); - handshakeFuture.setSuccess(); - return; - } - - if (msg instanceof FullHttpResponse) { - FullHttpResponse response = (FullHttpResponse) msg; - throw new Exception("Unexpected FullHttpResponse (getStatus=" + response.getStatus() + ", content=" - + response.content().toString(CharsetUtil.UTF_8) + ')'); - } - - WebSocketFrame frame = (WebSocketFrame) msg; - if (frame instanceof TextWebSocketFrame) { - TextWebSocketFrame textFrame = (TextWebSocketFrame) frame; - System.out.println("WebSocket Client received message: " + textFrame.text()); - //Channel_impl_ari_0_0_1 c = new Channel_impl_ari_0_0_1(); - BaseAriAction ba = new BaseAriAction(); - try { - Message m = ba.deserializeEvent(textFrame.text(), Message_impl_ari_0_0_1.class); - //Channel c = (Channel) ba.deserializeJson(message, Channel_impl_ari_0_0_1.class); - System.out.println(m); - } catch (RestException e) { - e.printStackTrace(); - } - } else if (frame instanceof PongWebSocketFrame) { - System.out.println("WebSocket Client received pong"); - } else if (frame instanceof CloseWebSocketFrame) { - System.out.println("WebSocket Client received closing"); - ch.close(); - } - } - - @Override - public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception { - cause.printStackTrace(); - - if (!handshakeFuture.isDone()) { - handshakeFuture.setFailure(cause); - } - - ctx.close(); - } - - } - - public static void main(String [] args) { - EventLoopGroup group = new NioEventLoopGroup(); - try { - URI uri = new URI("ws://192.168.0.194:8088/ari/events?app=hello&api_key=admin:admin"); - Bootstrap b = new Bootstrap(); - String protocol = uri.getScheme(); - if (!"ws".equals(protocol)) { - throw new IllegalArgumentException("Unsupported protocol: " + protocol); - } - - HttpHeaders customHeaders = new DefaultHttpHeaders(); - customHeaders.add("MyHeader", "MyValue"); - - // Connect with V13 (RFC 6455 aka HyBi-17). You can change it to V08 or V00. - // If you change it to V00, ping is not supported and remember to change - // HttpResponseDecoder to WebSocketHttpResponseDecoder in the pipeline. - final WebSocketClientHandler handler = - new WebSocketClientHandler( - WebSocketClientHandshakerFactory.newHandshaker( - uri, WebSocketVersion.V13, null, false, customHeaders)); - - b.group(group) - .channel(NioSocketChannel.class) - .handler(new ChannelInitializer() { - @Override - public void initChannel(SocketChannel ch) throws Exception { - ChannelPipeline pipeline = ch.pipeline(); - pipeline.addLast("http-codec", new HttpClientCodec()); - pipeline.addLast("aggregator", new HttpObjectAggregator(8192)); - pipeline.addLast("ws-handler", handler); - } - }); - - System.out.println("WebSocket Client connecting"); - Channel ch = b.connect(uri.getHost(), uri.getPort()).sync().channel(); - handler.handshakeFuture().sync(); - - // Send 10 messages and wait for responses - /*System.out.println("WebSocket Client sending message"); - for (int i = 0; i < 10; i++) { - ch.writeAndFlush(new TextWebSocketFrame("Message #" + i)); - }*/ - - // Ping - System.out.println("WebSocket Client sending ping"); - ch.writeAndFlush(new PingWebSocketFrame(Unpooled.copiedBuffer(new byte[]{1, 2, 3, 4, 5, 6}))); - - // Wait some time - for (int i = 0; i < 30; i++) { - Thread.sleep(1000); - } - - // Close - System.out.println("WebSocket Client sending close"); - ch.writeAndFlush(new CloseWebSocketFrame()); - - // WebSocketClientHandler will disconnectWs the connection when the server - // responds to the CloseWebSocketFrame. - ch.closeFuture().sync(); - } catch (Exception e) { - e.printStackTrace(); - } finally { - group.shutdownGracefully(); - } - - } -} diff --git a/tests/ch/loway/oss/ari4java/sandbox/deserializeJsonTest.java b/tests/ch/loway/oss/ari4java/sandbox/deserializeJsonTest.java deleted file mode 100644 index d7a9ce4e..00000000 --- a/tests/ch/loway/oss/ari4java/sandbox/deserializeJsonTest.java +++ /dev/null @@ -1,184 +0,0 @@ -/* - * - */ - -package ch.loway.oss.ari4java.sandbox; - -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.io.IOException; -import java.util.List; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -/** - * These are a couple of tests written to learn how to use Jackson. - * - * @author lenz - */ -public class deserializeJsonTest { - - public deserializeJsonTest() { - } - - @BeforeClass - public static void setUpClass() throws Exception { - } - - @AfterClass - public static void tearDownClass() throws Exception { - } - - @Before - public void setUp() { - } - - @After - public void tearDown() { - } - - - public static String JSON_XXX = ""; - - - - // TODO add test methods here. - // The methods must be annotated with annotation @Test. For example: - // - - /** - * Lessons learned: - * - use public methods - * - * @throws IOException - */ - - @Test - public void testJacksonSimple() throws IOException { - - ObjectMapper mapper = new ObjectMapper(); - MyValue mx = (MyValue) mapper.readValue("{\"name\":\"Bob\", \"age\":13}", MyValue.class); - - Assert.assertEquals( "name", "Bob", mx.name ); - Assert.assertEquals( "age", 13, mx.age ); - - } - - /** - * Lessons learned: - * - Used TypeReference - * - * @throws IOException - */ - - @Test - public void testJacksonListOfStuff() throws IOException { - - ObjectMapper mapper = new ObjectMapper(); - List lVals = mapper.readValue("[ {\"name\":\"Leo\", \"age\":5}, {\"name\":\"Leda Sofia\", \"age\":3} ]", - new TypeReference>() {}); - - Assert.assertEquals( "N items", 2, lVals.size() ); - - Assert.assertEquals( "name 1", "Leo", lVals.get(0).name ); - Assert.assertEquals( "age 1", 5, lVals.get(0).age ); - - Assert.assertEquals( "name 2", "Leda Sofia", lVals.get(1).name ); - Assert.assertEquals( "age 2", 3, lVals.get(1).age ); - } - - - /** - * Lessons learned: - * - for setters in inner onjects, you set the congrete class - * but have a getter for the interface. Our clients will always use - * the custom interface. - * - * @throws IOException - */ - - @Test - public void createHierarchy() throws IOException { - - ObjectMapper mapper = new ObjectMapper(); - - String json = " { \"name\": \"Leo\", " - + " \"ageObj\": " - + " { \"age\": 5 } " - + " } "; - - InterfaceA obj = mapper.readValue( json, ImplementationA.class ); - - Assert.assertEquals( "name", "Leo", obj.getName() ); - Assert.assertEquals( "age", 5, obj.getAgeObj().getAge() ); - - } - - /** - * Simple object - * - */ - - public static class MyValue { - public String name= ""; - public int age = 0; - } - - - /** - * Multiple objects with multiple interfaces. - * - */ - - public static interface InterfaceA { - public String getName(); - public InterfaceB getAgeObj(); - } - - public static interface InterfaceB { - public int getAge(); - } - - public static class ImplementationA implements InterfaceA { - - private String name = ""; - private ImplementationB obB = null; - - public InterfaceB getAgeObj() { - return obB; - } - - public void setAgeObj( ImplementationB b ) { - obB = (ImplementationB) b; - } - - public String getName() { - return name; - } - - public void setName( String n ) { - name = n; - } - - } - - public static class ImplementationB implements InterfaceB { - - private int age; - - public int getAge() { - return age; - } - - public void setAge( int a) { - age = a; - } - - } - - -} \ No newline at end of file diff --git a/tests/ch/loway/oss/ari4java/sandbox/sample/ConnectAndDial.java b/tests/ch/loway/oss/ari4java/sandbox/sample/ConnectAndDial.java deleted file mode 100644 index 1cbe608c..00000000 --- a/tests/ch/loway/oss/ari4java/sandbox/sample/ConnectAndDial.java +++ /dev/null @@ -1,197 +0,0 @@ -package ch.loway.oss.ari4java.sandbox.sample; - -import ch.loway.oss.ari4java.ARI; -import ch.loway.oss.ari4java.tools.ARIException; -import ch.loway.oss.ari4java.AriVersion; -import ch.loway.oss.ari4java.generated.AsteriskInfo; -import ch.loway.oss.ari4java.generated.Bridge; -import ch.loway.oss.ari4java.generated.Channel; -import ch.loway.oss.ari4java.generated.Message; -import ch.loway.oss.ari4java.generated.StasisStart; -import ch.loway.oss.ari4java.tools.AriCallback; -import ch.loway.oss.ari4java.tools.MessageQueue; -import ch.loway.oss.ari4java.tools.RestException; -import java.util.Collections; -import java.util.List; -import java.util.Map; - -/** - * This class opens up an ARI application that creates a bridge with MOH. - * When a call enters the application, a message is printed and the call - * is connected to the bridge. - * - * @author lenz - */ -public class ConnectAndDial { - - public static final String ASTERISK_ADDRESS = "http://192.168.99.100:18088/"; - public static final String ASTERISK_USER = "ari4java"; - public static final String ASTERISK_PASS = "yothere"; - - ARI ari = null; - Bridge b = null; - - /** - * @param args the command line arguments - */ - public static void main(String[] args) { - ConnectAndDial me = new ConnectAndDial(); - me.start(); - } - - /** - * This is the app... - * - */ - public void start() { - - try { - - connect(); - createBridge(); - - processEvents(); - - removeBridge(); - - } catch (ARIException e) { - e.printStackTrace(); - } finally { - if (ari != null) { - try { - ARI.sleep(500); - ari.cleanup(); - } catch (Throwable t) { - } - } - } - - } - - public void connect() throws ARIException { - - System.out.println("Connecting to: " + ASTERISK_ADDRESS - + " as " + ASTERISK_USER + ":" + ASTERISK_PASS); - - ari = ARI.build( ASTERISK_ADDRESS, "myapp", - ASTERISK_USER, ASTERISK_PASS, - AriVersion.IM_FEELING_LUCKY); - - System.out.println("Connected through ARI: " + ari.getVersion()); - - // let's raise an exeption if the connection is not valid - AsteriskInfo ai = ari.asterisk().getInfo(""); - System.out.println("Hey! We're connected! Asterisk Version: " + ai.getSystem().getVersion()); - - } - - public void createBridge() throws ARIException { - - // create a bridge and start playing MOH on it - // UGLY: we should have a constant for the allowed bridge types - System.out.println( "Creating a bridge"); - b = ari.bridges().create("", "a4j-bridge1", "myBridge"); - System.out.println("Bridge ID:" + b.getId() + " Name:" + b.getName() + " Tech:" + b.getTechnology() + " Creator:" + b.getCreator()); - - // start MOH on the bridge - System.out.println( "Starting MOH on bridge"); - ari.bridges().startMoh(b.getId(), ""); - - // check which bridges are available - System.out.println( "Listing bridges"); - List bridges = ari.bridges().list(); - - for (Bridge bb : bridges) { - printBridge(bb); - } - - } - - - /** - * The new style of event processing... - * - * @throws ARIException - */ - - public void processEvents() throws ARIException { - - System.out.println( "Starting events... " ); - MessageQueue mq = ari.getWebsocketQueue(); - - long start = System.currentTimeMillis(); - - String dummy = ""; - - Channel chan = ari.channels().originate("Local/100@wdep", "100", "wdep", 1, dummy, dummy, dummy, dummy, 10000, Collections.EMPTY_MAP, dummy, dummy, dummy); - System.out.println( "Channel:" + chan.getId() + " in state " + chan.getState() ); - - while ((System.currentTimeMillis() - start) < 10 * 1000L) { - - Message m = mq.dequeueMax( 100, 20 ); - if (m != null) { - - long now = System.currentTimeMillis() - start; - System.out.println(now + ": " + m); - - if (m instanceof StasisStart) { - StasisStart event = (StasisStart) m; - System.out.println("Channel found: " + event.getChannel().getId() + " State:" + event.getChannel().getState()); - - ari.bridges().addChannel(b.getId(), event.getChannel().getId(), ""); - } - } - } - - System.out.println( "No more events... " ); - } - - - public void removeBridge() throws ARIException { - - System.out.println( threadName() + "Removing bridge...." ); - - ari.bridges().destroy(b.getId(), new AriCallback() { - - @Override - public void onSuccess(Void result) { - // Let's do something with the returned value - System.out.println( threadName() + "Bridge destroyed " ); - } - - @Override - public void onFailure(RestException e) { - System.out.println( threadName() + "Failure in removeBridge() " ); - e.printStackTrace(); - } - }); - } - - /** - * Dumps a bridge to string. - * Should we have a default toString that makes more sense? - * - * @param b - */ - private void printBridge(Bridge b) { - System.out.println(". BridgeID:" + b.getId() - + " Name:" + b.getName() - + " Tech:" + b.getTechnology() - + " Creator:" + b.getCreator() - + " Class: " + b.getBridge_class() - + " Type: " + b.getBridge_type() - + " Chans: " + b.getChannels().size()); - for (String s : b.getChannels()) { - System.out.println(" - ChannelID: " + s); - } - } - - /** - * The name of the current thread. - * @return - */ - - private String threadName() { - return "[Thread:" + Thread.currentThread().getName() + "] "; - } -} diff --git a/wiki-images/example-comp-1.png b/wiki-images/example-comp-1.png new file mode 100644 index 00000000..fdf37a7f Binary files /dev/null and b/wiki-images/example-comp-1.png differ diff --git a/wiki-images/example-comp-2.png b/wiki-images/example-comp-2.png new file mode 100644 index 00000000..e86a6ba8 Binary files /dev/null and b/wiki-images/example-comp-2.png differ diff --git a/wiki-images/example-comp-3.png b/wiki-images/example-comp-3.png new file mode 100644 index 00000000..2272b615 Binary files /dev/null and b/wiki-images/example-comp-3.png differ diff --git a/wiki-images/example-phone-1.png b/wiki-images/example-phone-1.png new file mode 100644 index 00000000..ff3f389c Binary files /dev/null and b/wiki-images/example-phone-1.png differ diff --git a/wiki-images/example-phone-2.png b/wiki-images/example-phone-2.png new file mode 100644 index 00000000..ceea8d08 Binary files /dev/null and b/wiki-images/example-phone-2.png differ diff --git a/wiki-images/example-weasels.png b/wiki-images/example-weasels.png new file mode 100644 index 00000000..3b4eb49e Binary files /dev/null and b/wiki-images/example-weasels.png differ