...
Supported platforms and browsers
Chrome | Firefox | Safari 11 | Edge | |
---|---|---|---|---|
Windows | + | + | + | |
Mac OS | + | + | + | |
Android | + | + | ||
iOS | - | - | + |
Supported protocols
- WebRTC
- RTP
- SIP
...
Code Block | ||||
---|---|---|---|---|
| ||||
keytool -importcert -keystore /usr/java/jdk1.8.0_181/jre/lib/security/cacerts -storepass changeit -file pbx.crt -alias "pbx" |
6. Restart WCS.
Connection to an existing session
Sometimes it is necessary to connect to already existing session and receive an incoming call. It is usually actual on mobile devices where websocket session is closed automatically when browser goes to background. In this case, only push notifications are available. To keep the sesssion active after disconnection, the keepAlive
option should be set while creating the session
Code Block | ||||
---|---|---|---|---|
| ||||
var connectionOptions = {
urlServer: url,
keepAlive: true,
sipOptions: sipOptions
};
...
Flashphoner.createSession(connectionOptions).on(SESSION_STATUS.ESTABLISHED, function(session, connection){
...
}); |
In this case, session stays active until the following interval in milliseconds is expired (3600 seconds, or 1 hour by default)
Code Block | ||
---|---|---|
| ||
client_timeout=3600000 |
This interval is periodically checked. The checking priod is set in milliseconds by the following parameter (300 seconds, or 5 minutes by default)
Code Block | ||
---|---|---|
| ||
client_timeout_check_interval=300000 |
A session token should be stored while creating the session
Code Block | ||||
---|---|---|---|---|
| ||||
Flashphoner.createSession(connectionOptions).on(SESSION_STATUS.ESTABLISHED, function(session, connection){
authToken = connection.authToken;
...
}); |
Then application may connect to the session again using this token (for example, if incoming call push notification is received):
Code Block | ||||
---|---|---|---|---|
| ||||
var connectionOptions = {
urlServer: url,
keepAlive: true
};
if (authToken) {
connectionOptions.authToken = authToken;
} else {
connectionOptions.sipOptions = sipOptions;
}
Flashphoner.createSession(connectionOptions).on(SESSION_STATUS.ESTABLISHED, function(session, connection){
...
}); |
Known issues
1. It's impossible to make a SIP call if 'SIP Login' and 'SIP Authentification name' fields are incorrect
...