+ Start a Discussion
Karol Zaorski 15Karol Zaorski 15 

Uncaught Failed to initialize Open CTI. Ensure that it is loaded from the right frame with correct URL parameters

Hi,

I'm trying to create a Softphone on VisualForce and add it to Lightning app in utility bar.

However, when I add open cti script I recieve error as in the subject:
Uncaught Failed to initialize Open CTI. Ensure that it is loaded from the right frame with correct URL parameters

Page code
<apex:page showHeader="true" sidebar="true">
    <apex:includeScript value="/support/api/40.0/lightning/opencti_min.js"/>
</apex:page>

Anyone else had similar problems?

Regards,
Karol
Orhan YılmazOrhan Yılmaz
Hi,

Is solved this problem? I have a same problem. Can you help me?

Best regards,
Orhan
 
Karol Zaorski 15Karol Zaorski 15
Hi,

yes, you need to add sfdcIframeOrigin={lightning page origin} parameter to the URL of the VisualForce page.
Lighting page origin is the host of you lightning page e.g. https://your-domain-dev-ed.lightning.force.com.

Regards,
Karol
Orhan YılmazOrhan Yılmaz
Hi,

Thans you so much.

Regards,
Orhan
Braxtel TestBraxtel Test
Hi,

In the initialize function of the opencti.js, the sfdcIframeOrigin and mode parameters are missing and as a result initialization fails.

Are those parameters supposed to be added in "CTI Adapter URL" like /apex/TestClient?sfdcIframeOrigin=.....&mode= " in Call Center Definition file and if so what values do we expect?


Thanks
Stelios
Nirmallya_GhoshNirmallya_Ghosh

Hi Team, 

Can you please tell me where i need to add the below - 
sfdcIframeOrigin="{lightning page origin}" 

do i need to make any changes in VF or any Call center definition File ? Post an example please. 

Regards

Nirmallya

Anjali G 5Anjali G 5
Hi Karol
Can you please paste that url here? how you added sfdcIframeOrigin.
I am also getting same error. Please help
 
Lewis Graham 8Lewis Graham 8
Hi All,

it seems that lightning sends a few additional parameters in the URL:

Classic sends:
nonce
sfdcIFrameOrigin
isdtp


Lightning sends:
nonce
sfdcIframeOrigin
ltn_app_id
isdtp
mode


Note the case change in sfdcIframeOrigin.

Simply including them all in the URL if you for example redirect or navigate to another page worked for me.

Yours

Lewis
Amjad Khan 67Amjad Khan 67
Hi All,

Could you please let me know how I can suppress the additional parameter which are being send from lightning. My Apps does not accept the additional parametwers as part of Url because or Url validation.How I can disabled it from salesforce. do we have any property available to disable it the following parameters?
Lightning sends:
nonce
sfdcIframeOrigin
ltn_app_id
isdtp
mode

Thanks,
Amjad