I have asterisk 1.4, is it possible to use websocket with this version?
That version probably reached end of life before websockets were invented! (Although I’m not sure when they were introduced.)
Was there a lot of structure change between versions? To use the current version will I have to rewrite my application?
If the application is directly linked with the code, it will be a major job. If it is a script, you will need to do a lot of rework, but most of it will be simple.
If you need to stay on Asterisk version 1.4 you have an alternative to build the doubango’s WebRTC2SIP Media gateway combined with their SIPML5 api you can use that version.
Do you mean that I will have to have another intermediary server to talk to asterisk doing the websocket negotiation?
Not another server but a service, it can run inside the same asterisk server. It is the mediagateway that convert plain SIP to websocket