cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2678
Views
0
Helpful
3
Replies

Easy AXL calls with Node JS using node-cisco-axl

description

Cisco Unified Communications Manager has been the gold standard in enterprise unified communication for years, but using it's Administrative XML or AXL toolkit can be a beast. It changes frequently, uses SOAP rather than REST, and returns XML not JSON.

The goal of this project is to make it easier for people to use AXL, focusing on top use cases, not all functions!


To use you don't need to learn SOAP, or even have a WSDL file. All of the functions use the same name as the CUCM Data Dictionary, and take either a single parameter (listRoutePlan), or an object (getLine) and returns a JSON object you can work with.

The SOAP queries are done using AXIOS which is Promise based, so you can use .then with your calls!


installation

npm install node-cisco-axl


usage

const AXL = require('node-cisco-axl);


const axlOptions = {

    host: process.env.CUCM,

    user: process.env.AXLUSER,

    pass: process.env.AXLPASS,

    version: process.env.AXLVERSION

}

const axl = new AXL(axlOptions);


axl.listRoutePlan('9109200040')

    .then(res => {

     console.log(res.uuid);

    });

axl.getLine({

     'type': 'pattern',

     'search': '9109200040',

     'partition': 'Onnet-PT'

     }).then(res => {

        console.log(res.alertingName);

});




Feel free to contribute!

https://www.npmjs.com/package/node-cisco-axl

https://github.com/levensailor/node-cisco-axl

3 Replies 3

dstaudt
Cisco Employee
Cisco Employee

Cool!  Look forward to seeing if this project expands

felten
Level 1
Level 1

Great work, thanks for sharing

cjbarrettaz
Level 1
Level 1

I was not able to get axios working for sending SOAP input objects.  However, I did find that axios was great for making RESTful calls to CUC.  For CUCM AXL, I have been using the request-promise-native module so that I can utilize Promises.  Works like a charm. Would like to see how your project works out!