Setting up and using the communications enabled application samples
You can set up a single-server environment to use the computer telephony integration (CTI) and web collaboration capabilities of IBM® WebSphere® Application Server Version 8.5.
About this task
Procedure
- Install WebSphere Application Server.
- Install WebSphere Application Server. See the installation topics in the documentation for additional information about installing WebSphere Application Server in your environment.Important: The setup procedure for the PlantsByWebSphere Ajax Edition for CEA application requires the EJBDeploy tool for pre-EJB 3.0 modules. When installing WebSphere Application Server, be sure to include this optional feature. If you are using an existing installation that does not include the EJBDeploy tool, use IBM Installation Manager to modify the installation to include the tool before proceeding. The samples were tested with WebSphere Application Server Version 8.0 and Version 8.5.
- Install WebSphere Application Server.
- Download and extract the communications enabled application
samples.
- Download the CEASamples.zip file to a directory on your workstation: HTTPS or FTP (ftp://public.dhe.ibm.com/software/websphere/appserv/library/v80/samples/CEASamples.zip). You might create the /samples/cea directory path on your workstation and download CEA sample files to that directory path.
- Extract the files into the directory of your choice.
- Use the setup scripts to create an application server profile
and set up the sample applications.
The samples package includes a set of scripts that you can use to create an application server profile and set up the applications on distributed platforms. You can also use the scripts to customize an existing application server profile. If you want to perform these tasks manually, proceed to the step to manually create an application server profile to host the sample applications.
Important: The setup procedure for the PlantsByWebSphere Ajax Edition for CEA application requires the EJBDeploy tool for pre-EJB 3.0 modules. When installing WebSphere Application Server, be sure to include this optional feature. If you are using an existing installation that does not include the EJBDeploy tool, use IBM Installation Manager to modify the installation to include the tool before proceeding.Find the
setupCEA.batfile that is located in the scripts directory of the CEA samples package. Complete the following steps to customize and runsetupCEA.bat.- In the
setupCEA.batfile, customize the variables for your application server environment. See the comments included in thesetupCEA.batfile for more information. - At a command prompt, change to the scripts directory of the CEA
samples package and run
setupCEA.bat. - Proceed to the step to verify that the CEA configuration settings are appropriate.
- In the
Find the
setupCEA.shfile that is located in the scripts directory of the CEA samples package. Complete the following steps to customize and runsetupCEA.sh.- In the
setupCEA.shfile, customize the variables for your application server environment. See the comments included in thesetupCEA.shfile for more information. - Run
setupCEA.sh. - Proceed to the step to verify that the CEA configuration settings are appropriate.
- In the
- Manually create an application
server profile to host the sample applications.
- If necessary, start the Profile Management Tool.
- After the Profile Management Tool window opens, click Launch Profile Management Tool.
- Click Create.
- After the Profile Creation wizard opens, define the
following settings:
- Environment Type: Application server
- Profile Creation Option: Advanced profile creation
- Application Deployment: Deploy the administrative console and the default application. If you want, you can deploy the sample applications.
- Profile name and Location
- Profile name: AppSrvCEA
- Profile directory: Accept the value provided, or change the directory path if you use a different convention.
- Host and Node names
- Node name: AppSrvCEANode01
- Server name: server1
- Host name: Your_host_name
- Administrative security: Define settings appropriate for your environment
- Security Certificate (Part 1): Accept the default settings
- Security Certificate (Part 2): Accept the default settings
- Port Values Assignment: Accept the values providedAttention: The SIP_DEFAULTHOST port is required when performing the following steps:
- Verify that the CEA configuration settings are appropriate
- Download, install, and configure the free Express Talk Basic softphone
- Download, install, and configure the free X-Lite softphone
- Simulate customer service interactions to verify the setup and explore the basic features of the CEA widgets
- Simulate cobrowsing interactions to further explore the features of the CEA widgets
- Explore the CEA web service sample application
- Windows Service Definition: Define settings appropriate for your environment
- Web Server Definition: Accept the default settings
- Profile Creation Summary: Click Create
- After the profile is created, close the Profile Management Tool.
- Manually install and start the sample IP PBX enterprise
application. The sample application is suitable for light testing only.
- Start the application server.
-
Launch the WebSphere Application Server administrative console for your
installation. Use the administrative console to install the application
(commsvc.pbx.ear) that is located in the installableApps
directory of the CEA samples package.
- Display the following page in the administrative console: Applications > New Application.
- Click New Enterprise Application.
- Specify the location of the EAR file, commsvc.pbx.ear.
- Click Next.
- Select the Fast Path option.
- Click Next.
- On the remaining pages, accept the default values, and click Next.
- On the summary page, click Finish to save the changes to the local configuration. Then click Save to save the changes directly to the master configuration.
- Start the sample IP PBX application.
- Display the following page in the administrative console: Applications > Application Types > WebSphere enterprise applications.
- Select the commsvc.pbx application, and click Start.
- Verify that the sample IP PBX application is running.
- Manually install and start the PlantsByWebSphereAjax for
CEA sample application. Important: The setup procedure for the PlantsByWebSphere Ajax Edition for CEA application requires the EJBDeploy tool for pre-EJB 3.0 modules. When installing WebSphere Application Server, be sure to include this optional feature. If you are using an existing installation that does not include the EJBDeploy tool, use IBM Installation Manager to modify the installation to include the tool before proceeding.
- Using the WebSphere Application Server administrative console, define a Derby XA Provider.
- Display the following administrative console page: Resources > JDBC > JDBC Providers.
- Set the scope to
Node=AppSrvCEANode01,server=server1. - Click New.
- Specify the following properties:
- Database type: Derby
- Provider type: Derby JDBC Provider
- Implementation type: XA Data source
- Name: Derby Provider for PlantsByWebSphereAjax (XA)
- Click Next.
- On the summary page, click Finish to save the changes to the local configuration.
- Click Save to save the changes directly to the master configuration.
- Using the WebSphere Application Server administrative console, create a data source and associate
it with the new provider.
- Display the following administrative console page: Resources > JDBC > Data sources.
- Set the scope to
Node=AppSrvCEANode01,server=server1. - Click New.
- Specify the following properties:
- Data source name: PLANTSDB
- JNDI name: jdbc/PlantsByWebSphereAjaxDataSource
- Click Next.
- Choose Select an existing JDBC Provider.
- Choose Derby Provider for PlantsByWebSphereAjax (XA).
- Click Next.
- For the Database name, enter (exactly) ${APP_INSTALL_ROOT}/${CELL}/PlantsByWebSphereAjax.ear/Database/PLANTSDB
- Use this data source in container managed persistence (CMP).
- Click Next.
- On the remaining pages, accept the default values and click Next.
- On the summary page, click Finish to save the changes to the local configuration.
- Click Save to save the changes directly to the master configuration.
- Prepare, install, and start the CEA PlantsByWebSphereAjax
sample application
- Open a command window and change to the installableApps directory of the CEA samples package.
- Generate EJB deployment bindings (and a new EAR file); for example:
C:\Program Files\IBM\WebSphere\AppServer\bin\ejbdeploy.bat PlantsByWebSphere.ear C:\temp PlantsByWebSphere_Deployed.ear -dbvendor DERBY_V10
/opt/IBM/WebSphere/AppServer/bin/ejbdeploy.sh PlantsByWebSphere.ear /tmp PlantsByWebSphere_Deployed.ear -dbvendor DERBY_V10
- Using the WebSphere Application Server administrative console, install the application.
- Display the following administrative console page: Applications > New Application.
- Click New Enterprise Application.
- Specify the location of the new EAR file, PlantsByWebSphere_Deployed.ear.
- Click Next.
- Select the Fast Path option.
- Click Next.
- On the remaining pages, accept the default values and click Next.
- On the summary page, click Finish to save the changes to the local configuration.
- Click Save to save the changes directly to the master configuration.
- Using the WebSphere Application Server administrative console, start the application.
- Display the following administrative console page: Applications > Application Types > WebSphere enterprise applications
- Select the PlantsByWebSphereAjax application and click Start.
- Verify that the application started.
- Using the WebSphere Application Server administrative console, define a Derby XA Provider.
-
Manually install and start the web service sample application
(commsvc.ws.sample.ear) that is located in the
installableApps directory of the CEA samples package.
-
Using the WebSphere Application Server administrative console, install
the web service sample application.
- Display the following page in the administrative console: Applications > New Application.
- Click New Enterprise Application.
- Specify the location of the web service sample EAR file, commsvc.ws.sample.ear.
- Click Next.
- Select the Fast Path option.
- Click Next.
- On the remaining pages, accept the default values and click Next.
- On the summary page, click Finish to save the changes to the local configuration. Then click Save to save the changes directly to the master configuration.
-
Using the WebSphere Application Server administrative console, start the
application.
- Display the following page in the administrative console: Applications > Application Types > WebSphere enterprise applications.
- Select the commsvc.ws.sample application, and click Start.
- Verify that the application started.
-
Using the WebSphere Application Server administrative console, install
the web service sample application.
- Verify that the CEA and virtual
host configuration settings are appropriate.
- Display the following WebSphere Application Server administrative
console page: Servers > Server Types > WebSphere application servers > server1 > Communications Enabled Applications
(CEA). Then, verify that the following settings
are appropriate, paying particular attention to the settings, Enable
communications service and Port.
- Communications Enabled Applications services
- Enable communications service: Selected
- REST interface
- Context root: /commsvc.rest
- Virtual host: default_host
- Maximum hold time: 30 seconds
- Telephony access method
- Use SIP CTI (ECMA TR/87) gateway for telephony access: Selected
- Host name or IP address: localhost
- Port: Specify the SIP_DEFAULTHOST port of the application server. To determine the correct value, visit the following administrative console page: Servers > Server Types > WebSphere application servers > server1. Then display the Ports table that is located in the Communications category of settings.
- Protocol: TCP
- Extract user name from request: Cleared
- Superuser name:
ceauser
- Use SIP CTI (ECMA TR/87) gateway for telephony access: Selected
- Communications Enabled Applications services
- Configure the virtual host default_host. Display the following administrative console page: Environment > Virtual hosts. Click the virtual host default_host. Next, click Host Aliases. Finally, ensure that appropriate host aliases exist for each of the following application server ports:
- WC_defaulthost
- WC_defaulthost_secure
- SIP_DEFAULTHOST
- SIP_DEFAULTHOST_SECURE
- If you modified any of the configuration settings, complete
the following actions:
- Click OK to save the changes to the local configuration.
- Click Save to save the changes to the master configuration.
- Restart (stop and start) the application server.
- Display the following WebSphere Application Server administrative
console page: Servers > Server Types > WebSphere application servers > server1 > Communications Enabled Applications
(CEA). Then, verify that the following settings
are appropriate, paying particular attention to the settings, Enable
communications service and Port.
- Download, install, and configure the free Express Talk Basic softphone. To complete this set of tasks, you must know the host name or address and SIP_DEFAULTHOST port of the application server that is running the sample IP PBX application.
To view the port numbers assigned to a given server, first visit the following WebSphere Application Server administrative console page: Servers > Application servers > server_name, where server_name is the name of the application server; for example: server1. Then display the Ports table that is located in the Communications category of settings.
- Download Express Talk Basic using the NCH Software site, https://www.nch.com.au/talk/be.html.
- Run the Express Talk Basic setup file, talksetup.exe. Then accept the default installation settings.
- After the installation completes, a Setup wizard opens. Use the first several pages of the setup wizard to define appropriate speaker and microphone settings. (In many cases, you can simply accept the default settings.)
- On the SIP Details page of the Setup wizard, use the
following account information to configure Express Talk Basic to serve as a phone for
a customer.
- Full Friendly Display Name: Customer
- Server (SIP Proxy or Virtual PBX): host name or address of the application server; for example:
localhost - SIP Number (or User Name): Customer
- Password: Leave this field blank
- Click Finish to save the settings.
- If the application server is not using the default SIP_DEFAULTHOST
port (5060), complete the following actions:
- On the main Express Talk Basic window, click the Options button.
- After the Options window opens, click the Lines tab.
- After the Lines page opens, click the Advanced Line Settings button.
- After the Advanced SIP Server window opens, select Use a different outbound server.
- In the Outbound Server field, enter hostname:port, where hostname is the host name or address of
the application server, and port is the SIP_DEFAULTHOST
port of the application server; for example:
localhost:5061. - Click OK to save the settings, and close the Advanced SIP Server Settings window.
- Click OK to save the settings, and close the Options window.
Avoid trouble: If the softphone does not register with the IP PBX, ensure that the application server and the sample IP PBX application (commsvc.pbx) are running. Additionally, ensure that the SIP_DEFAULTHOST port is not being used by another application, such as an email application.
- Download, install, and configure the free X-Lite softphone.
To complete this set of tasks, you must know the host name or address and SIP_DEFAULTHOST port of the application server that is running the sample IP PBX application.
To view the port numbers assigned to a given server, first visit the following WebSphere Application Server administrative console page: Servers > Application servers > server_name, where server_name is the name of the application server; for example: server1. Then, display the Ports table that is located in the Communications category of settings.
- Download X-Lite from the CounterPath site, https://www.counterpath.com/x-lite.html.
- Run the X-Lite setup file. Then accept the default installation settings (including the option to start X-Lite after the installation completes).
- If you are using X-Lite 4.0, click Softphone > Account Settings. If you are using X-Lite 3.0, click menu in the softphone. In the menu that opens, select SIP Account Settings.
- To configure X-Lite to serve as a phone for a customer
service representative, add a new account with the following settings:
- User name: CSR
- Domain: Host name or address of the application server that is running the sample IP PBX application; for example: localhost
- Display name: CSR
- Register with domain and receive incoming calls: Selected
- If the application server is using the default SIP_DEFAULTHOST
port (5060):
- Send outbound using the domain: Selected
- If the application server is not using the default SIP_DEFAULTHOST
port (5060):
- Send outbound using the proxy: Selected
- Address: hostname:port, where hostname is the host name or
address of the application server, and port is the SIP_DEFAULTHOST port of the
application server; for example:
localhost:5061.
Avoid trouble: If the softphone does not register with the IP PBX, ensure that the application server and the sample IP PBX application (commsvc.pbx) are running. Additionally, ensure that the SIP_DEFAULTHOST port is not being used by another application, such as an email application.
- Verify that the telephony system is functioning correctly.
- Using the customer softphone, Express Talk Basic, enter
sip:CSR@hostname,where hostname is the host name or address of the application server that is running the sample IP PBX application; for example:sip:CSR@localhost. - Click Dial.
- After the customer service representative softphone (X-Lite) rings, click the green Answer button (on the customer service representative softphone).
- After verifying that a connection is present, click the red Hang Up button on the customer phone or the End button on the customer service representative phone.
- Using the customer softphone, Express Talk Basic, enter
- Simulate customer service interactions to verify the setup and explore the basic features
of the CEA widgets.
- To complete this set of tasks, you must know the WC_defaulthost port of the application server
that is running the PlantsByWebSphereAjax application.
To view the port numbers assigned to a given server, first visit the following WebSphere Application Server administrative console page: Servers > Server Types > WebSphere application servers > server_name, where server_name is the name of the application server; for example: server1. Then display the Ports table that is located in the Communications category of settings.
- Before testing customer service interactions, you must verify that the ClickToCall widget is
configured appropriately for your environment. First open the contactus.html file that is located in
the following directory: profile_root/installedApps/<cellName>/PlantsByWebSphereAjax.ear/PlantsByWebSphere.war.
Next, within contactus.html, locate the widgetNumber attribute (widgetNumber="
sip:CSR@localhost"). If necessary, replaceCSR@localhostwith the SIP number (address) to be contacted when a click-to-call request is initiated. SIP phone numbers must be specified in the formatsip:userName@hostName,where hostName is the host name or IP address of the IP PBX.
- Start the customer and customer service representative softphones.
- Acting as a customer service representative, register the CallNotification widget with
the communications infrastructure.
- Start a new web browser instance and load the PlantsByWebSphereAjax for CEA home page,
http://hostname:port/PlantsByWebSphereAjax/, where hostname is the host name or address of the application server, and port is the WC_defaulthost port of the appropriate application server; for example:http://localhost:9080/PlantsByWebSphereAjax/ - Click the Call Notification link.
- Within the CallNotification widget, enter
sip:CSR@hostname,where hostname is the host name or address of the application server that is running the sample IP PBX application; for example:sip:CSR@localhost. - Click the Start Call Notification button.
- Start a new web browser instance and load the PlantsByWebSphereAjax for CEA home page,
- Acting as a customer, use the ClickToCall widget to call (contact) the customer
service representative.
- Start a new web browser instance and load the PlantsByWebSphereAjax for CEA home page,
http://hostname:port/PlantsByWebSphereAjax/, where hostname is the host name or address of the application server, and port is the WC_defaulthost port of the appropriate application server; for example:http://localhost:9080/PlantsByWebSphereAjax/Best practice: When completing this task on a single machine, you must use two separate web browsers from different vendors; otherwise, results are unpredictable. For example, do not attempt to use two tabs within the same instance of a given browser, or even two separate instances of the same browser; for example, Firefox. Always use two separate browsers from different vendors; for example, Firefox and Chrome, Firefox and Safari, or Safari and Chrome. - Click the Contact Us link.
- Within the ClickToCall widget, enter
sip:Customer@hostname, where hostname is the host name or address of the application server that is running the sample IP PBX application; for example:sip:Customer@localhost. - Click the Call Me button.
- Start a new web browser instance and load the PlantsByWebSphereAjax for CEA home page,
- Acting as the customer service representative, use the X-Lite softphone to answer the call.
- Acting as the customer, use the Express Talk Basic softphone to answer the call.
- Acting as the customer service representative, use the CallNotification widget to
start a web collaboration session with the customer.
- Within the CallNotification widget, click Cobrowse.
- Acting as the customer service representative, send a web page to the customer. Then
verify that the customer received the page.
- Navigate to an appropriate page, and click Send Page.
- Verify that the page is displayed in customer's browser.
- Acting as the customer service representative, set up the Collaboration Dialog to
automatically send the customer each new web page that is viewed. Then verify that the customer
automatically receives new pages.
- Within the Collaboration Dialog, click Follow Me and view several different pages in the site.
- Verify that the final page is displayed in the customer's browser.
- Acting as the customer service representative, highlight an area of a page for the
customer. Then verify that the area was highlighted correctly in the customer's view.
- Within the Collaboration Dialog, click Highlight.
- Move your mouse pointer across the page to view the areas of the page that can be highlighted.
- Click the area of the page that you want to highlight in the customer's browser.
- Verify that the same area of the page is highlighted in the customer's browser.
- To end the collaboration session, complete the following steps in the web browser of
the customer or the customer service representative:
- Click the Close icon that is located in the Collaboration Dialog.
- In the Cobrowse widget, click End Collaboration Session.
For more information about the sample application, see the supporting documentation that is provided in the PlantsByWebSphere directory of the CEA samples package in the CEASamples.zip file that you can download to a directory on your workstation from: HTTPS or FTP (ftp://public.dhe.ibm.com/software/websphere/appserv/library/v80/samples/CEASamples.zip). - To complete this set of tasks, you must know the WC_defaulthost port of the application server
that is running the PlantsByWebSphereAjax application.
- Simulate cobrowsing interactions to further explore the features of the CEA
widgets. To complete this set of tasks, you must know the WC_defaulthost port of the application server that is running the PlantsByWebSphereAjax application.
To view the port numbers assigned to a given server, first visit the following WebSphere Application Server administrative console page: Servers > Server Types > WebSphere application servers > server_name, where server_name is the name of the application server; for example: server1. Then display the Ports table that is located in the Communications category of settings.
- Using the Cobrowse widget, invite a second party to participate in a cobrowsing
session.
- Start a new web browser instance and load the PlantsByWebSphereAjax for CEA home page,
http://hostname:port/PlantsByWebSphereAjax/, where hostname is the host name or address of the application server, and port is the WC_defaulthost port of the application server; for example:http://localhost:9080/PlantsByWebSphereAjax/. - Click the Cobrowse link.
- Within the Cobrowse widget, click Create.
- Copy the invitation link to the operating system clipboard.
- Start a new web browser instance and load the PlantsByWebSphereAjax for CEA home page,
- Acting as the second party, join the cobrowsing session.
- Start a new web browser instance and load the invitation link. Best practice: When completing this task on a single machine, you must use two separate web browsers from different vendors; otherwise, results are unpredictable. For example, do not attempt to use two tabs within the same instance of a given browser, or even two separate instances of the same browser; for example, Firefox. Always use two separate browsers from different vendors; for example, Firefox and Chrome, or Chrome and Safari.
- Start a new web browser instance and load the invitation link.
- Acting as the first party, send a web page to the second party. Then verify that the
second party received the page.
- Within the Collaboration Dialog, click Send Page.
- Verify that the page is displayed in the second party's browser.
- Acting as the first party, grant control of page navigation to the second party.
- Within the Collaboration Dialog, click Grant Control.
- Acting as the second party, set up the Collaboration Dialog to automatically send the
first party each new web page that is viewed. Then verify that the second party automatically
receives new pages.
- Within the Collaboration Dialog, click Follow Me and view several different pages in the site.
- Verify that the final page is displayed in the first party's browser.
- Acting as the second party, highlight an area of a page for the first party. Then
verify that the area was highlighted correctly in the first party's view.
- Within the Collaboration Dialog, click Highlight.
- Move your mouse pointer across the page to view the areas of the page that can be highlighted.
- Click the area of the page that you want to highlight in the first party's browser.
- Verify that the same area of the page is highlighted in the first party's browser.
- To end the collaboration session and the call, complete the following steps in the web
browser of either party:
- Click the Close icon that is located in the Collaboration Dialog.
- In the Call Notification or Click-To-Call widget, click End Call.
For more information about the sample application, see the supporting documentation that is provided in the PlantsByWebSphere directory of the CEA samples package in the CEASamples.zip file that you can download to a directory on your workstation from: HTTPS or FTP (ftp://public.dhe.ibm.com/software/websphere/appserv/library/v80/samples/CEASamples.zip). - Using the Cobrowse widget, invite a second party to participate in a cobrowsing
session.
- Explore the CEA web service sample application. To complete this set of tasks, you must know the WC_defaulthost port of the application server that is running the commsvc.ws.sample application.
To view the port numbers assigned to a given server, first visit the following WebSphere Application Server administrative console page: Servers > Server Types > WebSphere application servers > server_name, where server_name is the name of the application server; for example: server1. Then display the Ports table that is located in the Communications category of settings.
- Start the customer and customer service representative softphones.
- Start a new web browser instance and load the CEA web
service sample page,
http://hostname:port/commsvc.ws.sample/CommWebServiceServlet, where hostname is the host name or address of the application server, and port is the WC_defaulthost port of the application server; for example:http://localhost:9080/commsvc.ws.sample/CommWebServiceServlet. - After the CEA web service Sample page opens, enter
sip:CSR@hostnamein the Phone address of record entry-field, where hostname is the host name or address of the application server that is running the sample IP PBX application; for example:sip:CSR@localhost. - Click the Open session button to obtain control of the phone. A request is sent to the sample servlet, which calls the openSession web service API. It might take a few seconds to set up the session with the phone. A Phone Status page opens, presenting the following fields for monitoring and managing the phone: Address of record, Call status, Caller, Callee, and Call ID. You can click the Refresh call status button to obtain status updates that the sample servlet has received by way of WS-Notification.
- In the Peer address of record entry-field, enter
sip:Customer@hostname,where hostname is the host name or address of the application server that is running the sample IP PBX application; for example:sip:Customer@localhost. - Click the Make call button. The
sample servlet invokes the makeCall web service API to create a call
between the customer (
sip:Customer@hostname) and the customer service representative (sip:CSR@hostname). - After the customer service representative (X-Lite) softphone rings, answer the call.
- After the customer (Express Talk Basic) softphone rings, answer the call.
- Click the Refresh call status button to view details about the call that is in progress.
- Click the End call button.
The sample servlet invokes the endCall web service API to end the call.
- Finally, click the Close session button. The sample servlet invokes the closeSession web service API to terminate the phone monitoring session.