Skip to content

Commit

Permalink
Fix Ext to Ext calling issue and Early media handling. Fixes #176 and #…
Browse files Browse the repository at this point in the history
…160. (#177)

Upgraded SDK to 0.6.2
  • Loading branch information
vyshakhbabji authored and kirill-konshin committed Dec 18, 2018
1 parent 4d17dfe commit 515b4ad
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ session.stopRecord().then(...);

Not yet implemented. Could be done by dialing \*83. The account should be enabled for barge/whisper access through system admin.

### Upgrade Procedure from v0.4.X to 0.6.1
### Upgrade Procedure from v0.4.X to 0.6.2

- SDK constructor now allows to add custom UA Configuration parameters like `sessionDescriptionHandlerFactory` , `sessionDescriptionHandlerFactoryOptions` , `maxReconnectionAttempts` , `reconnectionTimeout`, `connectionTimeout`

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@
"node": ">=0.10.36"
},
"license": "MIT",
"version": "0.6.1"
"version": "0.6.2"
}
20 changes: 12 additions & 8 deletions src/ringcentral-web-phone.js
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@

/*--------------------------------------------------------------------------------------------------------------------*/

WebPhone.version = '0.6.1';
WebPhone.version = '0.6.2';
WebPhone.uuid = uuid;
WebPhone.delay = delay;
WebPhone.extend = extend;
Expand Down Expand Up @@ -404,14 +404,18 @@
// Audio
session.on('progress', function(incomingResponse) {
stopPlaying();
if (incomingResponse.status_code === 183 && incomingResponse.body) {
if (incomingResponse.status_code === 183) {
session.createDialog(incomingResponse, 'UAC');
session.sessionDescriptionHandler.setDescription(incomingResponse.body).then(function() {
session.status = 11; //C.STATUS_EARLY_MEDIA;
session.hasAnswer = true;
});
}
});
session.hasAnswer = true;
session.status = 11;
session.sessionDescriptionHandler.setDescription(incomingResponse.body)
.catch(function (exception) {
session.logger.warn(exception);
session.failed(response, C.causes.BAD_MEDIA_DESCRIPTION);
session.acceptAndTerminate({status_code: 488, reason_phrase: 'Bad Media Description'})
});

}});

if(session.media)
session.on('trackAdded',addTrack);
Expand Down

0 comments on commit 515b4ad

Please sign in to comment.