This is an example of creating and managing conferences and using BXML for call flow
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
out
src/main
.gitignore
CODE_OF_CONDUCT.md
CONTRIBUTING.md
ConferencesScreenShot.png
ISSUE_TEMPLATE.md
LICENSE
PULLREQUEST.md
PULL_REQUEST_TEMPLATE.md
Procfile
README.md
pom.xml
system.properties

README.md

Java Conference Example (with BXML)

This example shows how to to use Java and BXML to implement a simple conference app. It uses Java servlets and JSP for a MVC2 approach without a third party MVC framework.

This app will:

  • Display a phone number (routed to the app as described below)
  • Display the conference members when the dial in.

Deploy

Install / Configuration

Before installation you must have the following:

Deploy Locally

To run locally, you must have a running JEE application server. These instructions use Tomcat 8.0.26 (where TOMCAT_HOME is the directory that tomcat is installed).

Step 1 - Set the following environment variables :

  • BANDWIDTH_USER_ID (found on the account tab of the developer console)
  • BANDWIDTH_API_TOKEN (found on the account tab of the developer console)
  • BANDWIDTH_API_SECRET (found on the account tab of the developer console)
  • BANDWIDTH_APPLICATION_ID (from the application created above)

Step 2 - Build the app

Step 3 - Deploy the app

  • cp target/bandwidth-conference-example-1.0-SNAPSHOT.war $TOMCAT_HOME/webapps
  • Type http:localhost:8080/bandwidth-cconference-example-1.0-SNAPSHOT.war/conferences

Step 4 - Run Ngrok

  • cd NGROK_HOME
  • ./ngrok http 8080

Step 5

Deploy from IntelliJ

You can also build and run this from IntelliJ as follows (requires installation of IntelliJ 14):

  1. Create an IntelliJ project from existing source (either the pom.xml or just the source tree)
  2. Make sure that all of the dependent libraries are included in the project structure
  3. Create a Tomcat configuration. Ensure that the Web artifact is created
  4. Start Tomcat with the Run command
  5. Run ngrok from the command line
  6. Change the application url to use the ngrok url

Deploy Heroku (work in progress - still working out the dependencies with jetty annotations in a compatible way with tomcat)

This step assumes that you have the Heroku toolbelt installed and an active Heroku account From the command line run the following:

  • heroku create
  • git add .
  • git commit -m "initial deploy"
  • git push heroku master
  • heroku open

Now update the App Platform application url to point to the Heroku endpoint, e.g.

Testing the call flow

The call flow simply joins the caller into a conference. To see this in action enter the /conferences endpoint in a browser to see the following App screenshot