Spend some time trawling the various soft-switch mailing lists. Join the VoiceOps mailing list and trawl through there. Read the SIP RFCs and curse their use of MAY and MIGHT and SHOULD! :)
There's a lot of wisdom baked into the projects about how to handle phone calls; I don't know that there's money to be made redoing their work to be honest. Scratch the itch for sure! But be honest in your expectations - you're probably looking at years before your project becomes viable (unless there's a JS/Node SIP stack out there you could plug into already?) in a commercial sense.
Best of luck!
Asterisk is really, really solid, and will handle a lot of things for you that you shouldn't have to care about handling - lower level stuff.
Check this out: http://www.igorescobar.com/blog/2014/08/13/working-with-aste...
If you're going through the SIP RFCs for what you want, you're attacking the problem at the wrong layer of the stack. It's just not necessary to write your own SIP stack. It'd be like writing SSL negotiation logic for a web app: totally pointless. Just use what already works and extend it with the fancy UI and dev experience that you want. It's totally possible.
https://news.ycombinator.com/item?id=15690623
Thanks