"window is not defined" when using JsSIP in Node.JS #864
Replies: 1 comment
-
Hi @FloppiTuna, JsSIP is a browser-based SIP library designed to run on the client side, not directly in Node.js. If you’re trying to use it, here’s a quick guide to set it up properly: Create an HTML page. In the section, include the JsSIP library like this: <script src="./libs/jssip-3.10.0.min.js"></script> In the , link a custom JavaScript file where you’ll write your SIP logic. Then in that JS file, you can initialize and register the UA like this: var socket = new JsSIP.WebSocketInterface('ws://x.x.x.x:8088/ws'); var ua = new JsSIP.UA(configuration); ua.start(); ua.on('registered', () => { ua.on('newRTCSession', function(data) { If you face any issues while setting it up, feel free to ask — happy to help! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm able to create a connection between JsSIP and my Asterisk/FreePBX server, however as soon as it receives/sends a call, it throws the following exception:
The code:
Beta Was this translation helpful? Give feedback.
All reactions