Siegmar Gieseler
Free User
- Joined
- Oct 20, 2018
- Messages
- 3
- Reaction score
- 1
Hi,
As 3CX version 15.5 supports WebRTC I am trying to connect using the JsSIP Library.
My goal is to integrate a softphone in my application ( instead of using any 3CX API ) in the same way I have already done with Asterisk, also using JsSIP.
WebRTC works very well and, in my humble opinion, is the most interesting feature in 3CX latest releases.
Below you find an excerpt of my code ( based on my former Asterisk code ):
createUserAgent: function () {
var optionsUserAgent = {
authorization_user: $("#user").val(), // // USER ( 3CX KEY )
password: $("#password").val(), // PASSWORD ( 3CX Authentication ID )
realm: $("#realm").val(), // mysubdomain.3cx.com.br
session_timers: false,
sockets: [ new JsSIP.WebSocketInterface("wss://mysubdomain.3cx.com.br") ], // Secure
//sockets: [ new JsSIP.WebSocketInterface("ws://mysubdomain.3cx.com.br") ],
uri: $("#uri").val() // sip:[email protected] 00 is the extension number
};
MyPhone.userAgent = new JsSIP.UA(optionsUserAgent);
...
It seems to connect but I get the following WebSocket error:
failed: Error during WebSocket handshake: Unexpected response code: 200
Usually this error is related to a wrong WebSocket URL.
I tried the followin URLs but I got the 403 ( Forbidden ) error:
wss://mysubdomain.3cx.com.br/wss
wss://mysubdomain.3cx.com.br/ws
Below you find the JsSIP configuration parameters:
JsSIP JavaScript Library
http://jssip.net
http://jssip.net/documentation/3.2.x/api/ua_configuration_parameters
Does anybody know what could be the problem ?
Does 3CX support WebRTC/WebSocket connections ?
If not will this be available inthe near future ?
Thanks
As 3CX version 15.5 supports WebRTC I am trying to connect using the JsSIP Library.
My goal is to integrate a softphone in my application ( instead of using any 3CX API ) in the same way I have already done with Asterisk, also using JsSIP.
WebRTC works very well and, in my humble opinion, is the most interesting feature in 3CX latest releases.
Below you find an excerpt of my code ( based on my former Asterisk code ):
createUserAgent: function () {
var optionsUserAgent = {
authorization_user: $("#user").val(), // // USER ( 3CX KEY )
password: $("#password").val(), // PASSWORD ( 3CX Authentication ID )
realm: $("#realm").val(), // mysubdomain.3cx.com.br
session_timers: false,
sockets: [ new JsSIP.WebSocketInterface("wss://mysubdomain.3cx.com.br") ], // Secure
//sockets: [ new JsSIP.WebSocketInterface("ws://mysubdomain.3cx.com.br") ],
uri: $("#uri").val() // sip:[email protected] 00 is the extension number
};
MyPhone.userAgent = new JsSIP.UA(optionsUserAgent);
...
It seems to connect but I get the following WebSocket error:
failed: Error during WebSocket handshake: Unexpected response code: 200
Usually this error is related to a wrong WebSocket URL.
I tried the followin URLs but I got the 403 ( Forbidden ) error:
wss://mysubdomain.3cx.com.br/wss
wss://mysubdomain.3cx.com.br/ws
Below you find the JsSIP configuration parameters:
JsSIP JavaScript Library
http://jssip.net
http://jssip.net/documentation/3.2.x/api/ua_configuration_parameters
Does anybody know what could be the problem ?
Does 3CX support WebRTC/WebSocket connections ?
If not will this be available inthe near future ?
Thanks