We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 31cf972 commit 17b7503Copy full SHA for 17b7503
voice/make-outbound-call-ncco/index.php
@@ -0,0 +1,28 @@
1
+<?php
2
+require_once __DIR__ . '/../../config.php';
3
+require_once __DIR__ . '/../../vendor/autoload.php';
4
+
5
+$keypair = new \Nexmo\Client\Credentials\Keypair(
6
+ file_get_contents(NEXMO_APPLICATION_PRIVATE_KEY_PATH),
7
+ NEXMO_APPLICATION_ID
8
+);
9
+$client = new \Nexmo\Client($keypair);
10
11
+$call = $client->calls()->create([
12
+ 'to' => [[
13
+ 'type' => 'phone',
14
+ 'number' => TO_NUMBER
15
+ ]],
16
+ 'from' => [
17
18
+ 'number' => NEXMO_NUMBER
19
+ ],
20
+ 'ncco' => [
21
+ [
22
+ 'action' => 'talk',
23
+ 'text' => 'This is a text to speech call from Nexmo'
24
+ ]
25
26
+]);
27
28
+print_r($call);
0 commit comments