run ssh command on Sonus SBC 5110 device ( only use raw module, no network module available for this device)

I'm not sure how and why, but the raw module doesn't work with some devices.
In my limited experience it looks like it fails in situation where the remote is not a shell.

It these circumstances you will need to use the expect module.