Skip to content

Conversation

@nickvergessen
Copy link
Member

@nickvergessen nickvergessen commented Oct 30, 2020

Todos

  • Add capability when sip can be enabled by the participant
  • Add docs
  • Add integration tests (if possible)
  • Store the PIN in the database

Fix #1604
Fix #1605
Fix #1606
Fix #1607
Fix #1608
Fix #2511
Fix #2512

@nickvergessen
Copy link
Member Author

nickvergessen commented Nov 4, 2020

  • background job triggers: InvalidArgumentException: Object parameters must be string and not empty
  • Logged in users that join via SIP are logged as "guest" in system message
  • Leaving the call does not terminate anymore
  • Leave messages are not printed to the system messages

@nickvergessen
Copy link
Member Author

nickvergessen commented Nov 4, 2020

  • There is a "guest" display for the phone connection, additional to the real guest

@nickvergessen
Copy link
Member Author

nickvergessen commented Nov 4, 2020

  • Handle the new events to enable the mic icon:
{
	event: {
		flags: {
			roomid: "1609407087",
			sessionid: "hoB9bi9LhyJLVoZmcI_lswKJoOBfeHYCe31_ADaQaEt8UU9uM2tiajMyR2dOSWRvMFB5VS1abU9LbjM0TDNRN2l4eGp1Z21McDZlcDREUEdpWGFnQVRnX2t2R0lWWlR0eFp3SmpoTDZ2elN3aG1XeDJWTkd0UVdSanZlTVpvdFFuR1UyempIV0FEdzhHbVNvcHh5RHNqU2R2Yk1uT1pmdG9nUWloX1VvckRmV3pTUXd1UUVCQTlBengzMWpkRWFwLUx4TGswdkQ4fDAxMjk5NDQwNjE=",
			flags: 1
		}
		target: "participants"
		type: "flags"
	​​}
	type: "event"
​}
  static const uint32_t kFlagMutedSpeaking = 1;
  static const uint32_t kFlagMutedListening = 2;
  static const uint32_t kFlagTalking = 4;
  static const uint32_t kFlagRaisedHand = 8;

@nickvergessen nickvergessen force-pushed the feature/noid/sip-part-2 branch from 0c2bc8f to 0273263 Compare November 11, 2020 07:58
@nickvergessen
Copy link
Member Author

  • Missing guest names and avatars of logged in users

@nickvergessen nickvergessen marked this pull request as ready for review November 16, 2020 15:35
@nickvergessen nickvergessen force-pushed the feature/noid/sip-part-2 branch from 8862f4e to 42ee9b2 Compare November 16, 2020 15:38
@nickvergessen

This comment has been minimized.

@nickvergessen nickvergessen force-pushed the feature/noid/sip-part-2 branch from 120e2ef to 7a90854 Compare November 16, 2020 20:36
@nickvergessen
Copy link
Member Author

Fixed guest identification. Works fine now, but there is a bug with the video background, as when we add in the user id later on, this part does not rerun with the new given user id:

async beforeMount() {
if (!this.user) {
return
}
// check if hasAvatar info is already known
const userHasAvatar = getUserHasAvatar(this.user)
if (typeof userHasAvatar === 'boolean') {
this.hasPicture = userHasAvatar
return
}
try {
const response = await axios.get(generateUrl(`avatar/${this.user}/300`))
if (response.headers[`x-nc-iscustomavatar`] === '1') {
this.hasPicture = true
setUserHasAvatar(this.user, true)
} else {
setUserHasAvatar(this.user, false)
}
} catch (exception) {
console.debug(exception)
}
},

Comment on lines 678 to 683
$roomData['canEnableSIP'] =
$this->talkConfig->isSIPConfigured()
&& ($room->getType() === Room::GROUP_CALL || $room->getType() === Room::PUBLIC_CALL)
&& $currentParticipant->hasModeratorPermissions(false)
&& $this->talkConfig->canUserEnableSIP($currentUser);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it be also checked if the room token only contains digits (as otherwise Room::setSIPEnabled would fail)? Or that check is just an extra safety measure and configuring SIP automatically updates the previous room tokens, so if SIP is configured they will always be only digits?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah right, let me check that

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

configuring SIP automatically updates the previous room tokens,

No way, as the token is used everywhere across clients and server to store information.

@nickvergessen nickvergessen force-pushed the feature/noid/sip-part-2 branch from 2f4ec36 to fbfd005 Compare November 17, 2020 15:22
Copy link
Member

@danxuliu danxuliu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have NOT tested it, but code looks good.

There are some things that I would like to double check, but if they need any fixing we can handle them in follow-up pull requests.

Signed-off-by: Joas Schilling <[email protected]>
Signed-off-by: Joas Schilling <[email protected]>
Signed-off-by: Joas Schilling <[email protected]>
Signed-off-by: Joas Schilling <[email protected]>
Signed-off-by: Joas Schilling <[email protected]>
@nickvergessen nickvergessen force-pushed the feature/noid/sip-part-2 branch from 4766013 to c287c0f Compare November 26, 2020 13:32
->with($sessionId)
->willThrowException(new ParticipantNotFoundException());
$room->expects($this->once())
->method('getParticipantBySession')
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we tested the same function twice and that's why the tests failed before the last push

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

4 participants