Company
Date Published
Author
Michael Heap
Word count
1641
Language
English
Hacker News points
None

Summary

This tutorial demonstrates how to play a pre-recorded audio file into an incoming call using the Vonage Voice API, specifically utilizing the stream action in an NCCO (Nexmo Control Object) and the REST API for updates. The application is built using PHP and the Slim framework, with ngrok used to expose it to the internet. The tutorial covers creating a Vonage application, purchasing a virtual phone number, setting up the answer URL and event URL, and integrating the application with the Vonage API to handle incoming calls, play audio files, and update callers on their position in the queue. The final step involves taking the caller off hold and connecting them to an agent, although this is left as an exercise for the reader.