This question was asked by somebody on Quora here but there was no answer. Is there any work around solution for this, other than changing the source code of jsSip?
The issue is that most JS SIP libraries that work with webRTC do so through websockets (RFC 7118). ALso, Chrome now requires getUserMedia interface to be run on a https which imposes additional requirements on the SIP server side. The SIP server must also support websockets, SRTP, DTLS, etc.
All this makes sense if the SIP calls are made through a browser, either as a signalling mechanism for webRTC or non-webRTC telephony calls through a web page.
However, when the SIP server is on the local network and the SIP call has to be initiated from an app server, all these requirements are no longer applicable. It should be possible to make JS SIP calls over plain UDP without the need to run a http server with the SIP server as the http server in my case is integrated with the application server itself.
Scenario 1 as supported bymost JS SIP libraries:
JSSIP (in HTML page <------>websockets<---->[http-builtin with SIP server]<---->PSTN
Scenario 2 which applies to the question:
JSSIP (in HTML page <--https---->app-server with https-server<----local net--->[SIP server] <-----> PSTN