kirm / sip.js

Session Initiation Protocol for node.js
MIT License
427 stars 171 forks source link

Use SIPjs with Freeswitch #139

Open telmojsneves opened 4 years ago

telmojsneves commented 4 years ago

Is it possible to use freeswitch (as a sip registrar and proxy) and sipjs as a user agent that receives calls (RTP)? What I am trying currently is to start with the freeswitch address, but seems impossible because returns a EADDRINUSE error.

Thanks

kirm commented 4 years ago

EADDRINUSE means that sip.js is trying to use the same address to listen on as your other app. Try to change port number in sip.start() options. for example:sip.start({port: 6060})

laoyin commented 1 year ago

if i wanna reuse this port, is there a way to solve this problem? @kirm 。 i try to change

var socket = dgram.createSocket({type: 'udp4', 'reuseAddr': true}, onMessage);

it doesnt work.

ztutberidze commented 1 year ago

It is impossible to reuseaddr if the port is already bound by another application. reuseAddr works when the port was previously used and it is in the closing stage.