versatica/JsSIP — reverse-engineered prompt
Reverse engineered prompt
Build me a lightweight JavaScript SIP library that works in both the browser and Node.js. I want it to let a web app talk to a real SIP server over WebSocket, create a user agent, register with a SIP account, make and receive audio and video calls with WebRTC, and send instant messages.
Please make the developer experience really simple. A person should be able to connect with a SIP URI and password, start the client, place a call, and listen for clear events like progress, confirmed, failed, and ended. It should feel easy to use but still powerful enough for real world apps, and it should play nicely with common SIP servers like Asterisk and Kamailio.
Include solid docs, a basic demo, and examples that show the happy path for connecting and making a call. Make it suitable to publish as an npm package, with tests and clean source. If you need details, look up current SIP over WebSocket and WebRTC docs online.
Want more depth? Deep Reverse