vbaexcelsshavaya

Excel 2007 VBA - Avaya CMS - SSH broke scripts


Specs

Excel 2007, VBA, Avaya CMS Supervisor R16.2

About 2 years ago I threw together some scripts to automate the reports we did in Avaya. It's been working great, but this weekend there was some strange issues taking place and IT said for us to switch our connection in Avaya from 'Network' to 'SSH.' IT hadn't changed anything on their end, but simply said this seems to work and that they agreed it's bizarre it just started happening. Unfortunately, my scripts no longer work and I'm stumped as to how to make it work with SSH.

Dim cvsApp As New ACSUP.cvsApplication 'acsApp.exe
Dim cvsConn As New ACSCN.cvsConnection 'cvsconn.dll
Dim cvsSrv As New ACSUPSRV.cvsServer 'acsSRV.exe
Dim Rep As New ACSREP.cvsReport 'acsRep.exe
Dim Info As Object, Log As Object, b As Object
Dim InfoOB As Object, LogOB As Object, bOB As Object


cvsApp.CreateServer(UserName, "", "", serverAddress, False, "ENU", cvsSrv, cvsConn)
cvsConn.Login(UserName, passW, serverAddress, "ENU")

That is the bit of my scripts that accesses Avaya and connects to the server. If anyone has any clues on this, please share them with me. Again, it worked fine with the 'Network' (port 23) connection, and is no longer working with 'SSH' (port 22).

The scripts just hang, rather than generating any type of useful error. In excel it returns a "Run-time error '9': Subscript out of range" which is just a basic error that happens if it's unable to connect to Avaya to pull the data.

Thanks in advance!


Solution

  • After personally speaking with Avaya, and coming to no solution at all, I began to mess around with it further so I could get the reports automated again. If you've ran into this same problem, this is the solution I reached:

    Since SSH is blocking us from creating processes for Avaya, lets get around it by starting the processes first and then grab onto those created processes. Simply open up Avaya manually (double-click icon for Avaya CMS Supervisor) and sign-in with your credentials. After you've signed in successfully, minimize Avaya.

    Now we'll want to change up the scripts a little:

    REMOVE: Dim cvsConn As New ACSCN.cvsConnection

    FROM:

    Dim cvsApp As New ACSUP.cvsApplication 'acsApp.exe`
    Dim cvsConn As New ACSCN.cvsConnection 'cvsconn.dll
    Dim cvsSrv As New ACSUPSRV.cvsServer 'acsSRV.exe
    Dim Rep As New ACSREP.cvsReport 'acsRep.exe
    Dim Info As Object, Log As Object, b As Object
    Dim InfoOB As Object, LogOB As Object, bOB As Object
    

    REPLACE:

    cvsApp.CreateServer(UserName, "", "", serverAddress, False, "ENU", cvsSrv, cvsConn)
    cvsConn.Login(UserName, passW, serverAddress, "ENU")
    

    WITH:

    Set cvsSrv = cvsApp.Servers(1)
    

    I hope this helps you all out. It should resolve the issue by allowing you to use the already opened connection, rather than having the scripts create the process in the background when processing reports. If you don't forget to open Avaya first, then everything should run smooth.