Ruby
Initialize Vonage Client
After the require statements at the top of the server.rb file, initialize a new Vonage Ruby client using the credentials you provided in the .env file created earlier:
client = Vonage::Client.new(
api_key: ENV['VONAGE_API_KEY'],
api_secret: ENV['VONAGE_API_SECRET'],
application_id: ENV['VONAGE_APPLICATION_ID'],
private_key: File.read(ENV['VONAGE_APPLICATION_PRIVATE_KEY_PATH'])
)
Play Audio into a Call with Ruby
A tutorial showing you how to build an app that will play audio into a PSTN call
Steps
1
Introduction to this tutorial2
Prerequisites3
Create the Project Folder and Files4
Install Vonage Ruby5
Require Dependencies6
Initialize Vonage Client7
Add Environment Variables8
Define Constant Variables9
Create Routes10
Run the Ruby App11
What's Next?