cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
42152
Views
160
Helpful
100
Replies

CE9.2.1 Macro Framework discussions

Magnus Ohm
Cisco Employee
Cisco Employee

The new Macro Framework that came with CE9.2.1 allows you to create your own small "features" that runs natively on the codec. You can also create a user interface for your features by combining the In-Room Control feature with the Macro Framework!

 

Please share your ideas, questions, code and anything else related to the newly released Macro Framework. Happy coding!

 

PS: The Macro Framework is currently not supported on the SX10 (N)

 

Please visit the official DEVNET page for ROOM DEVICES. 

https://developer.cisco.com/site/roomdevices/

100 Replies 100

const xapi = require('xapi');

const n1 = '131005';
const n2 = '130218';
const t = 2000;
let call1;
let call2;

function listenToGui() {
    xapi.event.on('UserInterface Extensions Event PageOpened', (event) => {
        console.log('event', event.PageId);
        if (event.PageId == 'dialer'){
            call1 = xapi.command('Dial', { 'Number': n1 });
	    setTimeout(function(){
    		xapi.command('Call Hold');
    		setTimeout(function(){
       			call2 = xapi.command('Dial', { 'Number': n2 });
       			setTimeout(function(){
           		     xapi.command('Call Join');
       			},t);
    		},t);
	},t);
      }
    });
}

listenToGui();

Hi Randall

I successfully put the first call on hold, called another, merged the three participants using MRGL with the above code. The problem with running all the commands at the same time is that the calls does not get time to establish. I added a timer for each step and it works like a charm. Assuming you have autoanswer on the remote participants you are dialing.

Hope it helps.

 

/Magnus

Thank you Magnus, that works!

I had thought about trying a delay timer, but the code syntax was beyond my skill level.

xapi.command(string, object) returns a Promise so if you use the pattern below you won't have to worry about the potential of leaking memory with setTimeout...let me know if it works for you..

 

return xapi.command(str, obj).then(function(result1) {
  return xapi.command(str, obj)
}).then(function(result2) {
  // so on and so forth (you might need 
}).catch(function(error) {
// handle errors
})

On DX, I noticed Message prompt generate events when it is closed.

 

     

     xapi.event.on('UserInterface Message Prompt Cleared FeedbackId', () 

I use this event to pop up prompt again. So instead of using In-Room Control, Message Prompt approach is another option to create Kiosk Mode.

On Touch 10, it doesn't work.

 

 

Instead of replacing the the green dial button you can lock the system dial to be a ring down so no matter what number is dialed it can only call the number you want. This is done the through CUCM Call Serach Spaces.

Richard Greig
Level 1
Level 1

Hey Magnus,

 

Just started playing around with it - looks promising!

 

At this stage, thinking of exploring 2 ideas:

A quality survey - however unsure how we can get the data from the endpoint to report on.

Creating a Webex quick dial button - when you press it, you are prompted to enter the meeting ID and it appends our domain automatically (less for the user to type in).


 

A quality survey - however unsure how we can get the data from the endpoint to report on.

 

According to the tutorial for the Marco Editor, macros cannot store or send user's input anywhere, but this may change in later releases.  When I mention it can't send the data anywhere, I mean externally from the codec, you can use the data from the user within a macro itself.  There is an example macro for a quality survey in the tutorial, it's listed under "Prompt", for now you'll probably have to go through the codec logs to see the results.

Remote .TXT at the end of each file.  Forums won't allow me to upload compressed .zip files.

Creating a Webex quick dial button - when you press it, you are prompted to enter the meeting ID and it appends our domain automatically (less for the user to type in).

When macros were first released, I created a WebEx quick dial button with an option to dial your own WebEx site or a different site than your own.  If you select the other site, you'll be prompted for the meeting ID and site name, in both cases, you'll be prompted to confirm the address before dialing.

Thanks a heap Patrick - works a treat!

I'm glad it's working for you! Hope it was easy to edit for your needs, it was my very first macro, actually took several different macro examples and hashed them into what you see.

The WebEx quick dial was a great example project to wrap my head around the way the macros work. We use BlueJeans for cloud meetings and I was able to extend that script to do a similar thing where it asks users for a meeting ID, then prompts for optional meeting PIN and concatenates it into a single URI of meetingID.PIN@bjn.vc.

One other thing our users ask for is the ability to dial H323 IP addresses. We used the officially unofficial way to have users dial the IP with appending the @video domain and have Expressway strip it off in a dial transform. H323 works perfectly on SX endpoints, but gets disabled when the units boot up. I'm wondering if the macros could be extended to monitor those options and flip them when the codec gets its settings wiped by CUCM. (Or even better, Cisco could just update the firmware to allow them to dial h323 after registering to CUCM :)

Hi

 

const xapi = require('xapi');
//Enables H323
function enableH323() {
    xapi.config.set('NetworkServices H323 Mode', 'On');
}
//Status listener for changes in the xStatus H323 Mode Status, if this changes to Disabled, flip back to Enabled. 
xapi.status.on('H323 Mode Status', value => {
    if (value == "Disabled") enableH323();
});

enableH323();

Feel free to build on this example. This is a basic example of the macro listening for a specific status change, for example when anyone tries to disable the xConfig NetworkServices H323 Mode to Off (this sets the xStatus mode to "Disabled". When that happens the macro will run the enableH323(); function. This is similar to the infiniteDnd script I posted earlier but without any GUI interaction, this always runs in the background. By default the macros are started upon boot and will always set H323 to enabled when it starts.

 

I have not done much testing but I think it will work for your scenario. Please let me know if it covers your need.

 

/Magnus

Hi Magnus,

 

Your H.323 script works like a charm. If the codec is registered to a GK with alias and E.164 it loses all the H.323 settings after reboot including GK address (because of CUCM provisioning). Is it possible to set h.323 alias, e.164 and GK address on the same way H.323 network service is enabled in your script?

 

Ante

Side note: Dual registration with CUCM->VCS or Third-party is not supported and is not planned to be supported either. The term "Supported" is linked to "Tested and verified" and "Will give you TAC support". It does not mean it won´t work, however if you experience problems with the setup it is up to you to find a workaround and TAC can decline troubleshooting your issues until the scenario is in a "Supported" state. :)

 

/Magnus

Thats awesome, thank you!
We further added the InputType: 'numeric' to the "UserInterface Message TextInput Display" command.
so that you dont have to switch to the numeric keypad.

Very cool! I modified it to work with Bluejeans as well. Probably also modify it to work with CMS/Acano.

 

Is there ANY way to get the moderator or participant pin for Webex into the tablet instead of having to bring up the dialpad while in a call?

 

One of the cool things BJ did was allow you to embed the moderator or participant pin within the URI so you could go <meedingid>.<moderator pin>@bjn.vc

 

Does anybody know if the Webex CMR developers have thought about doing something like that? It would allow the tablet to construct a full URI with the authentication info.