This repository is deprecated; please follow the main search page or use the ‘Related code repos’ widget on the right side of the current page.

webdialer-java-sample

Overview

Sample Java program demonstrating usage of the Cisco WebDialer SOAP API and Axis2 to perform a <makeCallSoap> call, wait 5 seconds, then end the call with <endCallSoap>.

Visit the DevNet WebDialer Site

Requirements

  • Java 1.8
  • Apache Axis 1.4 / Axis 2 libraries
  • A working Cisco Unified Communications Manager environment:
    • An application-user username/password, with ''Standard EM Authentication Proxy Rights' role
    • An end-user username/password
    • A CTI controllable phone device (such as a Jabber PC client) configured with at least one line, associated to the end-user
    • Ideally a destination phone number for testing (though you could have the line call its own number)

Getting started

  1. Make sure you have Oracle Java SE 1.8 installed, and java is available in the path

    $ java -version
    java version "1.8.0_201"
    Java(TM) SE Runtime Environment (build 1.8.0_201-b09)
    Java HotSpot(TM) 64-Bit Server VM (build 25.201-b09, mixed mode)
  2. Open a terminal and use git to clone this repository:

    git clone https://github.com/CiscoDevNet/webdialer-java-sample.git
  3. Open the Java project in Visual Studio Code:

    cd webdialer-java-sample
    code .
  4. Download the CUCM Tomcat HTTPS certificate (format: x.509 with chain (PEM) ), and place in the certificate/ folder

  5. Import the CUCM HTTPS certificate into the local Java keystore.

    The following command wastested on Ubuntu Linux 19.04, see the Oracle Java documentation for more info on managing Java certificates. Be sure to replace {ANYNAME} and {CERTFILE} with your particular values

    sudo $JAVA_HOME/bin/keytool -import -alias {ANYNAME} -file certificate/{CERTFILE} -keystore  $JAVA_HOME/jre/lib/security/cacerts
  6. Edit .vscode/launch.json to specify environment variables for your CUCM location, WebDialer proxy user credentials, targer user name, calling device name, and to/from phone numbers

  7. The 11.5 version of the WebDialer WSDL file is included in this proect. If you want to use a different version, download the WebDialer WSDL files for your CUCM version, and place in schema/:

    https://{cucm}:8443/webdialer/wsdl/wd70.wsdl
  8. Import the WebDialer WSDL and generate the Axis2 .java files:

    java -cp "lib/*" org.apache.axis.wsdl.WSDL2Java -o src/ schema/wd70.wsdl
  9. Finally, to launch the sample in VS Code, select the Debug panel, the choose Debug (Launch) makecall launch option, and click the green 'Start Debugging' arrow:

    Launch

Notes

  • JAX/WS does not support the "rpc/encoded" SOAP style of the WebDialer WSDL, so Apache Axis was used

  • Elements of Axis 1.4 and Axis 2 were needed to make the project work. The lib/ folder in this project contains all the .jars from Axis 1.4 plus the following .jars from Axis 2:

    • activation-1.1.jar
    • mail-1.4.jar
  • Adding Axis .jars to the VS Code build classpath - as of this writing, this is done by manually editing the .classpath file and creating <classpathentry king="lib" path="..."> elements for each target .jar

View code on GitHub
  • Owner

  • Contributors

    +1Github contributor
  • Categories

  • Programming Languages

    Java
  • License

    MIT License

Code Exchange Community

Get help, share code, and collaborate with other developers in the Code Exchange community.View Community
Disclaimer:
Cisco provides Code Exchange for convenience and informational purposes only, with no support of any kind. This page contains information and links from third-party websites that are governed by their own separate terms. Reference to a project or contributor on this page does not imply any affiliation with or endorsement by Cisco.