From the ZF manual for the A5S310Z under troubleshooting 4-5:
Clutch E, inadequate supply to clutch E
Line break at solenoid 1
Shift valve 4 sticking
Damper C2 blocked
Position switch (selector lever) fault
So I'd start with cleaning the selector switch and then change the oil/filter