Comments (11)
Hi sromoki@,
Amazon Connect streams uses a SharedWorker behind the scenes to coordinate leader election for various different sets of activities, such as which frame/tab is responsible for ringtones and softphone connection management. Normally, a CCP embedded in an iframe (via initCCP( )
) is not eligible to participate in this leader election for softphone connection management. With "allowFramedSoftphone", the CCP in the iframe is allowed to participate in leader election in this way.
The reason that this limitation exists is to prevent navigation on the parent page from dropping the softphone call, since it must be attached to an open tab/frame. Some situations where using "allowedFrameSoftphone" makes sense include:
- Single page apps that the user will keep open for their entire usage session.
- CRM systems with PJAX style navigation that can support reloading page content without reloading the CCP iframe.
To address the signin issues above: The signin page is not allowed to be hosted in an iframe, this is why the CCP will launch a popup window with the login page if calling initCCP( )
yields an empty iframe. Make sure you allow popups from your Amazon Connect instance domain to keep this popup from being suppressed.
Thanks!
Lain
from amazon-connect-streams.
Observing same thing - after closing popup window - call is not answered in the iframe.
from amazon-connect-streams.
@HandyG52 Yea, that was it. I whitelisted my URL and everything works as expected now. Thanks!
from amazon-connect-streams.
Per my experience -
set softphone.allowFramedSoftphone: true during init.
also make sure there is no exception logged in console
from amazon-connect-streams.
I'm confused by what allowFramedSoftphone is supposed to allow.
allowFramedSoftphone: Normally, the softphone microphone and speaker components are not allowed to be hosted in an iframe. This is because the softphone must be hosted in a single window or tab. The window hosting the softphone session must not be closed during the course of a softphone call or the call will be disconnected. If allowFramedSoftphone is true, the softphone components will be allowed to be hosted in this window or tab.
I'm trying to load the CCP inside an iFrame in my application, so essentially it's an iFrame in an iFrame. I'm not able to login or access my microphone if I use this approach. If I open the application in a separate tab everything works fine.
from amazon-connect-streams.
@supelee OK thanks, I will use the login popup for now. The original issue I described remains though. I'm not able to accept a call unless I have "https://lily.us-east-1.amazonaws.com/connect/ccp#/" open in a separate tab.
from amazon-connect-streams.
I configure the ccpApp using:
global.connect.core.initCCP(e, {
ccpUrl: "https://lily.us-east-1.amazonaws.com/connect/ccp#/", /*REQUIRED*/
loginPopup: true, /*optional, default TRUE*/
softphone: { /*optional*/
allowFramedSoftphone: true,
disableRingtone: true /*optional*/
}
});
I downloaded the log for when the call is repeatedly not able to connect.
from amazon-connect-streams.
sromocki@:
From the logs you attached, I think this is your culprit:
{
"component": "softphone",
"level": "ERROR",
"text": " Softphone error occurred : microphone_not_shared Your microphone is not enabled in your browser. ",
"time": "2017-08-03T20:25:54.608Z",
"exception": null,
"objects": [],
"line": 2
}
This error indicates that the getUserMedia( )
call failed as there is no microphone available to the browser. This will prevent softphone from initializing and you won't be able to make or receive calls using softphone until this is remedied.
from amazon-connect-streams.
Hmm, I've added https://lily.us-east-1.amazonaws.com:443 to be allowed for microphone access in Chrome. It only prompts me for access to the microphone outside of the iframe. I allow it, but the app inside the iframe still does not have access. I don't believe Chrome supports adding specific domain names to an exception list for microphone access so I'm a bit stuck. @pukhrajbal Do you see the microphone access notification for the app inside the iframe?
from amazon-connect-streams.
@supelee I found out why my microphone was being blocked. It's because I'm using HTTP and a domain name other than just localhost for testing locally and getUserMedia only works with HTTPS. I'm able to gives Chrome some command line args to workaround it:
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --user-data-dir=/tmp/chrome-tmp --unsafely-treat-insecure-origin-as-secure="http://myhost-localhost:3000"
However, now I'm seeing a different error related to running the app in an iframe:
Refused to display 'https://lily.us-east-1.amazonaws.com/connect/ccp#/' in a frame because it set 'X-Frame-Options' to 'sameorigin'.
Currently researching how to get around this.
from amazon-connect-streams.
from amazon-connect-streams.
Related Issues (20)
- [Question] CCP for device settings HOT 1
- [Errors] When a supervisor is monitoring a call with multi party enabled, if an agent tries to swap or transfer to a quick connect, it fails HOT 4
- contact.onRejected is not available HOT 1
- Feature Request: use setEchoLevel and setLogLevel at the top level to change CCP logs HOT 2
- Agent mute button is stuck and wrongly showing unmute agent when agent is in a conference and silently monitored by a supervisor HOT 3
- Request to add Contact.getChannelContext to index.d.ts HOT 1
- WebRTC - Failing to join video session - AudioJoinedFromAnotherDevice HOT 2
- OnRefresh is invoked after a contact has ended showing both the initial and third party connections as active HOT 6
- ccp cannot initialized when disabled the third party cookie
- Unable to Login with amazon connect Streams (Periority High) HOT 4
- Pop-up warning message when an agent ON CALL attempts to logout HOT 3
- how to send and receive email in Amazon connect HOT 1
- Amazon connect Task flow stopped working HOT 1
- amazon instance integrate with SAML popup window can not close HOT 1
- connect.BaseConnection.getEndpoint() does not provide proper details of endpoint HOT 1
- onEnded no disconnectReason provided HOT 1
- Initialization Failed
- Auto Login & Login pop screen freezes with Amazon connect streams
- Listen in on conversations between agent and customer HOT 2
- [High Sev] Breaking Issue with Streams v2.14.2 and initApp() HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from amazon-connect-streams.