SX10 devices are unable to run the macro framework directly on the device. These devices are left out in the macro cold unable to do what other more powerful endpoints can. I can feel the chill now. But...
Thanks to a Nodejs library jsxapi we can bring these codec in from the cold and give them some powerful tools to handle in-room controls from the Touch 10 interface. My example focuses on in-room controls but this logic can be applied across monitoring any of the events that a Cisco video endpoint could generate.
There are some great macro examples on the DevNet Github repo. I am going to use one as an example to show how to convert it into a nodejs server application. The example I am using today is the audio only dial button. The example interface is shown below.
Typically when you select said button you get this interface:
I am going to change this up slightly and instead of providing a straight dialing interface for an audio call, I am going to provide the ability to enter a meeting number to join a Webex. See below:
Once the meeting number is entered and the Join button is pressed the appropriate @mysite.webex.com is appended to the call and the calling interface launches. So a slight change but easy dialing into a meeting is always a good thing. If you want to stick to the original like the example it should be a matter of a few small changes.
To turn this into a Nodejs application we need two files. First is the typical Node application launch file index.js. This file is pretty simple and launches the application by creating an array of endpoint objects using the TPXapi module which is our second file. My list of endpoints is a simple array but feel free to use a database or json file in its place to store your list of host URL's or IP addresses.
The TPXapi module below forms the core of our application and controls the SSH connection, provides error correction and most importantly monitors events coming from our video endpoint. New functionality can be adding by extending the prototype with new functions. Error correction provides a way to reconnect to the endpoint should the SSH session fail. Any other type of error will close the connection and reopen it. This may or may not be preferred.
This is a very simple example of using in-room controls and converting a macro to a server side application. The possibilities of more complex functionality are endless.
VoIPNorm
Hello. I need to add an speed dial button in a sx10 but I am not sure where should I to enter the js code to make the button works, can you provide the steps to make this? Thank you.
ReplyDeleteSX10's do not support Macros, you would need to build a service and read the events coming from the SX10 to trigger a command to launch the call.
DeleteBe easier to for you just add the favorite after you dial. To be honest it is silly to do all this for a speed dial. Good doc here. Thanks - Sid
DeleteThis is just an example Sid. Yeah sure it would be easy to do as you suggest but what if you wanted to create a speed dial for 400 SX10's that may occasionally need updating. You going to run around to all 400 and do what you suggest. nope.
Delete