Python scripting tool to manage Avaya Communication Manager

This could be it!

So many of us hunger for a decent tool to automate getting useful information out of the Avaya Communication Manager! I have written many scripts using PHP and Perl, but they all have various issues.

It looks like an engineer and python programmer has created a script that uses OSSI, which is a low-level protocol to talk to the CMs. He probably had to do a lot of brilliant hacking to get this to work. I wish I had an Avaya to play with! Alas, my world is all Cisco now (which also has surprisingly difficult challenges with command-line automation).

Anyway, I wanted to pass along the link to this person’s project. I saw it on LinkedIn here: https://www.linkedin.com/feed/update/urn:li:activity:6648167619008483328

And here is the project itself: https://pypi.org/project/ossi-tool/

As I post this, we are four weeks into the COVID-19 “shelter in place” order. Many of us telephone engineers have been involved in setting up remote workers and probably dealing with capacity and congestion. This Python tool should help with that. I can imagine setting up a script that:

  1. Watches for a new “mobility” flag in Active Directory
  2. If set, pulls the extension and mobile number from Active Directory
  3. Launches a script to build the EC500 record in CM with the right mobile number
  4. Lists all EC500 and watches for changes between AD and CM
  5. Removes the EC500 mapping when the flag is cleared

Also, we could all use more visibility into trunk utilization. This Python script should allow us to monitor trunk usage as well.

Happy Scripting All! Please let me know how it works for you. And send feedback and thanks to https://www.linkedin.com/in/janos-tarjanyi-a4201226/ for this awesome tool!

Roger

 

13 thoughts on “Python scripting tool to manage Avaya Communication Manager

  1. Tom Lynn

    I stand corrected. OSSI does it. Avaya has not created models for their SMS API to address performance measurements.

    Nice find!

    Reply
  2. Janos Tarjanyi

    Happy to hear you think ossi_tool is useful. I know it has many bugs, but I would like to improve it in my free time. I have couple of new idea for the new version to improve command running time:
    – Dynamic timeout for prompt checking
    – Specify possible prompt per command

    And later change commands which are not supported by Site Administrator import.
    For this I need help from CM engineer community to specify the command and the field as well.

    Feel free to open here a new case https://github.com/deesnow/ossi_tool

    Reply
    1. roger Post author

      Janos! I’m so flattered that you took the time to comment. I’m a huge fan of this tool you have developed! Unfortunately, I no longer have an Avaya system to play with. There will always be a special place in my heart for Avaya and I think the work you did is amazing. I highly recommend it.

      Someday I’d love to hear your story of pouring over wireshark and other logs to reverse-engineer the OSSI protocol. I cannot imagine how tedious that was. Is there any publicly-available documentation about OSSI?

      Thank you and well done!
      Roger

      Reply
      1. Janos Tarjanyi

        Because Geomant the company what I work for is a Devconnect partner of Avaya, so we have access for devconnect forum. 3 years ago I have got the ossi interface specification from there. It is available for partners, but Unfortunately I cannot share it, I think it breaks rights.
        Anyway the story is not that complex what you imagine. However the login process a bit tricky, and sending commands is special the output is very similar to a SAT screen, but there is no flied names just clearly the values. Many times these are really what we need.
        The most challenging is recognize the prompt (when the output is finished) because there is NO prompt characters like $ or # in linux. And it changing from command to command. That the reason why I thinking to categorize the command and define possible prompts for that, so in the next version I hope can implement this.

        Reply
  3. ivan r

    Many thanks to Roger and Janos for the effort to upload this valuable information, greetings from Mexico

    Reply
  4. Hammad Butt

    Hello Janos,

    Good day!

    I’m getting this ERROR when running the tool:

    — Let Start! —
    Login failed
    Las
    Traceback (most recent call last):
    File “/bin/ossi_tool”, line 11, in
    sys.exit(main())
    File “/usr/lib/python2.7/site-packages/ossi_tool/ossit.py”, line 342, in main
    a.ossi_close()
    File “/usr/lib/python2.7/site-packages/ossi_tool/ossit.py”, line 132, in ossi_close
    self.s.sendline(‘clogoff’)
    File “/usr/lib/python2.7/site-packages/pexpect/pty_spawn.py”, line 578, in sendline
    return self.send(s + self.linesep)
    File “/usr/lib/python2.7/site-packages/pexpect/pty_spawn.py”, line 569, in send
    return os.write(self.child_fd, b)
    OSError: [Errno 9] Bad file descriptor

    Can you please guide what could be the issue?
    Here is my command:
    ossi_tool 192.168.10.10 sampleuser -ppassword -c ‘list node-name all’

    Much thanks.

    Reply
    1. roger Post author

      Sorry for the delay, Hammad. Did you get this sorted out? I do not have access to my Avaya lab anymore so I cannot troubleshoot these issues. I’m kinda sad about that, actually.

      Reply
  5. János Tarjányi

    Finally the pyhon3 compatible version just released few days ago. Thanks to Muhammad Waqar to chasing me 😉
    Additionally the package is importable now for a bigger python project which was not available in the original ossi_tool version.

    My discord server is still open if anyone have question.

    https://discord.gg/dddZvqKnan
    For PM that’s me on discord: Deesnow#0840

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *