-
Notifications
You must be signed in to change notification settings - Fork 10.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[NEW] Enable outbound calling for EE #25843
Conversation
Description: Creating EE structure for outbound dialing. Refactored VoIPUser.ts and made necessary fields protected. Created VoIPUser or EEVoipClient based on the licensing in SimpleVoipUser Made necessary changes for using the voip client.
Description: Adding missing file.
Description: Connector changes for detecting the outbound call.
|
||
const createRoom = useCallback( | ||
async (caller: ICallerInfo): Promise<IVoipRoom['_id']> => { | ||
if (user) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (!user) return '' to avoid nesting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
this.setupRemoteMedia(); | ||
this.emit('callestablished'); | ||
this._callState = 'IN_CALL'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even if the if is used, this will override the answer_received
_callState. Is that expected?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would not matter. The problem is there is no chance for the system to receive 2 states. i.e ANSWER_RECEIVED and IN_CALL for outbound call. I am setting it there assuming between the statements this._callState = 'ANSWER_RECEIVED'; and this._callState = 'IN_CALL'; if there is any async call happens, the _callstate should be consistent.
But for now, it does not matter as sip.js does not give us any callback when remote answer is received. (When remote answer is received and correct, there is just of formality of sending ACK. the call and media has already establised. But sematically they are 2 different states).
return; | ||
} | ||
stopRingback(); | ||
if (callDetails.userState === UserState.UAC) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (callDetails.userState === UserState.UAC) { | |
if (callDetails.userState !== UserState.UAC) { return } |
To avoid nesting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
if (!result.voipClient) { | ||
return; | ||
} | ||
if (!user) { | ||
return; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (!result.voipClient) { | |
return; | |
} | |
if (!user) { | |
return; | |
} | |
if (!result.voipClient || !user || result.voipClient.userState !== UserState.UAC) { | |
return; | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
result.voipClient.userState will not be a part of this if. Even if the voipClient.userState !== UAC, we do want to stop the ringback.
It will be just
if (!result.voipClient || !callDetails.callInfo) {
return;
}
if (result.voipClient.userState === UserState.UAC) { | ||
startRingback(user); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (result.voipClient.userState === UserState.UAC) { | |
startRingback(user); | |
} | |
startRingback(user); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
Description: Handling review comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good to me but I'll leave the final approval to the Frontend guys :)
@@ -24,7 +26,9 @@ export class SimpleVoipUser { | |||
connectionRetryCount: voipRetryCount, | |||
enableKeepAliveUsingOptionsForUnstableNetworks: enableKeepAliveForUnstableNetworks, | |||
}; | |||
|
|||
if (await hasLicense('livechat-enterprise')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we are creating and using a new license called 'voip-enterprise'
I will approve and merge, but needs more attention when |
* Clickup Task: https://app.clickup.com/t/22bmce2 Description: Creating EE structure for outbound dialing. Refactored VoIPUser.ts and made necessary fields protected. Created VoIPUser or EEVoipClient based on the licensing in SimpleVoipUser Made necessary changes for using the voip client. * Clickup Task: https://app.clickup.com/t/22bmce2 Description: Adding missing file. * Clickup Task: https://app.clickup.com/t/22bmce2 Description: Connector changes for detecting the outbound call. * Clickup Task: https://app.clickup.com/t/22bmce2 Description: Handling review comments.<!-- This is a pull request template, you do not need to uncomment or remove the comments, they won't show up in the PR text. --> <!-- Your Pull Request name should start with one of the following tags [NEW] For new features [IMPROVE] For an improvement (performance or little improvements) in existing features [FIX] For bug fixes that affect the end-user [BREAK] For pull requests including breaking changes Chore: For small tasks Doc: For documentation --> <!-- Checklist!!! If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code. - I have read the Contributing Guide - https://github.com/RocketChat/Rocket.Chat/blob/develop/.github/CONTRIBUTING.md#contributing-to-rocketchat doc - I have signed the CLA - https://cla-assistant.io/RocketChat/Rocket.Chat - Lint and unit tests pass locally with my changes - I have added tests that prove my fix is effective or that my feature works (if applicable) - I have added necessary documentation (if applicable) - Any dependent changes have been merged and published in downstream modules --> ## Proposed changes (including videos or screenshots) <!-- CHANGELOG --> <!-- Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue below. This description will appear in the release notes if we accept the contribution. --> <!-- END CHANGELOG --> ## Issue(s) <!-- Link the issues being closed by or related to this PR. For example, you can use #594 if this PR closes issue number 594 --> ## Steps to test or reproduce <!-- Mention how you would reproduce the bug if not mentioned on the issue page already. Also mention which screens are going to have the changes if applicable --> ## Further comments <!-- If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc... --> Co-authored-by: amolghode1981 <86001342+amolghode1981@users.noreply.github.com> Co-authored-by: Murtaza Patrawala <34130764+murtaza98@users.noreply.github.com> Co-authored-by: Aleksander Nicacio da Silva <6494543+aleksandernsilva@users.noreply.github.com> Co-authored-by: Tiago Evangelista Pinto <17487063+tiagoevanp@users.noreply.github.com> Co-authored-by: Guilherme Gazzo <5263975+ggazzo@users.noreply.github.com>
…ove/message-renderer-tweaks * 'develop' of github.com:RocketChat/Rocket.Chat: [NEW] Enable outbound calling for EE (#25843) (#25960) Chore: Introduce new index to query active livechat conversations for cloud scaling (#26047) [FIX] Importer fails to download files from URLs with query string params (#25934) [IMPROVE] Moved call hold/unhold to EE (#26007) [NEW] Engagement Metrics - Phase 2 (#25505) Chore: Convert usePreventDefault, useQueryOptions, useShortcutOpenMenu (#26035) [FIX] Importer files are unnecessarily transferred over the network. (#25919) Chore: test turbo params (#26038) Chore: Create a token for each action (#26023) Chore: Migrate oembed to ts (#25622) Regression: Fix voip call wrap-up model not working (#26024) Chore: Updating Apps-Engine (#26001) [IMPROVE] Differ Voip calls from Incoming and Outgoing (#25643) [FIX] Append path To Route For Custom Emoji (#24379) [IMPROVE] Moved call wrap up modal to EE (#25875) Chore: Major refactors in pageobjects (#26015)
…/clientPackage * 'develop' of github.com:RocketChat/Rocket.Chat: (80 commits) [NEW] Community Edition Watermark (#25844) [BREAK] remove unused endpoints and restify others (#25889) Chore: add underscore to ddp-streamer [IMPROVE] VoIP admin page cleanup: remove unused settings (#25993) Regression: Fix micro services (#26054) Regression: Fix threads list (#26052) [NEW] VoIP Input/Output Device Selection (#25966) Chore: Account/Profile to TS (#25929) Chore: Add missing Swedish livechat translations (#26048) [IMPROVE] Expand the feature set of the new message rendering (#25970) Chore: Bump fuselage and update icon (#26036) [NEW][APPS] Allowing apps to register authenticated routes (#25937) [NEW] Enable outbound calling for EE (#25843) (#25960) Chore: Introduce new index to query active livechat conversations for cloud scaling (#26047) [FIX] Importer fails to download files from URLs with query string params (#25934) [IMPROVE] Moved call hold/unhold to EE (#26007) [NEW] Engagement Metrics - Phase 2 (#25505) Chore: Convert usePreventDefault, useQueryOptions, useShortcutOpenMenu (#26035) [FIX] Importer files are unnecessarily transferred over the network. (#25919) Chore: test turbo params (#26038) ...
Proposed changes (including videos or screenshots)
Adding structure for supporting EE features for Voip client. This PR handles making outbound calls.
Issue(s)
Steps to test or reproduce
Further comments