/QuickCheck

Webex Teams Bot to quickly/easily check Cisco CE Codec Settings

Primary LanguagePythonOtherNOASSERTION

QuickCheck

Alt text

A Webex Teams Bot to perform Quick Check of Cisco Video (CE) endpoints


Motivation

There are many fine tools for managing Cisco Video Endpoints that do so much more than QuickCheck. But, on occasion, you get a call saying "All the video units are down." Are they? Are they ALL down or just some of them? With QuickCheck, you can query the QC bot in a webex teams space with "QC sipStatus" and the bot would query the status of every video unit you manage and respond with a quick, concise report right back to you in the same Webex Teams space. Maybe follow that with "QC getDiags" to see a report of current Diagnostic Alerts generated by each of your managed endpoints to see if a Touch 10 tablet has un-paired or a camera has disconnected. Quick and Simple - with valuable results.

Show Me!

Alt text

Features

Welcome to QuickCheck

Welcome to QuickCheck

Actions supported by QuickCheck:

  • help - This help menu

  • list - print endpoints from endpoints.json list.

  • callStatus - Shows current call status.

  • getDiags - List any diagnostic alerts.

  • getVersion - List current software version.

  • sipStatus - List SIP registration Status.

  • getLoss - List Packet Loss values.

  • getLast - List Last Call Details.

  • getPeople - List number of people in room.

  • getNumber - Get Endpoint Numbers.

    !!! NEW Commands !!!

  • dial CodecIP SIPAddress Make codec dial out

  • dial all SIPAddress - codeBlue all Codecs dial same number

  • hangup CodecIP - hangup calls on one codec

  • hangup all - hangup all calls on all codecs

Provide IP Address as argument if you want info on that device only

Technologies & Frameworks Used

This is Cisco Sample Code written in Python3. We use the Atom application on Apple Macbook Pro computer to write and maintain the code.

The three of us are in a group called "tag-team" on github and use github as the central repository for this code. (Atom has simple git and github actions built in which make it easier to code together)

Our github repository is publicly available at https://github.com/CiscoSE/QuickCheck.git

Cisco Products & Services:

  • This Cisco Webex Teams bot uses Webex Teams API to send/receive JSON formatted webhooks. The bot also sends/receives XML formatted xAPI commands to/from Cisco CE code based Video Endpoints.

Installation

Please Note: This code is written for Python 3... if you have a Mac, it comes with Python 2... you will need to upgrade to Python 3 or do a whole lot of changes to many of the methods for it to work.

Pre-Requisites for QuickCheck

  • Create a webex teams bot - We created QC@webex.bot starting from the "How to create a webex teams bot (using python)": https://developer.webex.com/blog/spark-bot-demo

  • Invite your bot to a webex teams space or 1-1 direct space.

  • Create a webex teams webhook that will listen for messages to your bot and forward them to a public address for your bot handling app.(this app) HowTo:

  • Get an account on ngrok which gives you a tunnel from ngrok to your laptop and a public address at ngrok for your webhook to send http messages to. *** ngrok is sometimes considered a security risk by corporate security services, so check with IT before loading ngrok client on your laptop.

    • Launch ngrok client on laptop
  • Edit endpoints.txt file to include endpoints you want to manage and save the file as endpoints.json.

  • Edit config.txt with your names and bearer tokens and save the file as config.json

  • Run main.py from terminal on laptop and main.py will - launch local HTTP server on port 10010 (You can change port number in config.json) - check your local ngrok client and get public uri - edit your webex teams webhook with current ngrok target

    • HTTP server will then wait for incoming webhooks and send them to the intent method for action.

Useful links

Authors & Maintainers

People responsible for the creation and maintenance of this project:

Credits

The HTTP server code and the send get/post to webex teams methods were inspired by the code in the "How to create a webex teams bot" tutorial at: https://developer.webex.com/blog/spark-bot-demo The original python 2 code for this tutorial can be found at "tahanson's" repository at https://github.com/webex/SparkBotDemo/blob/master/bot_demo.py

We pulled from ObjectIsAdvantag / Steve Sfartz Postman Collection Github Repository at https://github.com/CiscoDevNet/postman-xapi to create actions/intents, i.e. commands against Telepresence Endpoints you can execute with QuickCheck bot.

License

This project is licensed to you under the terms of the Cisco Sample Code License.

Contributions

Please see Contributing to help contribute to this code.

Code of Conduct

Contributors to this code agree with our Code of Conduct: CODE_OF_CONDUCT