Adapted sip phone to use user internal identification

This commit is contained in:
Pedro Beschorner Marin 2016-10-11 15:35:13 +00:00
parent cf0927e9d7
commit 4fedbf9882
3 changed files with 8 additions and 8 deletions

View File

@ -34,7 +34,7 @@ trait UsersApp {
} }
def handleUserConnectedToGlobalAudio(msg: UserConnectedToGlobalAudio) { def handleUserConnectedToGlobalAudio(msg: UserConnectedToGlobalAudio) {
val user = users.getUserWithExternalId(msg.userid) val user = users.getUser(msg.userid)
user foreach {u => user foreach {u =>
val vu = u.voiceUser.copy(talking=false) val vu = u.voiceUser.copy(talking=false)
val uvo = u.copy(listenOnly=true, voiceUser=vu) val uvo = u.copy(listenOnly=true, voiceUser=vu)
@ -45,7 +45,7 @@ trait UsersApp {
} }
def handleUserDisconnectedFromGlobalAudio(msg: UserDisconnectedFromGlobalAudio) { def handleUserDisconnectedFromGlobalAudio(msg: UserDisconnectedFromGlobalAudio) {
val user = users.getUserWithExternalId(msg.userid) val user = users.getUser(msg.userid)
user foreach {u => user foreach {u =>
val uvo = u.copy(listenOnly=false) val uvo = u.copy(listenOnly=false)
users.addUser(uvo) users.addUser(uvo)

View File

@ -50,7 +50,7 @@ package org.bigbluebutton.modules.phone.managers {
private var outgoingNetStream:NetStream = null; private var outgoingNetStream:NetStream = null;
private var username:String; private var username:String;
private var uri:String; private var uri:String;
private var externUserId:String; private var userId:String;
private var uid:String; private var uid:String;
private var meetingId:String; private var meetingId:String;
@ -78,13 +78,13 @@ package org.bigbluebutton.modules.phone.managers {
return netConnection; return netConnection;
} }
public function setup(uid:String, externUserId:String, username:String, meetingId:String, uri:String):void { public function setup(uid:String, userId:String, username:String, meetingId:String, uri:String):void {
trace(LOG + "Setup uid=[" + uid + "] extuid=[" + externUserId + "] name=[" + username + "] uri=[" + uri + "]"); trace(LOG + "Setup uid=[" + uid + "] extuid=[" + userId + "] name=[" + username + "] uri=[" + uri + "]");
this.uid = uid; this.uid = uid;
this.username = username; this.username = username;
this.meetingId = meetingId; this.meetingId = meetingId;
this.uri = uri; this.uri = uri;
this.externUserId = externUserId; this.userId = userId;
} }
public function connect():void { public function connect():void {
@ -101,7 +101,7 @@ package org.bigbluebutton.modules.phone.managers {
netConnection.client = this; netConnection.client = this;
netConnection.addEventListener( NetStatusEvent.NET_STATUS , netStatus ); netConnection.addEventListener( NetStatusEvent.NET_STATUS , netStatus );
netConnection.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler); netConnection.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
netConnection.connect(uri, meetingId, externUserId, username); netConnection.connect(uri, meetingId, userId, username);
} }
if(reconnecting && !amIListenOnly){ if(reconnecting && !amIListenOnly){
handleConnectionSuccess(); handleConnectionSuccess();

View File

@ -73,7 +73,7 @@
private function initConnectionManager():void { private function initConnectionManager():void {
var options:PhoneOptions = new PhoneOptions(); var options:PhoneOptions = new PhoneOptions();
var uid:String = String(Math.floor(new Date().getTime())); var uid:String = String(Math.floor(new Date().getTime()));
var uname:String = encodeURIComponent(UsersUtil.getMyExternalUserID() + "-bbbID-" + UsersUtil.getMyUsername()); var uname:String = encodeURIComponent(UsersUtil.getMyUserID() + "-bbbID-" + UsersUtil.getMyUsername());
connectionManager.setup(uid, UsersUtil.getMyUserID(), uname , UsersUtil.getInternalMeetingID(), options.uri); connectionManager.setup(uid, UsersUtil.getMyUserID(), uname , UsersUtil.getInternalMeetingID(), options.uri);
} }