Track client's webrtc call session
- We want to be able to correlate client webrtc calls with freeswitch logs. We add extra info on callerid which we strip out in akka-fsesl.
This commit is contained in:
parent
3cd21c6b28
commit
a29bbb250f
@ -51,6 +51,7 @@ public class ESLEventListener implements IEslEventListener {
|
||||
|
||||
private static final Pattern GLOBAL_AUDION_PATTERN = Pattern.compile("(GLOBAL_AUDIO)_(.*)$");
|
||||
private static final Pattern CALLERNAME_PATTERN = Pattern.compile("(.*)-bbbID-(.*)$");
|
||||
private static final Pattern CALLERNAME_WITH_SESS_INFO_PATTERN = Pattern.compile("^(.*)_(\\d+)-bbbID-(.*)$");
|
||||
|
||||
@Override
|
||||
public void conferenceEventJoin(String uniqueId, String confName, int confSize, EslEvent event) {
|
||||
@ -77,7 +78,11 @@ public class ESLEventListener implements IEslEventListener {
|
||||
conferenceEventListener.handleConferenceEvent(dsStart);
|
||||
} else {
|
||||
Matcher matcher = CALLERNAME_PATTERN.matcher(callerIdName);
|
||||
if (matcher.matches()) {
|
||||
Matcher callWithSess = CALLERNAME_WITH_SESS_INFO_PATTERN.matcher(callerIdName);
|
||||
if (callWithSess.matches()) {
|
||||
voiceUserId = callWithSess.group(1).trim();
|
||||
callerIdName = callWithSess.group(3).trim();
|
||||
} else if (matcher.matches()) {
|
||||
voiceUserId = matcher.group(1).trim();
|
||||
callerIdName = matcher.group(2).trim();
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user