Openfire 4.2.1 - websocket unable to connect to the server via internet

I am trying to connect using strophejs library.

Connection through websocket is not establishing from internet it is showing status code - 101 Switching Protocols.

When I am trying using within server it is working but when trying from internet after showing status connecting it is hanging.

Thanks in advance (: