sendCTIMessage() is working flawlessly in Classic and VF page.

From below below code snippet sendCTIMessage('/CLICK_TO_DIAL?DN=XXXXXXXXXX'); is talking to my Twilio Flex configuration set in Call Center set up and making a call to XXXXXXXXXX as expected in classic.

 <apex:page standardController="Lead">

     <script type="text/javascript">
        function makeACall(){
         console.log('sendCTIMessage: '+sendCTIMessage);
    <input type="button" name="call" value="call" onClick="makeACall();"/>

But when I use this in Lighting it says sendCTIMessage is undefined in console inspect.

My requirement is: Will have a quick Action button on the lightning lead/contact page. When the user clicks the button it will make a server call to get other Lead/Contact details along with the Phone Number and make a call to that number then navigates to that Lead/Contact. We are using Twilio Flex as a vendor.

Anyone has any idea how to make sendCTIMessage() works in Lightning experience or is there any other way I can make outbound calls in lightning.

Thank you! Charan

  • Have you tried if any method from Open CTI Developer Guide: Methods for Lightning Experience work? Feb 17 '20 at 14:35
  • @PrzemysławTamoń Yeah. But all those methods are to perform some actions when the user clicks on some Phone number. Basically to play around DOM or UI etc. But I wanted to implement something like sendCTIMessage('/CLICK_TO_DIAL?DN) in lightning with some params so that salesforce will look around call center settings and talk to URL which is mentioned in call center settings. So I would like to have lightning:clickToDial / lightning-click-to-dial behind the scene functionality in my Lighting component.
    – Charan
    Feb 18 '20 at 0:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.