This sample code can be used to retrieve a list of devices from Cisco Unified Communications Manager using
the AXL Soap API and a SQL Query to also extract the extension number assigned to each device.
The information is then showed in a web page where the extension number is displayed as a link that triggers the Jabber Protocol Handler
to have Jabber dial the number.
This is useful for organizations that need to provide Jabber users with a directory of video devices to which they can dial, such as
video enpoints located in different hospital rooms to be able to reach specific patients. The device name can contain the room number which
makes it easy to dial that room.
The sample code shows how you can filter the list based on device type, so that a CUCM installation with many IP phones and just a few
Collaboration Room and Desk devices such as DX80s can limit the list of devices to dial to just one particular type.
This sample code can be tested using a Cisco dCloud demo instance that contains the CUCM VM such as the one titled
Cisco Collaboration 12.5 v1 - Transform Work with Collaboration
It can also be tested using the Collaboration 12.5 DevNet Sandbox although that would require more configuration to be done to set up devices and install Jabber on workstations connected to the sandbox via VPN.
It is recommended you set up a python environment as follows, assuming you do not use an IDE that does this for you already:
In the CLI:
Choose a folder, then create and activate a virtual environment for the project
#WINDOWS: py -3 -m venv [add name of virtual environment here] source [add name of virtual environment here]/Scripts/activate #MAC: python3 -m venv [add name of virtual environment here] source [add name of virtual environment here]/bin/activate
Access the created virtual enviroment folder
cd [add name of virtual environment here]
Clone this Github repository into the virtual environment folder.
git clone https://wwwin-github.cisco.com/gve/CUCM_Jabber_Dialer_Portal
Install dependencies
pip install -r requirements.txt
To accomodate for any changes you might want do in the way the list of devices is presented and
the filtering options, the code uses a boolean named runningLocal to determine if it will actually
attempt to make the AXL/SOAP calls into Cisco Unified Communications Manager to retrieve the list of devices
or just use some sample hard-coded values.
Please set the value of runningLocal to False in line 46 of app.py to have the code use data from CUCM
Once properly configured, you can launch the application by running the app.py script:
python app.py
You can then navigate with a Web Browser to http://0.0.0.0:5000/ if you keep the defaults in this code or whatever destination
you specify when running the Flask application.
You will now be presented with an initial page with all devices configured in CUCM:
If you wish to limit the number of devices being shown, use the pull down menu under Device Type, select a specific device type and click on the Filter button
You can now click on the extension number showns for a particular device and that will invoke Cisco Jabber if installed on your desktop so it can call the extension on that device:
Once you confirm, it will proceed to launch Jabber and place the call:
Provided under Cisco Sample Code License, for details see LICENSE
Our code of conduct is available here
See our contributing guidelines here
Please note: This script is meant for demo purposes only. All tools/ scripts in this repo are released for use "AS IS" without any warranties of any kind, including, but not limited to their installation, use, or performance. Any use of these scripts and tools is at your own risk. There is no guarantee that they have been through thorough testing in a comparable environment and we are not responsible for any damage or data loss incurred with their use.
You are responsible for reviewing and testing any scripts you run thoroughly before use in any non-testing environment.
Owner
Contributors
Categories
Products
Cisco Unified Communications Manager (CUCM)Programming Languages
CSSPythonJavaScriptLicense
Code Exchange Community
Get help, share code, and collaborate with other developers in the Code Exchange community.View Community