Skip to content

Instantly share code, notes, and snippets.

//Constructor for creating a endpoint object with video xapi. Ability to scrape multiple API's.
const xapi = require('xapi');
const ZOOM = 'vip2.zoomcrc.com';
function zoomMeeting() {
xapi.event.on('UserInterface Extensions Panel Clicked', (event) => {
console.log('event', event.PanelId);
if (event.PanelId == 'zoom_dial') {
//Intial press of zoom button
xapi.command('UserInterface Message TextInput Display', {
"use strict";
const jsxapi = require('jsxapi');
let camera1active = false;
module.exports = class TPXapi {
constructor(endpoint) {
//super();
const xapi = require('xapi');
const MAINCAMERAID = '1';
const PRESENTATIONCAMERAID = '2';
//var farendCameraToControl = 'MAIN';
var farendCameraToControl = 'PRESENTATION';
var currentCallId = null;
var farendpresentationactive = 0;
var lastDirection = null;
const WebSocket = require('ws');
const XAPI = require('jsxapi/lib/xapi').default;
const WSBackend = require('jsxapi/lib/backend/ws').default;
const url = 'ws://codecip/ws';
const username = 'admin';
const password = '';
const auth = Buffer.from(`${username}:${password}`).toString('base64');
const options = {
const jsxapi = require('jsxapi');
const username = 'admin';
const password = 'password';
const url = 'ssh://ip-address'
const xapi = jsxapi.connect(url, {
username: username,
password: password,
const ciscoTPClient = require('cisco-tp-client');
const express = require('express');
const app = express();
const bodyParser = require('body-parser');
const port = 3000;
const ip = '<endpoint-IP>';
const serverip = 'http://<server-IP>:3000/';
const status = ["/Status/Audio/Volume"];
#accept input data and keys "Status" and "Call"
async def nested_get(input_dict, nested_key):
internal_dict_value = input_dict
for k in nested_key:
internal_dict_value = internal_dict_value.get(k, None)
if internal_dict_value is None:
return None
#test to ensure Status is part of the new list
@voipnorm
voipnorm / blync_public.py
Last active July 22, 2019 20:09
BlyncLight Project in Python
#!/usr/bin/env python3
#Simple project to monitor and control a BlyncLight. Some helpful links to make this work:
#https://joshspicer.com/python37-ssl-issue
#https://github.com/cisco-ce/pyxows
#https://pypi.org/project/blynclight/
#https://github.com/signal11/hidapi
#https://kb.mccdaq.com/KnowledgebaseArticle50608.aspx?Keywords=Linux&Keywords=Linux
from pyxows import xows
@voipnorm
voipnorm / SipMessageChannelMacro.js
Last active July 26, 2019 16:44
CE Macro for allow remote camera control
const xapi = require('xapi');
const MAINCAMERAID = '1';
const PRESENTATIONCAMERAID = '2';
//var farendCameraToControl = 'MAIN';
var farendCameraToControl = 'PRESENTATION';
var currentCallId = null;
var farendpresentationactive = 0;
<Extensions>
<Version>1.5</Version>
<Panel>
<PanelId>panel_1</PanelId>
<Type>Statusbar</Type>
<Icon>Input</Icon>
<Order>1</Order>
<Color>#A866FF</Color>
<Name>Input Control</Name>
<Page>