JavaScript

Create a NCCO

A Nexmo Call Control Object (NCCO) is a JSON array that you use to control the flow of a Voice API call. More information on NCCO can be found here.

The NCCO must be public and accessible by the internet. To accomplish that, you will be using GitHub Gist that provides a convenient way to host the configuration:

1) Make sure you are logged into GitHub and then go to https://gist.github.com/.

2) Enter ncco.json into "Filename including extension".

3) Copy and paste the following JSON object into the gist:

[
    {
        "action": "talk",
        "text": "Please wait while we connect you."
    },
    {
        "action": "connect",
        "endpoint": [
            {
                "type": "phone",
                "number": "PHONE_NUMBER"
            }
        ]
    }
]

4) Replace PHONE_NUMBER with your phone number. Nexmo numbers are in E.164 format, '+' and '-' are not valid. Make sure you specify your country code when entering your number, for example, US: 14155550100 and UK: 447700900001.

5) Click the Create secret gist button:

#{alt_text}

6) Click the Raw button:

#{alt_text}

7) Take note of the URL shown in your browser, you will be using it in the next step.