It’s easy to play a file in Voice Elements.
When you get a new call event, you are given a reference to the Channel Resource that the call came in on. By default, the Channel Resource is routed to a Voice Resource.
The Channel Resource contains methods for answering the line, disconnecting from a line, and getting information about the call.
While the Voice Resource contains most of the functionality that you will need to be able to give information to and receive information from a user.
To play a file, you call the Play function and can pass in any file reference (both relative and absolute references work!)
Alternatively, a relative reference if you are running from the “Test” directory will work as well: