If it's a browser based softphone you are writing you can rule out pjsip, it's written in C so no option to run in a browser there.
Flash and Java are options and in the past I've seen softphone implementations with both so it is possible. However for whatever reason they were never really up to scratch and didn't get any popular support. I suspect once you get down to the media side of things needing to process large numbers of UDP packets in real-time the constraints of having to operate within a browser may start to bite.
The latest effort I'm aware of is phono from voxeo which is a flash/javascript hybrid softphone. It has a javascript API that hooks back into voxeo's SIP servers which then do the call signalling and set the media up between the flash plugin in the browser and the remote end of the call. It seems to work pretty well or as well as you can expect from a real-time product in a browser.
If I was you I'd start looking at WebRTC once it's supported in browsers it will be a much better option as you'll then be able to access network sockets directly from javascript and processing of media in real-time within a browser should be much more practical.