public ChromeOptions chromeProfile()
{
Path path = FileSystems.getDefault().getPath(FileLocator.BROWSER_DOWNLOAD_DIR.getLocation());
logger.info("Setting browser download path to "+path.toAbsolutePath().toString());
HashMap<String, Object> chromePreferences = new HashMap<String, Object>();
chromePreferences.put("profile.default_content_settings.popups", 0);
chromePreferences.put("download.prompt_for_download", false);
chromePreferences.put("download.default_directory", path.toAbsolutePath().toString());
if(enableMicrophone)
ChromeOptions options = new ChromeOptions();
if(installExtension)
options.addExtensions(new File(FileLocator.CHROME_EXTENSION_PATH.getLocation().replace("$STACK",chromeExtensionStack)));
if(mobileEmulationDevice != null && !mobileEmulationDevice.isEmpty())
{
Map<String, String> mobileEmulation = new HashMap<String, String>();
mobileEmulation.put("deviceName", mobileEmulationDevice);
options.setExperimentalOption("mobileEmulation", mobileEmulation);
}
options.setExperimentalOption("prefs", chromePreferences);
if(enableMicrophone)
{
options.addArguments("use-fake-ui-for-media-stream");
options.addArguments("use-fake-device-for-media-stream");
options.addArguments("allow-file-access-from-files");
Path audioFilePath = FileSystems.getDefault().getPath(FileLocator.SAMPLE_AUDIO_FILES_DIR.getLocation()+TestContext.TEST_PROPERTIES.get("audioFileName"));
logger.info("Setting browser download path to "+audioFilePath.toAbsolutePath().toString());
options.addArguments("use-file-for-fake-audio-capture="+audioFilePath.toAbsolutePath().toString());
}
return options;
}
Here is the pluging logs when trying to connect to incoming call:
a=candidate:
2488699228 1 udp 2113939711 XXX.local 59493 typ host generation 0 network-cost 999
a=ice-ufrag:t+ao
a=ice-pwd:XXX
a=ice-options:trickle
a=fingerprint:XXX
a=setup:actpass
a=mid:0
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid
a=extmap:5 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id
a=extmap:6 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id
a=sendrecv
a=msid:XXXX
a=rtcp-mux
a=rtpmap:111 opus/48000/2
a=rtcp-fb:111 transport-cc
a=fmtp:111 minptime=10;useinbandfec=1; stereo=1; sprop-stereo=1
a=rtpmap:103 ISAC/16000
a=rtpmap:104 ISAC/32000
a=rtpmap:9 G722/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:106 CN/32000
a=rtpmap:105 CN/16000
a=rtpmap:13 CN/8000
a=rtpmap:110 telephone-event/48000
a=rtpmap:112 telephone-event/32000
a=rtpmap:113 telephone-event/16000
a=rtpmap:126 telephone-event/8000
a=ssrc:1095883829 cname:XXX
a=ssrc:1095883829 msid:XXX
a=ssrc:1095883829 mslabel:XXX
a=ssrc:1095883829 label:XXX
console.js:35 Dialog 17f579f6-edc7-ec8a-94ec-27a165bd3674: state change from new to requesting
console.js:35 WebPhoneVerto: dialog state changed from new to requesting - 17f579f6-edc7-ec8a-94ec-27a165bd3674
console.js:35 Dialog 17f579f6-edc7-ec8a-94ec-27a165bd3674: state change from requesting to trying
console.js:35 WebPhoneVerto: dialog state changed from requesting to trying - 17f579f6-edc7-ec8a-94ec-27a165bd3674
console.js:35 Dialog 17f579f6-edc7-ec8a-94ec-27a165bd3674: state change from trying to hangup
console.js:35 WebPhoneVerto: dialog state changed from trying to hangup - 17f579f6-edc7-ec8a-94ec-27a165bd3674
console.js:35 WebPhoneVerto: call ended with cause: INCOMPATIBLE_DESTINATION
console.js:35 Dialog 17f579f6-edc7-ec8a-94ec-27a165bd3674: state change from hangup to destroy
console.js:35 WebPhoneVerto: dialog state changed from hangup to destroy - 17f579f6-edc7-ec8a-94ec-27a165bd3674