Use java actions. How to integrate with telnet using java can be found elsewhere on the internet. Stackoverflow always being a good starting point:
All Avaya AES dialers work on the same principle. There are a few steps that one needs to take to handle calls. I have created a java implementation for an Avaya AES system that requires some server configuration and authentication details to work. This should work for any Avaya AES system.
I have submitted it to the Appstore as a module. Hopefully it will be available for download soon. In the meantime, I could send the module to you if you need it urgently.
The module Johan is talking about is now available in the Appstore.