Download - The Nexmo Voice API - AAT 2016
How to Voice-Enable Your App with Nexmo Voice API
Roland Selmer, Product Lead
Phil Leggetter, Head of Developer Relations
About Nexmo
Reinventing communicationNexmo’s Cloud Communications Platform enables you to develop faster and easier than ever before.
Our PlatformA set of cloud-based communication APIs designed to remove the pain of integrating with multiple carriers – and take you global in the blink of an eye.
7 BillionPhones reached globally
130,000Developers
5 BillionAPI calls annually
99.997%Platform uptime
1235+Networks connected
2Copyright © Nexmo, a Vonage Company. All rights reserved. Confidential – Do not distribute without permission.
Nexmo’s Cloud Communication Platform
Messaging APIHigh deliverability &low latency globally
Verify API & SDKTurnkey solutionfor phone verification
IoT API (alpha)Next generation solutions for connecting IOT devices and M2M
Voice APIText-to-Speech, VoiceXML and SIP
Number Insight APIKnow your customers,communicate with context
Phone Number APILargest global reach, instant provisioning for SMS & Voice
Chat App APIAccess to all chat appswith one API
3Copyright © Nexmo, a Vonage Company. All rights reserved. Confidential – Do not distribute without permission.
Leaders have chosen Nexmo in key verticals
Chat Apps Transport Social Communication FinanceTravel
4Copyright © Nexmo, a Vonage Company. All rights reserved. Confidential – Do not distribute without permission.
VoiceCall From The Cloud
What is a voice API & why?
Copyright © Nexmo, a Vonage Company. All rights reserved. Confidential – Do not distribute without permission. 66
An API used to make, receive and control a telephone call through a REST interface
Voice is still the most natural interface across varying form factors
7.22 billion mobile phones in a world of 7.19 billion people
▪ Disruptive: Build a contact centre in software $10k Vs $10m
▪ Agile: Compete with Telcos and create things they can’t e.g AI, IOT etc.
▪ Use cases: Unlock new use cases with advanced features like split call recording for transcription, sentiment analysis etc.
▪ Zero Install: No proprietary software to install, upgrade or maintain
Benefits of Voice in the Cloud
7Copyright © Nexmo, a Vonage Company. All rights reserved. Confidential – Do not distribute without permission.
Faster Time to Market & Simplicity High Quality Global Reach Easy to scale/lower TCO
Voice Features
Built for the modern webWith our powerful Voice API you can build
apps that scale easily with the web technologies that you are already using.
Copyright © Nexmo, a Vonage Company. All rights reserved. Confidential – Do not distribute without permission.
Build high-quality voice applications in the cloud
88
Low Latency, High-Quality VoiceLatency can make or break voice
services. So we use only the highest quality routes and tier 1 carriers with
most major codecs supported.
More Numbers in More CountriesWe have more SMS, Voice and Toll-Free numbers in more destinations than any
other provider – and that includes traditionally difficult to access countries.
Buy vs Build Vs API
Copyright © Nexmo, a Vonage Company. All rights reserved. Confidential – Do not distribute without permission.
Buy: H/W & S/W▪ Quick solution to a business problem ▪ No technical skills required▪ Expensive legacy per seat pricing▪ Can also be inflexible
Build: DIY▪ Maximum flexibility: custom solution
per use case▪ Very expensive and difficult to scale▪ Specialised skills required to maintain
complicated software
Build: API▪ Every digital business is an API run
business▪ Flexibility: custom solution per use case▪ Elastic: Scale on demand▪ Pay as you go model
9
Feature Overview: Voice API
Call ControlCall transfer, hold and playback audio to a live call
ConferencingSimple and moderated conferences, muting, earmuffing, notifications
Call RecordingRecord inbound and live calls, store recordings
Phone NumbersLargest global reach, instant provisioning
Only pay for what you use with “per second” billing
Text-to-SpeechSend text-to-speech messages, prompt for response
Inbound Call ProcessingNexmo Call Control Object manages inbound calls using developer-friendly JSON
SIP TrunkingBasic SIP trunk for PBX type application
Programmability Nexmo Call Control Object manages Inbound calls using developer-friendly JSON
Copyright © Nexmo, a Vonage Company. All rights reserved. Confidential – Do not distribute without permission. 1010
VoiceUse Cases
Use Case: Proxy
Value - Enables buyers and sellers to connect anonymously
▪ Improved privacy
▪ Keep transactions on platform and prevents revenue leakage
▪ Enables transaction audit for customer service
Copyright © Nexmo, a Vonage Company. All rights reserved. Confidential – Do not distribute without permission.
Guest HostMasked communication via
virtual numbers
Nexmo Voice API
1313
Use Case: Call Tracking
Value - Setup call system for dentists and patients
▪ Call tracking can be used to track communication with assigned numbers
▪ Can be used for various phone-based processes
▪ Data-driven: Track response rates and analytics
Copyright © Nexmo, a Vonage Company. All rights reserved. Confidential – Do not distribute without permission.
Inquiries
1414
Nexmo Voice API
Use Cases: Contact Center
Customer
15
How it works - Building a contextual, automated customer experience
CallbackEnables customer to enter their number to receive a local callback
DistributedRemote agents, remote offices on one system
MeasurableTrack response rates, call duration, ROI
Cloud IVRContextual and simple, to optimize customer experience
RecordingEnable instant call recording
Integrated with CRMAdd Voice support to your CRM for outbound sales
ContextualConnects customers to the right people with the right data
100% CloudNo hardware required, easy to setup and adapt
Copyright © Nexmo, a Vonage Company. All rights reserved. Confidential – Do not distribute without permission.
Nexmo Voice API
VoiceThe Basics: How a Voice API Works
Caller A
Answer URL Event URL
Calls & Conversations
Copyright © Nexmo, a Vonage Company. All rights reserved. Confidential – Do not distribute without permission.
Conversation
CCaller B
17
How it Works: Inbound
Copyright © Nexmo, a Vonage Company. All rights reserved. Confidential – Do not distribute without permission.
Inbound call is made to a Nexmo LVN
Long virtual number
1
2
1818
Answer URL
Event URL
Nexmo Platform
Customer Server
[LVN]
The Nexmo platform requests an NCCO (Nexmo Call Control Object) from the Answer URL on the application server to execute some instructions
e.g. play a file, play TTS, collect DTMF for an IVR etc.
3 Call events are sent to the Event URL
How it Works: Outbound
Copyright © Nexmo, a Vonage Company. All rights reserved. Confidential – Do not distribute without permission.
Nexmo Platform
1
Customer Server
2
End user
3
1919
Call events such as (‘started’, ‘ringing’, answered, ’busy’, ‘failed’, ‘timeout’, ‘cancelled’, ‘machine’, ‘completed’ ) are sent to the Event URL
Initial HTTP request made by customer’s server to the Nexmo platform & applicable HTTP response is received
1. HTTP API
3. Answer URL
4. Event URL
2. Outbound Call
Nexmo platform initiates outbound call to number specified in the HTTP request
Once call is answered, the Nexmo platform requests NCCO from the Answer URL to execute instructions e.g. play a file, play TTS, collect DTMF for an IVR etc.
4
▪ Introduced to support more complicated use cases
▪ Applications are a container that allow developers to store use case specific settings
▪ Applications also generate and hold authentication information, used to generate tokens that authorise the use of the API
▪ Applications are created through an API call or through the Nexmo Command Line Interface (CLI) tool
> Developer implication: Customer use cases become more modular, more manageable
Nexmo Applications
Copyright © Nexmo, a Vonage Company. All rights reserved. Confidential – Do not distribute without permission. 20
▪ We are moving to a token based authentication method
▪ JSON Web Tokens are an open, industry standard (RFC 7519) method for authenticating API’s
▪ Private Key generated from Application used to sign JWT
▪ Slight increase in complexity as developers will mint their own tokens
> Developer implication: Important for customers requiring more security e.g Fintech verticals
Authentication: JSON Web Tokens
Copyright © Nexmo, a Vonage Company. All rights reserved. Confidential – Do not distribute without permission. 21
Beginning of stack [ { "action": "conversation", "name": "nexmo-company-call" }]
ActionOptions
> Developer implication: Easier to build complex use cases
Nexmo Call Control Object
Copyright © Nexmo, a Vonage Company. All rights reserved. Confidential – Do not distribute without permission. 22
Connect - Used to to connect an inbound call to another numberE.g. use case: Voice proxy for call
Transfer - Used to move a call leg from one conversation to another E.g. use case: Call transfer for contact centre
Talk - Used to generate TTSE.g Use case: Voice broadcast, critical voice alert, 2FA
Stream - Used to stream a file to a call leg or conversationE.g. use case: Play music on hold for contact centre; voice files for 2FA
Record - Used to record a either a call leg or a conversationE.g. use case: Recorded voice proxy; recorded contact centre
NCCO Actions: Building Blocks
Copyright © Nexmo, a Vonage Company. All rights reserved. Confidential – Do not distribute without permission. 23
▪ Input - Collects DTMF digits that have been pressed by a caller E.g. use case: Collect input to navigate an IVR; Get confirmation from a TTS call
▪ Conversation - Used to create a conference callEg. use case: a conference call with two or more participants; warm transfer in a call centre
▪ Delay - Pauses the execution of the NCCO call stackE.g. use case: Time to complete a network action like real time translation
▪ Reject - Rejects an incoming call without answering itE.g. use case: Hosted voicemail
NCCO Actions: Building Blocks
Copyright © Nexmo, a Vonage Company. All rights reserved. Confidential – Do not distribute without permission. 24
How to Build a Voice Application
Copyright © Nexmo, a Vonage Company. All rights reserved. Confidential – Do not distribute without permission. 25
Create a Voice App
1
Retrieve Keys
Perform REST request to Nexmo API
Assign LVN to Application
(for inbound)
2
3
4 5 Use JWT to authenticate REST calls to the voice API
Use private key to mint new JWT
Retrieve application ID & public/private key pairs
Create an application, setting answer & event URL’s
For inbound calls, configure an LVN to point to to the new application
Mint a JSON Web Token