Skip to content

Commit

Permalink
Wp/release/0.8.4 (#316)
Browse files Browse the repository at this point in the history
* Fix bug for sendReceive
* Fix bug for incoming reinvite
  • Loading branch information
vyshakhbabji authored Dec 10, 2020
1 parent 5d3c45a commit 6582711
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,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.8.3
## Upgrade Procedure from v0.4.X to 0.8.4

- SDK now only supports only Unified SDP plan. You can find more information about this here: [https://chromestatus.com/feature/5723303167655936](https://chromestatus.com/feature/5723303167655936)

Expand Down Expand Up @@ -517,4 +517,5 @@ function onInvite(session) {
| Mar 2020 | 0.8.0 | 0.13.5 | 71+ | 62 to 65 , :warning: QoS feature not supported |
| May 2020 | 0.8.1 | 0.13.5 | 71+ | 62 to 65 , :warning: QoS feature not supported |
| Jul 2020 | 0.8.2 | 0.13.5 | 71+ | 62 to 65 , :warning: QoS feature not supported |
| Oct 2020 | 0.8.3 | 0.13.5 | 71+ | 62 to 65 , :warning: QoS feature not supported |
| Oct 2020 | 0.8.3 | 0.13.5 | 71+ | 62 to 65 , :warning: QoS feature not supported |
| Dec 2020 | 0.8.4 | 0.13.5 | 71+ | 62 to 65 , :warning: QoS feature not supported |
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ringcentral-web-phone",
"version": "0.8.3",
"version": "0.8.4",
"scripts": {
"test": "npm run test:ut && npm run test:e2e",
"test:coverage": "cat .coverage/lcov.info | coveralls -v",
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export interface WebPhoneOptions {
}

export default class WebPhone {
public static version = '0.8.3';
public static version = '0.8.4';
public static uuid = uuid;
public static delay = delay;
public static extend = extend;
Expand Down
9 changes: 7 additions & 2 deletions src/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ export type WebPhoneSession = InviteClientContext &
_sendReinvite: typeof sendReinvite;
getIncomingInfoContent: typeof getIncomingInfoContent;
sendMoveResponse: typeof sendMoveResponse;
sendReceive: typeof sendReceive;
};

export const patchSession = (session: WebPhoneSession): WebPhoneSession => {
Expand Down Expand Up @@ -149,9 +150,9 @@ export const patchSession = (session: WebPhoneSession): WebPhoneSession => {
session.stopMediaStats = stopMediaStats.bind(session);
session.getIncomingInfoContent = getIncomingInfoContent.bind(session);
session.sendMoveResponse = sendMoveResponse.bind(session);
session.sendReceive = sendReceive.bind(session);

session._sendReinvite = sendReinvite.bind(session);

session.on('replaced', patchSession);

// Audio
Expand Down Expand Up @@ -197,6 +198,9 @@ export const patchSession = (session: WebPhoneSession): WebPhoneSession => {
session.on('failed', stopPlaying);
session.on('replaced', stopPlaying);


session.on('reinviteAccepted', patchIncomingSession);

if (session.ua.enableQos) {
session.on('SessionDescriptionHandler-created', () => {
session.logger.log('SessionDescriptionHandler Created');
Expand Down Expand Up @@ -233,6 +237,7 @@ export const patchIncomingSession = (session: WebPhoneSession): void => {
session.ignore = ignore;
session.toVoicemail = toVoicemail;
session.replyWithMessage = replyWithMessage;
session.receiveRequest = receiveRequest;
};

/*--------------------------------------------------------------------------------------------------------------------*/
Expand Down Expand Up @@ -385,7 +390,7 @@ async function sendReceive(session: WebPhoneSession, command: any, options?: any
options = options || {};

extend(command, options);

delete command.extraHeaders;
let cseq;

return new Promise((resolve, reject) => {
Expand Down

0 comments on commit 6582711

Please sign in to comment.