Using the Cisco room system API's to simplify BlueJeans meetings

  • 1
  • Idea
  • Updated 4 months ago
Following the code samples at https://developer.cisco.com/site/roomdevices/ it should be possible to create a "Dial BlueJeans" button that would lead to a dialog to enter the Meeting ID and PIN code to connect to a meeting.  something similar to this:

  



You could potentially use a combination of "Custom Dial Pad" and "Prompt for PIN" at their linked GitHub. I'm not a coder and so far that top screenshot is a home panel button based on the "On Button to Dial" sample.

Yes - we have Relay and encourage people to use it for the OBTJ calendaring, but not every meeting happens like that. Mostly we use a contact in the directory that everyone dials, but through this bit of Cisco API work you could put a single button on the Cisco Touch home screen and have an experience very similar to the Dolby Conference Phone.

Even more.... Since you are gathering the Meeting ID, there is a Customer Satisfaction sample that you could feed it to and have a survey after the call linked to the Meeting ID. The one missing step there is to push that feedback to BlueJeans so it could be rolled into the CommandCenter!


I might be able to code my way out of a paper bag when you hand me a blowtorch but this is past my skillset. I've pointed you to some neat API's and given you what I think is a pretty workable idea. I'm curious to see what someone can make out of it!
Photo of Brian Haley

Brian Haley

  • 182 Points 100 badge 2x thumb

Posted 7 months ago

  • 1
Photo of Ben Hutchison

Ben Hutchison, Official Rep

  • 2,038 Points 2k badge 2x thumb
Hi Brian!

I assume you're referring to the Macro Framework introduced in CE9.2, correct? I looked at the documentation for this when it came out, but I haven't gotten a chance to play with it yet.

The release notes mentioned that this framework does not have the capability to make HTTP requests, which we would want for the purpose of validating passcodes before dialing and potentially conditionally prompting to escalate to a moderator for meeting that haven't started yet. However, the satisfaction survey example seems to indicate that you can make remote requests after all?

I'll see what it would take to get one of our Cisco endpoints upgraded to CE9.2.x. Currently all our 9.2 endpoints are SX10s, which don't work with the Macro Framework due to "platform stability issues."

I'm glad you're using Relay!

Thanks,
Ben
Photo of Brian Haley

Brian Haley

  • 182 Points 100 badge 2x thumb
yes CE9.2.x. passcode validation I suppose would be neat.. I had not even tried using invalid passcodes on my DCP. 

Now the Satisfaction Survey is really where I get stuck:  some documentation says there is no way to send or push things from an endpoint, but the whole Feedback system and API is exactly that. In addition, if there is no way to log the results of the survey off the codec, then why bother collecting them. One survey example I;ve tried is supposed to send an email but I didn't get that working either. 

Like I said, I am not smart enough to code so I'm not sure I know what I even know.

and yes... the sx10. even the sad EOL'd sx20 is more powerful. 
Photo of Ben Hutchison

Ben Hutchison, Official Rep

  • 2,038 Points 2k badge 2x thumb
Here's a simple implementation that lets you join a BlueJeans meeting by typing in a meeting ID and passcode.
Screenshots







Prerequisites
  • Cisco EX/SX/DX/Spark Room endpoint
    • SX10 is not compatible
    • Endpoints registered to Spark are not compatible
  • CE9.3 software or later
  • Touch 10
    • Not required for DX
  • Credentials for ADMIN role on the endpoint
Installation
  1. Save the roomcontrolconfig.xml and bjn_dial.js files (below) to your computer
  2. Log in to your Cisco endpoint's web admin interface in your browser (http://<endpoint-ip-address>/)
  3. Go to Integration › In-Room Control
  4. Click Launch Editor
  5. Open the Editor Menu in the top-right corner, and select Import from file
  6. Choose the roomcontrolconfig.xml file you downloaded earlier
  7. Click the Export to Video System button
  8. At this point, you should see a blue camera icon called "BlueJeans" on the home screen of your Touch 10. It won't do anything if you tap on it yet.
  9. Go back to the home page of your endpoint's web admin interface
  10. Go to Integration › Macro Editor
  11. If you're prompted to enable macros on the endpoint, enable them
  12. Click Import from file...
  13. Choose the bjn_dial.js file you downloaded earlier
  14. Use the wrench icon to Save to system
  15. Use the toggle switch to enable the macro
Files

roomcontrolconfig.xml
<Extensions>
  <Version>1.5</Version>
  <Panel>
    <PanelId>bjn_dial</PanelId>
    <Type>Home</Type>
    <Icon>Camera</Icon>
    <Order>1</Order>
    <Color>#12A8F1</Color>
    <Name>BlueJeans</Name>
  </Panel>
</Extensions>

bjn_dial.js
const xapi = require('xapi');

const bridgeAddress = "bjn.vc";
const signalingProtocol = "sip";
const panelId = "bjn_dial";

var meeting;

class Meeting {
    constructor(meetingId, passcode) {
        this.meetingId = meetingId;
        this.passcode = passcode;
    }
    
    get dialString() {
        var dialString = signalingProtocol + ":";
        dialString += this.meetingId;
        if (this.passcode) {
            dialString += "." + this.passcode;
        }
        dialString += "@" + bridgeAddress;
        return dialString;
    }
}

function init() {
    meeting = new Meeting();
    handlePanelButtonPress();
    handleMeetingIdEntry();
    handlePasscodeEntry();
}

function handlePanelButtonPress() {
    meeting = new Meeting();
    xapi.event.on('UserInterface Extensions Panel Clicked', (event) => {
        if (event.PanelId === panelId) {
            xapi.command("UserInterface Message TextInput Display", {
                FeedbackId: "bjn_dial_meetingId",
                Title: "Join BlueJeans Meeting",
                Text: "Meeting ID:",
                Duration: 60,
                InputType: "Numeric",
                SubmitText: "Next"
            });
        }
    });
}

function handleMeetingIdEntry() {
    xapi.event.on('UserInterface Message TextInput Response', (event) => {
        if (event.FeedbackId === "bjn_dial_meetingId") {
            meeting.meetingId = event.Text;
            
            xapi.command("UserInterface Message TextInput Display", {
                FeedbackId: "bjn_dial_passcode",
                Title: "Join BlueJeans Meeting",
                Text: "Passcode (if none, press Join):",
                Duration: 60,
                InputType: "PIN",
                SubmitText: "Join"
            });
        }
    });
}

function handlePasscodeEntry() {
    xapi.event.on('UserInterface Message TextInput Response', (event) => {
        if (event.FeedbackId === "bjn_dial_passcode") {
            meeting.Passcode = event.Text || null;
            
            dial(meeting);
        }
    });
}

function dial(meeting) {
    return xapi.command("Dial", { Number: meeting.dialString });
}

init();
(Edited)
Photo of Brian Haley

Brian Haley

  • 182 Points 100 badge 2x thumb
Excellent! I do hope you publish this to the BlueJeans guides as an option. 

The CE 9.3 release notes (https://www.cisco.com/c/dam/en/us/td/docs/telepresence/endpoint/software/ce9/release-notes/ce-softwa...) offer a number of ways to backup and restore these files quite easily including how to use UCM, TMS or other 3rd party systems for large scale deployment of files (like these) to endpoints. 
Photo of George Hitchens

George Hitchens

  • 60 Points
This is brilliant thanks Ben!

Any chance the code can be simplified for a basic dial to BJ without the meetingID and Passcode prompt?
(Edited)
Photo of Ben Hutchison

Ben Hutchison, Employee

  • 1,796 Points 1k badge 2x thumb
Yeah if you just want the home screen button to send users to the Blue Jeans interactive voice response menu, you can replace the handleButtonPress function with
function handlePanelButtonPress() {
    xapi.event.on('UserInterface Extensions Panel Clicked', (event) => {
        if (event.PanelId === panelId) {
            xapi.command("Dial", { Number: "meet@bjn.vc" });
        }
    });
}
and get rid of all the code relating to meetings, meeting IDs, passcodes, and prompts.
(Edited)