# Zp-make-call is not working

**URL:** <https://devforum.zoom.us/t/zp-make-call-is-not-working/105075>\
**Category:** Phone\
**Created:** [March 5, 2024, 2:25pm UTC](https://devforum.zoom.us/t/zp-make-call-is-not-working/105075 "2024-03-05T14:25:43Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![sue1](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/sue1/32/57234_2.png) [@sue1](https://devforum.zoom.us/u/sue1)\
**Post date:** [March 5, 2024, 2:25pm UTC](https://devforum.zoom.us/t/zp-make-call-is-not-working/105075/1 "2024-03-05T14:25:43Z")

</div>

**API Endpoint(s) and/or Zoom API Event(s)**

> **[Zoom Phone Smart Embed guide](https://developers.zoom.us/docs/zoom-phone/smart-embed-guide/#click-to-dial-from-a-third-party-app)**
>
> The Zoom Developer Platform is an open platform that allows third-party developers to build applications and integrations upon Zoom’s video-first unified communications platform.

**Description**  
I would like to click on a number, and instantly call the number that the user clicked.  
I used this tutorial to integrate the zoom phone with my app:

> **[Zoom Phone Smart Embed guide](https://developers.zoom.us/docs/zoom-phone/smart-embed-guide/)**
>
> The Zoom Developer Platform is an open platform that allows third-party developers to build applications and integrations upon Zoom’s video-first unified communications platform.

But when I call this event ‘zp-make-call’, the event is not being triggered, and even the number sended in the data, is not being dialed.  
What’s strange to me is that when starting the component and calling the 'zp-init-config 'event, the event is triggered by zoom, and the zoom embed is initiating the iframe.

**Error?**  
the call is not being initiated.

---

<div class="post-metadata">

**Author:** ![gianni.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/gianni.zoom/32/32523_2.png) [@gianni.zoom](https://devforum.zoom.us/u/gianni.zoom)\
**Post date:** [March 13, 2024, 2:40am UTC](https://devforum.zoom.us/t/zp-make-call-is-not-working/105075/2 "2024-03-13T02:40:04Z")

</div>

Hi @sue1 , can you please provide a short recording of this and link to your repo? You can send to the private message I start with you.

---

<div class="post-metadata">

**Author:** ![sue1](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/sue1/32/57234_2.png) [@sue1](https://devforum.zoom.us/u/sue1)\
**Post date:** [March 14, 2024, 6:46pm UTC](https://devforum.zoom.us/t/zp-make-call-is-not-working/105075/4 "2024-03-14T18:46:29Z")

</div>

Hello,  
Where I can send you this private message?  
I didn’t find your private message.

---

<div class="post-metadata">

**Author:** ![sue1](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/sue1/32/57234_2.png) [@sue1](https://devforum.zoom.us/u/sue1)\
**Post date:** [March 14, 2024, 8:26pm UTC](https://devforum.zoom.us/t/zp-make-call-is-not-working/105075/5 "2024-03-14T20:26:17Z")

</div>

@gianni.zoom Anyway, my code is simple

```auto
  private injectIframe(): void {
    const container = this.iframeContainer.nativeElement;
    const iframe = this.document.createElement('iframe') as HTMLIFrameElement;
    iframe.setAttribute('allow', 'clipboard-read; clipboard-write https://applications.zoom.us');
    iframe.setAttribute('src', 'https://applications.zoom.us/integration/phone/embeddablephone/home');
    iframe.setAttribute('height', '700');
    iframe.setAttribute('width', '350');
    iframe.addEventListener('load', () => this.callIframe(iframe, '77028245777'));
    container.appendChild(iframe);
  }

  callIframe(iframe: HTMLIFrameElement, number: string): void {
    iframe.contentWindow.postMessage(
      {
        type: 'zp-init-config',
        data: {
          enableSavingaLog: false,
          enableAutoLog: false,
          enableContactSearching: false,
          enableContactMatching: false
        }
      },
      this.window.location.origin
    );

    iframe.contentWindow.postMessage(
      {
        type: 'zp-make-call',
        data: {
          number: number
        }
      },
      this.window.location.origin
    );
  }

```

The iframe is being injected when I call injectIframe method, and when I dial a number and press call button, the call starts normally. but this event to make a call via code, is not working, for every number that I insert.

I tried to select the iframe element in dev tools and call this event like that:

```auto
$0.contentWindow.postMessage(
      {
        type: 'zp-make-call',
        data: {
          number: 7702585555
        }
      },
      this.window.location.origin
    );

```

However, the console returns ‘undefined’, and the call is not being performed."

---

<div class="post-metadata">

**Author:** ![gianni.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/gianni.zoom/32/32523_2.png) [@gianni.zoom](https://devforum.zoom.us/u/gianni.zoom)\
**Post date:** [March 19, 2024, 1:34am UTC](https://devforum.zoom.us/t/zp-make-call-is-not-working/105075/6 "2024-03-19T01:34:12Z")

</div>

Hi @sue1 ,

I just responded again in the private message thread so you can send your email address. I will open a support inquiry for you on your behalf. When you click on your icon pic you should see a message icon to access your private messages.

![Screenshot 2024-03-18 at 10.49.54 AM](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/3/c/3c53aec1c1deb4921e1ea9510a9ae956aea4af2c.png)

---

<div class="post-metadata">

**Author:** ![sue1](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/sue1/32/57234_2.png) [@sue1](https://devforum.zoom.us/u/sue1)\
**Post date:** [March 19, 2024, 9:58am UTC](https://devforum.zoom.us/t/zp-make-call-is-not-working/105075/7 "2024-03-19T09:58:47Z")

</div>

thank you! I will respond you

---

<div class="post-metadata">

**Author:** ![gianni.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/gianni.zoom/32/32523_2.png) [@gianni.zoom](https://devforum.zoom.us/u/gianni.zoom)\
**Post date:** [March 20, 2024, 2:49pm UTC](https://devforum.zoom.us/t/zp-make-call-is-not-working/105075/8 "2024-03-20T14:49:37Z")

</div>

@sue1 were you able to reproduce with the the sample code provided as opposed to your refactored code?

```auto
document.querySelector('iframe#zoom-embeddable-phone-iframe').contentWindow.postMessage({
    type: 'zp-init-config',
    data: {
      enableSavingLog: false,
      enableAutoLog: false,
      enableContactSearching: false,
      enableContactMatching: false,
      notePageConfiguration: <configurationJSON>
       // Optional. Build your note page with the fields listed in "Add notes" section
    }
}, 'https://applications.zoom.us');

```

```auto
document.querySelector('iframe#zoom-embeddable-phone-iframe').contentWindow.postMessage({
    type: 'zp-make-call',
    data: {
      number: <phone number>,
      callerId: <outgoing caller ID (optional)>,
      autoDial: <whether to initiate the call immediately or copy the number (optional and the default is true)> 
    }
}, 'https://applications.zoom.us');

```

---

<div class="post-metadata">

**Author:** ![sue1](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/sue1/32/57234_2.png) [@sue1](https://devforum.zoom.us/u/sue1)\
**Post date:** [March 20, 2024, 8:01pm UTC](https://devforum.zoom.us/t/zp-make-call-is-not-working/105075/9 "2024-03-20T20:01:12Z")

</div>

@gianni.zoom Yes, in addition to this application, I created a JS application, using the same code exactly as it is in the documentation, and in this video on YouTube which is also on the official ZOOM channel.  
[https://www.youtube.com/watch?v=Jiy6sX7VIRo.](https://www.youtube.com/watch?v=Jiy6sX7VIRo.)

However, the problem persists. The ZP-INIT-CONFIG event works and the Iframe is initialized correctly, and I can make calls successfully. However, ZP-MAKE-CALL does not work at all.  
As I said before, I even tried selecting the IFRAME in the dev-tools and simply hitting the event, but it still doesn’t work.

---

<div class="post-metadata">

**Author:** ![gianni.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/gianni.zoom/32/32523_2.png) [@gianni.zoom](https://devforum.zoom.us/u/gianni.zoom)\
**Post date:** [March 21, 2024, 5:32pm UTC](https://devforum.zoom.us/t/zp-make-call-is-not-working/105075/10 "2024-03-21T17:32:30Z")

</div>

Hi @sue1 ,

We are investigating and will follow up (ZSEE-123248). Thank you!

---

<div class="post-metadata">

**Author:** ![sue1](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/sue1/32/57234_2.png) [@sue1](https://devforum.zoom.us/u/sue1)\
**Post date:** [March 26, 2024, 1:15pm UTC](https://devforum.zoom.us/t/zp-make-call-is-not-working/105075/11 "2024-03-26T13:15:05Z")

</div>

@gianni.zoom How can I track this ticket?  
Do you have any idea when we will get an answer?

thanks!

---

<div class="post-metadata">

**Author:** ![gianni.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/gianni.zoom/32/32523_2.png) [@gianni.zoom](https://devforum.zoom.us/u/gianni.zoom)\
**Post date:** [March 27, 2024, 7:12pm UTC](https://devforum.zoom.us/t/zp-make-call-is-not-working/105075/12 "2024-03-27T19:12:34Z")

</div>

> [@gianni.zoom](#):
>
> 123248

Hi @sue1 ,

This is an internal reference number, but I just checked in with the team looking into this for an update. I’ll follow up as it becomes available.

---

<div class="post-metadata">

**Author:** ![gianni.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/gianni.zoom/32/32523_2.png) [@gianni.zoom](https://devforum.zoom.us/u/gianni.zoom)\
**Post date:** [March 28, 2024, 4:09pm UTC](https://devforum.zoom.us/t/zp-make-call-is-not-working/105075/13 "2024-03-28T16:09:16Z")

</div>

I was told to expect updates shortly. Appreciate your patience.

---

<div class="post-metadata">

**Author:** ![gianni.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/gianni.zoom/32/32523_2.png) [@gianni.zoom](https://devforum.zoom.us/u/gianni.zoom)\
**Post date:** [April 9, 2024, 5:40pm UTC](https://devforum.zoom.us/t/zp-make-call-is-not-working/105075/14 "2024-04-09T17:40:32Z")

</div>

@sue1

`https://applications.zoom.us` instead of `this.window.location.origin` in `callIframe` function.

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/8/6/8651d20712a3f0be34548d33e451070ef58f7147.png)

Please also try adding 1 or 2 seconds delay between `zp-init-config` and `zp-make-call` event otherwise you can get no available caller id error.

Here is working javascript `callIframe` function code from the smart embed team:

```auto
function callIframe(iframe, number) {
      // Send a message to the iframe window to initialize configuration
      iframe.contentWindow.postMessage(
        {
          type: 'zp-init-config',
          data: {
            enableSavingaLog: false,
            enableAutoLog: false,
            enableContactSearching: false,
            enableContactMatching: false
          }
        },
        'https://applications.zoom.us'
      );
    var delayInMilliseconds = 2000; //2 seconds
    setTimeout(function() {
        iframe.contentWindow.postMessage(
        {
          type: 'zp-make-call',
          data: {
            number: number
          }
        },
        'https://applications.zoom.us'
      );
    }, delayInMilliseconds);
      
    }

```
