It looks to me like the server is sending a VT100 query device code command to the 'terminal' (your telnet client, when you run your script). It is probably then waiting to receive your device code. Since you don't send your device code, it doesn't continue to send the menu and prompt.

You probably have a timeout because your script is waiting for the server to send data and the server is waiting for your script to send data. It's good that at least one of them timeout.

Thank you guys for the help
Changing my prompt to a variant of *option* wont help as i am not receiving that data.
The suggestion re VT100 sounds most promising. I dont fully understand it, but this is exactly whats happening. my telnet client just sits there waiting for some data. It could be this.
I'll invetigate!
Thank you
Any more experts on VT100, and whether this could be the problem?

Usually you want the remote TERM environment variable to be set to something like "dumb" so you don't read escape sequences meant to be interpreted by a display terminal.

However, here the server requests neither terminal type, nor environment variables, but sends a "\033Z" to query terminal device attributes. A good response to this might be "\033[?6c" ('I am a vt102').