11-21-2017 04:25 AM - edited 03-18-2019 01:38 PM
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.
01-10-2019 08:54 PM
Thanks for following up!
Yes. We don't need the macro for getting Serial#.
04-23-2018 05:58 AM
05-02-2018 05:46 AM - edited 05-02-2018 05:54 AM
On CE9.3, we can get the event by clicking Panel with Panel ID. I modified Quick Dial sample to trigger panel touch.
function listenToGui() { xapi.event.on('UserInterface Extensions Panel Clicked', (event) => { const number = numbers[event.PanelId]; if (number) dial(number); }); }
06-04-2018 01:44 AM
What would be really cool, is if there was a way to centrally apply macros to devices, rather than having to manually do it on each endpoint.
06-04-2018 01:46 AM
CE9.3 has introduced bulk backup/recovery feature. TMS and UCM with devicepack supports it for bulk-deployment.
Check P.16-17
06-15-2018 01:22 AM
I'm confused about which device pack I would need to allow for CUCM 10(5) provisioning of DX and SX endpoints running CE9 and above.
Would anyone know?
Many Thanks in advance
06-15-2018 07:00 AM
06-15-2018 08:15 AM
06-19-2018 02:28 PM
Hi,
By chance does someone have a Macro for having an endpoint dial into out at a specific time?
I would like to have our endpoint dial out into our internal bridge first thing in the morning.
Thanks,
Brandon
06-19-2018 02:53 PM
On CE endpoint Macro editor, there is a sample of "Scheduling" in Macro Tutorial.
function schedule(time, action) { let [alarmH, alarmM] = time.split(':'); let now = new Date(); now = now.getHours() * 3600 + now.getMinutes() * 60 + now.getSeconds(); let difference = parseInt(alarmH) * 3600 + parseInt(alarmM) * 60 - now; if (difference <= 0) difference += 24 * 3600; return setTimeout(action, difference * 1000); }
const StandupTime = '09:00'; const StandupUri = 'macro@polo.com'; const Sunday = 0, Saturday = 6;
function dialStandup() { const weekDay = new Date().getDay(); if (weekDay !== Sunday && weekDay !== Saturday) { xapi.command('Dial', { Number: StandupUri }); } schedule(StandupTime, dialStandup); // schedule it for the next day }
schedule(StandupTime, StandupUri);
06-13-2018 04:44 AM
Cisco Headset 531/532 has Call button on its remote controller. When I push it, there is an event.
*e Audio UsbHeadset CallButton
So I created one button to push by Cisco Headset.
const xapi = require('xapi'); // Modify destination number const dest = "sip:example@example.com"; function dial(number) { console.log('dial', number); xapi.command('dial', {number}); } xapi.event.on('Audio UsbHeadset CallButton', () => { xapi.status.get('calls') // No calls found. Dial .catch(() => dial(dest)); });
06-13-2018 07:03 AM
09-01-2018 02:15 AM
For click to call app, CE can check if it's business hour or not.
function listenToGui() { const now = new Date(); const weekday = now.getDay() > 0 && now.getDay() < 6; const businesshour = now.getHours() > 9 && now.getHours() < 18 && weekday; xapi.event.on('UserInterface Extensions Panel Clicked', (event) => { const number = numbers[event.PanelId]; if (businesshour) { if (number) dial(number); } else prompt("Notice","Sorry but our receptionist is not available.Please click Call and select Favorites.You can call our department directly.",15); }); }
10-05-2018 09:26 AM
SyntaxEditor Code Snippet
This macro allows to auto restart the device at the time of your choosing:
const xapi = require('xapi'); const intervalSec = 60; function checkTime() { const now = new Date(); const weekday = now.getDay() > 0 && now.getDay() < 6; const wakeupNow = now.getHours() === 14 && now.getMinutes() === 17 && weekday; if (wakeupNow) xapi.command('SystemUnit Boot'); } setInterval(checkTime, intervalSec * 1000);
10-19-2018 06:28 AM
Hi to all,
I try to make Video Composite with two Cisco Precision 60 using In-Room Control and macros. I manage to make it work when the layout is equal but when I try to change it to PIP I take the following error on the editor
VideoComposite ReferenceError: identifier 'PIP' undefined
at [anon] (duk_js_var.c:1198) internal
at composite (VideoComposite:20) strict
at [anon] (extensions/xapi.js:6453) strict
at _dispatch (extensions/xapi.js:3962) strict
at [anon] (extensions/xapi.js:3966) strict preventsyield
at forEach () native strict preventsyield
at _dispatch (extensions/xapi.js:3967) strict
at [anon] (extensions/xapi.js:3966) strict preventsyield
at forEach () native strict preventsyield
at _dispatch (extensions/xapi.js:3967) strict
at [anon] (extensions/xapi.js:3966) strict preventsyield
[...]20
I have attached my code and from the xAPI guide I found out that the command is
xCommand Video Input SetMainVideoSource ConnectorId: 1 ConnectorId: 2 Layout: PIP
How I can convert the above xAPI to a macro?
Best Regards
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide