Prevent Error 1006 when user has two or more occurrences of ':' (colon) in your name
This happens because FreeSWITCH is not able to parse the "From" header when it has multiple occurrences of ':'. So user is not able to join audio. To fix, we now changed the "callerId" to use the base64 value of the user name, instead of directly using user's input (the callerId format keeps being a triple like this: <user_id>-bbbID-<base64_encoded_name>). Once this callerIdName is encoded at the same point it is generated, there shouldn't be server side effects for changing this value; except for those places where the callerName is retrieved by splitting this triple (such as the voice talking-indicator, as described below). Updated the talking-indicator to retrieve the username from User's object, instead of retrieving from the one username generated by splitting the callerId triple. This problem also happens in versions <= 2.2.26.
This commit is contained in:
parent
1b1a055d37
commit
0a601359bb
@ -145,10 +145,13 @@ class SIPSession {
|
|||||||
sessionToken,
|
sessionToken,
|
||||||
} = this.user;
|
} = this.user;
|
||||||
|
|
||||||
|
const encodedName =
|
||||||
|
btoa && name ? btoa(name) : name;
|
||||||
|
|
||||||
const callerIdName = [
|
const callerIdName = [
|
||||||
`${userId}_${getAudioSessionNumber()}`,
|
`${userId}_${getAudioSessionNumber()}`,
|
||||||
'bbbID',
|
'bbbID',
|
||||||
isListenOnly ? `LISTENONLY-${name}` : name,
|
isListenOnly ? `LISTENONLY-${encodedName}` : encodedName,
|
||||||
].join('-').replace(/"/g, "'");
|
].join('-').replace(/"/g, "'");
|
||||||
|
|
||||||
this.user.callerIdName = callerIdName;
|
this.user.callerIdName = callerIdName;
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { withTracker } from 'meteor/react-meteor-data';
|
import { withTracker } from 'meteor/react-meteor-data';
|
||||||
import VoiceUsers from '/imports/api/voice-users';
|
import VoiceUsers from '/imports/api/voice-users';
|
||||||
|
import Users from '/imports/api/users'
|
||||||
import Auth from '/imports/ui/services/auth';
|
import Auth from '/imports/ui/services/auth';
|
||||||
import { debounce } from 'lodash';
|
import { debounce } from 'lodash';
|
||||||
import TalkingIndicator from './component';
|
import TalkingIndicator from './component';
|
||||||
@ -36,12 +37,16 @@ export default withTracker(() => {
|
|||||||
callerName, talking, color, voiceUserId, muted, intId,
|
callerName, talking, color, voiceUserId, muted, intId,
|
||||||
} = usersTalking[i];
|
} = usersTalking[i];
|
||||||
|
|
||||||
|
const user = Users.findOne({ userId: voiceUserId });
|
||||||
|
|
||||||
|
const _name = user ? user.name : 'USER';
|
||||||
|
|
||||||
talkers[`${intId}`] = {
|
talkers[`${intId}`] = {
|
||||||
color,
|
color,
|
||||||
talking,
|
talking,
|
||||||
voiceUserId,
|
voiceUserId,
|
||||||
muted,
|
muted,
|
||||||
callerName,
|
callerName: _name,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user