Got the direction line working today. Turns out I was connecting the second channel of the opto with wrong polarity
Now it works fine. Don't know if it's my imagination but I think the steppers got a smoother mid-band sound with this isolation.
Also partially got the index signal sorted. I am getting it through the opto and it works fine. But I am using the unbuffered output from the Ultra 3000. Now I wanted to use the buffered one so that I can divide the counts inside the drive (hopefully it divides the index too), since I have a 2:1 reduction. However there is some strange problem with the buffered Index line - it outputs exactly 8Khz signal at all times - even when the motor is still. A and B buffered outputs are fine, it's just the Index that does this weirdness. Looks like a bad drive, though it is a new one. Will probably have to use an external opto-sensor for the Index